Fix drag notification to split
On drag notification to split case, the pending intent calling Uid should be app's Uid and lead to this start failed due to not system and app didn't visible. Put allow background activity flag on split side to ensure it could start successful and active split screen. Fix: 234406935 Test: manual Test: pass existing tests Change-Id: Ib52023f6d79d166b2b01948f2481350280a094f3
This commit is contained in:
@@ -18,6 +18,8 @@ package com.android.wm.shell.splitscreen;
|
||||
|
||||
import static android.app.ActivityOptions.KEY_LAUNCH_ROOT_TASK_TOKEN;
|
||||
import static android.app.ActivityTaskManager.INVALID_TASK_ID;
|
||||
import static android.app.ComponentOptions.KEY_PENDING_INTENT_BACKGROUND_ACTIVITY_ALLOWED;
|
||||
import static android.app.ComponentOptions.KEY_PENDING_INTENT_BACKGROUND_ACTIVITY_ALLOWED_BY_PERMISSION;
|
||||
import static android.app.WindowConfiguration.ACTIVITY_TYPE_ASSISTANT;
|
||||
import static android.app.WindowConfiguration.ACTIVITY_TYPE_HOME;
|
||||
import static android.app.WindowConfiguration.ACTIVITY_TYPE_RECENTS;
|
||||
@@ -846,6 +848,9 @@ public class StageCoordinator implements SplitLayout.SplitLayoutHandler,
|
||||
|
||||
private void addActivityOptions(Bundle opts, StageTaskListener stage) {
|
||||
opts.putParcelable(KEY_LAUNCH_ROOT_TASK_TOKEN, stage.mRootTaskInfo.token);
|
||||
// Put BAL flags to avoid activity start aborted.
|
||||
opts.putBoolean(KEY_PENDING_INTENT_BACKGROUND_ACTIVITY_ALLOWED, true);
|
||||
opts.putBoolean(KEY_PENDING_INTENT_BACKGROUND_ACTIVITY_ALLOWED_BY_PERMISSION, true);
|
||||
}
|
||||
|
||||
void updateActivityOptions(Bundle opts, @SplitPosition int position) {
|
||||
|
||||
Reference in New Issue
Block a user