OSDN Git Service

Allow force resize message activity to be resumed
authorAndrii Kulian <akulian@google.com>
Fri, 2 Jun 2017 00:49:02 +0000 (17:49 -0700)
committerAndrii Kulian <akulian@google.com>
Fri, 2 Jun 2017 01:26:13 +0000 (18:26 -0700)
"Activity may not work with split-screen" message is not showing
because the overlay activity is not allowed to resume without
user action.

Bug: 36205249
Test: Launch an activity with target SDK < 25, enable split-screen
Test: go/wm-smoke
Change-Id: Ic796f4449df1307c75ca5445cbffab218f0f8ae3

packages/SystemUI/src/com/android/systemui/stackdivider/ForcedResizableInfoActivityController.java

index a2c782e..578a18a 100644 (file)
@@ -142,7 +142,9 @@ public class ForcedResizableInfoActivityController {
             Intent intent = new Intent(mContext, ForcedResizableInfoActivity.class);
             ActivityOptions options = ActivityOptions.makeBasic();
             options.setLaunchTaskId(pendingRecord.taskId);
-            options.setTaskOverlay(true, false /* canResume */);
+            // Set as task overlay and allow to resume, so that when an app enters split-screen and
+            // becomes paused, the overlay will still be shown.
+            options.setTaskOverlay(true, true /* canResume */);
             intent.putExtra(EXTRA_FORCED_RESIZEABLE_REASON, pendingRecord.reason);
             mContext.startActivityAsUser(intent, options.toBundle(), UserHandle.CURRENT);
         }