Home
last modified time | relevance | path

Searched refs:MediaColumns (Results 1 – 25 of 72) sorted by relevance

123

/packages/providers/MediaProvider/src/com/android/providers/media/photopicker/data/
DExternalDbFacade.java50 import android.provider.MediaStore.MediaColumns;
80 CloudMediaProviderContract.MediaColumns.ID;
81 private static final String COLUMN_GENERATION_MODIFIED = MediaColumns.GENERATION_MODIFIED;
84 MediaColumns._ID + " AS " + CloudMediaProviderContract.MediaColumns.ID,
85 "COALESCE(" + MediaColumns.DATE_TAKEN + "," + MediaColumns.DATE_MODIFIED +
86 "* 1000) AS " + CloudMediaProviderContract.MediaColumns.DATE_TAKEN_MILLIS,
87 MediaColumns.GENERATION_MODIFIED + " AS " +
88 CloudMediaProviderContract.MediaColumns.SYNC_GENERATION,
89 MediaColumns.SIZE + " AS " + CloudMediaProviderContract.MediaColumns.SIZE_BYTES,
90 MediaColumns.MIME_TYPE + " AS " + CloudMediaProviderContract.MediaColumns.MIME_TYPE,
[all …]
DPickerDbFacade.java22 import static android.provider.CloudMediaProviderContract.MediaColumns;
590 CloudMediaProviderContract.MediaColumns.ID); in executeInternal()
646 .getColumnIndex(CloudMediaProviderContract.MediaColumns.ID); in updateFirstDateTakenMillis()
1188 getProjectionDataLocked(MediaColumns.DATA, PickerUriResolver.PICKER_SEGMENT), in getCloudMediaProjectionLocked()
1189 getProjectionId(MediaColumns.ID), in getCloudMediaProjectionLocked()
1192 getProjectionSimple(KEY_DATE_TAKEN_MS, MediaColumns.DATE_TAKEN_MILLIS), in getCloudMediaProjectionLocked()
1193 getProjectionSimple(KEY_SYNC_GENERATION, MediaColumns.SYNC_GENERATION), in getCloudMediaProjectionLocked()
1194 getProjectionSimple(KEY_SIZE_BYTES, MediaColumns.SIZE_BYTES), in getCloudMediaProjectionLocked()
1195 getProjectionSimple(KEY_DURATION_MS, MediaColumns.DURATION_MILLIS), in getCloudMediaProjectionLocked()
1196 getProjectionSimple(KEY_MIME_TYPE, MediaColumns.MIME_TYPE), in getCloudMediaProjectionLocked()
[all …]
/packages/providers/MediaProvider/tests/src/com/android/providers/media/photopicker/util/
DPickerDbTestUtils.java61 CloudMediaProviderContract.MediaColumns.STANDARD_MIME_TYPE_EXTENSION_GIF;
143 CloudMediaProviderContract.MediaColumns.ID, in getMediaCursor()
144 CloudMediaProviderContract.MediaColumns.MEDIA_STORE_URI, in getMediaCursor()
145 CloudMediaProviderContract.MediaColumns.DATE_TAKEN_MILLIS, in getMediaCursor()
146 CloudMediaProviderContract.MediaColumns.SYNC_GENERATION, in getMediaCursor()
147 CloudMediaProviderContract.MediaColumns.SIZE_BYTES, in getMediaCursor()
148 CloudMediaProviderContract.MediaColumns.MIME_TYPE, in getMediaCursor()
149 CloudMediaProviderContract.MediaColumns.STANDARD_MIME_TYPE_EXTENSION, in getMediaCursor()
150 CloudMediaProviderContract.MediaColumns.DURATION_MILLIS, in getMediaCursor()
151 CloudMediaProviderContract.MediaColumns.IS_FAVORITE, in getMediaCursor()
[all …]
/packages/providers/MediaProvider/tests/src/com/android/providers/media/photopicker/
DPickerDataLayerTest.java37 import android.provider.CloudMediaProviderContract.MediaColumns;
184 MediaColumns.STANDARD_MIME_TYPE_EXTENSION_NONE, SIZE_BYTES, /* isFavorite */ true); in testFetchMediaFavorites()
186 MediaColumns.STANDARD_MIME_TYPE_EXTENSION_NONE, SIZE_BYTES, /* isFavorite */ false); in testFetchMediaFavorites()
188 MediaColumns.STANDARD_MIME_TYPE_EXTENSION_NONE, SIZE_BYTES - 1, in testFetchMediaFavorites()
191 MediaColumns.STANDARD_MIME_TYPE_EXTENSION_NONE, SIZE_BYTES, /* isFavorite */ false); in testFetchMediaFavorites()
217 MediaColumns.STANDARD_MIME_TYPE_EXTENSION_NONE, SIZE_BYTES, /* isFavorite */ true); in testFetchMediaFavoritesMimeTypeFilter()
219 MediaColumns.STANDARD_MIME_TYPE_EXTENSION_NONE, SIZE_BYTES, /* isFavorite */ false); in testFetchMediaFavoritesMimeTypeFilter()
221 MediaColumns.STANDARD_MIME_TYPE_EXTENSION_NONE, SIZE_BYTES - 1, in testFetchMediaFavoritesMimeTypeFilter()
224 MediaColumns.STANDARD_MIME_TYPE_EXTENSION_NONE, SIZE_BYTES, /* isFavorite */ false); in testFetchMediaFavoritesMimeTypeFilter()
249 MediaColumns.STANDARD_MIME_TYPE_EXTENSION_NONE, SIZE_BYTES, /* isFavorite */ true); in testFetchMediaFavoritesSizeFilter()
[all …]
/packages/providers/MediaProvider/tests/src/com/android/providers/media/util/
DFileUtilsTest.java78 import android.provider.MediaStore.MediaColumns;
718 values.put(MediaColumns.RELATIVE_PATH, "path/in\0valid/data/"); in testSanitizeValues()
719 values.put(MediaColumns.DISPLAY_NAME, "inva\0lid"); in testSanitizeValues()
721 assertEquals("path/in_valid/data/", values.get(MediaColumns.RELATIVE_PATH)); in testSanitizeValues()
722 assertEquals("inva_lid", values.get(MediaColumns.DISPLAY_NAME)); in testSanitizeValues()
728 values.put(MediaColumns.RELATIVE_PATH, "/"); in testSanitizeValues_Root()
730 assertEquals("/", values.get(MediaColumns.RELATIVE_PATH)); in testSanitizeValues_Root()
738 values.put(MediaColumns.RELATIVE_PATH, hiddenDirectoryPath); in testSanitizeValues_HiddenFile()
739 values.put(MediaColumns.DISPLAY_NAME, hiddenFileName); in testSanitizeValues_HiddenFile()
742 assertEquals(hiddenDirectoryPath, values.get(MediaColumns.RELATIVE_PATH)); in testSanitizeValues_HiddenFile()
[all …]
/packages/providers/MediaProvider/src/com/android/providers/media/scan/
DModernMediaScanner.java87 import android.provider.MediaStore.MediaColumns;
865 op.withValue(MediaColumns.IS_DRM, 1); in visitFile()
1080 op.withValue(MediaColumns.DATA, file.getAbsolutePath()); in withGenericValues()
1081 op.withValue(MediaColumns.SIZE, attrs.size()); in withGenericValues()
1082 op.withValue(MediaColumns.DATE_MODIFIED, lastModifiedTime(file, attrs)); in withGenericValues()
1083 op.withValue(MediaColumns.DATE_TAKEN, null); in withGenericValues()
1084 op.withValue(MediaColumns.IS_DRM, 0); in withGenericValues()
1085 op.withValue(MediaColumns.WIDTH, null); in withGenericValues()
1086 op.withValue(MediaColumns.HEIGHT, null); in withGenericValues()
1087 op.withValue(MediaColumns.RESOLUTION, null); in withGenericValues()
[all …]
/packages/providers/MediaProvider/tests/src/com/android/providers/media/photopicker/data/
DExternalDbFacadeTest.java31 import static android.provider.MediaStore.MediaColumns.DATE_TAKEN;
51 import android.provider.MediaStore.MediaColumns;
603 cv.put(MediaColumns.DATE_TAKEN, DATE_TAKEN_MS1); in testQueryMedia_match()
604 cv.put(MediaColumns.GENERATION_MODIFIED, GENERATION_MODIFIED2); in testQueryMedia_match()
642 cvPending.put(MediaColumns.IS_PENDING, 1); in testQueryMedia_noMatch()
645 cvTrashed.put(MediaColumns.IS_TRASHED, 1); in testQueryMedia_noMatch()
675 cv.remove(MediaColumns.DATE_TAKEN); in testQueryMedia_withDateModified()
676 cv.put(MediaColumns.DATE_MODIFIED, dateModifiedSeconds2); in testQueryMedia_withDateModified()
679 cv.put(MediaColumns.DATE_MODIFIED, dateModifiedSeconds1); in testQueryMedia_withDateModified()
680 cv.put(MediaColumns.GENERATION_MODIFIED, GENERATION_MODIFIED2); in testQueryMedia_withDateModified()
[all …]
/packages/providers/MediaProvider/tests/src/com/android/providers/media/
DPickerProviderMediaGenerator.java24 import static android.provider.CloudMediaProviderContract.MediaColumns;
56 MediaColumns.ID,
57 MediaColumns.MEDIA_STORE_URI,
58 MediaColumns.MIME_TYPE,
59 MediaColumns.STANDARD_MIME_TYPE_EXTENSION,
60 MediaColumns.DATE_TAKEN_MILLIS,
61 MediaColumns.SYNC_GENERATION,
62 MediaColumns.SIZE_BYTES,
63 MediaColumns.DURATION_MILLIS,
64 MediaColumns.IS_FAVORITE,
[all …]
DMediaProviderTest.java62 import android.provider.MediaStore.MediaColumns;
448 values.put(MediaColumns.DISPLAY_NAME, "test.mp3"); in testCheckUriPermission()
449 values.put(MediaColumns.MIME_TYPE, "audio/mpeg"); in testCheckUriPermission()
459 testActionLongFileNameItemHasTrimmedFileName(MediaColumns.IS_TRASHED); in testTrashLongFileNameItemHasTrimmedFileName()
464 testActionLongFileNameItemHasTrimmedFileName(MediaColumns.IS_PENDING); in testPendingLongFileNameItemHasTrimmedFileName()
470 final String[] projection = new String[]{MediaColumns.DATA}; in testActionLongFileNameItemHasTrimmedFileName()
519 values.put(MediaStore.MediaColumns.RELATIVE_PATH, "Download"); in testInsertionWithFilePathOnAnotherUserVolume_throwsIllegalArgumentException()
537 values.put(MediaStore.MediaColumns.RELATIVE_PATH, "Android/media/com.example/"); in testInsertionWithInvalidFilePath_throwsIllegalArgumentException()
553 values.put(MediaStore.MediaColumns.RELATIVE_PATH, "Download"); in testUpdationWithInvalidFilePath_throwsIllegalArgumentException()
560 newValues.put(MediaStore.MediaColumns.DATA, "/storage/emulated/0/../../../data/media/"); in testUpdationWithInvalidFilePath_throwsIllegalArgumentException()
[all …]
/packages/apps/Messaging/src/com/android/messaging/datamodel/data/
DGalleryGridItemData.java23 import android.provider.MediaStore.MediaColumns;
39 MediaColumns._ID,
40 MediaColumns.DATA,
41 MediaColumns.WIDTH,
42 MediaColumns.HEIGHT,
43 MediaColumns.MIME_TYPE,
44 MediaColumns.DATE_MODIFIED,
45 MediaColumns.DISPLAY_NAME};
/packages/providers/MediaProvider/tests/client/src/com/android/providers/media/client/
DLegacyProviderMigrationTest.java51 import android.provider.MediaStore.MediaColumns;
146 values.put(MediaColumns.DATA, file.getAbsolutePath()); in generateValues()
147 values.put(MediaColumns.DISPLAY_NAME, file.getName()); in generateValues()
148 values.put(MediaColumns.MIME_TYPE, mimeType); in generateValues()
149 values.put(MediaColumns.VOLUME_NAME, mVolumeName); in generateValues()
150 values.put(MediaColumns.DATE_ADDED, String.valueOf(System.currentTimeMillis() / 1_000)); in generateValues()
151 values.put(MediaColumns.OWNER_PACKAGE_NAME, in generateValues()
171 values.put(MediaColumns.ORIENTATION, String.valueOf(90)); in testLegacy_Orientation()
179 values.put(MediaColumns.IS_PENDING, String.valueOf(1)); in testLegacy_Pending()
180 values.put(MediaColumns.DATE_EXPIRES, String.valueOf(System.currentTimeMillis() / 1_000)); in testLegacy_Pending()
[all …]
DDelegatorTest.java29 import android.provider.MediaStore.MediaColumns;
75 values.put(MediaColumns.OWNER_PACKAGE_NAME, PERMISSIONLESS_APP); in testPushAllowed()
92 values.put(MediaColumns.OWNER_PACKAGE_NAME, PERMISSIONLESS_APP); in testOrphanedAllowed()
109 values.put(MediaColumns.OWNER_PACKAGE_NAME, in testPullBlocked()
118 values.put(MediaColumns.DISPLAY_NAME, "Song " + System.nanoTime()); in createAudio()
119 values.put(MediaColumns.MIME_TYPE, "audio/mpeg"); in createAudio()
129 new String[] { MediaColumns.OWNER_PACKAGE_NAME }, null, null)) { in getOwner()
DPlaylistPerformanceTest.java34 import android.provider.MediaStore.MediaColumns;
133 values.put(MediaColumns.DISPLAY_NAME, "Test_Playlist"); in createPlaylist()
134 values.put(MediaColumns.RELATIVE_PATH, mRelativePath); in createPlaylist()
135 values.put(MediaColumns.MIME_TYPE, "audio/x-mpegurl"); in createPlaylist()
144 values.put(MediaColumns.DISPLAY_NAME, "Test_Song_" + num); in createAudio()
145 values.put(MediaColumns.RELATIVE_PATH, mRelativePath); in createAudio()
146 values.put(MediaColumns.MIME_TYPE, "audio/mpeg"); in createAudio()
DPublicVolumeTest.java77 values.put(MediaStore.MediaColumns.DISPLAY_NAME, displayName + ".jpeg"); in testIncludeRecentlyUnmountedVolumes()
91 MediaStore.MediaColumns.DISPLAY_NAME + " LIKE ?"); in testIncludeRecentlyUnmountedVolumes()
96 new String[]{MediaStore.MediaColumns._ID}, extras, null)) { in testIncludeRecentlyUnmountedVolumes()
104 new String[]{MediaStore.MediaColumns._ID}, extras, null)) { in testIncludeRecentlyUnmountedVolumes()
112 new String[]{MediaStore.MediaColumns._ID}, extras, null)) { in testIncludeRecentlyUnmountedVolumes()
DClientPlaylistTest.java38 import android.provider.MediaStore.MediaColumns;
125 mValues.put(MediaColumns.DISPLAY_NAME, "Playlist " + System.nanoTime()); in testAdd()
126 mValues.put(MediaColumns.MIME_TYPE, mMimeType); in testAdd()
259 mValues.put(MediaColumns.DISPLAY_NAME, "Playlist " + System.nanoTime()); in testVolumeName()
260 mValues.put(MediaColumns.MIME_TYPE, mMimeType); in testVolumeName()
288 mValues.put(MediaColumns.DISPLAY_NAME, "Song " + System.nanoTime()); in createAudio()
289 mValues.put(MediaColumns.MIME_TYPE, "audio/mpeg"); in createAudio()
299 mValues.put(MediaColumns.DISPLAY_NAME, "Playlist " + System.nanoTime()); in createPlaylist()
300 mValues.put(MediaColumns.MIME_TYPE, mMimeType); in createPlaylist()
DPublicVolumePlaylistTest.java75 values.put(MediaStore.MediaColumns.DISPLAY_NAME, "Playlist " + System.nanoTime()); in testEjectedVolume()
76 values.put(MediaStore.MediaColumns.MIME_TYPE, "audio/x-mpegurl"); in testEjectedVolume()
96 values.put(MediaStore.MediaColumns.DISPLAY_NAME, "Song " + System.nanoTime()); in testEjectedVolume()
97 values.put(MediaStore.MediaColumns.MIME_TYPE, "audio/mpeg"); in testEjectedVolume()
/packages/providers/MediaProvider/src/com/android/providers/media/util/
DFileUtils.java58 import android.provider.MediaStore.MediaColumns;
1298 values.remove(MediaColumns.DATE_EXPIRES);
1302 final Object pending = values.get(MediaColumns.IS_PENDING);
1305 values.put(MediaColumns.DATE_EXPIRES,
1308 values.putNull(MediaColumns.DATE_EXPIRES);
1311 final Object trashed = values.get(MediaColumns.IS_TRASHED);
1314 values.put(MediaColumns.DATE_EXPIRES,
1317 values.putNull(MediaColumns.DATE_EXPIRES);
1329 values.remove(MediaColumns.VOLUME_NAME);
1330 values.remove(MediaColumns.RELATIVE_PATH);
[all …]
DSQLiteQueryBuilder.java39 import android.provider.MediaStore.MediaColumns;
931 values.remove(MediaColumns.GENERATION_ADDED);
932 values.remove(MediaColumns.GENERATION_MODIFIED);
945 sql.append(MediaColumns.GENERATION_ADDED);
947 sql.append(MediaColumns.GENERATION_MODIFIED);
951 sql.append(MediaColumns._ID);
974 values.getAsString(MediaColumns.DATA)));
993 values.remove(MediaColumns.GENERATION_ADDED);
994 values.remove(MediaColumns.GENERATION_MODIFIED);
1008 sql.append(MediaColumns.GENERATION_MODIFIED);
[all …]
/packages/providers/MediaProvider/apex/framework/api/
Dremoved.txt4 …c static interface MediaStore.Audio.AudioColumns extends android.provider.MediaStore.MediaColumns {
11 …blic static interface MediaStore.DownloadColumns extends android.provider.MediaStore.MediaColumns {
15 …ic static interface MediaStore.Files.FileColumns extends android.provider.MediaStore.MediaColumns {
19 … static interface MediaStore.Images.ImageColumns extends android.provider.MediaStore.MediaColumns {
27 public static interface MediaStore.MediaColumns extends android.provider.BaseColumns {
31 …c static interface MediaStore.Video.VideoColumns extends android.provider.MediaStore.MediaColumns {
/packages/providers/MediaProvider/src/com/android/providers/media/photopicker/data/model/
DItem.java19 import static android.provider.CloudMediaProviderContract.MediaColumns;
174 final String authority = getCursorString(cursor, MediaColumns.AUTHORITY); in updateFromCursor()
175 mId = getCursorString(cursor, MediaColumns.ID); in updateFromCursor()
176 mMimeType = getCursorString(cursor, MediaColumns.MIME_TYPE); in updateFromCursor()
177 mDateTaken = getCursorLong(cursor, MediaColumns.DATE_TAKEN_MILLIS); in updateFromCursor()
178 mGenerationModified = getCursorLong(cursor, MediaColumns.SYNC_GENERATION); in updateFromCursor()
179 mDuration = getCursorLong(cursor, MediaColumns.DURATION_MILLIS); in updateFromCursor()
180 mSpecialFormat = getCursorInt(cursor, MediaColumns.STANDARD_MIME_TYPE_EXTENSION); in updateFromCursor()
/packages/providers/MediaProvider/src/com/android/providers/media/photopicker/v2/
DPickerSQLConstants.java117 MEDIA_ID(CloudMediaProviderContract.MediaColumns.ID),
118 AUTHORITY(CloudMediaProviderContract.MediaColumns.AUTHORITY),
123 DATE_TAKEN_MS(KEY_DATE_TAKEN_MS, CloudMediaProviderContract.MediaColumns.DATE_TAKEN_MILLIS),
124 SIZE_IN_BYTES(KEY_SIZE_BYTES, CloudMediaProviderContract.MediaColumns.SIZE_BYTES),
125 MIME_TYPE(KEY_MIME_TYPE, CloudMediaProviderContract.MediaColumns.MIME_TYPE),
127 CloudMediaProviderContract.MediaColumns.STANDARD_MIME_TYPE_EXTENSION),
128 DURATION_MS(KEY_DURATION_MS, CloudMediaProviderContract.MediaColumns.DURATION_MILLIS);
/packages/providers/MediaProvider/tests/src/com/android/providers/media/photopicker/sync/
DMediaResetWorkerTest.java43 import android.provider.CloudMediaProviderContract.MediaColumns;
401 MediaColumns.ID, in getAlbumMediaCursor()
402 MediaColumns.MEDIA_STORE_URI, in getAlbumMediaCursor()
403 MediaColumns.DATE_TAKEN_MILLIS, in getAlbumMediaCursor()
404 MediaColumns.SYNC_GENERATION, in getAlbumMediaCursor()
405 MediaColumns.SIZE_BYTES, in getAlbumMediaCursor()
406 MediaColumns.MIME_TYPE, in getAlbumMediaCursor()
407 MediaColumns.STANDARD_MIME_TYPE_EXTENSION, in getAlbumMediaCursor()
408 MediaColumns.DURATION_MILLIS, in getAlbumMediaCursor()
424 String.valueOf(MediaColumns.STANDARD_MIME_TYPE_EXTENSION_NONE), in getAlbumMediaCursor()
/packages/providers/MediaProvider/src/com/android/providers/media/
DMediaProvider.java46 import static android.provider.MediaStore.MediaColumns.OWNER_PACKAGE_NAME;
254 import android.provider.MediaStore.MediaColumns;
456 MediaColumns.DATA, PATTERN_PENDING_FILEPATH_FOR_SQL);
490 sDataColumns.put(MediaStore.MediaColumns.DATA, null); in sDataColumns.put()
1763 try (Cursor c = db.query(true, "files", new String[] { MediaColumns.VOLUME_NAME }, in deleteStaleVolumes()
1860 final String externalDbSelection = MediaColumns._ID + "=?"; in updateSpecialFormatForLimitedRows()
1897 final String[] projection = new String[] { MediaColumns._ID, MediaColumns.DATA }; in queryForPendingSpecialFormatColumns()
2010 final String whereClause = MediaColumns._ID + "=?"; in updateDatabaseForExpiredItem()
2108 new String[] { MediaColumns._ID, MediaColumns.DATA }, in deleteAndroidMediaEntriesAndInvalidateDentryCache()
2399 (db) -> db.query("files", new String[]{MediaColumns.DATA}, in handleRedactedFileLookup()
[all …]
/packages/apps/Messaging/src/com/android/messaging/datamodel/
DGalleryBoundCursorLoader.java23 import android.provider.MediaStore.MediaColumns;
35 private static final String SORT_ORDER = MediaColumns.DATE_MODIFIED + " DESC";
50 return MediaColumns.MIME_TYPE + " IN ('" + Joiner.on("','").join(mimeTypes) + "') AND " in createSelection()
/packages/providers/MediaProvider/apex/framework/java/android/provider/
DMediaStore.java1460 values.put(MediaColumns.IS_TRASHED, 1); in createTrashRequest()
1462 values.put(MediaColumns.IS_TRASHED, 0); in createTrashRequest()
1501 values.put(MediaColumns.IS_FAVORITE, 1); in createFavoriteRequest()
1503 values.put(MediaColumns.IS_FAVORITE, 0); in createFavoriteRequest()
1543 public interface MediaColumns extends BaseColumns { interface in MediaStore
2098 public static final String DATA = MediaColumns.DATA;
2107 public static final String SIZE = MediaColumns.SIZE;
2115 public static final String DISPLAY_NAME = MediaColumns.DISPLAY_NAME;
2124 public static final String DATE_TAKEN = MediaColumns.DATE_TAKEN;
2132 public static final String MIME_TYPE = MediaColumns.MIME_TYPE;
[all …]

123