diff options
author | Steve Kondik <steve@cyngn.com> | 2015-03-28 14:09:12 -0700 |
---|---|---|
committer | Steve Kondik <steve@cyngn.com> | 2015-03-28 15:35:36 -0700 |
commit | bbbc9107f02bf48505c1123cbb5bb1810572079c (patch) | |
tree | 9dc45a0ebbeebabfbceb13a00ac994ebac2736b4 /src/com/android/gallery3d/ui/MenuExecutor.java | |
parent | 741973ed5c52011444250d7b6002dd8b86ac7be3 (diff) | |
download | android_packages_apps_Gallery2-bbbc9107f02bf48505c1123cbb5bb1810572079c.tar.gz android_packages_apps_Gallery2-bbbc9107f02bf48505c1123cbb5bb1810572079c.tar.bz2 android_packages_apps_Gallery2-bbbc9107f02bf48505c1123cbb5bb1810572079c.zip |
Revert OMADRM feature.staging/cm-12.1
* No need for this.
Revert "Gallery2 : Added support for Oma drm (CD and SD)"
This reverts commit 6144de8cc35fdd114802545c9922a1a234af8397.
Revert "Gallery2: Make Gallery2 support OMADRM feature"
This reverts commit 9382a979292e52de5c60a39ba24688362dce8bc1.
Change-Id: I13a0d69a792aad36d7b15bc0b3c78e3f55d396bc
Diffstat (limited to 'src/com/android/gallery3d/ui/MenuExecutor.java')
-rw-r--r-- | src/com/android/gallery3d/ui/MenuExecutor.java | 36 |
1 files changed, 1 insertions, 35 deletions
diff --git a/src/com/android/gallery3d/ui/MenuExecutor.java b/src/com/android/gallery3d/ui/MenuExecutor.java index 00a1459b0..1ace71829 100644 --- a/src/com/android/gallery3d/ui/MenuExecutor.java +++ b/src/com/android/gallery3d/ui/MenuExecutor.java @@ -24,11 +24,8 @@ import android.content.DialogInterface; import android.content.DialogInterface.OnCancelListener; import android.content.DialogInterface.OnClickListener; import android.content.Intent; -import android.database.Cursor; -import android.net.Uri; import android.os.Handler; import android.os.Message; -import android.provider.MediaStore.Video.VideoColumns; import android.support.v4.print.PrintHelper; import android.view.Menu; import android.view.MenuItem; @@ -182,7 +179,7 @@ public class MenuExecutor { boolean supportInfo = (supported & MediaObject.SUPPORT_INFO) != 0; boolean supportPrint = (supported & MediaObject.SUPPORT_PRINT) != 0; supportPrint &= PrintHelper.systemSupportsPrint(); - boolean supportDrmInfo = (supported & MediaObject.SUPPORT_DRM_INFO) != 0; + setMenuItemVisible(menu, R.id.action_delete, supportDelete); setMenuItemVisible(menu, R.id.action_rotate_ccw, supportRotate); setMenuItemVisible(menu, R.id.action_rotate_cw, supportRotate); @@ -198,7 +195,6 @@ public class MenuExecutor { // setMenuItemVisible(menu, R.id.action_simple_edit, supportEdit); setMenuItemVisible(menu, R.id.action_details, supportInfo); setMenuItemVisible(menu, R.id.print, supportPrint); - setMenuItemVisible(menu, R.id.action_drm_info, supportDrmInfo); } public static void updateMenuForPanorama(Menu menu, boolean shareAsPanorama360, @@ -275,36 +271,6 @@ public class MenuExecutor { case R.id.action_show_on_map: title = R.string.show_on_map; break; - case R.id.action_drm_info: - DataManager manager = mActivity.getDataManager(); - Path path = getSingleSelectedPath(); - Uri uri = manager.getContentUri(path); - Log.d(TAG, "onMenuClicked:" + uri); - String filepath = null; - String scheme = uri.getScheme(); - if ("file".equals(scheme)) { - filepath = uri.getPath(); - } else { - Cursor cursor = null; - try { - cursor = mActivity.getAndroidContext().getContentResolver().query(uri, - new String[] {VideoColumns.DATA}, null, null, null); - if (cursor != null && cursor.moveToNext()) { - filepath = cursor.getString(0); - } - } catch (Throwable t) { - Log.w(TAG, "cannot get path from: " + uri); - } finally { - if (cursor != null) cursor.close(); - } - } - Intent drmintent = new Intent("android.drmservice.intent.action.SHOW_PROPERTIES"); - filepath = filepath.replace("/storage/emulated/0", "/storage/emulated/legacy"); - drmintent.putExtra("DRM_FILE_PATH", filepath); - drmintent.putExtra("DRM_TYPE", "OMAV1"); - mActivity.getAndroidContext().sendBroadcast(drmintent); - title = R.string.drm_license_info; - break; default: return; } |