Package org.robolectric.shadows.gms
Class ShadowGooglePlayServicesUtil
- java.lang.Object
-
- org.robolectric.shadows.gms.ShadowGooglePlayServicesUtil
-
@Implements(com.google.android.gms.common.GooglePlayServicesUtil.class) public class ShadowGooglePlayServicesUtil extends Object
Calls to static method ofGooglePlayServicesUtilwill be redirected to the providedShadowGooglePlayServicesUtil.GooglePlayServicesUtilImplimplementation. UseprovideImpl(GooglePlayServicesUtilImpl)to set the implementation instance. By default, aShadowGooglePlayServicesUtil.GooglePlayServicesUtilImplis used in call redirection. Use mocks or subclassingShadowGooglePlayServicesUtil.GooglePlayServicesUtilImplto achieve desired behaviors.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classShadowGooglePlayServicesUtil.GooglePlayServicesUtilImplClass containing methods with same signatures of the static methods ofGooglePlayServicesUtil.
-
Constructor Summary
Constructors Constructor Description ShadowGooglePlayServicesUtil()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static DialoggetErrorDialog(int errorCode, Activity activity, int requestCode)static DialoggetErrorDialog(int errorCode, Activity activity, int requestCode, DialogInterface.OnCancelListener cancelListener)static PendingIntentgetErrorPendingIntent(int errorCode, Context context, int requestCode)static ShadowGooglePlayServicesUtil.GooglePlayServicesUtilImplgetImpl()static StringgetOpenSourceSoftwareLicenseInfo(Context context)static ContextgetRemoteContext(Context context)static ResourcesgetRemoteResource(Context context)static intisGooglePlayServicesAvailable(Context context)static voidprovideImpl(ShadowGooglePlayServicesUtil.GooglePlayServicesUtilImpl impl)static voidreset()static booleanshowErrorDialogFragment(int errorCode, Activity activity, int requestCode)static booleanshowErrorDialogFragment(int errorCode, Activity activity, int requestCode, DialogInterface.OnCancelListener cancelListener)static booleanshowErrorDialogFragment(int errorCode, Activity activity, android.support.v4.app.Fragment fragment, int requestCode, DialogInterface.OnCancelListener cancelListener)static voidshowErrorNotification(int errorCode, Context context)
-
-
-
Method Detail
-
getImpl
public static ShadowGooglePlayServicesUtil.GooglePlayServicesUtilImpl getImpl()
-
provideImpl
public static void provideImpl(ShadowGooglePlayServicesUtil.GooglePlayServicesUtilImpl impl)
-
reset
@Resetter public static void reset()
-
getRemoteContext
@Implementation public static Context getRemoteContext(Context context)
-
getRemoteResource
@Implementation public static Resources getRemoteResource(Context context)
-
showErrorDialogFragment
@Implementation public static boolean showErrorDialogFragment(int errorCode, Activity activity, android.support.v4.app.Fragment fragment, int requestCode, DialogInterface.OnCancelListener cancelListener)
-
showErrorDialogFragment
@Implementation public static boolean showErrorDialogFragment(int errorCode, Activity activity, int requestCode)
-
showErrorDialogFragment
@Implementation public static boolean showErrorDialogFragment(int errorCode, Activity activity, int requestCode, DialogInterface.OnCancelListener cancelListener)
-
getErrorDialog
@Implementation public static Dialog getErrorDialog(int errorCode, Activity activity, int requestCode)
-
getErrorDialog
@Implementation public static Dialog getErrorDialog(int errorCode, Activity activity, int requestCode, DialogInterface.OnCancelListener cancelListener)
-
getErrorPendingIntent
@Implementation public static PendingIntent getErrorPendingIntent(int errorCode, Context context, int requestCode)
-
getOpenSourceSoftwareLicenseInfo
@Implementation public static String getOpenSourceSoftwareLicenseInfo(Context context)
-
isGooglePlayServicesAvailable
@Implementation public static int isGooglePlayServicesAvailable(Context context)
-
showErrorNotification
@Implementation public static void showErrorNotification(int errorCode, Context context)
-
-