Settings unexpectedly open after turning work profile on
ConfirmDeviceCredentialActivity doesn't set a taskAffinity, so the
default taskAffinity is the package name. That's why Settings
unexpectedly open after users turn work profile on. We specified an
unique name to taskAffinity to avoid launching Settings activity.
Fixes: 129330530
Test: turn work profile off then turn it on, repeat
Change-Id: I1f71c3d1bb37a09a6393fae4c01bc9b18cab49a8
diff --git a/AndroidManifest.xml b/AndroidManifest.xml
index c13068f..3027c06 100644
--- a/AndroidManifest.xml
+++ b/AndroidManifest.xml
@@ -1474,6 +1474,7 @@
<!-- Lock screen settings -->
<activity android:name=".password.ConfirmDeviceCredentialActivity"
android:exported="true"
+ android:taskAffinity=".password.ConfirmDeviceCredentialActivity"
android:theme="@android:style/Theme.Translucent.NoTitleBar">
<intent-filter android:priority="1">
<action android:name="android.app.action.CONFIRM_DEVICE_CREDENTIAL" />
@@ -1491,6 +1492,7 @@
android:exported="false"
android:permission="android.permission.MANAGE_USERS"
android:resizeableActivity="false"
+ android:taskAffinity=".password.ConfirmDeviceCredentialActivity"
android:theme="@android:style/Theme.Translucent.NoTitleBar">
<intent-filter android:priority="1">
<action android:name="android.app.action.CONFIRM_DEVICE_CREDENTIAL_WITH_USER" />