summaryrefslogtreecommitdiff
path: root/service
diff options
context:
space:
mode:
authorRoshan Pius <rpius@google.com>2017-08-01 16:40:56 -0700
committerRoshan Pius <rpius@google.com>2017-08-01 16:57:52 -0700
commit899b14464fc6591010a5893142b470a466598f96 (patch)
tree02542e9b9f44dae85ae3c1de7098532c83af644a /service
parent29702d5f6bf0b83837778377f765d393bdfcf5c1 (diff)
HalDeviceManager: Get IWifi proxy immediately
Try to get IWifi proxy as a part of HalDeviceManager.initialize() directly instead of waiting for the IServiceMAnager callback. When HalDeviceManager.initialize() is invoked: a) If the wifi service is up at that point, we will get the proxy immediately and IServiceManager callback will be ignored. b) If the wifi service is not up at that point, we will get the proxy as a part of the IServiceManager callback. Bug: 64226605 Test: Unit tests Test: TBD: Regression test request. Change-Id: I9160af8ef0479ec1fefddb03ec81172c94d583bb
Diffstat (limited to 'service')
-rw-r--r--service/java/com/android/server/wifi/HalDeviceManager.java6
1 files changed, 3 insertions, 3 deletions
diff --git a/service/java/com/android/server/wifi/HalDeviceManager.java b/service/java/com/android/server/wifi/HalDeviceManager.java
index 4382c8126..bcc0348a8 100644
--- a/service/java/com/android/server/wifi/HalDeviceManager.java
+++ b/service/java/com/android/server/wifi/HalDeviceManager.java
@@ -532,6 +532,7 @@ public class HalDeviceManager {
private void initializeInternal() {
initIServiceManagerIfNecessary();
+ initIWifiIfNecessary();
}
private void teardownInternal() {
@@ -561,9 +562,7 @@ public class HalDeviceManager {
Log.d(TAG, "IWifi registration notification: fqName=" + fqName
+ ", name=" + name + ", preexisting=" + preexisting);
synchronized (mLock) {
- mWifi = null; // get rid of old copy!
initIWifiIfNecessary();
- stopWifi(); // just in case
}
}
};
@@ -673,7 +672,8 @@ public class HalDeviceManager {
mWifi = null;
return;
}
- managerStatusListenerDispatch();
+ // Stopping wifi just in case. This would also trigger the status callback.
+ stopWifi();
} catch (RemoteException e) {
Log.e(TAG, "Exception while operating on IWifi: " + e);
}