FileDocCategorySizeDatePackage
MockContext.javaAPI DocAndroid 5.1 API18560Thu Mar 12 22:22:42 GMT 2015android.test.mock

MockContext

public class MockContext extends android.content.Context
A mock {@link android.content.Context} class. All methods are non-functional and throw {@link java.lang.UnsupportedOperationException}. You can use this to inject other dependencies, mocks, or monitors into the classes you are testing.

Fields Summary
Constructors Summary
Methods Summary
public booleanbindService(android.content.Intent service, android.content.ServiceConnection conn, int flags)

        throw new UnsupportedOperationException();
    
public booleanbindServiceAsUser(android.content.Intent service, android.content.ServiceConnection conn, int flags, android.os.UserHandle user)

hide

        throw new UnsupportedOperationException();
    
public intcheckCallingOrSelfPermission(java.lang.String permission)

        throw new UnsupportedOperationException();
    
public intcheckCallingOrSelfUriPermission(android.net.Uri uri, int modeFlags)

        throw new UnsupportedOperationException();
    
public intcheckCallingPermission(java.lang.String permission)

        throw new UnsupportedOperationException();
    
public intcheckCallingUriPermission(android.net.Uri uri, int modeFlags)

        throw new UnsupportedOperationException();
    
public intcheckPermission(java.lang.String permission, int pid, int uid)

        throw new UnsupportedOperationException();
    
public intcheckPermission(java.lang.String permission, int pid, int uid, android.os.IBinder callerToken)

hide

        return checkPermission(permission, pid, uid);
    
public intcheckUriPermission(android.net.Uri uri, int pid, int uid, int modeFlags)

        throw new UnsupportedOperationException();
    
public intcheckUriPermission(android.net.Uri uri, int pid, int uid, int modeFlags, android.os.IBinder callerToken)

hide

        return checkUriPermission(uri, pid, uid, modeFlags);
    
public intcheckUriPermission(android.net.Uri uri, java.lang.String readPermission, java.lang.String writePermission, int pid, int uid, int modeFlags)

        throw new UnsupportedOperationException();
    
public voidclearWallpaper()

        throw new UnsupportedOperationException();
    
public android.content.ContextcreateApplicationContext(android.content.pm.ApplicationInfo application, int flags)
{@hide}

        return null;
    
public android.content.ContextcreateConfigurationContext(android.content.res.Configuration overrideConfiguration)

        throw new UnsupportedOperationException();
    
public android.content.ContextcreateDisplayContext(android.view.Display display)

        throw new UnsupportedOperationException();
    
public android.content.ContextcreatePackageContext(java.lang.String packageName, int flags)

        throw new UnsupportedOperationException();
    
public android.content.ContextcreatePackageContextAsUser(java.lang.String packageName, int flags, android.os.UserHandle user)
{@hide}

        throw new UnsupportedOperationException();
    
public java.lang.String[]databaseList()

        throw new UnsupportedOperationException();
    
public booleandeleteDatabase(java.lang.String name)

        throw new UnsupportedOperationException();
    
public booleandeleteFile(java.lang.String name)

        throw new UnsupportedOperationException();
    
public voidenforceCallingOrSelfPermission(java.lang.String permission, java.lang.String message)

        throw new UnsupportedOperationException();
    
public voidenforceCallingOrSelfUriPermission(android.net.Uri uri, int modeFlags, java.lang.String message)

        throw new UnsupportedOperationException();
    
public voidenforceCallingPermission(java.lang.String permission, java.lang.String message)

        throw new UnsupportedOperationException();
    
public voidenforceCallingUriPermission(android.net.Uri uri, int modeFlags, java.lang.String message)

        throw new UnsupportedOperationException();
    
public voidenforcePermission(java.lang.String permission, int pid, int uid, java.lang.String message)

        throw new UnsupportedOperationException();
    
public voidenforceUriPermission(android.net.Uri uri, int pid, int uid, int modeFlags, java.lang.String message)

        throw new UnsupportedOperationException();
    
public voidenforceUriPermission(android.net.Uri uri, java.lang.String readPermission, java.lang.String writePermission, int pid, int uid, int modeFlags, java.lang.String message)

        throw new UnsupportedOperationException();
    
public java.lang.String[]fileList()

        throw new UnsupportedOperationException();
    
public android.content.ContextgetApplicationContext()

        throw new UnsupportedOperationException();
    
public android.content.pm.ApplicationInfogetApplicationInfo()

        throw new UnsupportedOperationException();
    
public android.content.res.AssetManagergetAssets()

        throw new UnsupportedOperationException();
    
public java.lang.StringgetBasePackageName()

hide

        throw new UnsupportedOperationException();
    
public java.io.FilegetCacheDir()

        throw new UnsupportedOperationException();
    
public java.lang.ClassLoadergetClassLoader()

        throw new UnsupportedOperationException();
    
public java.io.FilegetCodeCacheDir()

        throw new UnsupportedOperationException();
    
public android.content.ContentResolvergetContentResolver()

        throw new UnsupportedOperationException();
    
