Home | History | Annotate | Download | only in shadows

Lines Matching defs:context

4 import android.content.Context;
26 private Context context;
30 context = new Activity();
31 deleteDir(context.getFilesDir());
32 deleteDir(context.getCacheDir());
34 File[] files = context.getFilesDir().listFiles();
38 File[] cachedFiles = context.getFilesDir().listFiles();
45 deleteDir(context.getFilesDir());
46 deleteDir(context.getCacheDir());
47 deleteDir(context.getExternalCacheDir());
48 deleteDir(context.getExternalFilesDir(null));
67 dataDir = context.getDir("data", Context.MODE_PRIVATE);
78 dataDir = context.getDir("data", Context.MODE_PRIVATE);
85 assertThat(context.obtainStyledAttributes(null), not(nullValue()));
86 assertThat(context.obtainStyledAttributes(0, null), not(nullValue()));
87 assertThat(context.obtainStyledAttributes(null, null), not(nullValue()));
88 assertThat(context.obtainStyledAttributes(null, null, 0, 0), not(nullValue()));
93 assertTrue(context.getCacheDir().exists());
98 assertTrue(context.getExternalCacheDir().exists());
103 assertNotNull(context.getCacheDir());
104 File cacheTest = new File(context.getCacheDir(), "__test__");
121 assertNotNull(context.getExternalCacheDir());
122 File cacheTest = new File(context.getExternalCacheDir(), "__test__");
140 assertTrue(context.getFilesDir().exists());
145 assertTrue(context.getExternalFilesDir(null).exists());
150 File f = context.getExternalFilesDir("__test__");
159 File file = new File(context.getFilesDir(), "__test__");
166 fileInputStream = context.openFileInput("__test__");
181 fileInputStream = context.openFileInput("data" + File.separator + "test");
194 fileOutputStream = context.openFileOutput("__test__", -1);
202 fileInputStream = new FileInputStream(new File(context.getFilesDir(), file.getName()));
216 fos = context.openFileOutput(File.separator + "data" + File.separator + "test" + File.separator + "hi", 0);
225 File filesDir = context.getFilesDir();
229 successfully = context.deleteFile(file.getName());
235 File filesDir = context.getFilesDir();
237 boolean successfully = context.deleteFile(file.getName());