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
This commit is contained in:
Mill Chen
2019-03-28 19:14:25 -07:00
parent 77d8cff015
commit c0754b35ba

View File

@@ -1474,6 +1474,7 @@
<!-- Lock screen settings --> <!-- Lock screen settings -->
<activity android:name=".password.ConfirmDeviceCredentialActivity" <activity android:name=".password.ConfirmDeviceCredentialActivity"
android:exported="true" android:exported="true"
android:taskAffinity=".password.ConfirmDeviceCredentialActivity"
android:theme="@android:style/Theme.Translucent.NoTitleBar"> android:theme="@android:style/Theme.Translucent.NoTitleBar">
<intent-filter android:priority="1"> <intent-filter android:priority="1">
<action android:name="android.app.action.CONFIRM_DEVICE_CREDENTIAL" /> <action android:name="android.app.action.CONFIRM_DEVICE_CREDENTIAL" />
@@ -1491,6 +1492,7 @@
android:exported="false" android:exported="false"
android:permission="android.permission.MANAGE_USERS" android:permission="android.permission.MANAGE_USERS"
android:resizeableActivity="false" android:resizeableActivity="false"
android:taskAffinity=".password.ConfirmDeviceCredentialActivity"
android:theme="@android:style/Theme.Translucent.NoTitleBar"> android:theme="@android:style/Theme.Translucent.NoTitleBar">
<intent-filter android:priority="1"> <intent-filter android:priority="1">
<action android:name="android.app.action.CONFIRM_DEVICE_CREDENTIAL_WITH_USER" /> <action android:name="android.app.action.CONFIRM_DEVICE_CREDENTIAL_WITH_USER" />