FileDocCategorySizeDatePackage
ContextWrapper.javaAPI DocAndroid 1.5 API11562Wed May 06 22:41:54 BST 2009android.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 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 intcheckUriPermission(android.net.Uri uri, int pid, int uid, int modeFlags)

        return mBase.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)

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

        mBase.clearWallpaper();
    
public ContextcreatePackageContext(java.lang.String packageName, int flags)

        return mBase.createPackageContext(packageName, flags);
    
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.res.AssetManagergetAssets()

        return mBase.getAssets();
    
public ContextgetBaseContext()

return
the base context as set by the constructor or setBaseContext

        return mBase;
    
public java.io.FilegetCacheDir()

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

        return mBase.getClassLoader();
    
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 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.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.lang.ObjectgetSystemService(java.lang.String name)

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

        return mBase.getTheme();
    
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 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.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 voidremoveStickyBroadcast(Intent intent)

        mBase.removeStickyBroadcast(intent);
    
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 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 voidsendStickyBroadcast(Intent intent)

        mBase.sendStickyBroadcast(intent);
    
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 voidstartActivity(Intent intent)

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

        return mBase.startInstrumentation(className, profileFile, arguments);
    
public ComponentNamestartService(Intent service)

        return mBase.startService(service);
    
public booleanstopService(Intent name)

        return mBase.stopService(name);
    
public voidunbindService(ServiceConnection conn)

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

        mBase.unregisterReceiver(receiver);