AF passwords settings: Start activity as new task.

Settings app has a new 2-pane layout for larger screens. Activities that
belong to other apps must now be started as a new task.

Fix: 197702325
Test: manual
Change-Id: Iaf800b7f9e6bf5d925047fed49d848f4d3973df7
This commit is contained in:
Ahaan Ugale
2021-11-07 22:59:50 -08:00
parent 9ae7fa254e
commit dc816116c5

View File

@@ -16,6 +16,7 @@
package com.android.settings.applications.autofill;
import static android.content.Intent.FLAG_ACTIVITY_NEW_TASK;
import static android.service.autofill.AutofillService.EXTRA_RESULT;
import static androidx.lifecycle.Lifecycle.Event.ON_CREATE;
@@ -133,7 +134,8 @@ public class PasswordsPreferenceController extends BasePreferenceController
new Intent(Intent.ACTION_MAIN)
.setClassName(
serviceInfo.packageName,
service.getPasswordsActivity());
service.getPasswordsActivity())
.setFlags(FLAG_ACTIVITY_NEW_TASK);
prefContext.startActivityAsUser(intent, UserHandle.of(user));
return true;
});