public java.io.FilegetDatabasePath(java.lang.String name)

        throw new UnsupportedOperationException();
    
public java.io.FilegetDir(java.lang.String name, int mode)

        throw new UnsupportedOperationException();
    
public android.view.DisplayAdjustmentsgetDisplayAdjustments(int displayId)

hide

        throw new UnsupportedOperationException();
    
public java.io.FilegetExternalCacheDir()

        throw new UnsupportedOperationException();
    
public java.io.File[]getExternalCacheDirs()

        throw new UnsupportedOperationException();
    
public java.io.FilegetExternalFilesDir(java.lang.String type)

        throw new UnsupportedOperationException();
    
public java.io.File[]getExternalFilesDirs(java.lang.String type)

        throw new UnsupportedOperationException();
    
public java.io.File[]getExternalMediaDirs()

        throw new UnsupportedOperationException();
    
public java.io.FilegetFileStreamPath(java.lang.String name)

        throw new UnsupportedOperationException();
    
public java.io.FilegetFilesDir()

        throw new UnsupportedOperationException();
    
public android.os.LoopergetMainLooper()

        throw new UnsupportedOperationException();
    
public java.io.FilegetNoBackupFilesDir()

        throw new UnsupportedOperationException();
    
public java.io.FilegetObbDir()

        throw new UnsupportedOperationException();
    
public java.io.File[]getObbDirs()

        throw new UnsupportedOperationException();
    
public java.lang.StringgetOpPackageName()

hide

        throw new UnsupportedOperationException();
    
public java.lang.StringgetPackageCodePath()

        throw new UnsupportedOperationException();
    
public android.content.pm.PackageManagergetPackageManager()

        throw new UnsupportedOperationException();
    
public java.lang.StringgetPackageName()

        throw new UnsupportedOperationException();
    
public java.lang.StringgetPackageResourcePath()

        throw new UnsupportedOperationException();
    
public android.content.res.ResourcesgetResources()

        throw new UnsupportedOperationException();
    
public android.content.SharedPreferencesgetSharedPreferences(java.lang.String name, int mode)

        throw new UnsupportedOperationException();
    
public java.io.FilegetSharedPrefsFile(java.lang.String name)

hide

        throw new UnsupportedOperationException();
    
public java.lang.ObjectgetSystemService(java.lang.String name)

        throw new UnsupportedOperationException();
    
public Resources.ThemegetTheme()

        throw new UnsupportedOperationException();
    
public intgetUserId()
{@hide}

        throw new UnsupportedOperationException();
    
public android.graphics.drawable.DrawablegetWallpaper()

        throw new UnsupportedOperationException();
    
public intgetWallpaperDesiredMinimumHeight()

        throw new UnsupportedOperationException();
    
public intgetWallpaperDesiredMinimumWidth()

        throw new UnsupportedOperationException();
    
public voidgrantUriPermission(java.lang.String toPackage, android.net.Uri uri, int modeFlags)

        throw new UnsupportedOperationException();
    
public booleanisRestricted()

        throw new UnsupportedOperationException();
    
public java.io.FileInputStreamopenFileInput(java.lang.String name)

        throw new UnsupportedOperationException();
    
public java.io.FileOutputStreamopenFileOutput(java.lang.String name, int mode)

        throw new UnsupportedOperationException();
    
public android.database.sqlite.SQLiteDatabaseopenOrCreateDatabase(java.lang.String file, int mode, SQLiteDatabase.CursorFactory factory)

        throw new UnsupportedOperationException();
    
public android.database.sqlite.SQLiteDatabaseopenOrCreateDatabase(java.lang.String file, int mode, SQLiteDatabase.CursorFactory factory, android.database.DatabaseErrorHandler errorHandler)

        throw new UnsupportedOperationException();
    
public android.graphics.drawable.DrawablepeekWallpaper()

        throw new UnsupportedOperationException();
    
public android.content.IntentregisterReceiver(android.content.BroadcastReceiver receiver, android.content.IntentFilter filter)

        throw new UnsupportedOperationException();
    
public android.content.IntentregisterReceiver(android.content.BroadcastReceiver receiver, android.content.IntentFilter filter, java.lang.String broadcastPermission, android.os.Handler scheduler)

        throw new UnsupportedOperationException();
    
public android.content.IntentregisterReceiverAsUser(android.content.BroadcastReceiver receiver, android.os.UserHandle user, android.content.IntentFilter filter, java.lang.String broadcastPermission, android.os.Handler scheduler)

hide

        throw new UnsupportedOperationException();
    
public voidremoveStickyBroadcast(android.content.Intent intent)

        throw new UnsupportedOperationException();
    
public voidremoveStickyBroadcastAsUser(android.content.Intent intent, android.os.UserHandle user)

        throw new UnsupportedOperationException();
    
public voidrevokeUriPermission(android.net.Uri uri, int modeFlags)

        throw new UnsupportedOperationException();
    
