Hookup interface status to other clients
After unreverting the linkstate change patch, hook up notification handlers
that didn't exist when the first patch was created, like
EthernetDataTracker.java and Vpn.java.
For the observers that handle interfaceStatusChanged(), I made
interfaceLinkStatusChanged() call it so they both do the same thing.
Change-Id: I0077e5e5f48f3932ba98f5bf363243892f2de6cc
Signed-off-by: Mike J. Chen <mjchen@google.com>
diff --git a/services/java/com/android/server/ThrottleService.java b/services/java/com/android/server/ThrottleService.java
index 8658f3d..d81dfdb 100644
--- a/services/java/com/android/server/ThrottleService.java
+++ b/services/java/com/android/server/ThrottleService.java
@@ -179,14 +179,17 @@
mIface = iface;
}
- public void interfaceStatusChanged(String iface, boolean link) {
- if (link) {
+ public void interfaceStatusChanged(String iface, boolean up) {
+ if (up) {
if (TextUtils.equals(iface, mIface)) {
mHandler.obtainMessage(mMsg).sendToTarget();
}
}
}
+ public void interfaceLinkStateChanged(String iface, boolean up) {
+ }
+
public void interfaceAdded(String iface) {
// TODO - an interface added in the UP state should also trigger a StatusChanged
// notification..
@@ -195,8 +198,6 @@
}
}
- public void interfaceLinkStateChanged(String iface, boolean linkState) {}
-
public void interfaceRemoved(String iface) {}
}