summaryrefslogtreecommitdiff
path: root/service
diff options
context:
space:
mode:
authorYifan Hong <elsk@google.com>2017-02-24 17:12:29 -0800
committerYifan Hong <elsk@google.com>2017-03-01 11:20:41 -0800
commit006eb17e06a7843e3da3bf939833b94e58a5a034 (patch)
tree15d974dfbd97b0176c82554497feaafd1e193eff /service
parent63e847ec063cdb7567e242104f25352745393707 (diff)
IServiceManager/ITokenManager uses "default" service name
The getService() and registerAsService() methods of interface objects now have default parameters of "default" for the service name. HALs will not have to use any service name unless they want to register more than one service. Test: boots Test: hidl_test Bug: 33844934 Change-Id: I80d35dcd87ebc42c8d60682f03a69111898a4268
Diffstat (limited to 'service')
-rw-r--r--service/java/com/android/server/wifi/HalDeviceManager.java2
-rw-r--r--service/java/com/android/server/wifi/SupplicantP2pIfaceHal.java5
-rw-r--r--service/java/com/android/server/wifi/SupplicantStaIfaceHal.java3
3 files changed, 3 insertions, 7 deletions
diff --git a/service/java/com/android/server/wifi/HalDeviceManager.java b/service/java/com/android/server/wifi/HalDeviceManager.java
index 62134321e..9795068c1 100644
--- a/service/java/com/android/server/wifi/HalDeviceManager.java
+++ b/service/java/com/android/server/wifi/HalDeviceManager.java
@@ -491,7 +491,7 @@ public class HalDeviceManager {
protected IServiceManager getServiceManagerMockable() {
try {
- return IServiceManager.getService("manager");
+ return IServiceManager.getService();
} catch (RemoteException e) {
Log.e(TAG, "Exception getting IServiceManager: " + e);
return null;
diff --git a/service/java/com/android/server/wifi/SupplicantP2pIfaceHal.java b/service/java/com/android/server/wifi/SupplicantP2pIfaceHal.java
index 7b96dc4c4..679caaf94 100644
--- a/service/java/com/android/server/wifi/SupplicantP2pIfaceHal.java
+++ b/service/java/com/android/server/wifi/SupplicantP2pIfaceHal.java
@@ -32,12 +32,10 @@ import android.net.wifi.p2p.WifiP2pManager;
import android.net.wifi.p2p.nsd.WifiP2pServiceInfo;
import android.os.RemoteException;
import android.util.Log;
-import android.util.MutableBoolean;
import com.android.server.wifi.util.NativeUtil;
import java.util.ArrayList;
-import java.util.Arrays;
/**
* Native calls sending requests to the P2P Hals, and callbacks for receiving P2P events
*
@@ -46,7 +44,6 @@ import java.util.Arrays;
public class SupplicantP2pIfaceHal {
private static final boolean DBG = true;
private static final String TAG = "SupplicantP2pIfaceHal";
- private static final String SERVICE_MANAGER_NAME = "manager";
private static final int RESULT_NOT_VALID = -1;
private static final int DEFAULT_GROUP_OWNER_INTENT = 6;
@@ -244,7 +241,7 @@ public class SupplicantP2pIfaceHal {
* Wrapper functions to access static HAL methods, created to be mockable in unit tests
*/
protected IServiceManager getServiceManagerMockable() throws RemoteException {
- return IServiceManager.getService(SERVICE_MANAGER_NAME);
+ return IServiceManager.getService();
}
protected ISupplicant getSupplicantMockable() throws RemoteException {
diff --git a/service/java/com/android/server/wifi/SupplicantStaIfaceHal.java b/service/java/com/android/server/wifi/SupplicantStaIfaceHal.java
index 380f52446..52fe6084a 100644
--- a/service/java/com/android/server/wifi/SupplicantStaIfaceHal.java
+++ b/service/java/com/android/server/wifi/SupplicantStaIfaceHal.java
@@ -72,7 +72,6 @@ import java.util.regex.Pattern;
*/
public class SupplicantStaIfaceHal {
private static final String TAG = "SupplicantStaIfaceHal";
- private static final String SERVICE_MANAGER_NAME = "manager";
/**
* Regex pattern for extracting the wps device type bytes.
* Matches a strings like the following: "<categ>-<OUI>-<subcateg>";
@@ -334,7 +333,7 @@ public class SupplicantStaIfaceHal {
* Wrapper functions to access static HAL methods, created to be mockable in unit tests
*/
protected IServiceManager getServiceManagerMockable() throws RemoteException {
- return IServiceManager.getService(SERVICE_MANAGER_NAME);
+ return IServiceManager.getService();
}
protected ISupplicant getSupplicantMockable() throws RemoteException {