diff options
| author | Patrick Baumann <patb@google.com> | 2020-01-28 09:41:22 -0800 |
|---|---|---|
| committer | Patrick Baumann <patb@google.com> | 2020-02-18 20:12:02 +0000 |
| commit | 2fa1c95404cd29047ead492ca3f11f1e2ff75780 (patch) | |
| tree | f429a42a4f2140fc4dcf24bf01b9c47fc46204c8 /core/java/android/content/Intent.java | |
| parent | b55d7214b0f3dad360dc6813bb709fe848647c9e (diff) | |
Adds NON_BROWSER & DEFAULT match flags
This change adds two new flags for starting activities:
FLAG_ACTIVITY_REQUIRE_NON_BROWSER and FLAG_ACTIVITY_REQUIRE_DEFAULT.
The first will only start if the result is a non-browser result. The
second will only start if the result is not the resolver activity.
Bug: 148452357
Test: Builds
Change-Id: I1f25bd78b6231c08036c15436bd8c2e3dccf56d6
Diffstat (limited to 'core/java/android/content/Intent.java')
| -rw-r--r-- | core/java/android/content/Intent.java | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/core/java/android/content/Intent.java b/core/java/android/content/Intent.java index 2e591ca1b4ee..acc4cb098ffb 100644 --- a/core/java/android/content/Intent.java +++ b/core/java/android/content/Intent.java @@ -6478,6 +6478,21 @@ public class Intent implements Parcelable, Cloneable { public static final int FLAG_ACTIVITY_MATCH_EXTERNAL = 0x00000800; /** + * If set in an intent passed to {@link Context#startActivity Context.startActivity()}, this + * flag will only launch the intent if it resolves to a result that is not a browser. If no such + * result exists, an {@link ActivityNotFoundException} will be thrown. + */ + public static final int FLAG_ACTIVITY_REQUIRE_NON_BROWSER = 0x00000400; + + /** + * If set in an intent passed to {@link Context#startActivity Context.startActivity()}, this + * flag will only launch the intent if it resolves to a single result. If no such result exists + * or if the system chooser would otherwise be displayed, an {@link ActivityNotFoundException} + * will be thrown. + */ + public static final int FLAG_ACTIVITY_REQUIRE_DEFAULT = 0x00000200; + + /** * If set, when sending a broadcast only registered receivers will be * called -- no BroadcastReceiver components will be launched. */ |
