Merge "Avoid launching activity-based feature to force stop exist actiivty and recreate it." into rvc-dev am: 45910eec3f am: ceb23bb736

Change-Id: I6327182f4400f7cbca26a79aa10f6b781a02a361
This commit is contained in:
TreeHugger Robot
2020-05-16 01:57:18 +00:00
committed by Automerger Merge Worker

View File

@@ -148,7 +148,7 @@ public class LaunchAccessibilityActivityPreferenceFragment extends
final Bundle bundle = ActivityOptions.makeBasic().setLaunchDisplayId(displayId).toBundle(); final Bundle bundle = ActivityOptions.makeBasic().setLaunchDisplayId(displayId).toBundle();
intent.setComponent(name); intent.setComponent(name);
intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_CLEAR_TASK); intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
try { try {
final int userId = UserHandle.myUserId(); final int userId = UserHandle.myUserId();
getPrefContext().startActivityAsUser(intent, bundle, UserHandle.of(userId)); getPrefContext().startActivityAsUser(intent, bundle, UserHandle.of(userId));