diff options
| -rw-r--r-- | api/current.txt | 80 | ||||
| -rw-r--r-- | core/java/android/app/Activity.java | 80 | ||||
| -rw-r--r-- | core/java/android/app/ActivityGroup.java | 6 | ||||
| -rw-r--r-- | core/java/android/app/ApplicationErrorReport.java | 9 | ||||
| -rw-r--r-- | core/java/android/app/LocalActivityManager.java | 8 | ||||
| -rw-r--r-- | core/java/android/app/TabActivity.java | 10 | ||||
| -rw-r--r-- | core/java/android/content/Intent.java | 92 |
7 files changed, 215 insertions, 70 deletions
diff --git a/api/current.txt b/api/current.txt index 286e6401b48f..783aef447a0a 100644 --- a/api/current.txt +++ b/api/current.txt @@ -2918,6 +2918,76 @@ package android.app { method public abstract void onActivityStopped(android.app.Activity); } + public class ApplicationErrorReport implements android.os.Parcelable { + ctor public ApplicationErrorReport(); + method public int describeContents(); + method public void dump(android.util.Printer, java.lang.String); + method public static android.content.ComponentName getErrorReportReceiver(android.content.Context, java.lang.String, int); + method public void readFromParcel(android.os.Parcel); + method public void writeToParcel(android.os.Parcel, int); + field public static final android.os.Parcelable.Creator CREATOR; + field public static final int TYPE_ANR = 2; // 0x2 + field public static final int TYPE_BATTERY = 3; // 0x3 + field public static final int TYPE_CRASH = 1; // 0x1 + field public static final int TYPE_NONE = 0; // 0x0 + field public static final int TYPE_RUNNING_SERVICE = 5; // 0x5 + field public android.app.ApplicationErrorReport.AnrInfo anrInfo; + field public android.app.ApplicationErrorReport.BatteryInfo batteryInfo; + field public android.app.ApplicationErrorReport.CrashInfo crashInfo; + field public java.lang.String installerPackageName; + field public java.lang.String packageName; + field public java.lang.String processName; + field public android.app.ApplicationErrorReport.RunningServiceInfo runningServiceInfo; + field public boolean systemApp; + field public long time; + field public int type; + } + + public static class ApplicationErrorReport.AnrInfo { + ctor public ApplicationErrorReport.AnrInfo(); + ctor public ApplicationErrorReport.AnrInfo(android.os.Parcel); + method public void dump(android.util.Printer, java.lang.String); + method public void writeToParcel(android.os.Parcel, int); + field public java.lang.String activity; + field public java.lang.String cause; + field public java.lang.String info; + } + + public static class ApplicationErrorReport.BatteryInfo { + ctor public ApplicationErrorReport.BatteryInfo(); + ctor public ApplicationErrorReport.BatteryInfo(android.os.Parcel); + method public void dump(android.util.Printer, java.lang.String); + method public void writeToParcel(android.os.Parcel, int); + field public java.lang.String checkinDetails; + field public long durationMicros; + field public java.lang.String usageDetails; + field public int usagePercent; + } + + public static class ApplicationErrorReport.CrashInfo { + ctor public ApplicationErrorReport.CrashInfo(); + ctor public ApplicationErrorReport.CrashInfo(java.lang.Throwable); + ctor public ApplicationErrorReport.CrashInfo(android.os.Parcel); + method public void dump(android.util.Printer, java.lang.String); + method public void writeToParcel(android.os.Parcel, int); + field public java.lang.String exceptionClassName; + field public java.lang.String exceptionMessage; + field public java.lang.String stackTrace; + field public java.lang.String throwClassName; + field public java.lang.String throwFileName; + field public int throwLineNumber; + field public java.lang.String throwMethodName; + } + + public static class ApplicationErrorReport.RunningServiceInfo { + ctor public ApplicationErrorReport.RunningServiceInfo(); + ctor public ApplicationErrorReport.RunningServiceInfo(android.os.Parcel); + method public void dump(android.util.Printer, java.lang.String); + method public void writeToParcel(android.os.Parcel, int); + field public long durationMillis; + field public java.lang.String serviceDetails; + } + public class DatePickerDialog extends android.app.AlertDialog implements android.widget.DatePicker.OnDateChangedListener android.content.DialogInterface.OnClickListener { ctor public DatePickerDialog(android.content.Context, android.app.DatePickerDialog.OnDateSetListener, int, int, int); ctor public DatePickerDialog(android.content.Context, int, android.app.DatePickerDialog.OnDateSetListener, int, int, int); @@ -5268,6 +5338,7 @@ package android.content { field public static final java.lang.String ACTION_AIRPLANE_MODE_CHANGED = "android.intent.action.AIRPLANE_MODE"; field public static final java.lang.String ACTION_ALL_APPS = "android.intent.action.ALL_APPS"; field public static final java.lang.String ACTION_ANSWER = "android.intent.action.ANSWER"; + field public static final java.lang.String ACTION_APP_ERROR = "android.intent.action.APP_ERROR"; field public static final java.lang.String ACTION_ATTACH_DATA = "android.intent.action.ATTACH_DATA"; field public static final java.lang.String ACTION_BATTERY_CHANGED = "android.intent.action.BATTERY_CHANGED"; field public static final java.lang.String ACTION_BATTERY_LOW = "android.intent.action.BATTERY_LOW"; @@ -5299,6 +5370,7 @@ package android.content { field public static final java.lang.String ACTION_INPUT_METHOD_CHANGED = "android.intent.action.INPUT_METHOD_CHANGED"; field public static final java.lang.String ACTION_INSERT = "android.intent.action.INSERT"; field public static final java.lang.String ACTION_INSERT_OR_EDIT = "android.intent.action.INSERT_OR_EDIT"; + field public static final java.lang.String ACTION_INSTALL_PACKAGE = "android.intent.action.INSTALL_PACKAGE"; field public static final java.lang.String ACTION_LOCALE_CHANGED = "android.intent.action.LOCALE_CHANGED"; field public static final java.lang.String ACTION_MAIN = "android.intent.action.MAIN"; field public static final java.lang.String ACTION_MANAGE_NETWORK_USAGE = "android.intent.action.MANAGE_NETWORK_USAGE"; @@ -5322,7 +5394,7 @@ package android.content { field public static final java.lang.String ACTION_PACKAGE_CHANGED = "android.intent.action.PACKAGE_CHANGED"; field public static final java.lang.String ACTION_PACKAGE_DATA_CLEARED = "android.intent.action.PACKAGE_DATA_CLEARED"; field public static final java.lang.String ACTION_PACKAGE_FIRST_LAUNCH = "android.intent.action.PACKAGE_FIRST_LAUNCH"; - field public static final java.lang.String ACTION_PACKAGE_INSTALL = "android.intent.action.PACKAGE_INSTALL"; + field public static final deprecated java.lang.String ACTION_PACKAGE_INSTALL = "android.intent.action.PACKAGE_INSTALL"; field public static final java.lang.String ACTION_PACKAGE_REMOVED = "android.intent.action.PACKAGE_REMOVED"; field public static final java.lang.String ACTION_PACKAGE_REPLACED = "android.intent.action.PACKAGE_REPLACED"; field public static final java.lang.String ACTION_PACKAGE_RESTARTED = "android.intent.action.PACKAGE_RESTARTED"; @@ -5352,6 +5424,7 @@ package android.content { field public static final java.lang.String ACTION_UID_REMOVED = "android.intent.action.UID_REMOVED"; field public static final deprecated java.lang.String ACTION_UMS_CONNECTED = "android.intent.action.UMS_CONNECTED"; field public static final deprecated java.lang.String ACTION_UMS_DISCONNECTED = "android.intent.action.UMS_DISCONNECTED"; + field public static final java.lang.String ACTION_UNINSTALL_PACKAGE = "android.intent.action.UNINSTALL_PACKAGE"; field public static final java.lang.String ACTION_USER_PRESENT = "android.intent.action.USER_PRESENT"; field public static final java.lang.String ACTION_VIEW = "android.intent.action.VIEW"; field public static final java.lang.String ACTION_VOICE_COMMAND = "android.intent.action.VOICE_COMMAND"; @@ -5382,7 +5455,9 @@ package android.content { field public static final java.lang.String CATEGORY_UNIT_TEST = "android.intent.category.UNIT_TEST"; field public static final android.os.Parcelable.Creator CREATOR; field public static final java.lang.String EXTRA_ALARM_COUNT = "android.intent.extra.ALARM_COUNT"; + field public static final java.lang.String EXTRA_ALLOW_REPLACE = "android.intent.extra.ALLOW_REPLACE"; field public static final java.lang.String EXTRA_BCC = "android.intent.extra.BCC"; + field public static final java.lang.String EXTRA_BUG_REPORT = "android.intent.extra.BUG_REPORT"; field public static final java.lang.String EXTRA_CC = "android.intent.extra.CC"; field public static final deprecated java.lang.String EXTRA_CHANGED_COMPONENT_NAME = "android.intent.extra.changed_component_name"; field public static final java.lang.String EXTRA_CHANGED_COMPONENT_NAME_LIST = "android.intent.extra.changed_component_name_list"; @@ -5398,12 +5473,15 @@ package android.content { field public static final java.lang.String EXTRA_DONT_KILL_APP = "android.intent.extra.DONT_KILL_APP"; field public static final java.lang.String EXTRA_EMAIL = "android.intent.extra.EMAIL"; field public static final java.lang.String EXTRA_INITIAL_INTENTS = "android.intent.extra.INITIAL_INTENTS"; + field public static final java.lang.String EXTRA_INSTALLER_PACKAGE_NAME = "android.intent.extra.INSTALLER_PACKAGE_NAME"; field public static final java.lang.String EXTRA_INTENT = "android.intent.extra.INTENT"; field public static final java.lang.String EXTRA_KEY_EVENT = "android.intent.extra.KEY_EVENT"; field public static final java.lang.String EXTRA_LOCAL_ONLY = "android.intent.extra.LOCAL_ONLY"; + field public static final java.lang.String EXTRA_NOT_UNKNOWN_SOURCE = "android.intent.extra.NOT_UNKNOWN_SOURCE"; field public static final java.lang.String EXTRA_PHONE_NUMBER = "android.intent.extra.PHONE_NUMBER"; field public static final java.lang.String EXTRA_REMOTE_INTENT_TOKEN = "android.intent.extra.remote_intent_token"; field public static final java.lang.String EXTRA_REPLACING = "android.intent.extra.REPLACING"; + field public static final java.lang.String EXTRA_RETURN_RESULT = "android.intent.extra.RETURN_RESULT"; field public static final java.lang.String EXTRA_SHORTCUT_ICON = "android.intent.extra.shortcut.ICON"; field public static final java.lang.String EXTRA_SHORTCUT_ICON_RESOURCE = "android.intent.extra.shortcut.ICON_RESOURCE"; field public static final java.lang.String EXTRA_SHORTCUT_INTENT = "android.intent.extra.shortcut.INTENT"; diff --git a/core/java/android/app/Activity.java b/core/java/android/app/Activity.java index 98b867d34e2a..929867bc8e7b 100644 --- a/core/java/android/app/Activity.java +++ b/core/java/android/app/Activity.java @@ -1445,10 +1445,6 @@ public class Activity extends ContextThemeWrapper } /** - * @deprecated Use the new {@link Fragment} API - * {@link Fragment#setRetainInstance(boolean)} instead; this is also - * available on older platforms through the Android compatibility package. - * * Retrieve the non-configuration instance data that was previously * returned by {@link #onRetainNonConfigurationInstance()}. This will * be available from the initial {@link #onCreate} and @@ -1464,6 +1460,10 @@ public class Activity extends ContextThemeWrapper * * @return Returns the object previously returned by * {@link #onRetainNonConfigurationInstance()}. + * + * @deprecated Use the new {@link Fragment} API + * {@link Fragment#setRetainInstance(boolean)} instead; this is also + * available on older platforms through the Android compatibility package. */ @Deprecated public Object getLastNonConfigurationInstance() { @@ -1472,10 +1472,6 @@ public class Activity extends ContextThemeWrapper } /** - * @deprecated Use the new {@link Fragment} API - * {@link Fragment#setRetainInstance(boolean)} instead; this is also - * available on older platforms through the Android compatibility package. - * * Called by the system, as part of destroying an * activity due to a configuration change, when it is known that a new * instance will immediately be created for the new configuration. You @@ -1522,6 +1518,10 @@ public class Activity extends ContextThemeWrapper * * @return Return any Object holding the desired state to propagate to the * next activity instance. + * + * @deprecated Use the new {@link Fragment} API + * {@link Fragment#setRetainInstance(boolean)} instead; this is also + * available on older platforms through the Android compatibility package. */ public Object onRetainNonConfigurationInstance() { return null; @@ -1696,10 +1696,6 @@ public class Activity extends ContextThemeWrapper } /** - * @deprecated Use the new {@link android.content.CursorLoader} class with - * {@link LoaderManager} instead; this is also - * available on older platforms through the Android compatibility package. - * * This method allows the activity to take care of managing the given * {@link Cursor}'s lifecycle for you based on the activity's lifecycle. * That is, when the activity is stopped it will automatically call @@ -1715,6 +1711,10 @@ public class Activity extends ContextThemeWrapper * * @see #managedQuery(android.net.Uri , String[], String, String[], String) * @see #stopManagingCursor + * + * @deprecated Use the new {@link android.content.CursorLoader} class with + * {@link LoaderManager} instead; this is also + * available on older platforms through the Android compatibility package. */ @Deprecated public void startManagingCursor(Cursor c) { @@ -1724,10 +1724,6 @@ public class Activity extends ContextThemeWrapper } /** - * @deprecated Use the new {@link android.content.CursorLoader} class with - * {@link LoaderManager} instead; this is also - * available on older platforms through the Android compatibility package. - * * Given a Cursor that was previously given to * {@link #startManagingCursor}, stop the activity's management of that * cursor. @@ -1735,6 +1731,10 @@ public class Activity extends ContextThemeWrapper * @param c The Cursor that was being managed. * * @see #startManagingCursor + * + * @deprecated Use the new {@link android.content.CursorLoader} class with + * {@link LoaderManager} instead; this is also + * available on older platforms through the Android compatibility package. */ @Deprecated public void stopManagingCursor(Cursor c) { @@ -2746,10 +2746,6 @@ public class Activity extends ContextThemeWrapper } /** - * @deprecated Use the new {@link DialogFragment} class with - * {@link FragmentManager} instead; this is also - * available on older platforms through the Android compatibility package. - * * Callback for creating dialogs that are managed (saved and restored) for you * by the activity. The default implementation calls through to * {@link #onCreateDialog(int)} for compatibility. @@ -2777,6 +2773,10 @@ public class Activity extends ContextThemeWrapper * @see #showDialog(int, Bundle) * @see #dismissDialog(int) * @see #removeDialog(int) + * + * @deprecated Use the new {@link DialogFragment} class with + * {@link FragmentManager} instead; this is also + * available on older platforms through the Android compatibility package. */ @Deprecated protected Dialog onCreateDialog(int id, Bundle args) { @@ -2793,10 +2793,6 @@ public class Activity extends ContextThemeWrapper } /** - * @deprecated Use the new {@link DialogFragment} class with - * {@link FragmentManager} instead; this is also - * available on older platforms through the Android compatibility package. - * * Provides an opportunity to prepare a managed dialog before it is being * shown. The default implementation calls through to * {@link #onPrepareDialog(int, Dialog)} for compatibility. @@ -2815,6 +2811,10 @@ public class Activity extends ContextThemeWrapper * @see #showDialog(int) * @see #dismissDialog(int) * @see #removeDialog(int) + * + * @deprecated Use the new {@link DialogFragment} class with + * {@link FragmentManager} instead; this is also + * available on older platforms through the Android compatibility package. */ @Deprecated protected void onPrepareDialog(int id, Dialog dialog, Bundle args) { @@ -2822,13 +2822,13 @@ public class Activity extends ContextThemeWrapper } /** - * @deprecated Use the new {@link DialogFragment} class with - * {@link FragmentManager} instead; this is also - * available on older platforms through the Android compatibility package. - * * Simple version of {@link #showDialog(int, Bundle)} that does not * take any arguments. Simply calls {@link #showDialog(int, Bundle)} * with null arguments. + * + * @deprecated Use the new {@link DialogFragment} class with + * {@link FragmentManager} instead; this is also + * available on older platforms through the Android compatibility package. */ @Deprecated public final void showDialog(int id) { @@ -2836,10 +2836,6 @@ public class Activity extends ContextThemeWrapper } /** - * @deprecated Use the new {@link DialogFragment} class with - * {@link FragmentManager} instead; this is also - * available on older platforms through the Android compatibility package. - * * Show a dialog managed by this activity. A call to {@link #onCreateDialog(int, Bundle)} * will be made with the same id the first time this is called for a given * id. From thereafter, the dialog will be automatically saved and restored. @@ -2864,6 +2860,10 @@ public class Activity extends ContextThemeWrapper * @see #onPrepareDialog(int, Dialog, Bundle) * @see #dismissDialog(int) * @see #removeDialog(int) + * + * @deprecated Use the new {@link DialogFragment} class with + * {@link FragmentManager} instead; this is also + * available on older platforms through the Android compatibility package. */ @Deprecated public final boolean showDialog(int id, Bundle args) { @@ -2887,10 +2887,6 @@ public class Activity extends ContextThemeWrapper } /** - * @deprecated Use the new {@link DialogFragment} class with - * {@link FragmentManager} instead; this is also - * available on older platforms through the Android compatibility package. - * * Dismiss a dialog that was previously shown via {@link #showDialog(int)}. * * @param id The id of the managed dialog. @@ -2902,6 +2898,10 @@ public class Activity extends ContextThemeWrapper * @see #onPrepareDialog(int, Dialog, Bundle) * @see #showDialog(int) * @see #removeDialog(int) + * + * @deprecated Use the new {@link DialogFragment} class with + * {@link FragmentManager} instead; this is also + * available on older platforms through the Android compatibility package. */ @Deprecated public final void dismissDialog(int id) { @@ -2926,10 +2926,6 @@ public class Activity extends ContextThemeWrapper } /** - * @deprecated Use the new {@link DialogFragment} class with - * {@link FragmentManager} instead; this is also - * available on older platforms through the Android compatibility package. - * * Removes any internal references to a dialog managed by this Activity. * If the dialog is showing, it will dismiss it as part of the clean up. * @@ -2946,6 +2942,10 @@ public class Activity extends ContextThemeWrapper * @see #onPrepareDialog(int, Dialog, Bundle) * @see #showDialog(int) * @see #dismissDialog(int) + * + * @deprecated Use the new {@link DialogFragment} class with + * {@link FragmentManager} instead; this is also + * available on older platforms through the Android compatibility package. */ @Deprecated public final void removeDialog(int id) { diff --git a/core/java/android/app/ActivityGroup.java b/core/java/android/app/ActivityGroup.java index fbd78be13c6c..78a4dfd47b40 100644 --- a/core/java/android/app/ActivityGroup.java +++ b/core/java/android/app/ActivityGroup.java @@ -20,18 +20,16 @@ import java.util.HashMap; import android.content.Intent; import android.os.Bundle; -import android.util.Log; /** + * A screen that contains and runs multiple embedded activities. + * * @deprecated Use the new {@link Fragment} and {@link FragmentManager} APIs * instead; these are also * available on older platforms through the Android compatibility package. - * - * A screen that contains and runs multiple embedded activities. */ @Deprecated public class ActivityGroup extends Activity { - private static final String TAG = "ActivityGroup"; private static final String STATES_KEY = "android:states"; static final String PARENT_NON_CONFIG_INSTANCE_KEY = "android:parent_non_config_instance"; diff --git a/core/java/android/app/ApplicationErrorReport.java b/core/java/android/app/ApplicationErrorReport.java index 1e012ebd1e6c..6524c9a43e76 100644 --- a/core/java/android/app/ApplicationErrorReport.java +++ b/core/java/android/app/ApplicationErrorReport.java @@ -37,14 +37,17 @@ import java.io.StringWriter; * * A report has a type, which is one of * <ul> + * <li> {@link #TYPE_NONE} uninitialized instance of {@link ApplicationErrorReport}. * <li> {@link #TYPE_CRASH} application crash. Information about the crash * is stored in {@link #crashInfo}. * <li> {@link #TYPE_ANR} application not responding. Information about the * ANR is stored in {@link #anrInfo}. - * <li> {@link #TYPE_NONE} uninitialized instance of {@link ApplicationErrorReport}. + * <li> {@link #TYPE_BATTERY} user reported application is using too much + * battery. Information about the battery use is stored in {@link #batteryInfo}. + * <li> {@link #TYPE_RUNNING_SERVICE} user reported application is leaving an + * unneeded serive running. Information about the battery use is stored in + * {@link #runningServiceInfo}. * </ul> - * - * @hide */ public class ApplicationErrorReport implements Parcelable { diff --git a/core/java/android/app/LocalActivityManager.java b/core/java/android/app/LocalActivityManager.java index 0a6b80449f3b..b654a6aae8af 100644 --- a/core/java/android/app/LocalActivityManager.java +++ b/core/java/android/app/LocalActivityManager.java @@ -28,15 +28,15 @@ import java.util.HashMap; import java.util.Map; /** - * @deprecated Use the new {@link Fragment} and {@link FragmentManager} APIs - * instead; these are also - * available on older platforms through the Android compatibility package. - * * <p>Helper class for managing multiple running embedded activities in the same * process. This class is not normally used directly, but rather created for * you as part of the {@link android.app.ActivityGroup} implementation. * * @see ActivityGroup + * + * @deprecated Use the new {@link Fragment} and {@link FragmentManager} APIs + * instead; these are also + * available on older platforms through the Android compatibility package. */ @Deprecated public class LocalActivityManager { diff --git a/core/java/android/app/TabActivity.java b/core/java/android/app/TabActivity.java index 0fd0c2c8a275..882e55a89a74 100644 --- a/core/java/android/app/TabActivity.java +++ b/core/java/android/app/TabActivity.java @@ -23,11 +23,6 @@ import android.widget.TabWidget; import android.widget.TextView; /** - * @deprecated New applications should use Fragments instead of this class; - * to continue to run on older devices, you can use the v4 support library - * which provides a version of the Fragment API that is compatible down to - * {@link android.os.Build.VERSION_CODES#DONUT}. - * * <p>For apps developing against {@link android.os.Build.VERSION_CODES#HONEYCOMB} * or later, tabs are typically presented in the UI using the new * {@link ActionBar#newTab() ActionBar.newTab()} and @@ -49,6 +44,11 @@ import android.widget.TextView; * <p>Also see the <a href="{@docRoot}resources/samples/Support4Demos/src/com/example/android/supportv4/app/FragmentTabsPager.html"> * Fragment Tabs Pager</a> sample for an example of using the support library's ViewPager to * allow the user to swipe the content to switch between tabs.</p> + * + * @deprecated New applications should use Fragments instead of this class; + * to continue to run on older devices, you can use the v4 support library + * which provides a version of the Fragment API that is compatible down to + * {@link android.os.Build.VERSION_CODES#DONUT}. */ @Deprecated public class TabActivity extends ActivityGroup { diff --git a/core/java/android/content/Intent.java b/core/java/android/content/Intent.java index 2f9627a4403d..a6e88cd65748 100644 --- a/core/java/android/content/Intent.java +++ b/core/java/android/content/Intent.java @@ -1132,7 +1132,8 @@ public class Intent implements Parcelable, Cloneable { * <p>Input: No data is specified. The bug report is passed in using * an {@link #EXTRA_BUG_REPORT} field. * <p>Output: Nothing. - * @hide + * + * @see #EXTRA_BUG_REPORT */ @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) public static final String ACTION_APP_ERROR = "android.intent.action.APP_ERROR"; @@ -1169,6 +1170,80 @@ public class Intent implements Parcelable, Cloneable { "android.intent.action.MANAGE_NETWORK_USAGE"; /** + * Activity Action: Launch application installer. + * <p> + * Input: The data must be a content: or file: URI at which the application + * can be retrieved. You can optionally supply + * {@link #EXTRA_INSTALLER_PACKAGE_NAME}, {@link #EXTRA_NOT_UNKNOWN_SOURCE}, + * {@link #EXTRA_ALLOW_REPLACE}, and {@link #EXTRA_RETURN_RESULT}. + * <p> + * Output: If {@link #EXTRA_RETURN_RESULT}, returns whether the install + * succeeded. + * + * @see #EXTRA_INSTALLER_PACKAGE_NAME + * @see #EXTRA_NOT_UNKNOWN_SOURCE + * @see #EXTRA_RETURN_RESULT + */ + @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) + public static final String ACTION_INSTALL_PACKAGE = "android.intent.action.INSTALL_PACKAGE"; + + /** + * Used as a string extra field with {@link #ACTION_INSTALL_PACKAGE} to install a + * package. Specifies the installer package name; this package will receive the + * {@link #ACTION_APP_ERROR} intent. + */ + public static final String EXTRA_INSTALLER_PACKAGE_NAME + = "android.intent.extra.INSTALLER_PACKAGE_NAME"; + + /** + * Used as a boolean extra field with {@link #ACTION_INSTALL_PACKAGE} to install a + * package. Specifies that the application being installed should not be + * treated as coming from an unknown source, but as coming from the app + * invoking the Intent. For this to work you must start the installer with + * startActivityForResult(). + */ + public static final String EXTRA_NOT_UNKNOWN_SOURCE + = "android.intent.extra.NOT_UNKNOWN_SOURCE"; + + /** + * Used as a boolean extra field with {@link #ACTION_INSTALL_PACKAGE} to install a + * package. Tells the installer UI to skip the confirmation with the user + * if the .apk is replacing an existing one. + */ + public static final String EXTRA_ALLOW_REPLACE + = "android.intent.extra.ALLOW_REPLACE"; + + /** + * Used as a boolean extra field with {@link #ACTION_INSTALL_PACKAGE} or + * {@link #ACTION_UNINSTALL_PACKAGE}. Specifies that the installer UI should + * return to the application the result code of the install/uninstall. The returned result + * code will be {@link android.app.Activity#RESULT_OK} on success or + * {@link android.app.Activity#RESULT_FIRST_USER} on failure. + */ + public static final String EXTRA_RETURN_RESULT + = "android.intent.extra.RETURN_RESULT"; + + /** + * Package manager install result code. @hide because result codes are not + * yet ready to be exposed. + */ + public static final String EXTRA_INSTALL_RESULT + = "android.intent.extra.INSTALL_RESULT"; + + /** + * Activity Action: Launch application uninstaller. + * <p> + * Input: The data must be a package: URI whose scheme specific part is + * the package name of the current installed package to be uninstalled. + * You can optionally supply {@link #EXTRA_RETURN_RESULT}. + * <p> + * Output: If {@link #EXTRA_RETURN_RESULT}, returns whether the install + * succeeded. + */ + @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) + public static final String ACTION_UNINSTALL_PACKAGE = "android.intent.action.UNINSTALL_PACKAGE"; + + /** * A string associated with a {@link #ACTION_UPGRADE_SETUP} activity * describing the last run version of the platform that was setup. * @hide @@ -1287,7 +1362,10 @@ public class Intent implements Parcelable, Cloneable { * * <p class="note">This is a protected intent that can only be sent * by the system. + * + * @deprecated This constant has never been used. */ + @Deprecated @SdkConstant(SdkConstantType.BROADCAST_INTENT_ACTION) public static final String ACTION_PACKAGE_INSTALL = "android.intent.action.PACKAGE_INSTALL"; /** @@ -2380,22 +2458,10 @@ public class Intent implements Parcelable, Cloneable { /** * Used as a parcelable extra field in {@link #ACTION_APP_ERROR}, containing * the bug report. - * - * @hide */ public static final String EXTRA_BUG_REPORT = "android.intent.extra.BUG_REPORT"; /** - * Used as a string extra field when sending an intent to PackageInstaller to install a - * package. Specifies the installer package name; this package will receive the - * {@link #ACTION_APP_ERROR} intent. - * - * @hide - */ - public static final String EXTRA_INSTALLER_PACKAGE_NAME - = "android.intent.extra.INSTALLER_PACKAGE_NAME"; - - /** * Used in the extra field in the remote intent. It's astring token passed with the * remote intent. */ |