diff options
| author | Mady Mellor <madym@google.com> | 2019-09-25 11:19:26 -0700 |
|---|---|---|
| committer | Mady Mellor <madym@google.com> | 2019-10-03 15:01:28 -0700 |
| commit | c41ed32b607d0ec19db5770c557d9984b515598a (patch) | |
| tree | 5791f6c8f30d9d993bb9126afc8a8962828e6f94 /core/java/android/app/ActivityView.java | |
| parent | 48b70b2dffe92b5053b86da5416957a22d99a81b (diff) | |
Remove embedded & document launch always restrictions from a bubble
* No longer need the embedded flag as of ag/9341444
* Instead of requiring the app to specify documentLaunchMode=always we'll
apply the relevant intent flags to force that behaviour
* Adds a new param to include a "fillInIntent" which can adjust the
flags on the PendingIntent.
Bug: 138325285
Test: manual with BubblesTest (removed the flags in the test app, things
should still bubble)
Test: atest NotificationManagerTest (needs CTS CL)
Change-Id: I08de491fc89d8182f2b2a7df95c985d8be847aab
Diffstat (limited to 'core/java/android/app/ActivityView.java')
| -rw-r--r-- | core/java/android/app/ActivityView.java | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/core/java/android/app/ActivityView.java b/core/java/android/app/ActivityView.java index b56c00e44d3f..fbf1f59141a8 100644 --- a/core/java/android/app/ActivityView.java +++ b/core/java/android/app/ActivityView.java @@ -22,6 +22,7 @@ import static android.hardware.display.DisplayManager.VIRTUAL_DISPLAY_FLAG_PUBLI import static android.view.Display.INVALID_DISPLAY; import android.annotation.NonNull; +import android.annotation.Nullable; import android.annotation.TestApi; import android.app.ActivityManager.StackInfo; import android.content.ComponentName; @@ -324,16 +325,17 @@ public class ActivityView extends ViewGroup { * this method can be called. * * @param pendingIntent Intent used to launch an activity. + * @param fillInIntent Additional Intent data, see {@link Intent#fillIn Intent.fillIn()}. * @param options options for the activity * * @see StateCallback * @see #startActivity(Intent) */ - public void startActivity(@NonNull PendingIntent pendingIntent, + public void startActivity(@NonNull PendingIntent pendingIntent, @Nullable Intent fillInIntent, @NonNull ActivityOptions options) { options.setLaunchDisplayId(mVirtualDisplay.getDisplay().getDisplayId()); try { - pendingIntent.send(null /* context */, 0 /* code */, null /* intent */, + pendingIntent.send(getContext(), 0 /* code */, fillInIntent, null /* onFinished */, null /* handler */, null /* requiredPermission */, options.toBundle()); } catch (PendingIntent.CanceledException e) { |
