1 /*
2  * Copyright (C) 2011 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.net;
18 
19 import android.annotation.UnsupportedAppUsage;
20 import android.net.INetworkManagementEventObserver;
21 import android.net.LinkAddress;
22 import android.net.RouteInfo;
23 
24 /**
25  * Base {@link INetworkManagementEventObserver} that provides no-op
26  * implementations which can be overridden.
27  *
28  * @hide
29  */
30 public class BaseNetworkObserver extends INetworkManagementEventObserver.Stub {
31     @Override
interfaceStatusChanged(String iface, boolean up)32     public void interfaceStatusChanged(String iface, boolean up) {
33         // default no-op
34     }
35 
36     @Override
interfaceRemoved(String iface)37     public void interfaceRemoved(String iface) {
38         // default no-op
39     }
40 
41     @Override
addressUpdated(String iface, LinkAddress address)42     public void addressUpdated(String iface, LinkAddress address) {
43         // default no-op
44     }
45 
46     @Override
addressRemoved(String iface, LinkAddress address)47     public void addressRemoved(String iface, LinkAddress address) {
48         // default no-op
49     }
50 
51     @Override
interfaceLinkStateChanged(String iface, boolean up)52     public void interfaceLinkStateChanged(String iface, boolean up) {
53         // default no-op
54     }
55 
56     @Override
interfaceAdded(String iface)57     public void interfaceAdded(String iface) {
58         // default no-op
59     }
60 
61     @Override
interfaceClassDataActivityChanged(String label, boolean active, long tsNanos)62     public void interfaceClassDataActivityChanged(String label, boolean active, long tsNanos) {
63         // default no-op
64     }
65 
66     @Override
limitReached(String limitName, String iface)67     public void limitReached(String limitName, String iface) {
68         // default no-op
69     }
70 
71     @Override
interfaceDnsServerInfo(String iface, long lifetime, String[] servers)72     public void interfaceDnsServerInfo(String iface, long lifetime, String[] servers) {
73         // default no-op
74     }
75 
76     @Override
routeUpdated(RouteInfo route)77     public void routeUpdated(RouteInfo route) {
78         // default no-op
79     }
80 
81     @Override
routeRemoved(RouteInfo route)82     public void routeRemoved(RouteInfo route) {
83         // default no-op
84     }
85 }
86