Loading api/current.txt +1 −0 Original line number Diff line number Diff line Loading @@ -6140,6 +6140,7 @@ package android.app { method public android.content.IntentSender getIntentSender(); method public static android.app.PendingIntent getService(android.content.Context, int, @NonNull android.content.Intent, int); method @Deprecated public String getTargetPackage(); method public boolean isImmutable(); method @Nullable public static android.app.PendingIntent readPendingIntentOrNullFromParcel(@NonNull android.os.Parcel); method public void send() throws android.app.PendingIntent.CanceledException; method public void send(int) throws android.app.PendingIntent.CanceledException; core/api/current.txt +1 −0 Original line number Diff line number Diff line Loading @@ -6140,6 +6140,7 @@ package android.app { method public android.content.IntentSender getIntentSender(); method public static android.app.PendingIntent getService(android.content.Context, int, @NonNull android.content.Intent, int); method @Deprecated public String getTargetPackage(); method public boolean isImmutable(); method @Nullable public static android.app.PendingIntent readPendingIntentOrNullFromParcel(@NonNull android.os.Parcel); method public void send() throws android.app.PendingIntent.CanceledException; method public void send(int) throws android.app.PendingIntent.CanceledException; core/java/android/app/IActivityManager.aidl +1 −0 Original line number Diff line number Diff line Loading @@ -342,6 +342,7 @@ interface IActivityManager { @UnsupportedAppUsage void unregisterProcessObserver(in IProcessObserver observer); boolean isIntentSenderTargetedToPackage(in IIntentSender sender); boolean isIntentSenderImmutable(in IIntentSender sender); @UnsupportedAppUsage void updatePersistentConfiguration(in Configuration values); void updatePersistentConfigurationWithAttribution(in Configuration values, Loading core/java/android/app/PendingIntent.java +12 −0 Original line number Diff line number Diff line Loading @@ -1144,6 +1144,18 @@ public final class PendingIntent implements Parcelable { } } /** * Check if this PendingIntent is marked with {@link #FLAG_IMMUTABLE}. */ public boolean isImmutable() { try { return ActivityManager.getService() .isIntentSenderImmutable(mTarget); } catch (RemoteException e) { throw e.rethrowFromSystemServer(); } } /** * @hide * Check whether this PendingIntent will launch an Activity. Loading services/core/java/com/android/server/am/ActivityManagerService.java +9 −0 Original line number Diff line number Diff line Loading @@ -4889,6 +4889,15 @@ public class ActivityManagerService extends IActivityManager.Stub return false; } @Override public boolean isIntentSenderImmutable(IIntentSender pendingResult) { if (pendingResult instanceof PendingIntentRecord) { final PendingIntentRecord res = (PendingIntentRecord) pendingResult; return (res.key.flags & PendingIntent.FLAG_IMMUTABLE) != 0; } return false; } @Override public boolean isIntentSenderAnActivity(IIntentSender pendingResult) { if (!(pendingResult instanceof PendingIntentRecord)) { Loading Loading
api/current.txt +1 −0 Original line number Diff line number Diff line Loading @@ -6140,6 +6140,7 @@ package android.app { method public android.content.IntentSender getIntentSender(); method public static android.app.PendingIntent getService(android.content.Context, int, @NonNull android.content.Intent, int); method @Deprecated public String getTargetPackage(); method public boolean isImmutable(); method @Nullable public static android.app.PendingIntent readPendingIntentOrNullFromParcel(@NonNull android.os.Parcel); method public void send() throws android.app.PendingIntent.CanceledException; method public void send(int) throws android.app.PendingIntent.CanceledException;
core/api/current.txt +1 −0 Original line number Diff line number Diff line Loading @@ -6140,6 +6140,7 @@ package android.app { method public android.content.IntentSender getIntentSender(); method public static android.app.PendingIntent getService(android.content.Context, int, @NonNull android.content.Intent, int); method @Deprecated public String getTargetPackage(); method public boolean isImmutable(); method @Nullable public static android.app.PendingIntent readPendingIntentOrNullFromParcel(@NonNull android.os.Parcel); method public void send() throws android.app.PendingIntent.CanceledException; method public void send(int) throws android.app.PendingIntent.CanceledException;
core/java/android/app/IActivityManager.aidl +1 −0 Original line number Diff line number Diff line Loading @@ -342,6 +342,7 @@ interface IActivityManager { @UnsupportedAppUsage void unregisterProcessObserver(in IProcessObserver observer); boolean isIntentSenderTargetedToPackage(in IIntentSender sender); boolean isIntentSenderImmutable(in IIntentSender sender); @UnsupportedAppUsage void updatePersistentConfiguration(in Configuration values); void updatePersistentConfigurationWithAttribution(in Configuration values, Loading
core/java/android/app/PendingIntent.java +12 −0 Original line number Diff line number Diff line Loading @@ -1144,6 +1144,18 @@ public final class PendingIntent implements Parcelable { } } /** * Check if this PendingIntent is marked with {@link #FLAG_IMMUTABLE}. */ public boolean isImmutable() { try { return ActivityManager.getService() .isIntentSenderImmutable(mTarget); } catch (RemoteException e) { throw e.rethrowFromSystemServer(); } } /** * @hide * Check whether this PendingIntent will launch an Activity. Loading
services/core/java/com/android/server/am/ActivityManagerService.java +9 −0 Original line number Diff line number Diff line Loading @@ -4889,6 +4889,15 @@ public class ActivityManagerService extends IActivityManager.Stub return false; } @Override public boolean isIntentSenderImmutable(IIntentSender pendingResult) { if (pendingResult instanceof PendingIntentRecord) { final PendingIntentRecord res = (PendingIntentRecord) pendingResult; return (res.key.flags & PendingIntent.FLAG_IMMUTABLE) != 0; } return false; } @Override public boolean isIntentSenderAnActivity(IIntentSender pendingResult) { if (!(pendingResult instanceof PendingIntentRecord)) { Loading