Home
last modified time | relevance | path

Searched refs:File (Results 1 – 25 of 445) sorted by relevance

12345678910>>...18

/frameworks/base/core/java/android/os/
DEnvironment.java29 import java.io.File;
58 private static final File DIR_ANDROID_ROOT = getDirectory(ENV_ANDROID_ROOT, "/system");
59 private static final File DIR_MEDIA_STORAGE = getDirectory(ENV_MEDIA_STORAGE, "/data/media");
115 private final File[] mExternalDirsForVold;
117 private final File[] mExternalDirsForApp;
119 private final File mEmulatedDirForDirect;
132 ArrayList<File> externalForVold = Lists.newArrayList(); in UserEnvironment()
133 ArrayList<File> externalForApp = Lists.newArrayList(); in UserEnvironment()
139 final File emulatedSourceBase = new File(rawEmulatedSource); in UserEnvironment()
140 final File emulatedTargetBase = new File(rawEmulatedTarget); in UserEnvironment()
[all …]
/frameworks/base/services/java/com/android/server/updates/
DSELinuxPolicyInstallReceiver.java29 import java.io.File;
50 private void backupContexts(File contexts) { in backupContexts()
51 new File(contexts, seappContextsPath).renameTo( in backupContexts()
52 new File(contexts, seappContextsPath + "_backup")); in backupContexts()
54 new File(contexts, propertyContextsPath).renameTo( in backupContexts()
55 new File(contexts, propertyContextsPath + "_backup")); in backupContexts()
57 new File(contexts, fileContextsPath).renameTo( in backupContexts()
58 new File(contexts, fileContextsPath + "_backup")); in backupContexts()
60 new File(contexts, sepolicyPath).renameTo( in backupContexts()
61 new File(contexts, sepolicyPath + "_backup")); in backupContexts()
[all …]
/frameworks/support/v4/java/android/support/v4/content/
DContextCompat.java27 import java.io.File;
153 public static File[] getObbDirs(Context context) { in getObbDirs()
158 final File single; in getObbDirs()
165 return new File[] { single }; in getObbDirs()
213 public static File[] getExternalFilesDirs(Context context, String type) { in getExternalFilesDirs()
218 final File single; in getExternalFilesDirs()
225 return new File[] { single }; in getExternalFilesDirs()
273 public static File[] getExternalCacheDirs(Context context) { in getExternalCacheDirs()
278 final File single; in getExternalCacheDirs()
285 return new File[] { single }; in getExternalCacheDirs()
[all …]
DFileProvider.java40 import java.io.File;
317 private static final File DEVICE_ROOT = new File("/");
375 public static Uri getUriForFile(Context context, String authority, File file) { in getUriForFile()
412 final File file = mStrategy.getFileForUri(uri); in query()
451 final File file = mStrategy.getFileForUri(uri); in getType()
497 final File file = mStrategy.getFileForUri(uri); in delete()
519 final File file = mStrategy.getFileForUri(uri); in openFile()
575 File target = null; in parsePathStrategy()
612 public Uri getUriForFile(File file); in getUriForFile()
617 public File getFileForUri(Uri uri); in getFileForUri()
[all …]
/frameworks/support/tests/java/android/support/v4/content/
DFileProviderTest.java30 import java.io.File;
62 File file = buildPath(mContext.getFilesDir(), "file.test"); in testStrategyUriSimple()
82 File file = buildPath(mContext.getFilesDir(), "..", "file.test"); in testStrategyUriJumpOutside()
93 strat.addRoot("tag2", new File("/")); in testStrategyUriShortestRoot()
95 File file = buildPath(mContext.getFilesDir(), "file.test"); in testStrategyUriShortestRoot()
100 strat.addRoot("tag1", new File("/")); in testStrategyUriShortestRoot()
112 File file = buildPath(mContext.getFilesDir(), "file.test"); in testStrategyFileSimple()
136 File file = buildPath(mContext.getFilesDir(), "lol\"wat?foo&bar", "wat.txt"); in testStrategyEscaping()
149 File file = buildPath(mContext.getFilesDir(), "file.txt"); in testStrategyExtraParams()
159 File inFile = new File(mContext.getFilesDir(), "//foo//bar//"); in testStrategyExtraSeparators()
[all …]
/frameworks/base/core/java/com/android/internal/util/
DFileRotator.java24 import java.io.File;
54 private final File mBasePath;
98 public FileRotator(File basePath, String prefix, long rotateAgeMillis, long deleteAgeMillis) { in FileRotator()
114 final File backupFile = new File(mBasePath, name); in FileRotator()
115 final File file = new File( in FileRotator()
124 final File noBackupFile = new File(mBasePath, name); in FileRotator()
125 final File file = new File( in FileRotator()
143 new File(mBasePath, name).delete(); in deleteAll()
160 final File file = new File(mBasePath, name); in dumpAll()
235 final File file = new File(mBasePath, name); in rewriteSingle()
[all …]
DJournaledFile.java19 import java.io.File;
32 File mReal;
33 File mTemp;
36 public JournaledFile(File real, File temp) { in JournaledFile()
47 public File chooseForRead() { in chooseForRead()
48 File result; in chooseForRead()
71 public File chooseForWrite() { in chooseForWrite()
/frameworks/base/packages/SharedStorageBackup/src/com/android/sharedstoragebackup/
DObbBackupService.java30 import java.io.File;
60 File obbDir = Environment.buildExternalStorageAppObbDirs(packageName)[0];
63 ArrayList<File> obbList = allFileContents(obbDir);
71 for (File f : obbList) {
109 File outFile = Environment.buildExternalStorageAppObbDirs(packageName)[0];
111 outFile = new File(outFile, path);
128 ArrayList<File> allFileContents(File rootDir) {
129 final ArrayList<File> files = new ArrayList<File>();
130 final ArrayList<File> dirs = new ArrayList<File>();
134 File dir = dirs.remove(0);
[all …]
/frameworks/base/core/tests/coretests/src/android/content/pm/
DAppCacheTest.java34 import java.io.File;
58 void cleanUpDirectory(File pDir, String dirName) { in cleanUpDirectory()
59 File testDir = new File(pDir, dirName); in cleanUpDirectory()
65 File file = new File(testDir, fList[i]); in cleanUpDirectory()
76 File testDir = mContext.getCacheDir(); in cleanUpCacheDirectory()
87 File file = new File(testDir, fList[i]); in cleanUpCacheDirectory()
128 File cacheDir = mContext.getCacheDir(); in testFreeApplicationCacheAllFiles()
145 File cacheDir = mContext.getCacheDir(); in testFreeApplicationCacheSomeFiles()
166 public void openOutFileInAppFilesDir(File pFile, String pFileOut) { in openOutFileInAppFilesDir()
222 File file = new File(con.getCacheDir(), fileName); in testAppCacheCreateFile()
[all …]
/frameworks/base/core/java/com/android/internal/backup/
DLocalTransport.java36 import java.io.File;
62 private File mDataDir = new File(Environment.getDownloadCacheDirectory(), "backup");
106 File packageDir = new File(mDataDir, packageInfo.packageName); in performBackup()
120 File entityFile = new File(packageDir, base64Key); in performBackup()
161 private void deleteContents(File dirname) { in deleteContents()
162 File[] contents = dirname.listFiles(); in deleteContents()
164 for (File f : contents) { in deleteContents()
178 File packageDir = new File(mDataDir, packageInfo.packageName); in clearBackupData()
179 final File[] fileset = packageDir.listFiles(); in clearBackupData()
181 for (File f : fileset) { in clearBackupData()
[all …]
/frameworks/base/services/tests/servicestests/src/com/android/server/
DMountServiceTests.java34 import java.io.File;
115 private File getFilePath(String name) { in getFilePath()
116 final File filesDir = mContext.getFilesDir(); in getFilePath()
117 final File outFile = new File(filesDir, name); in getFilePath()
121 private void copyRawToFile(int rawResId, File outFile) { in copyRawToFile()
140 private void mountObb(StorageManager sm, final int resource, final File file, in mountObb()
162 final File file) { in mountObbWithoutWait()
172 private void waitForObbActionCompletion(final StorageManager sm, final File file, in waitForObbActionCompletion()
186 private String checkMountedPath(final StorageManager sm, final File file) { in checkMountedPath()
194 private void unmountObb(final StorageManager sm, final File file, int expectedState) { in unmountObb()
[all …]
/frameworks/base/packages/ExternalStorageProvider/src/com/android/externalstorage/
DExternalStorageProvider.java44 import java.io.File;
89 private HashMap<String, File> mIdToPath;
92 private Map<File, DirectoryObserver> mObservers = Maps.newHashMap();
140 final File path = volume.getPathFile(); in updateVolumesLocked()
174 private String getDocIdForFile(File file) throws FileNotFoundException { in getDocIdForFile()
178 Map.Entry<String, File> mostSpecific = null; in getDocIdForFile()
180 for (Map.Entry<String, File> root : mIdToPath.entrySet()) { in getDocIdForFile()
206 private File getFileForDocId(String docId) throws FileNotFoundException { in getFileForDocId()
211 File target; in getFileForDocId()
221 target = new File(target, path); in getFileForDocId()
[all …]
/frameworks/base/tests/RenderScriptTests/SceneGraph/src/com/android/testapp/
DFileSelector.java19 import java.io.File;
38 File[] mCurrentSubList;
39 File mCurrentFile;
42 public boolean accept(File file) { in accept()
50 private void populateList(File file) { in populateList()
83 populateList(new File("/sdcard/")); in onCreate()
89 File parent = mCurrentFile.getParentFile(); in onListItemClick()
98 File selectedFile = mCurrentSubList[position - 1]; in onListItemClick()
/frameworks/base/tests/RenderScriptTests/ModelViewer/src/com/android/modelviewer/
DA3DSelector.java19 import java.io.File;
38 File[] mCurrentSubList;
39 File mCurrentFile;
42 public boolean accept(File file) { in accept()
50 private void populateList(File file) { in populateList()
83 populateList(new File("/sdcard/")); in onCreate()
89 File parent = mCurrentFile.getParentFile(); in onListItemClick()
98 File selectedFile = mCurrentSubList[position - 1]; in onListItemClick()
/frameworks/base/core/java/com/android/internal/content/
DNativeLibraryHelper.java22 import java.io.File;
42 public static long sumNativeBinariesLI(File apkFile) { in sumNativeBinariesLI()
59 public static int copyNativeBinariesIfNeededLI(File apkFile, File sharedLibraryDir) { in copyNativeBinariesIfNeededLI()
68 return removeNativeBinariesFromDirLI(new File(nativeLibraryPath)); in removeNativeBinariesLI()
73 public static boolean removeNativeBinariesFromDirLI(File nativeLibraryDir) { in removeNativeBinariesFromDirLI()
86 final File[] binaries = nativeLibraryDir.listFiles(); in removeNativeBinariesFromDirLI()
/frameworks/base/keystore/java/android/security/
DSystemKeyStore.java23 import java.io.File;
76 File keyFile = getKeyFile(keyName); in generateNewKey()
107 private File getKeyFile(String keyName) { in getKeyFile()
108 File sysKeystoreDir = new File(Environment.getDataDirectory(), in getKeyFile()
110 File keyFile = new File(sysKeystoreDir, keyName + KEY_FILE_EXTENSION); in getKeyFile()
119 File keyFile = getKeyFile(keyName); in retrieveKey()
129 File keyFile = getKeyFile(keyName); in deleteKey()
/frameworks/base/core/tests/coretests/src/android/os/
DFileUtilsTest.java30 import java.io.File;
43 private File mDir;
44 private File mTestFile;
45 private File mCopyFile;
51 mTestFile = new File(mDir, "test.file"); in setUp()
52 mCopyFile = new File(mDir, "copy.file"); in setUp()
79 assertTrue(FileUtils.isFilenameSafe(new File("foobar"))); in testIsFilenameSafe()
80 assertTrue(FileUtils.isFilenameSafe(new File("a_b-c=d.e/0,1+23"))); in testIsFilenameSafe()
81 assertFalse(FileUtils.isFilenameSafe(new File("foo*bar"))); in testIsFilenameSafe()
82 assertFalse(FileUtils.isFilenameSafe(new File("foo\nbar"))); in testIsFilenameSafe()
[all …]
/frameworks/base/packages/SystemUI/tests/src/com/android/systemui/screenshot/
DScreenshotTest.java27 import java.io.File;
52 File screenshotDir = getScreenshotDir(); in testScreenshot()
67 File screenshotFile = new File(screenshotDir, observer.getCreatedPath()); in testScreenshot()
123 private File getScreenshotDir() { in getScreenshotDir()
125 return new File(Environment.getExternalStorageDirectory(), "Pictures" + File.separator + in getScreenshotDir()
132 private boolean isValidImage(File screenshotFile) { in isValidImage()
/frameworks/base/core/java/android/app/backup/
DWallpaperBackupHelper.java30 import java.io.File;
45 new File(Environment.getUserSystemDirectory(UserHandle.USER_OWNER),
48 new File(Environment.getUserSystemDirectory(UserHandle.USER_OWNER),
60 new File(Environment.getUserSystemDirectory(UserHandle.USER_OWNER),
122 File f = new File(STAGE_FILE); in restoreEntity()
145 f.renameTo(new File(WALLPAPER_IMAGE)); in restoreEntity()
157 File f = new File(WALLPAPER_INFO); in restoreEntity()
DFileBackupHelper.java23 import java.io.File;
43 File mFilesDir;
77 File base = mContext.getFilesDir(); in performBackup()
81 fullPaths[i] = (new File(base, files[i])).getAbsolutePath(); in performBackup()
98 File f = new File(mFilesDir, key); in restoreEntity()
/frameworks/base/test-runner/src/android/test/
DClassPathPackageInfoSource.java24 import java.io.File;
59 private final Map<File, Set<String>> jarFiles = Maps.newHashMap();
113 File classPathEntry = new File(entryName); in findClasses()
124 File file = new File(apkPath); in findClasses()
136 private void scanForApkFiles(File source, String packageName, in scanForApkFiles()
141 File[] files = source.listFiles(); in scanForApkFiles()
143 for (File file : files) { in scanForApkFiles()
154 private void findClassesInDirectory(File classDir, in findClassesInDirectory()
158 File directory = new File(classDir, pathPrefix); in findClassesInDirectory()
161 for (File f : directory.listFiles()) { in findClassesInDirectory()
[all …]
/frameworks/av/media/libstagefright/codecs/on2/h264dec/omxdl/arm11/
Dbuild_vc.pl16 use File::Spec;
47 $h = File::Spec->canonpath($h);
68 $file = File::Spec->canonpath($file);
70 (undef, undef, $f) = File::Spec->splitpath($file);
73 $objfile = File::Spec->catfile('obj', $base.'.o');
101 $libfile = File::Spec->catfile('lib', 'omxVC'.$LIB_TYPE);
/frameworks/av/media/libstagefright/codecs/on2/h264dec/omxdl/reference/
Dbuild_vc.pl16 use File::Spec;
47 $h = File::Spec->canonpath($h);
68 $file = File::Spec->canonpath($file);
70 (undef, undef, $f) = File::Spec->splitpath($file);
73 $objfile = File::Spec->catfile('obj', $base.'.o');
101 $libfile = File::Spec->catfile('lib', 'omxVC'.$LIB_TYPE);
/frameworks/base/core/java/android/gesture/
DGestureLibraries.java23 import java.io.File;
36 return fromFile(new File(path)); in fromFile()
39 public static GestureLibrary fromFile(File path) { in fromFile()
52 private final File mPath;
54 public FileGestureLibrary(File path) { in FileGestureLibrary()
66 final File file = mPath; in save()
68 final File parentFile = file.getParentFile(); in save()
92 final File file = mPath; in load()
/frameworks/av/media/libstagefright/codecs/on2/h264dec/omxdl/arm_neon/
Dbuild_vc.pl16 use File::Spec;
47 $h = File::Spec->canonpath($h);
68 $file = File::Spec->canonpath($file);
70 (undef, undef, $f) = File::Spec->splitpath($file);
75 $objfile = File::Spec->catfile('obj', $base.'.o');
103 $libfile = File::Spec->catfile('lib', 'omxVC'.$LIB_TYPE);

12345678910>>...18