FileDocCategorySizeDatePackage
ContextWrapper.javaAPI DocAndroid 5.1 API20584Thu Mar 12 22:22:10 GMT 2015android.content

ContextWrapper

public class ContextWrapper extends Context
Proxying implementation of Context that simply delegates all of its calls to another Context. Can be subclassed to modify behavior without changing the original Context.

Fields Summary
Context
mBase
Constructors Summary
public ContextWrapper(Context base)

        mBase = base;
    
Methods Summary
protected voidattachBaseContext(Context base)
Set the base context for this ContextWrapper. All calls will then be delegated to the base context. Throws IllegalStateException if a base context has already been set.

param
base The new base context for this wrapper.

        if (mBase != null) {
            throw new IllegalStateException("Base context already set");
        }
        mBase = base;
    
public booleanbindService(Intent service, ServiceConnection conn, int flags)

        return mBase.bindService(service, conn, flags);
    
public booleanbindServiceAsUser(Intent service, ServiceConnection conn, int flags, android.os.UserHandle user)

hide

        return mBase.bindServiceAsUser(service, conn, flags, user);
    
public intcheckCallingOrSelfPermission(java.lang.String permission)

        return mBase.checkCallingOrSelfPermission(permission);
    
public intcheckCallingOrSelfUriPermission(android.net.Uri uri, int modeFlags)

        return mBase.checkCallingOrSelfUriPermission(uri, modeFlags);
    
public intcheckCallingPermission(java.lang.String permission)

        return mBase.checkCallingPermission(permission);
    
public intcheckCallingUriPermission(android.net.Uri uri, int modeFlags)

        return mBase.checkCallingUriPermission(uri, modeFlags);
    
public intcheckPermission(java.lang.String permission, int pid, int uid)

        return mBase.checkPermission(permission, pid, uid);
    
public intcheckPermission(java.lang.String permission, int pid, int uid, android.os.IBinder callerToken)

hide

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

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

        return mBase.checkUriPermission(uri, pid, uid, modeFlags);
    
public intcheckUriPermission(android.net.Uri uri, int pid, int uid, int modeFlags, android.os.IBinder callerToken)

hide

        return mBase.checkUriPermission(uri, pid, uid, modeFlags, callerToken);
    
public voidclearWallpaper()

        mBase.clearWallpaper();
    
public ContextcreateApplicationContext(android.content.pm.ApplicationInfo application, int flags)

hide

        return mBase.createApplicationContext(application, flags);
    
public ContextcreateConfigurationContext(android.content.res.Configuration overrideConfiguration)

        return mBase.createConfigurationContext(overrideConfiguration);
    
public ContextcreateDisplayContext(android.view.Display display)

        return mBase.createDisplayContext(display);
    
public ContextcreatePackageContext(java.lang.String packageName, int flags)

        return mBase.createPackageContext(packageName, flags);
    
public ContextcreatePackageContextAsUser(java.lang.String packageName, int flags, android.os.UserHandle user)

hide

        return mBase.createPackageContextAsUser(packageName, flags, user);
    
public java.lang.String[]databaseList()

        return mBase.databaseList();
    
public booleandeleteDatabase(java.lang.String name)

        return mBase.deleteDatabase(name);
    
public booleandeleteFile(java.lang.String name)

        return mBase.deleteFile(name);
    
public voidenforceCallingOrSelfPermission(java.lang.String permission, java.lang.String message)

        mBase.enforceCallingOrSelfPermission(permission, message);
    
public voidenforceCallingOrSelfUriPermission(android.net.Uri uri, int modeFlags, java.lang.String message)

        mBase.enforceCallingOrSelfUriPermission(uri, modeFlags, message);
    
public voidenforceCallingPermission(java.lang.String permission, java.lang.String message)

        mBase.enforceCallingPermission(permission, message);
    
public voidenforceCallingUriPermission(android.net.Uri uri, int modeFlags, java.lang.String message)

        mBase.enforceCallingUriPermission(uri, modeFlags, message);
    
public voidenforcePermission(java.lang.String permission, int pid, int uid, java.lang.String message)

        mBase.enforcePermission(permission, pid, uid, message);
    
public voidenforceUriPermission(android.net.Uri uri, int pid, int uid, int modeFlags, java.lang.String message)

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

        mBase.enforceUriPermission(
                uri, readPermission, writePermission, pid, uid, modeFlags,
                message);
    
public java.lang.String[]fileList()

        return mBase.fileList();
    
public ContextgetApplicationContext()

        return mBase.getApplicationContext();
    
public android.content.pm.ApplicationInfogetApplicationInfo()

        return mBase.getApplicationInfo();
    
public android.content.res.AssetManagergetAssets()

        return mBase.getAssets();
    
public ContextgetBaseContext()

return
the base context as set by the constructor or setBaseContext

        return mBase;
    
public java.lang.StringgetBasePackageName()

hide

        return mBase.getBasePackageName();
    
