diff options
Diffstat (limited to 'core/java/android/app/PendingIntent.java')
-rw-r--r-- | core/java/android/app/PendingIntent.java | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/core/java/android/app/PendingIntent.java b/core/java/android/app/PendingIntent.java index aa366b6..8adc8a2 100644 --- a/core/java/android/app/PendingIntent.java +++ b/core/java/android/app/PendingIntent.java @@ -631,6 +631,20 @@ public final class PendingIntent implements Parcelable { } /** + * @hide + * Check whether this PendingIntent will launch an Activity. + */ + public boolean isActivity() { + try { + return ActivityManagerNative.getDefault() + .isIntentSenderAnActivity(mTarget); + } catch (RemoteException e) { + // Should never happen. + return false; + } + } + + /** * Comparison operator on two PendingIntent objects, such that true * is returned then they both represent the same operation from the * same package. This allows you to use {@link #getActivity}, |