Avoid launching activity-based feature to force stop exist actiivty and recreate it.
Root cause: FLAG_ACTIVITY_CLEAR_TASK would cause the exist activity are finished and new one items to be started. It causes Live Transcribe main activity goes onStart call of new activity is followed by onStop call of old activity, which cause the mic stopping. Solution: Remmove the FLAG_ACTIVITY_CLEAR_TASK. Bug: 156455425 Test: Manual test Change-Id: Ia5c490cc4816fe41b704ca8ed9dce2891cf44c9b
This commit is contained in:
@@ -1208,7 +1208,7 @@ public class AccessibilityManagerService extends IAccessibilityManager.Stub
|
||||
final Intent intent = new Intent();
|
||||
final Bundle bundle = ActivityOptions.makeBasic().setLaunchDisplayId(displayId).toBundle();
|
||||
intent.setComponent(name);
|
||||
intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_CLEAR_TASK);
|
||||
intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
|
||||
try {
|
||||
mContext.startActivityAsUser(intent, bundle, UserHandle.of(mCurrentUserId));
|
||||
} catch (ActivityNotFoundException ignore) {
|
||||
|
||||
Reference in New Issue
Block a user