From 0568aed2af35bdfe878afa307dd6ab1a21f20104 Mon Sep 17 00:00:00 2001 From: Wale Ogunwale Date: Fri, 8 Sep 2017 13:29:37 -0700 Subject: ActivityOptions.set/getLaunchStackId() be gone! Removed ActivityOptions.set/getLaunchStackId() and replacement ActivityOptions.set/getWindowingMode() and set/getActivityType() Test: Existing tests pass. Test: go/wm-smoke Bug: 64146578 Change-Id: Ifc1c35f7b13c335cdf1a1694208e9fe0aea0c1fa --- core/java/android/widget/RemoteViews.java | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'core/java/android/widget/RemoteViews.java') diff --git a/core/java/android/widget/RemoteViews.java b/core/java/android/widget/RemoteViews.java index bc85fadb5ad9..7903d6fdc614 100644 --- a/core/java/android/widget/RemoteViews.java +++ b/core/java/android/widget/RemoteViews.java @@ -16,9 +16,10 @@ package android.widget; +import static android.app.WindowConfiguration.WINDOWING_MODE_UNDEFINED; + import android.annotation.ColorInt; import android.annotation.DimenRes; -import android.app.ActivityManager.StackId; import android.app.ActivityOptions; import android.app.ActivityThread; import android.app.Application; @@ -324,11 +325,11 @@ public class RemoteViews implements Parcelable, Filter { public boolean onClickHandler(View view, PendingIntent pendingIntent, Intent fillInIntent) { - return onClickHandler(view, pendingIntent, fillInIntent, StackId.INVALID_STACK_ID); + return onClickHandler(view, pendingIntent, fillInIntent, WINDOWING_MODE_UNDEFINED); } public boolean onClickHandler(View view, PendingIntent pendingIntent, - Intent fillInIntent, int launchStackId) { + Intent fillInIntent, int windowingMode) { try { // TODO: Unregister this handler if PendingIntent.FLAG_ONE_SHOT? Context context = view.getContext(); @@ -339,8 +340,8 @@ public class RemoteViews implements Parcelable, Filter { opts = ActivityOptions.makeBasic(); } - if (launchStackId != StackId.INVALID_STACK_ID) { - opts.setLaunchStackId(launchStackId); + if (windowingMode != WINDOWING_MODE_UNDEFINED) { + opts.setLaunchWindowingMode(windowingMode); } context.startIntentSender( pendingIntent.getIntentSender(), fillInIntent, -- cgit v1.2.3