summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--service/java/com/android/server/wifi/WifiService.java2
-rw-r--r--service/java/com/android/server/wifi/WifiServiceBase.java6
-rw-r--r--service/java/com/android/server/wifi/WifiStackService.java7
3 files changed, 8 insertions, 7 deletions
diff --git a/service/java/com/android/server/wifi/WifiService.java b/service/java/com/android/server/wifi/WifiService.java
index 724e77617..aaf9b1989 100644
--- a/service/java/com/android/server/wifi/WifiService.java
+++ b/service/java/com/android/server/wifi/WifiService.java
@@ -31,7 +31,7 @@ public final class WifiService implements WifiServiceBase {
final WifiServiceImpl mImpl;
public WifiService(Context context) {
- mImpl = new WifiServiceImpl(context, new WifiInjector(context), new WifiAsyncChannel(TAG));
+ mImpl = new WifiServiceImpl(context, WifiInjector.getInstance(), new WifiAsyncChannel(TAG));
}
@Override
diff --git a/service/java/com/android/server/wifi/WifiServiceBase.java b/service/java/com/android/server/wifi/WifiServiceBase.java
index df6406731..8cf8add6d 100644
--- a/service/java/com/android/server/wifi/WifiServiceBase.java
+++ b/service/java/com/android/server/wifi/WifiServiceBase.java
@@ -32,7 +32,7 @@ public interface WifiServiceBase {
* it's binder service & perform necessary initialization. This should happen very close to
* bootup phase {@link SystemService#PHASE_BOOT_COMPLETED} in system_server.
*/
- default void onStart() {}
+ void onStart();
/**
* Invoked when the user switches.
@@ -58,7 +58,5 @@ public interface WifiServiceBase {
/**
* Retrieve the underlying binder service implementation.
*/
- default Binder retrieveImpl() {
- return null;
- }
+ Binder retrieveImpl();
}
diff --git a/service/java/com/android/server/wifi/WifiStackService.java b/service/java/com/android/server/wifi/WifiStackService.java
index 0e941f61d..dbf3882eb 100644
--- a/service/java/com/android/server/wifi/WifiStackService.java
+++ b/service/java/com/android/server/wifi/WifiStackService.java
@@ -197,11 +197,14 @@ public class WifiStackService extends Service {
Log.w(TAG, "Wifi not supported on the device");
return false;
}
+
+ // initialize static instance of WifiInjector
+ new WifiInjector(this);
// Ordering of wifi services.
- // wifi service
- mApiServices.put(Context.WIFI_SERVICE, new WifiService(this));
// wifiscanner service
mApiServices.put(Context.WIFI_SCANNING_SERVICE, new WifiScanningService(this));
+ // wifi service
+ mApiServices.put(Context.WIFI_SERVICE, new WifiService(this));
// wifi-p2p service
if (getPackageManager().hasSystemFeature(PackageManager.FEATURE_WIFI_DIRECT)) {
mApiServices.put(Context.WIFI_P2P_SERVICE, new WifiP2pService(this));