|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectandroid.content.Context
android.content.ContextWrapper
android.test.RenamingDelegatingContext
public class RenamingDelegatingContext
| Field Summary |
|---|
| Fields inherited from class android.content.Context |
|---|
ACCESSIBILITY_SERVICE, ACCOUNT_SERVICE, ACTIVITY_SERVICE, ALARM_SERVICE, AUDIO_SERVICE, BIND_AUTO_CREATE, BIND_DEBUG_UNBIND, BIND_NOT_FOREGROUND, CLIPBOARD_SERVICE, CONNECTIVITY_SERVICE, CONTEXT_IGNORE_SECURITY, CONTEXT_INCLUDE_CODE, CONTEXT_RESTRICTED, DEVICE_POLICY_SERVICE, DROPBOX_SERVICE, INPUT_METHOD_SERVICE, KEYGUARD_SERVICE, LAYOUT_INFLATER_SERVICE, LOCATION_SERVICE, MODE_APPEND, MODE_PRIVATE, MODE_WORLD_READABLE, MODE_WORLD_WRITEABLE, NOTIFICATION_SERVICE, POWER_SERVICE, SEARCH_SERVICE, SENSOR_SERVICE, TELEPHONY_SERVICE, UI_MODE_SERVICE, VIBRATOR_SERVICE, WALLPAPER_SERVICE, WIFI_SERVICE, WINDOW_SERVICE |
| Constructor Summary | |
|---|---|
RenamingDelegatingContext(android.content.Context context,
android.content.Context fileContext,
java.lang.String filePrefix)
|
|
RenamingDelegatingContext(android.content.Context context,
java.lang.String filePrefix)
|
|
| Method Summary | ||
|---|---|---|
java.lang.String[] |
databaseList()
|
|
boolean |
deleteDatabase(java.lang.String name)
|
|
boolean |
deleteFile(java.lang.String name)
|
|
java.lang.String[] |
fileList()
|
|
java.io.File |
getCacheDir()
|
|
java.io.File |
getDatabasePath(java.lang.String name)
|
|
java.lang.String |
getDatabasePrefix()
|
|
java.io.File |
getFileStreamPath(java.lang.String name)
|
|
void |
makeExistingFilesAndDbsAccessible()
|
|
java.io.FileInputStream |
openFileInput(java.lang.String name)
|
|
java.io.FileOutputStream |
openFileOutput(java.lang.String name,
int mode)
|
|
android.database.sqlite.SQLiteDatabase |
openOrCreateDatabase(java.lang.String name,
int mode,
android.database.sqlite.SQLiteDatabase.CursorFactory factory)
|
|
static
|
providerWithRenamedContext(java.lang.Class<T> contentProvider,
android.content.Context c,
java.lang.String filePrefix)
|
|
static
|
providerWithRenamedContext(java.lang.Class<T> contentProvider,
android.content.Context c,
java.lang.String filePrefix,
boolean allowAccessToExistingFilesAndDbs)
|
|
| Methods inherited from class android.content.ContextWrapper |
|---|
attachBaseContext, bindService, checkCallingOrSelfPermission, checkCallingOrSelfUriPermission, checkCallingPermission, checkCallingUriPermission, checkPermission, checkUriPermission, checkUriPermission, clearWallpaper, createPackageContext, enforceCallingOrSelfPermission, enforceCallingOrSelfUriPermission, enforceCallingPermission, enforceCallingUriPermission, enforcePermission, enforceUriPermission, enforceUriPermission, getApplicationContext, getApplicationInfo, getAssets, getBaseContext, getClassLoader, getContentResolver, getDir, getExternalCacheDir, getExternalFilesDir, getFilesDir, getMainLooper, getPackageCodePath, getPackageManager, getPackageName, getPackageResourcePath, getResources, getSharedPreferences, getSystemService, getTheme, getWallpaper, getWallpaperDesiredMinimumHeight, getWallpaperDesiredMinimumWidth, grantUriPermission, isRestricted, peekWallpaper, registerReceiver, registerReceiver, removeStickyBroadcast, revokeUriPermission, sendBroadcast, sendBroadcast, sendOrderedBroadcast, sendOrderedBroadcast, sendStickyBroadcast, sendStickyOrderedBroadcast, setTheme, setWallpaper, setWallpaper, startActivity, startInstrumentation, startIntentSender, startService, stopService, unbindService, unregisterReceiver |
| Methods inherited from class android.content.Context |
|---|
getString, getString, getText, obtainStyledAttributes, obtainStyledAttributes, obtainStyledAttributes, obtainStyledAttributes |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public RenamingDelegatingContext(android.content.Context context,
java.lang.String filePrefix)
public RenamingDelegatingContext(android.content.Context context,
android.content.Context fileContext,
java.lang.String filePrefix)
| Method Detail |
|---|
public static <T extends android.content.ContentProvider> T providerWithRenamedContext(java.lang.Class<T> contentProvider,
android.content.Context c,
java.lang.String filePrefix)
throws java.lang.IllegalAccessException,
java.lang.InstantiationException
java.lang.IllegalAccessException
java.lang.InstantiationException
public static <T extends android.content.ContentProvider> T providerWithRenamedContext(java.lang.Class<T> contentProvider,
android.content.Context c,
java.lang.String filePrefix,
boolean allowAccessToExistingFilesAndDbs)
throws java.lang.IllegalAccessException,
java.lang.InstantiationException
java.lang.IllegalAccessException
java.lang.InstantiationExceptionpublic void makeExistingFilesAndDbsAccessible()
public java.lang.String getDatabasePrefix()
public android.database.sqlite.SQLiteDatabase openOrCreateDatabase(java.lang.String name,
int mode,
android.database.sqlite.SQLiteDatabase.CursorFactory factory)
openOrCreateDatabase in class android.content.ContextWrapperpublic boolean deleteDatabase(java.lang.String name)
deleteDatabase in class android.content.ContextWrapperpublic java.io.File getDatabasePath(java.lang.String name)
getDatabasePath in class android.content.ContextWrapperpublic java.lang.String[] databaseList()
databaseList in class android.content.ContextWrapper
public java.io.FileInputStream openFileInput(java.lang.String name)
throws java.io.FileNotFoundException
openFileInput in class android.content.ContextWrapperjava.io.FileNotFoundException
public java.io.FileOutputStream openFileOutput(java.lang.String name,
int mode)
throws java.io.FileNotFoundException
openFileOutput in class android.content.ContextWrapperjava.io.FileNotFoundExceptionpublic java.io.File getFileStreamPath(java.lang.String name)
getFileStreamPath in class android.content.ContextWrapperpublic boolean deleteFile(java.lang.String name)
deleteFile in class android.content.ContextWrapperpublic java.lang.String[] fileList()
fileList in class android.content.ContextWrapperpublic java.io.File getCacheDir()
getCacheDir in class android.content.ContextWrapper
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||