• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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
err(String format)25     public LogMessage err(String format) {
26         return sDummyLogMessage;
27     }
28 
29     @Override
warn(String format)30     public LogMessage warn(String format) {
31         return sDummyLogMessage;
32     }
33 
34     @Override
info(String format)35     public LogMessage info(String format) {
36         return sDummyLogMessage;
37     }
38 
39     @Override
trace(String format)40     public LogMessage trace(String format) {
41         return sDummyLogMessage;
42     }
43 
44     @Override
trace(String format, int numFramesToIgnore)45     public LogMessage trace(String format, int numFramesToIgnore) {
46         return sDummyLogMessage;
47     }
48 
49     @Override
dump(String format)50     public LogMessage dump(String format) {
51         return sDummyLogMessage;
52     }
53 
54     @Override
eC(String msg)55     public void eC(String msg) {
56         // Do nothing.
57     }
58 
59     @Override
wC(String msg)60     public void wC(String msg) {
61         // Do nothing.
62     }
63 
64     @Override
iC(String msg)65     public void iC(String msg) {
66         // Do nothing.
67     }
68 
69     @Override
tC(String msg)70     public void tC(String msg) {
71         // Do nothing.
72     }
73 
74     // Legacy methods.
75     @Override
e(String msg)76     public void e(String msg) {
77         // Do nothing.
78     }
79 
80     @Override
w(String msg)81     public void w(String msg) {
82         // Do nothing.
83     }
84 
85     @Override
i(String msg)86     public void i(String msg) {
87         // Do nothing.
88     }
89 
90     @Override
d(String msg)91     public void d(String msg) {
92         // Do nothing.
93     }
94 
95     @Override
v(String msg)96     public void v(String msg) {
97         // Do nothing.
98     }
99 }
100