public java.io.FilegetCacheDir()

        return mBase.getCacheDir();
    
public java.lang.ClassLoadergetClassLoader()

        return mBase.getClassLoader();
    
public java.io.FilegetCodeCacheDir()

        return mBase.getCodeCacheDir();
    
public ContentResolvergetContentResolver()

        return mBase.getContentResolver();
    
public java.io.FilegetDatabasePath(java.lang.String name)

        return mBase.getDatabasePath(name);
    
public java.io.FilegetDir(java.lang.String name, int mode)

        return mBase.getDir(name, mode);
    
public android.view.DisplayAdjustmentsgetDisplayAdjustments(int displayId)

hide

        return mBase.getDisplayAdjustments(displayId);
    
public java.io.FilegetExternalCacheDir()

        return mBase.getExternalCacheDir();
    
public java.io.File[]getExternalCacheDirs()

        return mBase.getExternalCacheDirs();
    
public java.io.FilegetExternalFilesDir(java.lang.String type)

        return mBase.getExternalFilesDir(type);
    
public java.io.File[]getExternalFilesDirs(java.lang.String type)

        return mBase.getExternalFilesDirs(type);
    
public java.io.File[]getExternalMediaDirs()

        return mBase.getExternalMediaDirs();
    
public java.io.FilegetFileStreamPath(java.lang.String name)

        return mBase.getFileStreamPath(name);
    
public java.io.FilegetFilesDir()

        return mBase.getFilesDir();
    
public android.os.LoopergetMainLooper()

        return mBase.getMainLooper();
    
public java.io.FilegetNoBackupFilesDir()

        return mBase.getNoBackupFilesDir();
    
public java.io.FilegetObbDir()

        return mBase.getObbDir();
    
public java.io.File[]getObbDirs()

        return mBase.getObbDirs();
    
public java.lang.StringgetOpPackageName()

hide

        return mBase.getOpPackageName();
    
public java.lang.StringgetPackageCodePath()

        return mBase.getPackageCodePath();
    
public android.content.pm.PackageManagergetPackageManager()

        return mBase.getPackageManager();
    
public java.lang.StringgetPackageName()

        return mBase.getPackageName();
    
public java.lang.StringgetPackageResourcePath()

        return mBase.getPackageResourcePath();
    
public android.content.res.ResourcesgetResources()

        return mBase.getResources();
    
public SharedPreferencesgetSharedPreferences(java.lang.String name, int mode)

        return mBase.getSharedPreferences(name, mode);
    
public java.io.FilegetSharedPrefsFile(java.lang.String name)

hide

        return mBase.getSharedPrefsFile(name);
    
public java.lang.ObjectgetSystemService(java.lang.String name)

        return mBase.getSystemService(name);
    
public Resources.ThemegetTheme()

        return mBase.getTheme();
    
public intgetThemeResId()

hide

        return mBase.getThemeResId();
    
public intgetUserId()

hide

        return mBase.getUserId();
    
public android.graphics.drawable.DrawablegetWallpaper()

        return mBase.getWallpaper();
    
public intgetWallpaperDesiredMinimumHeight()

        return mBase.getWallpaperDesiredMinimumHeight();
    
public intgetWallpaperDesiredMinimumWidth()

        return mBase.getWallpaperDesiredMinimumWidth();
    
public voidgrantUriPermission(java.lang.String toPackage, android.net.Uri uri, int modeFlags)

        mBase.grantUriPermission(toPackage, uri, modeFlags);
    
public booleanisRestricted()

        return mBase.isRestricted();
    
public java.io.FileInputStreamopenFileInput(java.lang.String name)

        return mBase.openFileInput(name);
    
public java.io.FileOutputStreamopenFileOutput(java.lang.String name, int mode)

        return mBase.openFileOutput(name, mode);
    
public android.database.sqlite.SQLiteDatabaseopenOrCreateDatabase(java.lang.String name, int mode, android.database.sqlite.SQLiteDatabase.CursorFactory factory)

        return mBase.openOrCreateDatabase(name, mode, factory);
    
public android.database.sqlite.SQLiteDatabaseopenOrCreateDatabase(java.lang.String name, int mode, android.database.sqlite.SQLiteDatabase.CursorFactory factory, android.database.DatabaseErrorHandler errorHandler)

        return mBase.openOrCreateDatabase(name, mode, factory, errorHandler);
    
public android.graphics.drawable.DrawablepeekWallpaper()

        return mBase.peekWallpaper();
    
public IntentregisterReceiver(BroadcastReceiver receiver, IntentFilter filter)

        return mBase.registerReceiver(receiver, filter);
    
public IntentregisterReceiver(BroadcastReceiver receiver, IntentFilter filter, java.lang.String broadcastPermission, android.os.Handler scheduler)

        return mBase.registerReceiver(receiver, filter, broadcastPermission,
                scheduler);
    
