コード例 #1
0
 @Override
 public Uri getContentUri() {
   if (mIsImage) {
     return MediaStore.Images.Media.EXTERNAL_CONTENT_URI
         .buildUpon()
         .appendQueryParameter(LocalSource.KEY_BUCKET_ID, String.valueOf(mBucketId))
         .build();
   } else {
     return MediaStore.Video.Media.EXTERNAL_CONTENT_URI
         .buildUpon()
         .appendQueryParameter(LocalSource.KEY_BUCKET_ID, String.valueOf(mBucketId))
         .build();
   }
 }
コード例 #2
0
 static boolean isSingleImageMode(String uriString) {
   return !uriString.startsWith(MediaStore.Images.Media.EXTERNAL_CONTENT_URI.toString())
       && !uriString.startsWith(MediaStore.Images.Media.INTERNAL_CONTENT_URI.toString());
 }