Java 类android.provider.MediaStore.Video.Media 实例源码

项目:stynico    文件:FileUtils.java   
public static String getPath(Context context, Uri uri) {
    if (uri == null) {
        return null;
    }
    String string;
    if (uri.getScheme().toString().compareTo("content") == 0) {
        Cursor query = context.getContentResolver().query(Media.EXTERNAL_CONTENT_URI, null, null, null, null);
        if (query == null || !query.moveToFirst()) {
            return null;
        }
        string = query.getString(query.getColumnIndexOrThrow("_data"));
        query.close();
        return string;
    } else if (uri.getScheme().compareTo("file") != 0) {
        return null;
    } else {
        string = uri.toString();
        return uri.toString().replace("file://", "");
    }
}
项目:FMTech    文件:efj.java   
public static boolean c(Uri paramUri)
{
  boolean bool1 = mfq.b(paramUri);
  boolean bool2 = false;
  if (bool1)
  {
    String str1 = paramUri.getPath();
    String str2 = MediaStore.Images.Media.EXTERNAL_CONTENT_URI.getPath();
    String str3 = MediaStore.Video.Media.EXTERNAL_CONTENT_URI.getPath();
    if (!str1.startsWith(str2))
    {
      boolean bool3 = str1.startsWith(str3);
      bool2 = false;
      if (!bool3) {}
    }
    else
    {
      bool2 = true;
    }
  }
  return bool2;
}
项目:Launchpet2    文件:VideoList.java   
public HashMap<String, String> getBucketIds() {
    Uri uri = mBaseUri.buildUpon()
            .appendQueryParameter("distinct", "true").build();
    Cursor c = Images.Media.query(
            mContentResolver, uri,
            new String[] {
                Media.BUCKET_DISPLAY_NAME,
                Media.BUCKET_ID
            },
            whereClause(), whereClauseArgs(), sortOrder());
    try {
        HashMap<String, String> hash = new HashMap<String, String>();
        while (c.moveToNext()) {
            hash.put(c.getString(1), c.getString(0));
        }
        return hash;
    } finally {
        c.close();
    }
}
项目:droidddle    文件:VideoList.java   
public HashMap<String, String> getBucketIds() {
    Uri uri = mBaseUri.buildUpon().appendQueryParameter("distinct", "true").build();
    Cursor c = Images.Media.query(mContentResolver, uri, new String[]{Media.BUCKET_DISPLAY_NAME, Media.BUCKET_ID}, whereClause(), whereClauseArgs(), sortOrder());
    try {
        HashMap<String, String> hash = new HashMap<String, String>();
        while (c.moveToNext()) {
            hash.put(c.getString(1), c.getString(0));
        }
        return hash;
    } finally {
        c.close();
    }
}
项目:FMTech    文件:efj.java   
public static void h()
{
  if (PW == null)
  {
    itd[] arrayOfitd = new itd[4];
    arrayOfitd[0] = new isz(MediaStore.Images.Media.EXTERNAL_CONTENT_URI);
    arrayOfitd[1] = new isz(itf.b);
    arrayOfitd[2] = new ite(MediaStore.Video.Media.EXTERNAL_CONTENT_URI);
    arrayOfitd[3] = new ite(itf.a);
    PW = arrayOfitd;
  }
}
项目:FMTech    文件:hbr.java   
public hbr(String paramString1, String paramString2)
{
  this.a = paramString1;
  this.b = paramString2;
  if ("photo".equals(paramString1))
  {
    if ("external".equals(paramString2)) {}
    for (this.c = MediaStore.Images.Media.EXTERNAL_CONTENT_URI;; this.c = itf.b)
    {
      this.e = hbo.b;
      return;
      if (!"phoneStorage".equals(paramString2)) {
        break;
      }
    }
    throw new IllegalArgumentException("Invalid volume name; must be one of the defined volumes");
  }
  if ("video".equals(paramString1))
  {
    if ("external".equals(paramString2)) {}
    for (this.c = MediaStore.Video.Media.EXTERNAL_CONTENT_URI;; this.c = itf.a)
    {
      this.e = hbo.a;
      return;
      if (!"phoneStorage".equals(paramString2)) {
        break;
      }
    }
    throw new IllegalArgumentException("Invalid volume name; must be one of the defined volumes");
  }
  throw new IllegalArgumentException("Invalid media type; must be one of the defined types");
}
项目:FMTech    文件:iry.java   
public final void a(jpg paramjpg)
{
  MediaPickerFragment localMediaPickerFragment = this.a;
  if (paramjpg.a()) {
    localMediaPickerFragment.a("_data", MediaStore.Video.Media.EXTERNAL_CONTENT_URI, ipm.b);
  }
  for (;;)
  {
    localMediaPickerFragment.v();
    return;
    Toast.makeText(localMediaPickerFragment.bn, localMediaPickerFragment.g().getString(da.w), 1).show();
  }
}
项目:Launchpet2    文件:VideoList.java   
@Override
protected Cursor createCursor() {
    Cursor c = Images.Media.query(
            mContentResolver, mBaseUri, VIDEO_PROJECTION,
            whereClause(), whereClauseArgs(), sortOrder());
    return c;
}
项目:AndroidMedia    文件:VideoList.java   
@Override
protected Cursor createCursor() {
    Cursor c = Images.Media.query(
            mContentResolver, mBaseUri, VIDEO_PROJECTION,
            whereClause(), whereClauseArgs(), sortOrder());
    return c;
}
项目:droidddle    文件:VideoList.java   
protected String whereClause() {
    return mBucketId != null ? Images.Media.BUCKET_ID + " = '" + mBucketId + "'" : null;
}
项目:droidddle    文件:VideoList.java   
@Override
protected Cursor createCursor() {
    Cursor c = Images.Media.query(mContentResolver, mBaseUri, VIDEO_PROJECTION, whereClause(), whereClauseArgs(), sortOrder());
    return c;
}
项目:FMTech    文件:bhr.java   
private static String a(Context paramContext)
{
  Uri[] arrayOfUri = new Uri[4];
  arrayOfUri[0] = MediaStore.Images.Media.EXTERNAL_CONTENT_URI;
  arrayOfUri[1] = itf.b;
  arrayOfUri[2] = MediaStore.Video.Media.EXTERNAL_CONTENT_URI;
  arrayOfUri[3] = itf.a;
  String[] arrayOfString = { "_id" };
  ContentResolver localContentResolver = paramContext.getContentResolver();
  int i = 0;
  for (;;)
  {
    Object localObject1 = null;
    Cursor localCursor;
    if (i < 4)
    {
      localCursor = localContentResolver.query(arrayOfUri[i], arrayOfString, "_data LIKE '%/DCIM/%'", null, "_id DESC LIMIT 1");
      if (localCursor == null) {
        break label130;
      }
    }
    try
    {
      if (localCursor.moveToNext())
      {
        long l = localCursor.getLong(0);
        String str = ContentUris.withAppendedId(arrayOfUri[i], l).toString();
        localObject1 = str;
        return localObject1;
      }
      label130:
      if (localCursor != null) {
        localCursor.close();
      }
      i++;
    }
    catch (SQLiteException localSQLiteException)
    {
      for (;;)
      {
        Log.e("allphotosview", "Could not load camera photo", localSQLiteException);
        if (localCursor != null) {
          localCursor.close();
        }
      }
    }
    finally
    {
      if (localCursor == null) {
        break;
      }
      localCursor.close();
    }
  }
}
项目:FMTech    文件:HostPhotoViewIntentActivity.java   
protected void onCreate(Bundle paramBundle)
{
  super.onCreate(paramBundle);
  Intent localIntent1 = getIntent();
  String str1 = localIntent1.getType();
  String str2;
  if (str1 != null) {
    if ("application/vnd.google.panorama360+jpg".equals(str1)) {
      str2 = "image/jpeg";
    }
  }
  while (str2 == null)
  {
    Toast.makeText(this, aau.lM, 1).show();
    finish();
    return;
    str2 = str1;
    continue;
    Uri localUri1 = localIntent1.getData();
    if (localUri1 != null) {
      str2 = getContentResolver().getType(localUri1);
    } else {
      str2 = null;
    }
  }
  Intent localIntent2 = new Intent(localIntent1);
  int i;
  if (("image/*".equals(str2)) || ("vnd.android.cursor.dir/image".equals(str2)))
  {
    i = 1;
    localIntent2.putExtra("filter", i);
    Uri localUri2 = localIntent1.getData();
    if ((localUri2 != null) && (!localUri2.equals(MediaStore.Images.Media.EXTERNAL_CONTENT_URI)) && (!localUri2.equals(MediaStore.Images.Media.INTERNAL_CONTENT_URI)) && (!localUri2.equals(MediaStore.Video.Media.EXTERNAL_CONTENT_URI)) && (!localUri2.equals(MediaStore.Video.Media.INTERNAL_CONTENT_URI))) {
      break label277;
    }
    if ((i & 0x2) == 0) {
      break label255;
    }
    localIntent2.setClass(this, HostPhotoViewIntentPhotoTileSearchActivity.class);
  }
  for (;;)
  {
    localIntent1.addFlags(33554432);
    startActivity(localIntent2);
    finish();
    return;
    if (!"video/*".equals(str2))
    {
      boolean bool = "vnd.android.cursor.dir/video".equals(str2);
      i = 0;
      if (!bool) {
        break;
      }
    }
    i = 2;
    break;
    label255:
    localIntent2.setClass(this, PhotosHomeActivity.class);
    localIntent2.putExtra("destination", 8);
    continue;
    label277:
    localIntent2.setClass(this, HostPhotoViewIntentPhotoOneUpActivity.class);
  }
}
项目:FMTech    文件:GetContentActivity.java   
private final int h()
{
  int i = 1;
  Intent localIntent = getIntent();
  if (localIntent == null) {
    return 0;
  }
  String str1 = localIntent.getAction();
  String str2 = localIntent.getType();
  Uri localUri = localIntent.getData();
  if ("android.intent.action.PICK".equalsIgnoreCase(str1)) {
    if ((str2 != null) && (str2.startsWith("vnd.android.cursor.dir/"))) {
      if (!str2.endsWith("/image")) {}
    }
  }
  for (;;)
  {
    return i;
    if (str2.endsWith("/video"))
    {
      i = 2;
      continue;
      if (localUri != null)
      {
        if ((localUri.equals(MediaStore.Images.Media.EXTERNAL_CONTENT_URI)) || (localUri.equals(MediaStore.Images.Media.INTERNAL_CONTENT_URI)) || (localUri.toString().endsWith("/image"))) {
          continue;
        }
        if ((localUri.equals(MediaStore.Video.Media.EXTERNAL_CONTENT_URI)) || (localUri.equals(MediaStore.Video.Media.INTERNAL_CONTENT_URI)) || (localUri.toString().endsWith("/video"))) {
          i = 2;
        }
      }
      else
      {
        i = 0x0 | a(str2);
        continue;
        if ("android.intent.action.SEND".equalsIgnoreCase(str1))
        {
          i = 0x0 | a(str2);
          continue;
        }
        if ("android.intent.action.SEND_MULTIPLE".equalsIgnoreCase(str1))
        {
          i = 0x0 | a(str2);
          continue;
        }
        if (str2 != null)
        {
          i = 0x0 | a(str2);
          continue;
        }
      }
    }
    i = 0;
  }
}
项目:Launchpet2    文件:VideoList.java   
protected String whereClause() {
    return mBucketId != null
            ? Images.Media.BUCKET_ID + " = '" + mBucketId + "'"
            : null;
}
项目:AndroidMedia    文件:VideoList.java   
protected String whereClause() {
    return mBucketId != null
            ? Images.Media.BUCKET_ID + " = '" + mBucketId + "'"
            : null;
}