public IntentregisterReceiverAsUser(BroadcastReceiver receiver, android.os.UserHandle user, IntentFilter filter, java.lang.String broadcastPermission, android.os.Handler scheduler)

hide

        return mBase.registerReceiverAsUser(receiver, user, filter, broadcastPermission,
                scheduler);
    
public voidremoveStickyBroadcast(Intent intent)

        mBase.removeStickyBroadcast(intent);
    
public voidremoveStickyBroadcastAsUser(Intent intent, android.os.UserHandle user)

        mBase.removeStickyBroadcastAsUser(intent, user);
    
public voidrevokeUriPermission(android.net.Uri uri, int modeFlags)

        mBase.revokeUriPermission(uri, modeFlags);
    
public voidsendBroadcast(Intent intent)

        mBase.sendBroadcast(intent);
    
public voidsendBroadcast(Intent intent, java.lang.String receiverPermission)

        mBase.sendBroadcast(intent, receiverPermission);
    
public voidsendBroadcast(Intent intent, java.lang.String receiverPermission, int appOp)

hide

        mBase.sendBroadcast(intent, receiverPermission, appOp);
    
public voidsendBroadcastAsUser(Intent intent, android.os.UserHandle user)

        mBase.sendBroadcastAsUser(intent, user);
    
public voidsendBroadcastAsUser(Intent intent, android.os.UserHandle user, java.lang.String receiverPermission)

        mBase.sendBroadcastAsUser(intent, user, receiverPermission);
    
public voidsendOrderedBroadcast(Intent intent, java.lang.String receiverPermission)

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

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

hide

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

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

hide

        mBase.sendOrderedBroadcastAsUser(intent, user, receiverPermission, appOp, resultReceiver,
                scheduler, initialCode, initialData, initialExtras);
    
public voidsendStickyBroadcast(Intent intent)

        mBase.sendStickyBroadcast(intent);
    
public voidsendStickyBroadcastAsUser(Intent intent, android.os.UserHandle user)

        mBase.sendStickyBroadcastAsUser(intent, user);
    
public voidsendStickyOrderedBroadcast(Intent intent, BroadcastReceiver resultReceiver, android.os.Handler scheduler, int initialCode, java.lang.String initialData, android.os.Bundle initialExtras)

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

        mBase.sendStickyOrderedBroadcastAsUser(intent, user, resultReceiver,
                scheduler, initialCode, initialData, initialExtras);
    
public voidsetTheme(int resid)

        mBase.setTheme(resid);
    
public voidsetWallpaper(android.graphics.Bitmap bitmap)

        mBase.setWallpaper(bitmap);
    
public voidsetWallpaper(java.io.InputStream data)

        mBase.setWallpaper(data);
    
public voidstartActivities(Intent[] intents)

        mBase.startActivities(intents);
    
public voidstartActivities(Intent[] intents, android.os.Bundle options)

        mBase.startActivities(intents, options);
    
public voidstartActivitiesAsUser(Intent[] intents, android.os.Bundle options, android.os.UserHandle userHandle)

hide

        mBase.startActivitiesAsUser(intents, options, userHandle);
    
public voidstartActivity(Intent intent)

        mBase.startActivity(intent);
    
public voidstartActivity(Intent intent, android.os.Bundle options)

        mBase.startActivity(intent, options);
    
public voidstartActivityAsUser(Intent intent, android.os.UserHandle user)

hide

        mBase.startActivityAsUser(intent, user);
    
public voidstartActivityAsUser(Intent intent, android.os.Bundle options, android.os.UserHandle user)

hide

        mBase.startActivityAsUser(intent, options, user);
    
public booleanstartInstrumentation(ComponentName className, java.lang.String profileFile, android.os.Bundle arguments)

        return mBase.startInstrumentation(className, profileFile, arguments);
    
public voidstartIntentSender(IntentSender intent, Intent fillInIntent, int flagsMask, int flagsValues, int extraFlags)

        mBase.startIntentSender(intent, fillInIntent, flagsMask,
                flagsValues, extraFlags);
    
public voidstartIntentSender(IntentSender intent, Intent fillInIntent, int flagsMask, int flagsValues, int extraFlags, android.os.Bundle options)

        mBase.startIntentSender(intent, fillInIntent, flagsMask,
                flagsValues, extraFlags, options);
    
public ComponentNamestartService(Intent service)

        return mBase.startService(service);
    
public ComponentNamestartServiceAsUser(Intent service, android.os.UserHandle user)

hide

        return mBase.startServiceAsUser(service, user);
    
public booleanstopService(Intent name)

        return mBase.stopService(name);
    
public booleanstopServiceAsUser(Intent name, android.os.UserHandle user)

hide

        return mBase.stopServiceAsUser(name, user);
    
public voidunbindService(ServiceConnection conn)

        mBase.unbindService(conn);
    
public voidunregisterReceiver(BroadcastReceiver receiver)

        mBase.unregisterReceiver(receiver);