Merge "Apply pending-intent op before blanket locktask check" into udc-dev

This commit is contained in:
Evan Rosky
2023-05-24 15:46:10 +00:00
committed by Android (Google) Code Review

View File

@@ -960,20 +960,6 @@ class WindowOrganizerController extends IWindowOrganizerController.Stub
errorCallbackToken, organizer); errorCallbackToken, organizer);
break; break;
} }
default: {
// The other operations may change task order so they are skipped while in lock
// task mode. The above operations are still allowed because they don't move
// tasks. And it may be necessary such as clearing launch root after entering
// lock task mode.
if (isInLockTaskMode) {
Slog.w(TAG, "Skip applying hierarchy operation " + hop
+ " while in lock task mode");
return effects;
}
}
}
switch (type) {
case HIERARCHY_OP_TYPE_PENDING_INTENT: { case HIERARCHY_OP_TYPE_PENDING_INTENT: {
final Bundle launchOpts = hop.getLaunchOptions(); final Bundle launchOpts = hop.getLaunchOptions();
ActivityOptions activityOptions = launchOpts != null ActivityOptions activityOptions = launchOpts != null
@@ -1012,6 +998,20 @@ class WindowOrganizerController extends IWindowOrganizerController.Stub
} }
break; break;
} }
default: {
// The other operations may change task order so they are skipped while in lock
// task mode. The above operations are still allowed because they don't move
// tasks. And it may be necessary such as clearing launch root after entering
// lock task mode.
if (isInLockTaskMode) {
Slog.w(TAG, "Skip applying hierarchy operation " + hop
+ " while in lock task mode");
return effects;
}
}
}
switch (type) {
case HIERARCHY_OP_TYPE_START_SHORTCUT: { case HIERARCHY_OP_TYPE_START_SHORTCUT: {
final Bundle launchOpts = hop.getLaunchOptions(); final Bundle launchOpts = hop.getLaunchOptions();
final String callingPackage = launchOpts.getString( final String callingPackage = launchOpts.getString(