Home | History | Annotate | Download | only in wifi
      1 /*
      2  * Copyright (C) 2016 The Android Open Source Project
      3  *
      4  * Licensed under the Apache License, Version 2.0 (the "License");
      5  * you may not use this file except in compliance with the License.
      6  * You may obtain a copy of the License at
      7  *
      8  *      http://www.apache.org/licenses/LICENSE-2.0
      9  *
     10  * Unless required by applicable law or agreed to in writing, software
     11  * distributed under the License is distributed on an "AS IS" BASIS,
     12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     13  * See the License for the specific language governing permissions and
     14  * limitations under the License.
     15  */
     16 
     17 package com.android.server.wifi;
     18 
     19 /** WifiLog implementation that does nothing. */
     20 public class FakeWifiLog implements WifiLog {
     21     private static final DummyLogMessage sDummyLogMessage = new DummyLogMessage();
     22 
     23     // New-style methods.
     24     @Override
     25     public LogMessage err(String format) {
     26         return sDummyLogMessage;
     27     }
     28 
     29     @Override
     30     public LogMessage warn(String format) {
     31         return sDummyLogMessage;
     32     }
     33 
     34     @Override
     35     public LogMessage info(String format) {
     36         return sDummyLogMessage;
     37     }
     38 
     39     @Override
     40     public LogMessage trace(String format) {
     41         return sDummyLogMessage;
     42     }
     43 
     44     @Override
     45     public LogMessage dump(String format) {
     46         return sDummyLogMessage;
     47     }
     48 
     49     @Override
     50     public void eC(String msg) {
     51         // Do nothing.
     52     }
     53 
     54     @Override
     55     public void wC(String msg) {
     56         // Do nothing.
     57     }
     58 
     59     @Override
     60     public void iC(String msg) {
     61         // Do nothing.
     62     }
     63 
     64     @Override
     65     public void tC(String msg) {
     66         // Do nothing.
     67     }
     68 
     69     // Legacy methods.
     70     @Override
     71     public void e(String msg) {
     72         // Do nothing.
     73     }
     74 
     75     @Override
     76     public void w(String msg) {
     77         // Do nothing.
     78     }
     79 
     80     @Override
     81     public void i(String msg) {
     82         // Do nothing.
     83     }
     84 
     85     @Override
     86     public void d(String msg) {
     87         // Do nothing.
     88     }
     89 
     90     @Override
     91     public void v(String msg) {
     92         // Do nothing.
     93     }
     94 }
     95