diff options
author | Lorenzo Colitti <lorenzo@google.com> | 2013-08-21 17:20:39 +0000 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2013-08-21 17:20:40 +0000 |
commit | 10fa8c0626dbc0a875fe2543bf3c14d617dee9fb (patch) | |
tree | 2bb90d86336c7c7e1ec0608fdc6c85ee85eba3ca /services | |
parent | 4d3d5f1f9e2ccf680660086338f7b9b02c2eb648 (diff) | |
parent | df86a9f2e92d077386b146fe483b2cf14850737d (diff) | |
download | frameworks_base-10fa8c0626dbc0a875fe2543bf3c14d617dee9fb.zip frameworks_base-10fa8c0626dbc0a875fe2543bf3c14d617dee9fb.tar.gz frameworks_base-10fa8c0626dbc0a875fe2543bf3c14d617dee9fb.tar.bz2 |
Merge "Make BaseNetworkObserver available to core code" into klp-dev
Diffstat (limited to 'services')
-rw-r--r-- | services/java/com/android/server/CommonTimeManagementService.java | 9 | ||||
-rw-r--r-- | services/java/com/android/server/net/BaseNetworkObserver.java | 57 |
2 files changed, 3 insertions, 63 deletions
diff --git a/services/java/com/android/server/CommonTimeManagementService.java b/services/java/com/android/server/CommonTimeManagementService.java index aa2c8b8..710fb9d 100644 --- a/services/java/com/android/server/CommonTimeManagementService.java +++ b/services/java/com/android/server/CommonTimeManagementService.java @@ -40,6 +40,8 @@ import android.os.ServiceManager; import android.os.SystemProperties; import android.util.Log; +import com.android.server.net.BaseNetworkObserver; + /** * @hide * <p>CommonTimeManagementService manages the configuration of the native Common Time service, @@ -104,9 +106,7 @@ class CommonTimeManagementService extends Binder { /* * Callback handler implementations. */ - private INetworkManagementEventObserver mIfaceObserver = - new INetworkManagementEventObserver.Stub() { - + private INetworkManagementEventObserver mIfaceObserver = new BaseNetworkObserver() { public void interfaceStatusChanged(String iface, boolean up) { reevaluateServiceState(); } @@ -119,9 +119,6 @@ class CommonTimeManagementService extends Binder { public void interfaceRemoved(String iface) { reevaluateServiceState(); } - public void limitReached(String limitName, String iface) { } - - public void interfaceClassDataActivityChanged(String label, boolean active) {} }; private BroadcastReceiver mConnectivityMangerObserver = new BroadcastReceiver() { diff --git a/services/java/com/android/server/net/BaseNetworkObserver.java b/services/java/com/android/server/net/BaseNetworkObserver.java deleted file mode 100644 index 8b2aa5d..0000000 --- a/services/java/com/android/server/net/BaseNetworkObserver.java +++ /dev/null @@ -1,57 +0,0 @@ -/* - * Copyright (C) 2011 The Android Open Source Project - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.android.server.net; - -import android.net.INetworkManagementEventObserver; - -/** - * Base {@link INetworkManagementEventObserver} that provides no-op - * implementations which can be overridden. - * - * @hide - */ -public class BaseNetworkObserver extends INetworkManagementEventObserver.Stub { - @Override - public void interfaceStatusChanged(String iface, boolean up) { - // default no-op - } - - @Override - public void interfaceRemoved(String iface) { - // default no-op - } - - @Override - public void interfaceLinkStateChanged(String iface, boolean up) { - // default no-op - } - - @Override - public void interfaceAdded(String iface) { - // default no-op - } - - @Override - public void interfaceClassDataActivityChanged(String label, boolean active) { - // default no-op - } - - @Override - public void limitReached(String limitName, String iface) { - // default no-op - } -} |