Start SystemUI SensorUse activity as user 0

SystemUI runs as user 0, we shouldn't be spawning new instances in other
users.

Bug: 227350805
Test: Manual
Change-Id: Ifd7c810ddbdb0c623a4f09d858ced1b7c814482b
This commit is contained in:
Evan Severson
2022-04-08 16:04:19 -07:00
parent 7b23f67adc
commit e679e73606
2 changed files with 5 additions and 3 deletions

View File

@@ -522,7 +522,8 @@
android:launchMode="singleTop"
android:permission="android.permission.MANAGE_SENSOR_PRIVACY"
android:theme="@style/Theme.SystemUI.Dialog.Alert"
android:finishOnCloseSystemDialogs="true">
android:finishOnCloseSystemDialogs="true"
android:showForAllUsers="true">
</activity>
<!-- started from SensoryPrivacyService -->
@@ -531,7 +532,8 @@
android:launchMode="singleTop"
android:permission="android.permission.MANAGE_SENSOR_PRIVACY"
android:theme="@style/BottomSheet"
android:finishOnCloseSystemDialogs="true">
android:finishOnCloseSystemDialogs="true"
android:showForAllUsers="true">
</activity>

View File

@@ -560,7 +560,7 @@ public final class SensorPrivacyService extends SystemService {
+ " sensors");
return;
}
mContext.startActivityAsUser(dialogIntent, options.toBundle(), info.mUser);
mContext.startActivityAsUser(dialogIntent, options.toBundle(), UserHandle.SYSTEM);
}
/**