Home
last modified time | relevance | path

Searched refs:Environment (Results 1 – 25 of 120) sorted by relevance

12345

/packages/providers/MediaProvider/src/com/android/providers/media/util/
DFileUtils.java51 import android.os.Environment;
809 res.addAll(Environment.getInternalMediaDirectories());
897 if (contains(Environment.getStorageDirectory(), path)) {
995 Environment.DIRECTORY_MUSIC,
996 Environment.DIRECTORY_PODCASTS,
997 Environment.DIRECTORY_RINGTONES,
998 Environment.DIRECTORY_ALARMS,
999 Environment.DIRECTORY_NOTIFICATIONS,
1000 Environment.DIRECTORY_PICTURES,
1001 Environment.DIRECTORY_MOVIES,
[all …]
/packages/providers/MediaProvider/tests/client/src/com/android/providers/media/client/
DLegacyProviderMigrationTest.java40 import android.os.Environment;
170 "image/jpeg", Environment.DIRECTORY_PICTURES, R.raw.orientation_90); in testLegacy_Orientation()
178 "image/png", Environment.DIRECTORY_PICTURES); in testLegacy_Pending()
187 "image/png", Environment.DIRECTORY_PICTURES); in testLegacy_Trashed()
195 "image/png", Environment.DIRECTORY_PICTURES); in testLegacy_Favorite()
203 "image/png", Environment.DIRECTORY_PICTURES); in testLegacy_Orphaned()
211 "audio/mpeg", Environment.DIRECTORY_MUSIC); in testLegacy_Audio()
219 "video/mpeg", Environment.DIRECTORY_MOVIES); in testLegacy_Video()
230 "image/png", Environment.DIRECTORY_PICTURES); in testLegacy_Image()
238 "application/x-iso9660-image", Environment.DIRECTORY_DOWNLOADS); in testLegacy_Download()
[all …]
DPublicVolumeSetupHelper.java20 import android.os.Environment;
67 final File target = Environment.getExternalStorageDirectory(); in isExternalStorageStateMounted()
69 return (Environment.MEDIA_MOUNTED.equals(Environment.getExternalStorageState(target)) in isExternalStorageStateMounted()
/packages/providers/MediaProvider/tests/src/com/android/providers/media/
DTranscodeHelperTest.java24 import android.os.Environment;
44 "/storage/emulated/0/" + Environment.DIRECTORY_DCIM + "/Camera/some_filename.mp4";
74 "/storage/emulated/0/" + Environment.DIRECTORY_DCIM + "/Camera/filename.mp4", in testSupportsValidTranscodePath()
75 "/storage/emulated/1/" + Environment.DIRECTORY_DCIM + "/Camera/filename.mp4", in testSupportsValidTranscodePath()
86 "/storage/emulated/ab/" + Environment.DIRECTORY_DCIM + "/Camera/filename.mp4", in testDoesNotSupportsInvalidTranscodePath()
87 "/storage/emulated/0/" + Environment.DIRECTORY_DCIM + "/Camera/dir/filename.mp4", in testDoesNotSupportsInvalidTranscodePath()
88 "/storage/emulate/" + Environment.DIRECTORY_DCIM + "/Camera/filename.mp4", in testDoesNotSupportsInvalidTranscodePath()
89 "/storage/emulated/" + Environment.DIRECTORY_DCIM + "/Camera/filename.jpeg", in testDoesNotSupportsInvalidTranscodePath()
DIdleServiceTest.java19 import static android.os.Environment.DIRECTORY_MOVIES;
20 import static android.os.Environment.DIRECTORY_PICTURES;
21 import static android.os.Environment.buildPath;
37 import android.os.Environment;
98 final File dir = Environment.getExternalStorageDirectory(); in testPruneThumbnails()
125 final File uuidFile = buildPath(dir, Environment.DIRECTORY_PICTURES, in testPruneThumbnails()
/packages/apps/TvSettings/Settings/src/com/android/tv/settings/device/storage/
DStorageFragment.java25 import android.os.Environment;
224 Environment.DIRECTORY_DCIM, in updateDetails()
225 Environment.DIRECTORY_MOVIES, Environment.DIRECTORY_PICTURES); in updateDetails()
228 Environment.DIRECTORY_MUSIC, in updateDetails()
229 Environment.DIRECTORY_ALARMS, Environment.DIRECTORY_NOTIFICATIONS, in updateDetails()
230 Environment.DIRECTORY_RINGTONES, Environment.DIRECTORY_PODCASTS); in updateDetails()
233 Environment.DIRECTORY_DOWNLOADS); in updateDetails()
/packages/apps/Gallery2/src/com/android/gallery3d/util/
DMediaSetUtils.java19 import android.os.Environment;
32 Environment.getExternalStorageDirectory().toString() + "/"
35 Environment.getExternalStorageDirectory().toString() + "/"
38 Environment.getExternalStorageDirectory().toString() + "/"
41 Environment.getExternalStorageDirectory().toString() + "/"
44 Environment.getExternalStorageDirectory().toString() +
/packages/services/Mtp/src/com/android/mtp/
DMtpService.java29 import android.os.Environment;
60 Environment.DIRECTORY_DCIM,
61 Environment.DIRECTORY_PICTURES,
69 if (Environment.MEDIA_MOUNTED.equals(newState)) {
82 } else if (Environment.MEDIA_MOUNTED.equals(oldState)) {
142 if (v.getState().equals(Environment.MEDIA_MOUNTED)) { in onStartCommand()
148 Environment.UserEnvironment env = new Environment.UserEnvironment(getUserId()); in onStartCommand()
/packages/apps/LegacyCamera/src/com/android/camera/
DStorage.java23 import android.os.Environment;
36 Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_DCIM).toString();
106 String state = Environment.getExternalStorageState(); in getAvailableSpace()
108 if (Environment.MEDIA_CHECKING.equals(state)) { in getAvailableSpace()
111 if (!Environment.MEDIA_MOUNTED.equals(state)) { in getAvailableSpace()
/packages/providers/MediaProvider/src/com/android/providers/media/fuse/
DExternalStorageServiceImpl.java23 import android.os.Environment;
88 case Environment.MEDIA_MOUNTED: in onVolumeStateChanged()
93 case Environment.MEDIA_UNMOUNTED: in onVolumeStateChanged()
94 case Environment.MEDIA_EJECTING: in onVolumeStateChanged()
95 case Environment.MEDIA_REMOVED: in onVolumeStateChanged()
96 case Environment.MEDIA_BAD_REMOVAL: in onVolumeStateChanged()
/packages/apps/Gallery2/src/com/android/gallery3d/ingest/data/
DImportTask.java23 import android.os.Environment;
79 File dest = new File(Environment.getExternalStorageDirectory(), mDestAlbumName); in run()
107 String state = Environment.getExternalStorageState(); in hasSpaceForSize()
108 if (!Environment.MEDIA_MOUNTED.equals(state)) { in hasSpaceForSize()
112 String path = Environment.getExternalStorageDirectory().getPath(); in hasSpaceForSize()
/packages/apps/Camera2/tests/src/com/android/camera/functional/
DVideoCaptureIntentTest.java28 import android.os.Environment;
94 mFile = new File(Environment.getExternalStorageDirectory(), "video.tmp"); in testExtraOutput()
132 mFile = new File(Environment.getExternalStorageDirectory(), "video.tmp"); in testExtraSizeLimit()
154 mFile = new File(Environment.getExternalStorageDirectory(), "video.tmp"); in testExtraDurationLimit()
176 mFile = new File(Environment.getExternalStorageDirectory(), "video.tmp");
177 mFile2 = new File(Environment.getExternalStorageDirectory(), "video2.tmp");
/packages/providers/DownloadProvider/src/com/android/providers/downloads/
DHelpers.java19 import static android.os.Environment.buildExternalStorageAndroidObbDirs;
20 import static android.os.Environment.buildExternalStorageAppDataDirs;
21 import static android.os.Environment.buildExternalStorageAppMediaDirs;
22 import static android.os.Environment.buildExternalStorageAppObbDirs;
23 import static android.os.Environment.buildExternalStoragePublicDirs;
46 import android.os.Environment;
565 Environment.DIRECTORY_DOWNLOADS), file)) { in isFilenameValidInPublicDownloadsDir()
584 return ArrayUtils.contains(Environment.STANDARD_DIRECTORIES, publicDir); in isFilenameValidInKnownPublicDir()
598 || containsCanonical(Environment.getDownloadCacheDirectory(), file)) { in isFilenameValid()
732 Environment.getExternalStorageDirectory(), Environment.DIRECTORY_DOWNLOADS); in getDestinationDirectory()
DDownloadIdleService.java33 import android.os.Environment;
168 final String state = Environment.getExternalStorageState(file); in cleanOrphans()
169 if (Environment.MEDIA_UNKNOWN.equals(state) in cleanOrphans()
170 || Environment.MEDIA_MOUNTED.equals(state)) { in cleanOrphans()
191 fromDisk.addAll(listFilesRecursive(Environment.getDownloadCacheDirectory(), null, uid)); in cleanOrphans()
/packages/apps/LegacyCamera/tests/src/com/android/camera/functional/
DVideoCaptureIntentTest.java29 import android.os.Environment;
101 mFile = new File(Environment.getExternalStorageDirectory(), "video.tmp"); in testExtraOutput()
155 mFile = new File(Environment.getExternalStorageDirectory(), "video.tmp"); in testExtraSizeLimit()
177 mFile = new File(Environment.getExternalStorageDirectory(), "video.tmp"); in testExtraDurationLimit()
199 mFile = new File(Environment.getExternalStorageDirectory(), "video.tmp");
200 mFile2 = new File(Environment.getExternalStorageDirectory(), "video2.tmp");
/packages/providers/DownloadProvider/tests/src/com/android/providers/downloads/
DHelpersTest.java43 import android.os.Environment;
253 final File file = new File(Environment.getExternalStoragePublicDirectory( in prepareData()
254 Environment.DIRECTORY_DOWNLOADS), fileName); in prepareData()
263 final File file1 = new File(Environment.getExternalStoragePublicDirectory( in prepareData()
264 Environment.DIRECTORY_DOCUMENTS), fileName); in prepareData()
281 final File file1 = new File(Environment.getExternalStoragePublicDirectory( in prepareData()
282 Environment.DIRECTORY_DOCUMENTS), fileName); in prepareData()
/packages/services/Car/tests/obd2_app/src/com/google/android/car/obd2app/
DObd2CollectionTask.java21 import android.os.Environment;
112 String state = Environment.getExternalStorageState(); in isExternalStorageWriteable()
113 return (Environment.MEDIA_MOUNTED.equals(state)); in isExternalStorageWriteable()
118 return new File(context.getExternalFilesDir(Environment.DIRECTORY_DOCUMENTS), basename); in getFilenameForStorage()
/packages/apps/Gallery/src/com/android/camera/
DImageManager.java36 import android.os.Environment;
134 Environment.getExternalStorageDirectory().toString()
153 Environment.getExternalStorageDirectory().toString() in ensureOSXCompatibleFolder()
442 Environment.getExternalStorageDirectory().toString() + "/DCIM"; in checkFsWritable()
470 String state = Environment.getExternalStorageState(); in hasStorage()
472 if (Environment.MEDIA_MOUNTED.equals(state)) { in hasStorage()
480 && Environment.MEDIA_MOUNTED_READ_ONLY.equals(state)) { in hasStorage()
/packages/providers/CalendarProvider/src/com/android/providers/calendar/
DCalendarDebugActivity.java25 import android.os.Environment;
81 new File(Environment.getExternalStorageDirectory(), OUT_FILE).exists(); in updateDeleteButton()
105 File outFile = new File(Environment.getExternalStorageDirectory(), OUT_FILE); in cleanup()
124 File path = Environment.getExternalStorageDirectory(); in doInBackground()
/packages/apps/Bluetooth/src/com/android/bluetooth/opp/
DBluetoothOppReceiveFileInfo.java40 import android.os.Environment;
113 if (!Environment.getExternalStorageState().equals(Environment.MEDIA_MOUNTED)) { in generateFileInfo()
179 Environment.DIRECTORY_DOWNLOADS); in generateFileInfo()
/packages/apps/DocumentsUI/src/com/android/documentsui/dirlist/
DMessage.java37 import com.android.documentsui.dirlist.DocumentsAdapter.Environment;
44 protected final Environment mEnv;
58 Message(Environment env, Runnable defaultCallback) { in Message()
128 HeaderMessage(Environment env, Runnable callback) { in HeaderMessage()
186 InflateMessage(Environment env, Runnable callback) { in InflateMessage()
/packages/apps/Settings/src/com/android/settings/network/
DUsbTetherPreferenceController.java25 import android.os.Environment;
52 mMassStorageActive = Environment.MEDIA_SHARED.equals(Environment.getExternalStorageState()); in onStart()
/packages/apps/TV/common/src/com/android/tv/common/recording/
DRecordingStorageStatusManager.java24 import android.os.Environment;
248 Environment.getExternalStorageState().equals(Environment.MEDIA_MOUNTED); in getStorageStatusInternal()
249 File storageMountedDir = storageMounted ? Environment.getExternalStorageDirectory() : null; in getStorageStatusInternal()
/packages/apps/DocumentsUI/src/com/android/documentsui/
DHorizontalBreadcrumb.java32 import com.android.documentsui.NavigationViewManager.Environment;
62 public void setup(Environment env, in setup()
153 private final Environment mEnv;
160 Environment env, in BreadcrumbAdapter()
/packages/providers/MediaProvider/tests/transcode/src/com/android/providers/media/transcode/
DTranscodeTest.java36 import android.os.Environment;
60 = Environment.getExternalStorageDirectory();
62 = new File(EXTERNAL_STORAGE_DIRECTORY, Environment.DIRECTORY_DCIM + "/Camera");
67 new File(EXTERNAL_STORAGE_DIRECTORY, Environment.DIRECTORY_PICTURES),
68 new File(EXTERNAL_STORAGE_DIRECTORY, Environment.DIRECTORY_MOVIES),
69 new File(EXTERNAL_STORAGE_DIRECTORY, Environment.DIRECTORY_DOWNLOADS),
70 new File(EXTERNAL_STORAGE_DIRECTORY, Environment.DIRECTORY_DCIM),
71 new File(EXTERNAL_STORAGE_DIRECTORY, Environment.DIRECTORY_DOCUMENTS),

12345