summaryrefslogtreecommitdiff
path: root/service
diff options
context:
space:
mode:
Diffstat (limited to 'service')
-rw-r--r--service/java/com/android/server/wifi/aware/WifiAwareNativeManager.java3
-rw-r--r--service/java/com/android/server/wifi/aware/WifiAwareService.java1
-rw-r--r--service/java/com/android/server/wifi/aware/WifiAwareStateManager.java4
3 files changed, 4 insertions, 4 deletions
diff --git a/service/java/com/android/server/wifi/aware/WifiAwareNativeManager.java b/service/java/com/android/server/wifi/aware/WifiAwareNativeManager.java
index 22f13851f..f1945808f 100644
--- a/service/java/com/android/server/wifi/aware/WifiAwareNativeManager.java
+++ b/service/java/com/android/server/wifi/aware/WifiAwareNativeManager.java
@@ -53,6 +53,9 @@ class WifiAwareNativeManager {
mWifiAwareStateManager = awareStateManager;
mHalDeviceManager = halDeviceManager;
mWifiAwareNativeCallback = wifiAwareNativeCallback;
+ }
+
+ public void start() {
mHalDeviceManager.registerStatusListener(
new HalDeviceManager.ManagerStatusListener() {
@Override
diff --git a/service/java/com/android/server/wifi/aware/WifiAwareService.java b/service/java/com/android/server/wifi/aware/WifiAwareService.java
index 75efa0296..bd8156e17 100644
--- a/service/java/com/android/server/wifi/aware/WifiAwareService.java
+++ b/service/java/com/android/server/wifi/aware/WifiAwareService.java
@@ -65,6 +65,7 @@ public final class WifiAwareService extends SystemService {
HandlerThread awareHandlerThread = wifiInjector.getWifiAwareHandlerThread();
mImpl.start(awareHandlerThread, wifiAwareStateManager);
+ wifiAwareNativeManager.start();
} else if (phase == SystemService.PHASE_BOOT_COMPLETED) {
mImpl.startLate();
}
diff --git a/service/java/com/android/server/wifi/aware/WifiAwareStateManager.java b/service/java/com/android/server/wifi/aware/WifiAwareStateManager.java
index 1d00d162d..a35c786ee 100644
--- a/service/java/com/android/server/wifi/aware/WifiAwareStateManager.java
+++ b/service/java/com/android/server/wifi/aware/WifiAwareStateManager.java
@@ -391,10 +391,6 @@ public class WifiAwareStateManager {
* only happens when a connection is created.
*/
public void enableUsage() {
- if (mSm == null) {
- Log.e(TAG, "enableUsage: race condition - called while mSm null!");
- return;
- }
Message msg = mSm.obtainMessage(MESSAGE_TYPE_COMMAND);
msg.arg1 = COMMAND_TYPE_ENABLE_USAGE;
mSm.sendMessage(msg);