Loading api/current.txt +8 −21 Original line number Diff line number Diff line Loading @@ -62,21 +62,17 @@ package android { field public static final java.lang.String INJECT_EVENTS = "android.permission.INJECT_EVENTS"; field public static final java.lang.String INSTALL_LOCATION_PROVIDER = "android.permission.INSTALL_LOCATION_PROVIDER"; field public static final java.lang.String INSTALL_PACKAGES = "android.permission.INSTALL_PACKAGES"; field public static final java.lang.String INTERACT_ACROSS_USERS = "android.permission.INTERACT_ACROSS_USERS"; field public static final java.lang.String INTERNAL_SYSTEM_WINDOW = "android.permission.INTERNAL_SYSTEM_WINDOW"; field public static final java.lang.String INTERNET = "android.permission.INTERNET"; field public static final java.lang.String KILL_BACKGROUND_PROCESSES = "android.permission.KILL_BACKGROUND_PROCESSES"; field public static final java.lang.String MANAGE_ACCOUNTS = "android.permission.MANAGE_ACCOUNTS"; field public static final java.lang.String MANAGE_APP_TOKENS = "android.permission.MANAGE_APP_TOKENS"; field public static final java.lang.String MANAGE_USERS = "android.permission.MANAGE_USERS"; field public static final java.lang.String MASTER_CLEAR = "android.permission.MASTER_CLEAR"; field public static final java.lang.String MODIFY_AUDIO_SETTINGS = "android.permission.MODIFY_AUDIO_SETTINGS"; field public static final java.lang.String MODIFY_PHONE_STATE = "android.permission.MODIFY_PHONE_STATE"; field public static final java.lang.String MOUNT_FORMAT_FILESYSTEMS = "android.permission.MOUNT_FORMAT_FILESYSTEMS"; field public static final java.lang.String MOUNT_UNMOUNT_FILESYSTEMS = "android.permission.MOUNT_UNMOUNT_FILESYSTEMS"; field public static final java.lang.String NET_TUNNELING = "android.permission.NET_TUNNELING"; field public static final java.lang.String NFC = "android.permission.NFC"; field public static final java.lang.String PACKAGE_VERIFICATION_AGENT = "android.permission.PACKAGE_VERIFICATION_AGENT"; field public static final deprecated java.lang.String PERSISTENT_ACTIVITY = "android.permission.PERSISTENT_ACTIVITY"; field public static final java.lang.String PROCESS_OUTGOING_CALLS = "android.permission.PROCESS_OUTGOING_CALLS"; field public static final java.lang.String READ_CALENDAR = "android.permission.READ_CALENDAR"; Loading Loading @@ -3901,11 +3897,12 @@ package android.app { method public static android.app.PendingIntent getActivity(android.content.Context, int, android.content.Intent, int); method public static android.app.PendingIntent getActivity(android.content.Context, int, android.content.Intent, int, android.os.Bundle); method public static android.app.PendingIntent getBroadcast(android.content.Context, int, android.content.Intent, int); method public java.lang.String getCreatorPackage(); method public int getCreatorUid(); method public android.os.UserHandle getCreatorUserHandle(); method public android.content.IntentSender getIntentSender(); method public static android.app.PendingIntent getService(android.content.Context, int, android.content.Intent, int); method public java.lang.String getTargetPackage(); method public int getTargetUid(); method public android.os.UserHandle getTargetUserHandle(); method public deprecated java.lang.String getTargetPackage(); method public static android.app.PendingIntent readPendingIntentOrNullFromParcel(android.os.Parcel); method public void send() throws android.app.PendingIntent.CanceledException; method public void send(int) throws android.app.PendingIntent.CanceledException; Loading Loading @@ -6060,9 +6057,10 @@ package android.content { public class IntentSender implements android.os.Parcelable { method public int describeContents(); method public java.lang.String getTargetPackage(); method public int getTargetUid(); method public android.os.UserHandle getTargetUserHandle(); method public java.lang.String getCreatorPackage(); method public int getCreatorUid(); method public android.os.UserHandle getCreatorUserHandle(); method public deprecated java.lang.String getTargetPackage(); method public static android.content.IntentSender readIntentSenderOrNullFromParcel(android.os.Parcel); method public void sendIntent(android.content.Context, int, android.content.Intent, android.content.IntentSender.OnFinished, android.os.Handler) throws android.content.IntentSender.SendIntentException; method public void sendIntent(android.content.Context, int, android.content.Intent, android.content.IntentSender.OnFinished, android.os.Handler, java.lang.String) throws android.content.IntentSender.SendIntentException; Loading Loading @@ -6705,17 +6703,6 @@ package android.content.pm { field public java.lang.String packageName; } public class PackageUserState { ctor public PackageUserState(); ctor public PackageUserState(android.content.pm.PackageUserState); field public java.util.HashSet disabledComponents; field public int enabled; field public java.util.HashSet enabledComponents; field public boolean installed; field public boolean notLaunched; field public boolean stopped; } public class PathPermission extends android.os.PatternMatcher { ctor public PathPermission(java.lang.String, int, java.lang.String, java.lang.String); ctor public PathPermission(android.os.Parcel); core/java/android/app/PendingIntent.java +47 −5 Original line number Diff line number Diff line Loading @@ -32,8 +32,8 @@ import android.util.AndroidException; /** * A description of an Intent and target action to perform with it. Instances * of this class are created with {@link #getActivity}, * {@link #getBroadcast}, {@link #getService}; the returned object can be * of this class are created with {@link #getActivity}, {@link #getActivities}, * {@link #getBroadcast}, and {@link #getService}; the returned object can be * handed to other applications so that they can perform the action you * described on your behalf at a later time. * Loading @@ -54,6 +54,34 @@ import android.util.AndroidException; * categories, and components, and same flags), it will receive a PendingIntent * representing the same token if that is still valid, and can thus call * {@link #cancel} to remove it. * * <p>Because of this behavior, it is important to know when two Intents * are considered to be the same for purposes of retrieving a PendingIntent. * A common mistake people make is to create multiple PendingIntent objects * with Intents that only vary in their "extra" contents, expecting to get * a different PendingIntent each time. This does <em>not</em> happen. The * parts of the Intent that are used for matching are the same ones defined * by {@link Intent#filterEquals(Intent) Intent.filterEquals}. If you use two * Intent objects that are equivalent as per * {@link Intent#filterEquals(Intent) Intent.filterEquals}, then you will get * the same PendingIntent for both of them. * * <p>There are two typical ways to deal with this. * * <p>If you truly need multiple distinct PendingIntent objects active at * the same time (such as to use as two notifications that are both shown * at the same time), then you will need to ensure there is something that * is different about them to associate them with different PendingIntents. * This may be any of the Intent attributes considered by * {@link Intent#filterEquals(Intent) Intent.filterEquals}, or different * request code integers supplied to {@link #getActivity}, {@link #getActivities}, * {@link #getBroadcast}, or {@link #getService}. * * <p>If you only need one PendingIntent active at a time for any of the * Intents you will use, then you can alternatively use the flags * {@link #FLAG_CANCEL_CURRENT} or {@link #FLAG_UPDATE_CURRENT} to either * cancel or modify whatever current PendingIntent is associated with the * Intent you are supplying. */ public final class PendingIntent implements Parcelable { private final IIntentSender mTarget; Loading Loading @@ -621,6 +649,20 @@ public final class PendingIntent implements Parcelable { } } /** * @deprecated Renamed to {@link #getCreatorPackage()}. */ @Deprecated public String getTargetPackage() { try { return ActivityManagerNative.getDefault() .getPackageForIntentSender(mTarget); } catch (RemoteException e) { // Should never happen. return null; } } /** * Return the package name of the application that created this * PendingIntent, that is the identity under which you will actually be Loading @@ -630,7 +672,7 @@ public final class PendingIntent implements Parcelable { * @return The package name of the PendingIntent, or null if there is * none associated with it. */ public String getTargetPackage() { public String getCreatorPackage() { try { return ActivityManagerNative.getDefault() .getPackageForIntentSender(mTarget); Loading @@ -649,7 +691,7 @@ public final class PendingIntent implements Parcelable { * @return The uid of the PendingIntent, or -1 if there is * none associated with it. */ public int getTargetUid() { public int getCreatorUid() { try { return ActivityManagerNative.getDefault() .getUidForIntentSender(mTarget); Loading @@ -670,7 +712,7 @@ public final class PendingIntent implements Parcelable { * @return The user handle of the PendingIntent, or null if there is * none associated with it. */ public UserHandle getTargetUserHandle() { public UserHandle getCreatorUserHandle() { try { int uid = ActivityManagerNative.getDefault() .getUidForIntentSender(mTarget); Loading core/java/android/content/Context.java +36 −35 Original line number Diff line number Diff line Loading @@ -856,8 +856,10 @@ public abstract class Context { public abstract void startActivity(Intent intent); /** * Same as {@link #startActivity(Intent)}, but for a specific user. It requires holding * the {@link android.Manifest.permission#INTERACT_ACROSS_USERS_FULL} permission. * Version of {@link #startActivity(Intent)} that allows you to specify the * user the activity will be started for. This is not available to applications * that are not pre-installed on the system image. Using it requires holding * the INTERACT_ACROSS_USERS_FULL permission. * @param intent The description of the activity to start. * @param user The UserHandle of the user to start this activity for. * @throws ActivityNotFoundException Loading Loading @@ -895,8 +897,10 @@ public abstract class Context { public abstract void startActivity(Intent intent, Bundle options); /** * Same as {@link #startActivity(Intent, Bundle)}, but for a specific user. It requires holding * the {@link android.Manifest.permission#INTERACT_ACROSS_USERS_FULL} permission. * Version of {@link #startActivity(Intent, Bundle)} that allows you to specify the * user the activity will be started for. This is not available to applications * that are not pre-installed on the system image. Using it requires holding * the INTERACT_ACROSS_USERS_FULL permission. * @param intent The description of the activity to start. * @param options Additional options for how the Activity should be started. * May be null if there are no options. See {@link android.app.ActivityOptions} Loading Loading @@ -1118,10 +1122,10 @@ public abstract class Context { Bundle initialExtras); /** * Same as {@link #sendBroadcast(Intent)}, but for a specific user. This broadcast * can only be sent to receivers that are part of the calling application. It * requires holding the {@link android.Manifest.permission#INTERACT_ACROSS_USERS} * permission. * Version of {@link #sendBroadcast(Intent)} that allows you to specify the * user the broadcast will be sent to. This is not available to applications * that are not pre-installed on the system image. Using it requires holding * the INTERACT_ACROSS_USERS permission. * @param intent The intent to broadcast * @param user UserHandle to send the intent to. * @see #sendBroadcast(Intent) Loading @@ -1129,10 +1133,10 @@ public abstract class Context { public abstract void sendBroadcastAsUser(Intent intent, UserHandle user); /** * Same as {@link #sendBroadcast(Intent, String)}, but for a specific user. This broadcast * can only be sent to receivers that are part of the calling application. It * requires holding the {@link android.Manifest.permission#INTERACT_ACROSS_USERS} * permission. * Version of {@link #sendBroadcast(Intent, String)} that allows you to specify the * user the broadcast will be sent to. This is not available to applications * that are not pre-installed on the system image. Using it requires holding * the INTERACT_ACROSS_USERS permission. * * @param intent The Intent to broadcast; all receivers matching this * Intent will receive the broadcast. Loading @@ -1147,12 +1151,12 @@ public abstract class Context { String receiverPermission); /** * Same as * {@link #sendOrderedBroadcast(Intent, String, BroadcastReceiver, Handler, int, String, Bundle)}, * but for a specific user. This broadcast * can only be sent to receivers that are part of the calling application. It * requires holding the {@link android.Manifest.permission#INTERACT_ACROSS_USERS} * permission. * Version of * {@link #sendOrderedBroadcast(Intent, String, BroadcastReceiver, Handler, int, String, Bundle)} * that allows you to specify the * user the broadcast will be sent to. This is not available to applications * that are not pre-installed on the system image. Using it requires holding * the INTERACT_ACROSS_USERS permission. * * <p>See {@link BroadcastReceiver} for more information on Intent broadcasts. * Loading Loading @@ -1261,11 +1265,10 @@ public abstract class Context { public abstract void removeStickyBroadcast(Intent intent); /** * Same as {@link #sendStickyBroadcast(Intent)}, * but for a specific user. This broadcast * can only be sent to receivers that are part of the calling application. It * requires holding the {@link android.Manifest.permission#INTERACT_ACROSS_USERS} * permission. * Version of {@link #sendStickyBroadcast(Intent)} that allows you to specify the * user the broadcast will be sent to. This is not available to applications * that are not pre-installed on the system image. Using it requires holding * the INTERACT_ACROSS_USERS permission. * * @param intent The Intent to broadcast; all receivers matching this * Intent will receive the broadcast, and the Intent will be held to Loading @@ -1277,12 +1280,12 @@ public abstract class Context { public abstract void sendStickyBroadcastAsUser(Intent intent, UserHandle user); /** * Same as * {@link #sendStickyOrderedBroadcast(Intent, BroadcastReceiver, Handler, int, String, Bundle) * but for a specific user. This broadcast * can only be sent to receivers that are part of the calling application. It * requires holding the {@link android.Manifest.permission#INTERACT_ACROSS_USERS} * permission. * Version of * {@link #sendStickyOrderedBroadcast(Intent, BroadcastReceiver, Handler, int, String, Bundle)} * that allows you to specify the * user the broadcast will be sent to. This is not available to applications * that are not pre-installed on the system image. Using it requires holding * the INTERACT_ACROSS_USERS permission. * * <p>See {@link BroadcastReceiver} for more information on Intent broadcasts. * Loading @@ -1309,12 +1312,10 @@ public abstract class Context { Bundle initialExtras); /** * Same as * {@link #sendStickyOrderedBroadcast(Intent, BroadcastReceiver, Handler, int, String, Bundle) * but for a specific user. This broadcast * can only be sent to receivers that are part of the calling application. It * requires holding the {@link android.Manifest.permission#INTERACT_ACROSS_USERS} * permission. * Version of {@link #removeStickyBroadcast(Intent)} that allows you to specify the * user the broadcast will be sent to. This is not available to applications * that are not pre-installed on the system image. Using it requires holding * the INTERACT_ACROSS_USERS permission. * * <p>You must hold the {@link android.Manifest.permission#BROADCAST_STICKY} * permission in order to use this API. If you do not hold that Loading core/java/android/content/IntentSender.java +17 −3 Original line number Diff line number Diff line Loading @@ -204,6 +204,20 @@ public class IntentSender implements Parcelable { } } /** * @deprecated Renamed to {@link #getCreatorPackage()}. */ @Deprecated public String getTargetPackage() { try { return ActivityManagerNative.getDefault() .getPackageForIntentSender(mTarget); } catch (RemoteException e) { // Should never happen. return null; } } /** * Return the package name of the application that created this * IntentSender, that is the identity under which you will actually be Loading @@ -213,7 +227,7 @@ public class IntentSender implements Parcelable { * @return The package name of the PendingIntent, or null if there is * none associated with it. */ public String getTargetPackage() { public String getCreatorPackage() { try { return ActivityManagerNative.getDefault() .getPackageForIntentSender(mTarget); Loading @@ -232,7 +246,7 @@ public class IntentSender implements Parcelable { * @return The uid of the PendingIntent, or -1 if there is * none associated with it. */ public int getTargetUid() { public int getCreatorUid() { try { return ActivityManagerNative.getDefault() .getUidForIntentSender(mTarget); Loading @@ -253,7 +267,7 @@ public class IntentSender implements Parcelable { * @return The user handle of the PendingIntent, or null if there is * none associated with it. */ public UserHandle getTargetUserHandle() { public UserHandle getCreatorUserHandle() { try { int uid = ActivityManagerNative.getDefault() .getUidForIntentSender(mTarget); Loading core/java/android/content/pm/PackageManager.java +2 −4 Original line number Diff line number Diff line Loading @@ -2434,8 +2434,7 @@ public abstract class PackageManager { * @param verificationCode either {@link PackageManager#VERIFICATION_ALLOW} * or {@link PackageManager#VERIFICATION_REJECT}. * @throws SecurityException if the caller does not have the * {@link android.Manifest.permission#PACKAGE_VERIFICATION_AGENT} * permission. * PACKAGE_VERIFICATION_AGENT permission. */ public abstract void verifyPendingInstall(int id, int verificationCode); Loading Loading @@ -2469,8 +2468,7 @@ public abstract class PackageManager { * bounds value; namely, 0 or * {@link PackageManager#MAXIMUM_VERIFICATION_TIMEOUT}. * @throws SecurityException if the caller does not have the * {@link android.Manifest.permission#PACKAGE_VERIFICATION_AGENT} * permission. * PACKAGE_VERIFICATION_AGENT permission. */ public abstract void extendVerificationTimeout(int id, int verificationCodeAtTimeout, long millisecondsToDelay); Loading Loading
api/current.txt +8 −21 Original line number Diff line number Diff line Loading @@ -62,21 +62,17 @@ package android { field public static final java.lang.String INJECT_EVENTS = "android.permission.INJECT_EVENTS"; field public static final java.lang.String INSTALL_LOCATION_PROVIDER = "android.permission.INSTALL_LOCATION_PROVIDER"; field public static final java.lang.String INSTALL_PACKAGES = "android.permission.INSTALL_PACKAGES"; field public static final java.lang.String INTERACT_ACROSS_USERS = "android.permission.INTERACT_ACROSS_USERS"; field public static final java.lang.String INTERNAL_SYSTEM_WINDOW = "android.permission.INTERNAL_SYSTEM_WINDOW"; field public static final java.lang.String INTERNET = "android.permission.INTERNET"; field public static final java.lang.String KILL_BACKGROUND_PROCESSES = "android.permission.KILL_BACKGROUND_PROCESSES"; field public static final java.lang.String MANAGE_ACCOUNTS = "android.permission.MANAGE_ACCOUNTS"; field public static final java.lang.String MANAGE_APP_TOKENS = "android.permission.MANAGE_APP_TOKENS"; field public static final java.lang.String MANAGE_USERS = "android.permission.MANAGE_USERS"; field public static final java.lang.String MASTER_CLEAR = "android.permission.MASTER_CLEAR"; field public static final java.lang.String MODIFY_AUDIO_SETTINGS = "android.permission.MODIFY_AUDIO_SETTINGS"; field public static final java.lang.String MODIFY_PHONE_STATE = "android.permission.MODIFY_PHONE_STATE"; field public static final java.lang.String MOUNT_FORMAT_FILESYSTEMS = "android.permission.MOUNT_FORMAT_FILESYSTEMS"; field public static final java.lang.String MOUNT_UNMOUNT_FILESYSTEMS = "android.permission.MOUNT_UNMOUNT_FILESYSTEMS"; field public static final java.lang.String NET_TUNNELING = "android.permission.NET_TUNNELING"; field public static final java.lang.String NFC = "android.permission.NFC"; field public static final java.lang.String PACKAGE_VERIFICATION_AGENT = "android.permission.PACKAGE_VERIFICATION_AGENT"; field public static final deprecated java.lang.String PERSISTENT_ACTIVITY = "android.permission.PERSISTENT_ACTIVITY"; field public static final java.lang.String PROCESS_OUTGOING_CALLS = "android.permission.PROCESS_OUTGOING_CALLS"; field public static final java.lang.String READ_CALENDAR = "android.permission.READ_CALENDAR"; Loading Loading @@ -3901,11 +3897,12 @@ package android.app { method public static android.app.PendingIntent getActivity(android.content.Context, int, android.content.Intent, int); method public static android.app.PendingIntent getActivity(android.content.Context, int, android.content.Intent, int, android.os.Bundle); method public static android.app.PendingIntent getBroadcast(android.content.Context, int, android.content.Intent, int); method public java.lang.String getCreatorPackage(); method public int getCreatorUid(); method public android.os.UserHandle getCreatorUserHandle(); method public android.content.IntentSender getIntentSender(); method public static android.app.PendingIntent getService(android.content.Context, int, android.content.Intent, int); method public java.lang.String getTargetPackage(); method public int getTargetUid(); method public android.os.UserHandle getTargetUserHandle(); method public deprecated java.lang.String getTargetPackage(); method public static android.app.PendingIntent readPendingIntentOrNullFromParcel(android.os.Parcel); method public void send() throws android.app.PendingIntent.CanceledException; method public void send(int) throws android.app.PendingIntent.CanceledException; Loading Loading @@ -6060,9 +6057,10 @@ package android.content { public class IntentSender implements android.os.Parcelable { method public int describeContents(); method public java.lang.String getTargetPackage(); method public int getTargetUid(); method public android.os.UserHandle getTargetUserHandle(); method public java.lang.String getCreatorPackage(); method public int getCreatorUid(); method public android.os.UserHandle getCreatorUserHandle(); method public deprecated java.lang.String getTargetPackage(); method public static android.content.IntentSender readIntentSenderOrNullFromParcel(android.os.Parcel); method public void sendIntent(android.content.Context, int, android.content.Intent, android.content.IntentSender.OnFinished, android.os.Handler) throws android.content.IntentSender.SendIntentException; method public void sendIntent(android.content.Context, int, android.content.Intent, android.content.IntentSender.OnFinished, android.os.Handler, java.lang.String) throws android.content.IntentSender.SendIntentException; Loading Loading @@ -6705,17 +6703,6 @@ package android.content.pm { field public java.lang.String packageName; } public class PackageUserState { ctor public PackageUserState(); ctor public PackageUserState(android.content.pm.PackageUserState); field public java.util.HashSet disabledComponents; field public int enabled; field public java.util.HashSet enabledComponents; field public boolean installed; field public boolean notLaunched; field public boolean stopped; } public class PathPermission extends android.os.PatternMatcher { ctor public PathPermission(java.lang.String, int, java.lang.String, java.lang.String); ctor public PathPermission(android.os.Parcel);
core/java/android/app/PendingIntent.java +47 −5 Original line number Diff line number Diff line Loading @@ -32,8 +32,8 @@ import android.util.AndroidException; /** * A description of an Intent and target action to perform with it. Instances * of this class are created with {@link #getActivity}, * {@link #getBroadcast}, {@link #getService}; the returned object can be * of this class are created with {@link #getActivity}, {@link #getActivities}, * {@link #getBroadcast}, and {@link #getService}; the returned object can be * handed to other applications so that they can perform the action you * described on your behalf at a later time. * Loading @@ -54,6 +54,34 @@ import android.util.AndroidException; * categories, and components, and same flags), it will receive a PendingIntent * representing the same token if that is still valid, and can thus call * {@link #cancel} to remove it. * * <p>Because of this behavior, it is important to know when two Intents * are considered to be the same for purposes of retrieving a PendingIntent. * A common mistake people make is to create multiple PendingIntent objects * with Intents that only vary in their "extra" contents, expecting to get * a different PendingIntent each time. This does <em>not</em> happen. The * parts of the Intent that are used for matching are the same ones defined * by {@link Intent#filterEquals(Intent) Intent.filterEquals}. If you use two * Intent objects that are equivalent as per * {@link Intent#filterEquals(Intent) Intent.filterEquals}, then you will get * the same PendingIntent for both of them. * * <p>There are two typical ways to deal with this. * * <p>If you truly need multiple distinct PendingIntent objects active at * the same time (such as to use as two notifications that are both shown * at the same time), then you will need to ensure there is something that * is different about them to associate them with different PendingIntents. * This may be any of the Intent attributes considered by * {@link Intent#filterEquals(Intent) Intent.filterEquals}, or different * request code integers supplied to {@link #getActivity}, {@link #getActivities}, * {@link #getBroadcast}, or {@link #getService}. * * <p>If you only need one PendingIntent active at a time for any of the * Intents you will use, then you can alternatively use the flags * {@link #FLAG_CANCEL_CURRENT} or {@link #FLAG_UPDATE_CURRENT} to either * cancel or modify whatever current PendingIntent is associated with the * Intent you are supplying. */ public final class PendingIntent implements Parcelable { private final IIntentSender mTarget; Loading Loading @@ -621,6 +649,20 @@ public final class PendingIntent implements Parcelable { } } /** * @deprecated Renamed to {@link #getCreatorPackage()}. */ @Deprecated public String getTargetPackage() { try { return ActivityManagerNative.getDefault() .getPackageForIntentSender(mTarget); } catch (RemoteException e) { // Should never happen. return null; } } /** * Return the package name of the application that created this * PendingIntent, that is the identity under which you will actually be Loading @@ -630,7 +672,7 @@ public final class PendingIntent implements Parcelable { * @return The package name of the PendingIntent, or null if there is * none associated with it. */ public String getTargetPackage() { public String getCreatorPackage() { try { return ActivityManagerNative.getDefault() .getPackageForIntentSender(mTarget); Loading @@ -649,7 +691,7 @@ public final class PendingIntent implements Parcelable { * @return The uid of the PendingIntent, or -1 if there is * none associated with it. */ public int getTargetUid() { public int getCreatorUid() { try { return ActivityManagerNative.getDefault() .getUidForIntentSender(mTarget); Loading @@ -670,7 +712,7 @@ public final class PendingIntent implements Parcelable { * @return The user handle of the PendingIntent, or null if there is * none associated with it. */ public UserHandle getTargetUserHandle() { public UserHandle getCreatorUserHandle() { try { int uid = ActivityManagerNative.getDefault() .getUidForIntentSender(mTarget); Loading
core/java/android/content/Context.java +36 −35 Original line number Diff line number Diff line Loading @@ -856,8 +856,10 @@ public abstract class Context { public abstract void startActivity(Intent intent); /** * Same as {@link #startActivity(Intent)}, but for a specific user. It requires holding * the {@link android.Manifest.permission#INTERACT_ACROSS_USERS_FULL} permission. * Version of {@link #startActivity(Intent)} that allows you to specify the * user the activity will be started for. This is not available to applications * that are not pre-installed on the system image. Using it requires holding * the INTERACT_ACROSS_USERS_FULL permission. * @param intent The description of the activity to start. * @param user The UserHandle of the user to start this activity for. * @throws ActivityNotFoundException Loading Loading @@ -895,8 +897,10 @@ public abstract class Context { public abstract void startActivity(Intent intent, Bundle options); /** * Same as {@link #startActivity(Intent, Bundle)}, but for a specific user. It requires holding * the {@link android.Manifest.permission#INTERACT_ACROSS_USERS_FULL} permission. * Version of {@link #startActivity(Intent, Bundle)} that allows you to specify the * user the activity will be started for. This is not available to applications * that are not pre-installed on the system image. Using it requires holding * the INTERACT_ACROSS_USERS_FULL permission. * @param intent The description of the activity to start. * @param options Additional options for how the Activity should be started. * May be null if there are no options. See {@link android.app.ActivityOptions} Loading Loading @@ -1118,10 +1122,10 @@ public abstract class Context { Bundle initialExtras); /** * Same as {@link #sendBroadcast(Intent)}, but for a specific user. This broadcast * can only be sent to receivers that are part of the calling application. It * requires holding the {@link android.Manifest.permission#INTERACT_ACROSS_USERS} * permission. * Version of {@link #sendBroadcast(Intent)} that allows you to specify the * user the broadcast will be sent to. This is not available to applications * that are not pre-installed on the system image. Using it requires holding * the INTERACT_ACROSS_USERS permission. * @param intent The intent to broadcast * @param user UserHandle to send the intent to. * @see #sendBroadcast(Intent) Loading @@ -1129,10 +1133,10 @@ public abstract class Context { public abstract void sendBroadcastAsUser(Intent intent, UserHandle user); /** * Same as {@link #sendBroadcast(Intent, String)}, but for a specific user. This broadcast * can only be sent to receivers that are part of the calling application. It * requires holding the {@link android.Manifest.permission#INTERACT_ACROSS_USERS} * permission. * Version of {@link #sendBroadcast(Intent, String)} that allows you to specify the * user the broadcast will be sent to. This is not available to applications * that are not pre-installed on the system image. Using it requires holding * the INTERACT_ACROSS_USERS permission. * * @param intent The Intent to broadcast; all receivers matching this * Intent will receive the broadcast. Loading @@ -1147,12 +1151,12 @@ public abstract class Context { String receiverPermission); /** * Same as * {@link #sendOrderedBroadcast(Intent, String, BroadcastReceiver, Handler, int, String, Bundle)}, * but for a specific user. This broadcast * can only be sent to receivers that are part of the calling application. It * requires holding the {@link android.Manifest.permission#INTERACT_ACROSS_USERS} * permission. * Version of * {@link #sendOrderedBroadcast(Intent, String, BroadcastReceiver, Handler, int, String, Bundle)} * that allows you to specify the * user the broadcast will be sent to. This is not available to applications * that are not pre-installed on the system image. Using it requires holding * the INTERACT_ACROSS_USERS permission. * * <p>See {@link BroadcastReceiver} for more information on Intent broadcasts. * Loading Loading @@ -1261,11 +1265,10 @@ public abstract class Context { public abstract void removeStickyBroadcast(Intent intent); /** * Same as {@link #sendStickyBroadcast(Intent)}, * but for a specific user. This broadcast * can only be sent to receivers that are part of the calling application. It * requires holding the {@link android.Manifest.permission#INTERACT_ACROSS_USERS} * permission. * Version of {@link #sendStickyBroadcast(Intent)} that allows you to specify the * user the broadcast will be sent to. This is not available to applications * that are not pre-installed on the system image. Using it requires holding * the INTERACT_ACROSS_USERS permission. * * @param intent The Intent to broadcast; all receivers matching this * Intent will receive the broadcast, and the Intent will be held to Loading @@ -1277,12 +1280,12 @@ public abstract class Context { public abstract void sendStickyBroadcastAsUser(Intent intent, UserHandle user); /** * Same as * {@link #sendStickyOrderedBroadcast(Intent, BroadcastReceiver, Handler, int, String, Bundle) * but for a specific user. This broadcast * can only be sent to receivers that are part of the calling application. It * requires holding the {@link android.Manifest.permission#INTERACT_ACROSS_USERS} * permission. * Version of * {@link #sendStickyOrderedBroadcast(Intent, BroadcastReceiver, Handler, int, String, Bundle)} * that allows you to specify the * user the broadcast will be sent to. This is not available to applications * that are not pre-installed on the system image. Using it requires holding * the INTERACT_ACROSS_USERS permission. * * <p>See {@link BroadcastReceiver} for more information on Intent broadcasts. * Loading @@ -1309,12 +1312,10 @@ public abstract class Context { Bundle initialExtras); /** * Same as * {@link #sendStickyOrderedBroadcast(Intent, BroadcastReceiver, Handler, int, String, Bundle) * but for a specific user. This broadcast * can only be sent to receivers that are part of the calling application. It * requires holding the {@link android.Manifest.permission#INTERACT_ACROSS_USERS} * permission. * Version of {@link #removeStickyBroadcast(Intent)} that allows you to specify the * user the broadcast will be sent to. This is not available to applications * that are not pre-installed on the system image. Using it requires holding * the INTERACT_ACROSS_USERS permission. * * <p>You must hold the {@link android.Manifest.permission#BROADCAST_STICKY} * permission in order to use this API. If you do not hold that Loading
core/java/android/content/IntentSender.java +17 −3 Original line number Diff line number Diff line Loading @@ -204,6 +204,20 @@ public class IntentSender implements Parcelable { } } /** * @deprecated Renamed to {@link #getCreatorPackage()}. */ @Deprecated public String getTargetPackage() { try { return ActivityManagerNative.getDefault() .getPackageForIntentSender(mTarget); } catch (RemoteException e) { // Should never happen. return null; } } /** * Return the package name of the application that created this * IntentSender, that is the identity under which you will actually be Loading @@ -213,7 +227,7 @@ public class IntentSender implements Parcelable { * @return The package name of the PendingIntent, or null if there is * none associated with it. */ public String getTargetPackage() { public String getCreatorPackage() { try { return ActivityManagerNative.getDefault() .getPackageForIntentSender(mTarget); Loading @@ -232,7 +246,7 @@ public class IntentSender implements Parcelable { * @return The uid of the PendingIntent, or -1 if there is * none associated with it. */ public int getTargetUid() { public int getCreatorUid() { try { return ActivityManagerNative.getDefault() .getUidForIntentSender(mTarget); Loading @@ -253,7 +267,7 @@ public class IntentSender implements Parcelable { * @return The user handle of the PendingIntent, or null if there is * none associated with it. */ public UserHandle getTargetUserHandle() { public UserHandle getCreatorUserHandle() { try { int uid = ActivityManagerNative.getDefault() .getUidForIntentSender(mTarget); Loading
core/java/android/content/pm/PackageManager.java +2 −4 Original line number Diff line number Diff line Loading @@ -2434,8 +2434,7 @@ public abstract class PackageManager { * @param verificationCode either {@link PackageManager#VERIFICATION_ALLOW} * or {@link PackageManager#VERIFICATION_REJECT}. * @throws SecurityException if the caller does not have the * {@link android.Manifest.permission#PACKAGE_VERIFICATION_AGENT} * permission. * PACKAGE_VERIFICATION_AGENT permission. */ public abstract void verifyPendingInstall(int id, int verificationCode); Loading Loading @@ -2469,8 +2468,7 @@ public abstract class PackageManager { * bounds value; namely, 0 or * {@link PackageManager#MAXIMUM_VERIFICATION_TIMEOUT}. * @throws SecurityException if the caller does not have the * {@link android.Manifest.permission#PACKAGE_VERIFICATION_AGENT} * permission. * PACKAGE_VERIFICATION_AGENT permission. */ public abstract void extendVerificationTimeout(int id, int verificationCodeAtTimeout, long millisecondsToDelay); Loading