diff options
Diffstat (limited to 'src/com/android/gallery3d/ui/MenuExecutor.java')
-rw-r--r-- | src/com/android/gallery3d/ui/MenuExecutor.java | 27 |
1 files changed, 1 insertions, 26 deletions
diff --git a/src/com/android/gallery3d/ui/MenuExecutor.java b/src/com/android/gallery3d/ui/MenuExecutor.java index 9b2c3259c..1ace71829 100644 --- a/src/com/android/gallery3d/ui/MenuExecutor.java +++ b/src/com/android/gallery3d/ui/MenuExecutor.java @@ -24,8 +24,6 @@ import android.content.DialogInterface; import android.content.DialogInterface.OnCancelListener; import android.content.DialogInterface.OnClickListener; import android.content.Intent; -import android.drm.DrmHelper; -import android.net.Uri; import android.os.Handler; import android.os.Message; import android.support.v4.print.PrintHelper; @@ -181,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); @@ -197,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, @@ -257,14 +254,6 @@ public class MenuExecutor { Intent intent = getIntentBySingleSelectedPath(Intent.ACTION_ATTACH_DATA) .addFlags(Intent.FLAG_GRANT_READ_URI_PERMISSION); intent.putExtra("mimeType", intent.getType()); - - // DRM files can be set as wallpaper only. Don't show other options - // to set as. - Uri uri = intent.getData(); - if (DrmHelper.isDrmFile(DrmHelper.getFilePath(mActivity, uri))) { - intent.setPackage("com.android.gallery3d"); - } - Activity activity = mActivity; activity.startActivity(Intent.createChooser( intent, activity.getString(R.string.set_as))); @@ -282,20 +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); - String filepath = null; - String scheme = uri.getScheme(); - if ("file".equals(scheme)) { - filepath = uri.getPath(); - } else { - filepath = DrmHelper.getFilePath(mActivity, uri); - } - DrmHelper.showDrmInfo(mActivity, filepath); - title = R.string.drm_license_info; - break; default: return; } |