BaseNetworkObserver.java revision 5ad421a3d00c92c155d57af9d1a05d81cc2fa88f
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
17package com.android.server.net;
18
19import android.net.INetworkManagementEventObserver;
20import android.net.LinkAddress;
21
22/**
23 * Base {@link INetworkManagementEventObserver} that provides no-op
24 * implementations which can be overridden.
25 *
26 * @hide
27 */
28public class BaseNetworkObserver extends INetworkManagementEventObserver.Stub {
29    @Override
30    public void interfaceStatusChanged(String iface, boolean up) {
31        // default no-op
32    }
33
34    @Override
35    public void interfaceRemoved(String iface) {
36        // default no-op
37    }
38
39    @Override
40    public void addressUpdated(LinkAddress address, String iface, int flags, int scope) {
41        // default no-op
42    }
43
44    @Override
45    public void addressRemoved(LinkAddress address, String iface, int flags, int scope) {
46        // default no-op
47    }
48
49    @Override
50    public void interfaceLinkStateChanged(String iface, boolean up) {
51        // default no-op
52    }
53
54    @Override
55    public void interfaceAdded(String iface) {
56        // default no-op
57    }
58
59    @Override
60    public void interfaceClassDataActivityChanged(String label, boolean active) {
61        // default no-op
62    }
63
64    @Override
65    public void limitReached(String limitName, String iface) {
66        // default no-op
67    }
68
69    @Override
70    public void interfaceDnsServerInfo(String iface, long lifetime, String[] servers) {
71        // default no-op
72    }
73}
74