From: Jeff Sharkey Date: Tue, 9 Apr 2019 15:23:48 +0000 (-0600) Subject: Define a category for "file management" apps. X-Git-Url: http://git.osdn.net/view?a=commitdiff_plain;h=2e4832fd19c1a5170b6ffb69d7a3c9c125f928eb;p=android-x86%2Fframeworks-base.git Define a category for "file management" apps. We already have a nice collection of CATEGORY_APP_* constants that can be used to identify classes of apps. This change expands that list to discover file management apps, such as DocumentsUI. Bug: 130215653 Test: none Change-Id: I9b5016676ca1526074ba876675f14bf814ea4c09 --- diff --git a/api/current.txt b/api/current.txt index 5997043cdd4a..bc634c63d2dd 100644 --- a/api/current.txt +++ b/api/current.txt @@ -10307,6 +10307,7 @@ package android.content { field public static final String CATEGORY_APP_CALENDAR = "android.intent.category.APP_CALENDAR"; field public static final String CATEGORY_APP_CONTACTS = "android.intent.category.APP_CONTACTS"; field public static final String CATEGORY_APP_EMAIL = "android.intent.category.APP_EMAIL"; + field public static final String CATEGORY_APP_FILES = "android.intent.category.APP_FILES"; field public static final String CATEGORY_APP_GALLERY = "android.intent.category.APP_GALLERY"; field public static final String CATEGORY_APP_MAPS = "android.intent.category.APP_MAPS"; field public static final String CATEGORY_APP_MARKET = "android.intent.category.APP_MARKET"; diff --git a/core/java/android/content/Intent.java b/core/java/android/content/Intent.java index d87171e39595..8628d32123bc 100644 --- a/core/java/android/content/Intent.java +++ b/core/java/android/content/Intent.java @@ -4731,6 +4731,18 @@ public class Intent implements Parcelable, Cloneable { @SdkConstant(SdkConstantType.INTENT_CATEGORY) public static final String CATEGORY_APP_MUSIC = "android.intent.category.APP_MUSIC"; + /** + * Used with {@link #ACTION_MAIN} to launch the files application. + * The activity should be able to browse and manage files stored on the device. + *

NOTE: This should not be used as the primary key of an Intent, + * since it will not result in the app launching with the correct + * action and category. Instead, use this with + * {@link #makeMainSelectorActivity(String, String)} to generate a main + * Intent with this category in the selector.

+ */ + @SdkConstant(SdkConstantType.INTENT_CATEGORY) + public static final String CATEGORY_APP_FILES = "android.intent.category.APP_FILES"; + // --------------------------------------------------------------------- // --------------------------------------------------------------------- // Standard extra data keys.