summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--service/AndroidManifest.xml2
-rw-r--r--service/java/com/android/server/wifi/AvailableNetworkNotifier.java3
-rw-r--r--service/java/com/android/server/wifi/ClientModeImpl.java3
-rw-r--r--service/java/com/android/server/wifi/hotspot2/PasspointProvisioner.java3
-rw-r--r--tests/wifitests/src/com/android/server/wifi/OpenNetworkNotifierTest.java6
5 files changed, 6 insertions, 11 deletions
diff --git a/service/AndroidManifest.xml b/service/AndroidManifest.xml
index f209431e8..ac6d53aa8 100644
--- a/service/AndroidManifest.xml
+++ b/service/AndroidManifest.xml
@@ -43,7 +43,7 @@
<uses-permission android:name="android.permission.DEVICE_POWER" />
<uses-permission android:name="android.permission.DUMP" />
<uses-permission android:name="android.permission.GET_ACCOUNTS" />
- <uses-permission android:name="android.permission.INTERACT_ACROSS_USERS" />
+ <uses-permission android:name="android.permission.INTERACT_ACROSS_USERS_FULL" />
<uses-permission android:name="android.permission.INTERNAL_SYSTEM_WINDOW" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.LOCAL_MAC_ADDRESS" />
diff --git a/service/java/com/android/server/wifi/AvailableNetworkNotifier.java b/service/java/com/android/server/wifi/AvailableNetworkNotifier.java
index eabc689a1..32e2e0959 100644
--- a/service/java/com/android/server/wifi/AvailableNetworkNotifier.java
+++ b/service/java/com/android/server/wifi/AvailableNetworkNotifier.java
@@ -260,9 +260,8 @@ public class AvailableNetworkNotifier {
private boolean isControllerEnabled() {
return mSettingEnabled && !mContext.getSystemService(UserManager.class)
- // TODO (b/142234604): This will not work on multi-user device scenarios.
.hasUserRestrictionForUser(UserManager.DISALLOW_CONFIG_WIFI,
- UserHandle.CURRENT_OR_SELF);
+ UserHandle.CURRENT);
}
/**
diff --git a/service/java/com/android/server/wifi/ClientModeImpl.java b/service/java/com/android/server/wifi/ClientModeImpl.java
index c9c981054..e262e321e 100644
--- a/service/java/com/android/server/wifi/ClientModeImpl.java
+++ b/service/java/com/android/server/wifi/ClientModeImpl.java
@@ -5330,8 +5330,7 @@ public class ClientModeImpl extends StateMachine {
intent.putExtra(WifiManager.EXTRA_WIFI_CREDENTIAL_SSID, config.SSID);
intent.putExtra(WifiManager.EXTRA_WIFI_CREDENTIAL_EVENT_TYPE,
wifiCredentialEventType);
- // TODO (b/142234604): This will not work on multi-user device scenarios.
- mContext.sendBroadcastAsUser(intent, UserHandle.CURRENT_OR_SELF,
+ mContext.sendBroadcastAsUser(intent, UserHandle.CURRENT,
android.Manifest.permission.RECEIVE_WIFI_CREDENTIAL_CHANGE);
}
}
diff --git a/service/java/com/android/server/wifi/hotspot2/PasspointProvisioner.java b/service/java/com/android/server/wifi/hotspot2/PasspointProvisioner.java
index b9afb0bac..137d9fa19 100644
--- a/service/java/com/android/server/wifi/hotspot2/PasspointProvisioner.java
+++ b/service/java/com/android/server/wifi/hotspot2/PasspointProvisioner.java
@@ -789,8 +789,7 @@ public class PasspointProvisioner {
// Verify that the intent will resolve to an activity
if (intent.resolveActivity(mContext.getPackageManager()) != null) {
- // TODO (b/142234604): This will not work on multi-user device scenarios.
- mContext.startActivityAsUser(intent, UserHandle.CURRENT_OR_SELF);
+ mContext.startActivityAsUser(intent, UserHandle.CURRENT);
invokeProvisioningCallback(PROVISIONING_STATUS,
ProvisioningCallback.OSU_STATUS_WAITING_FOR_REDIRECT_RESPONSE);
changeState(STATE_WAITING_FOR_REDIRECT_RESPONSE);
diff --git a/tests/wifitests/src/com/android/server/wifi/OpenNetworkNotifierTest.java b/tests/wifitests/src/com/android/server/wifi/OpenNetworkNotifierTest.java
index bdb82b20a..f88272d45 100644
--- a/tests/wifitests/src/com/android/server/wifi/OpenNetworkNotifierTest.java
+++ b/tests/wifitests/src/com/android/server/wifi/OpenNetworkNotifierTest.java
@@ -458,9 +458,8 @@ public class OpenNetworkNotifierTest extends WifiBaseTest {
/** Verifies that {@link UserManager#DISALLOW_CONFIG_WIFI} disables the feature. */
@Test
public void userHasDisallowConfigWifiRestriction_notificationNotDisplayed() {
- // TODO (b/142234604): This will not work on multi-user device scenarios.
when(mUserManager.hasUserRestrictionForUser(UserManager.DISALLOW_CONFIG_WIFI,
- UserHandle.CURRENT_OR_SELF))
+ UserHandle.CURRENT))
.thenReturn(true);
mNotificationController.handleScanResults(mOpenNetworks);
@@ -479,9 +478,8 @@ public class OpenNetworkNotifierTest extends WifiBaseTest {
ConnectToNetworkNotificationAndActionCount.NOTIFICATION_RECOMMEND_NETWORK);
verify(mNotificationManager).notify(anyInt(), any());
- // TODO (b/142234604): This will not work on multi-user device scenarios.
when(mUserManager.hasUserRestrictionForUser(UserManager.DISALLOW_CONFIG_WIFI,
- UserHandle.CURRENT_OR_SELF))
+ UserHandle.CURRENT))
.thenReturn(true);
mNotificationController.handleScanResults(mOpenNetworks);