diff options
Diffstat (limited to 'src/com/android/gallery3d/app/MovieActivity.java')
-rw-r--r-- | src/com/android/gallery3d/app/MovieActivity.java | 36 |
1 files changed, 0 insertions, 36 deletions
diff --git a/src/com/android/gallery3d/app/MovieActivity.java b/src/com/android/gallery3d/app/MovieActivity.java index cf8785cd1..63fb65b62 100644 --- a/src/com/android/gallery3d/app/MovieActivity.java +++ b/src/com/android/gallery3d/app/MovieActivity.java @@ -27,9 +27,6 @@ import android.bluetooth.BluetoothDevice; import android.content.AsyncQueryHandler; import android.content.BroadcastReceiver; import android.content.ContentResolver; -import android.content.ContentValues; -import android.content.Context; -import android.content.DialogInterface; import android.content.Context; import android.content.DialogInterface; import android.content.Intent; @@ -38,8 +35,6 @@ import android.content.res.Configuration; import android.content.SharedPreferences; import android.content.pm.ActivityInfo; import android.database.Cursor; -import android.drm.DrmManagerClientWrapper; -import android.drm.DrmStore.DrmDeliveryType; import android.graphics.Bitmap; import android.graphics.drawable.BitmapDrawable; import android.media.AudioManager; @@ -53,7 +48,6 @@ import android.os.AsyncTask; import android.os.Build; import android.os.Bundle; import android.provider.MediaStore; -import android.provider.MediaStore.Video.VideoColumns; import android.provider.OpenableColumns; import android.view.Gravity; import android.view.KeyEvent; @@ -312,36 +306,6 @@ public class MovieActivity extends Activity { @Override public boolean onCreateOptionsMenu(Menu menu) { super.onCreateOptionsMenu(menu); - String path = null; - String scheme = mUri.getScheme(); - if ("file".equals(scheme)) { - path = mUri.getPath(); - } else { - Cursor cursor = null; - try { - cursor = getContentResolver().query(mUri, - new String[] {VideoColumns.DATA}, null, null, null); - if (cursor != null && cursor.moveToNext()) { - path = cursor.getString(0); - } - } catch (Throwable t) { - Log.d(TAG, "cannot get path from: " + mUri); - } finally { - if (cursor != null) cursor.close(); - } - } - Log.d(TAG, "onCreateOptionsMenu= " + path); - if ((path != null) && ((path.endsWith(".dcf") || path.endsWith(".dm")))) { - DrmManagerClientWrapper drmClient = new DrmManagerClientWrapper(this); - ContentValues values = drmClient.getMetadata(path); - int drmType = values.getAsInteger("DRM-TYPE"); - Log.d(TAG, "onCreateOptionsMenu:DRM-TYPE = " + Integer.toString(drmType)); - if (drmType != DrmDeliveryType.SEPARATE_DELIVERY) { - return true; - } - if (drmClient != null) drmClient.release(); - } - getMenuInflater().inflate(R.menu.movie, menu); MenuItem shareMenu = menu.findItem(R.id.action_share); ShareActionProvider provider = (ShareActionProvider) shareMenu.getActionProvider(); |