From dc816116c5fa7fc4e74682de7e4d42cf3c791004 Mon Sep 17 00:00:00 2001 From: Ahaan Ugale Date: Sun, 7 Nov 2021 22:59:50 -0800 Subject: [PATCH] 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 --- .../applications/autofill/PasswordsPreferenceController.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/com/android/settings/applications/autofill/PasswordsPreferenceController.java b/src/com/android/settings/applications/autofill/PasswordsPreferenceController.java index 1d67fb7539d..cb8b73d2896 100644 --- a/src/com/android/settings/applications/autofill/PasswordsPreferenceController.java +++ b/src/com/android/settings/applications/autofill/PasswordsPreferenceController.java @@ -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; });