public voidsendBroadcast(android.content.Intent intent)

        throw new UnsupportedOperationException();
    
public voidsendBroadcast(android.content.Intent intent, java.lang.String receiverPermission)

        throw new UnsupportedOperationException();
    
public voidsendBroadcast(android.content.Intent intent, java.lang.String receiverPermission, int appOp)

hide

        throw new UnsupportedOperationException();
    
public voidsendBroadcastAsUser(android.content.Intent intent, android.os.UserHandle user)

        throw new UnsupportedOperationException();
    
public voidsendBroadcastAsUser(android.content.Intent intent, android.os.UserHandle user, java.lang.String receiverPermission)

        throw new UnsupportedOperationException();
    
public voidsendOrderedBroadcast(android.content.Intent intent, java.lang.String receiverPermission)

        throw new UnsupportedOperationException();
    
public voidsendOrderedBroadcast(android.content.Intent intent, java.lang.String receiverPermission, android.content.BroadcastReceiver resultReceiver, android.os.Handler scheduler, int initialCode, java.lang.String initialData, android.os.Bundle initialExtras)

        throw new UnsupportedOperationException();
    
public voidsendOrderedBroadcast(android.content.Intent intent, java.lang.String receiverPermission, int appOp, android.content.BroadcastReceiver resultReceiver, android.os.Handler scheduler, int initialCode, java.lang.String initialData, android.os.Bundle initialExtras)

hide

        throw new UnsupportedOperationException();
    
public voidsendOrderedBroadcastAsUser(android.content.Intent intent, android.os.UserHandle user, java.lang.String receiverPermission, android.content.BroadcastReceiver resultReceiver, android.os.Handler scheduler, int initialCode, java.lang.String initialData, android.os.Bundle initialExtras)

        throw new UnsupportedOperationException();
    
public voidsendOrderedBroadcastAsUser(android.content.Intent intent, android.os.UserHandle user, java.lang.String receiverPermission, int appOp, android.content.BroadcastReceiver resultReceiver, android.os.Handler scheduler, int initialCode, java.lang.String initialData, android.os.Bundle initialExtras)

hide

        throw new UnsupportedOperationException();
    
public voidsendStickyBroadcast(android.content.Intent intent)

        throw new UnsupportedOperationException();
    
public voidsendStickyBroadcastAsUser(android.content.Intent intent, android.os.UserHandle user)

        throw new UnsupportedOperationException();
    
public voidsendStickyOrderedBroadcast(android.content.Intent intent, android.content.BroadcastReceiver resultReceiver, android.os.Handler scheduler, int initialCode, java.lang.String initialData, android.os.Bundle initialExtras)

        throw new UnsupportedOperationException();
    
public voidsendStickyOrderedBroadcastAsUser(android.content.Intent intent, android.os.UserHandle user, android.content.BroadcastReceiver resultReceiver, android.os.Handler scheduler, int initialCode, java.lang.String initialData, android.os.Bundle initialExtras)

        throw new UnsupportedOperationException();
    
public voidsetTheme(int resid)

        throw new UnsupportedOperationException();
    
public voidsetWallpaper(android.graphics.Bitmap bitmap)

        throw new UnsupportedOperationException();
    
public voidsetWallpaper(java.io.InputStream data)

        throw new UnsupportedOperationException();
    
public voidstartActivities(android.content.Intent[] intents)

        throw new UnsupportedOperationException();
    
public voidstartActivities(android.content.Intent[] intents, android.os.Bundle options)

        startActivities(intents);
    
public voidstartActivity(android.content.Intent intent)

        throw new UnsupportedOperationException();
    
public voidstartActivity(android.content.Intent intent, android.os.Bundle options)

        startActivity(intent);
    
public booleanstartInstrumentation(android.content.ComponentName className, java.lang.String profileFile, android.os.Bundle arguments)

        throw new UnsupportedOperationException();
    
public voidstartIntentSender(android.content.IntentSender intent, android.content.Intent fillInIntent, int flagsMask, int flagsValues, int extraFlags)

        throw new UnsupportedOperationException();
    
public voidstartIntentSender(android.content.IntentSender intent, android.content.Intent fillInIntent, int flagsMask, int flagsValues, int extraFlags, android.os.Bundle options)

        startIntentSender(intent, fillInIntent, flagsMask, flagsValues, extraFlags);
    
public android.content.ComponentNamestartService(android.content.Intent service)

        throw new UnsupportedOperationException();
    
public android.content.ComponentNamestartServiceAsUser(android.content.Intent service, android.os.UserHandle user)

hide

        throw new UnsupportedOperationException();
    
public booleanstopService(android.content.Intent service)

        throw new UnsupportedOperationException();
    
public booleanstopServiceAsUser(android.content.Intent service, android.os.UserHandle user)

hide

        throw new UnsupportedOperationException();
    
public voidunbindService(android.content.ServiceConnection conn)

        throw new UnsupportedOperationException();
    
public voidunregisterReceiver(android.content.BroadcastReceiver receiver)

        throw new UnsupportedOperationException();