Class ShadowPendingIntent


  • @Implements(android.app.PendingIntent.class)
    public class ShadowPendingIntent
    extends java.lang.Object
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      protected void cancel()  
      boolean equals​(java.lang.Object o)  
      protected static android.app.PendingIntent getActivities​(android.content.Context context, int requestCode, android.content.Intent[] intents, int flags)  
      protected static android.app.PendingIntent getActivities​(android.content.Context context, int requestCode, android.content.Intent[] intents, int flags, android.os.Bundle options)  
      protected static android.app.PendingIntent getActivity​(android.content.Context context, int requestCode, android.content.Intent intent, int flags)  
      protected static android.app.PendingIntent getActivity​(android.content.Context context, int requestCode, android.content.Intent intent, int flags, android.os.Bundle options)  
      protected static android.app.PendingIntent getBroadcast​(android.content.Context context, int requestCode, android.content.Intent intent, int flags)  
      protected java.lang.String getCreatorPackage()  
      int getFlags()  
      protected static android.app.PendingIntent getForegroundService​(android.content.Context context, int requestCode, android.content.Intent intent, int flags)  
      protected android.content.IntentSender getIntentSender()  
      int getRequestCode()  
      android.content.Context getSavedContext()  
      android.content.Intent getSavedIntent()
      This returns the last Intent in the Intent[] to be delivered when the PendingIntent is sent.
      android.content.Intent[] getSavedIntents()
      This method is particularly useful for PendingIntents created with multiple Intents: getActivities(Context, int, Intent[], int) getActivities(Context, int, Intent[], int, Bundle)
      protected static android.app.PendingIntent getService​(android.content.Context context, int requestCode, android.content.Intent intent, int flags)  
      protected java.lang.String getTargetPackage()  
      int hashCode()  
      boolean isActivityIntent()  
      boolean isBroadcastIntent()  
      boolean isCanceled()  
      boolean isForegroundServiceIntent()  
      boolean isServiceIntent()  
      static android.app.PendingIntent readPendingIntentOrNullFromParcel​(android.os.Parcel in)  
      static void reset()  
      protected void send()  
      protected void send​(int code)  
      protected void send​(int code, android.app.PendingIntent.OnFinished onFinished, android.os.Handler handler)  
      protected void send​(android.content.Context context, int code, android.content.Intent intent)  
      protected void send​(android.content.Context context, int code, android.content.Intent intent, android.app.PendingIntent.OnFinished onFinished, android.os.Handler handler)  
      protected void send​(android.content.Context context, int code, android.content.Intent intent, android.app.PendingIntent.OnFinished onFinished, android.os.Handler handler, java.lang.String requiredPermission)  
      protected void send​(android.content.Context context, int code, android.content.Intent intent, android.app.PendingIntent.OnFinished onFinished, android.os.Handler handler, java.lang.String requiredPermission, android.os.Bundle options)  
      void setCreatorPackage​(java.lang.String creatorPackage)  
      static void writePendingIntentOrNullToParcel​(android.app.PendingIntent sender, android.os.Parcel out)  
      • Methods inherited from class java.lang.Object

        clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • ShadowPendingIntent

        public ShadowPendingIntent()
    • Method Detail

      • getActivity

        @Implementation
        protected static android.app.PendingIntent getActivity​(android.content.Context context,
                                                               int requestCode,
                                                               android.content.Intent intent,
                                                               int flags)
      • getActivity

        @Implementation
        protected static android.app.PendingIntent getActivity​(android.content.Context context,
                                                               int requestCode,
                                                               android.content.Intent intent,
                                                               int flags,
                                                               android.os.Bundle options)
      • getActivities

        @Implementation
        protected static android.app.PendingIntent getActivities​(android.content.Context context,
                                                                 int requestCode,
                                                                 android.content.Intent[] intents,
                                                                 int flags)
      • getActivities

        @Implementation
        protected static android.app.PendingIntent getActivities​(android.content.Context context,
                                                                 int requestCode,
                                                                 android.content.Intent[] intents,
                                                                 int flags,
                                                                 android.os.Bundle options)
      • getBroadcast

        @Implementation
        protected static android.app.PendingIntent getBroadcast​(android.content.Context context,
                                                                int requestCode,
                                                                android.content.Intent intent,
                                                                int flags)
      • getService

        @Implementation
        protected static android.app.PendingIntent getService​(android.content.Context context,
                                                              int requestCode,
                                                              android.content.Intent intent,
                                                              int flags)
      • getForegroundService

        @Implementation(minSdk=26)
        protected static android.app.PendingIntent getForegroundService​(android.content.Context context,
                                                                        int requestCode,
                                                                        android.content.Intent intent,
                                                                        int flags)
      • cancel

        @Implementation
        protected void cancel()
      • send

        @Implementation
        protected void send()
                     throws android.app.PendingIntent.CanceledException
        Throws:
        android.app.PendingIntent.CanceledException
      • send

        @Implementation
        protected void send​(int code)
                     throws android.app.PendingIntent.CanceledException
        Throws:
        android.app.PendingIntent.CanceledException
      • send

        @Implementation
        protected void send​(int code,
                            android.app.PendingIntent.OnFinished onFinished,
                            android.os.Handler handler)
                     throws android.app.PendingIntent.CanceledException
        Throws:
        android.app.PendingIntent.CanceledException
      • send

        @Implementation
        protected void send​(android.content.Context context,
                            int code,
                            android.content.Intent intent)
                     throws android.app.PendingIntent.CanceledException
        Throws:
        android.app.PendingIntent.CanceledException
      • send

        @Implementation
        protected void send​(android.content.Context context,
                            int code,
                            android.content.Intent intent,
                            android.app.PendingIntent.OnFinished onFinished,
                            android.os.Handler handler)
                     throws android.app.PendingIntent.CanceledException
        Throws:
        android.app.PendingIntent.CanceledException
      • send

        @Implementation
        protected void send​(android.content.Context context,
                            int code,
                            android.content.Intent intent,
                            android.app.PendingIntent.OnFinished onFinished,
                            android.os.Handler handler,
                            java.lang.String requiredPermission)
                     throws android.app.PendingIntent.CanceledException
        Throws:
        android.app.PendingIntent.CanceledException
      • send

        @Implementation(minSdk=23)
        protected void send​(android.content.Context context,
                            int code,
                            android.content.Intent intent,
                            android.app.PendingIntent.OnFinished onFinished,
                            android.os.Handler handler,
                            java.lang.String requiredPermission,
                            android.os.Bundle options)
                     throws android.app.PendingIntent.CanceledException
        Throws:
        android.app.PendingIntent.CanceledException
      • getIntentSender

        @Implementation
        protected android.content.IntentSender getIntentSender()
      • isActivityIntent

        public boolean isActivityIntent()
        Returns:
        true iff sending this PendingIntent will start an activity
      • isBroadcastIntent

        public boolean isBroadcastIntent()
        Returns:
        true iff sending this PendingIntent will broadcast an Intent
      • isServiceIntent

        public boolean isServiceIntent()
        Returns:
        true iff sending this PendingIntent will start a service
      • isForegroundServiceIntent

        public boolean isForegroundServiceIntent()
        Returns:
        true iff sending this PendingIntent will start a foreground service
      • getSavedContext

        public android.content.Context getSavedContext()
        Returns:
        the context in which this PendingIntent was created
      • isCanceled

        public boolean isCanceled()
        Returns:
        iff this PendingIntent has been canceled
      • getRequestCode

        public int getRequestCode()
        Returns:
        the request code with which this PendingIntent was created
      • getFlags

        public int getFlags()
        Returns:
        the flags with which this PendingIntent was created
      • getTargetPackage

        @Implementation
        protected java.lang.String getTargetPackage()
      • getCreatorPackage

        @Implementation(minSdk=17)
        protected java.lang.String getCreatorPackage()
      • setCreatorPackage

        public void setCreatorPackage​(java.lang.String creatorPackage)
      • equals

        @Implementation
        public boolean equals​(java.lang.Object o)
        Overrides:
        equals in class java.lang.Object
      • hashCode

        @Implementation
        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object
      • readPendingIntentOrNullFromParcel

        @Implementation
        @Nullable
        public static android.app.PendingIntent readPendingIntentOrNullFromParcel​(android.os.Parcel in)
      • writePendingIntentOrNullToParcel

        @Implementation
        public static void writePendingIntentOrNullToParcel​(@Nullable
                                                            android.app.PendingIntent sender,
                                                            android.os.Parcel out)
      • reset

        @Resetter
        public static void reset()