diff options
Diffstat (limited to 'src/com/android/gallery3d/app/PhotoPage.java')
-rwxr-xr-x | src/com/android/gallery3d/app/PhotoPage.java | 50 |
1 files changed, 4 insertions, 46 deletions
diff --git a/src/com/android/gallery3d/app/PhotoPage.java b/src/com/android/gallery3d/app/PhotoPage.java index 65c26278a..dd27f2689 100755 --- a/src/com/android/gallery3d/app/PhotoPage.java +++ b/src/com/android/gallery3d/app/PhotoPage.java @@ -1,4 +1,4 @@ -/** +/* * Copyright (C) 2010 The Android Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); @@ -24,7 +24,6 @@ import android.content.Context; import android.content.Intent; import android.content.pm.PackageManager; import android.content.res.Configuration; -import android.drm.DrmHelper; import android.graphics.Rect; import android.media.MediaFile; import android.net.Uri; @@ -378,9 +377,8 @@ public abstract class PhotoPage extends ActivityState implements panoramaIntent = createSharePanoramaIntent(contentUri); } Intent shareIntent = createShareIntent(mCurrentPhoto); - if (shareIntent != null) { - mActionBar.setShareIntents(panoramaIntent, shareIntent, PhotoPage.this); - } + + mActionBar.setShareIntents(panoramaIntent, shareIntent, PhotoPage.this); setNfcBeamPushUri(contentUri); } break; @@ -685,7 +683,7 @@ public abstract class PhotoPage extends ActivityState implements mNfcPushUris[0] = uri; } - private Intent createShareIntent(MediaObject mediaObject) { + private static Intent createShareIntent(MediaObject mediaObject) { int type = mediaObject.getMediaType(); return new Intent(Intent.ACTION_SEND) .setType(MenuExecutor.getMimeType(type)) @@ -804,20 +802,6 @@ public abstract class PhotoPage extends ActivityState implements requestDeferredUpdate(); } else { updateUIForCurrentPhoto(); - - // Manage DRM rights while image selection changed. this - // flow will comes for both image and video, but here - // we will consume rights for image files only. - // Do not consume rights of a GIF image and video here. - // ViewGifImage will take care of GIF rights consumption stub. - // MediaPlayer will handle the video rights consumption stub. - String mime = mCurrentPhoto.getMimeType(); - if (!TextUtils.isEmpty(mime) && !mime.equals("image/gif") - && !mime.startsWith("video/")) { - DrmHelper.manageDrmLicense(mActivity.getAndroidContext(), - mHandler, mCurrentPhoto.getFilePath(), - mCurrentPhoto.getMimeType()); - } } } @@ -1173,12 +1157,6 @@ public abstract class PhotoPage extends ActivityState implements mSelectionManager.toggle(path); mMenuExecutor.onMenuClicked(item, confirmMsg, mConfirmDialogListener); return true; - case R.id.action_drm_info: - String filepath = current.getFilePath(); - if (DrmHelper.isDrmFile(filepath)) { - DrmHelper.showDrmInfo(mActivity.getAndroidContext(), filepath); - } - return true; default : return false; } @@ -1445,23 +1423,6 @@ public abstract class PhotoPage extends ActivityState implements UsageStatistics.onContentViewChanged( UsageStatistics.COMPONENT_CAMERA, "Unknown"); // TODO } - - // Manage DRM rights while image selection changed. this - // flow will comes for both image and video, but here - // we will consume rights for image files only. - // Do not consume rights of a GIF image and video here. - // ViewGifImage will take care of GIF rights consumption stub. - // MediaPlayer will handle the video rights consumption stub. - if ((mMediaSet != null && mMediaSet.getMediaItemCount() > 1) - || !(this instanceof SinglePhotoPage)) { - String mime = mCurrentPhoto.getMimeType(); - if (!TextUtils.isEmpty(mime) && !mime.equals("image/gif") - && !mime.startsWith("video/")) { - DrmHelper.manageDrmLicense(mActivity.getAndroidContext(), - mHandler, mCurrentPhoto.getFilePath(), - mCurrentPhoto.getMimeType()); - } - } } } @@ -1656,9 +1617,6 @@ public abstract class PhotoPage extends ActivityState implements private static void viewAnimateGif(Activity activity, Uri uri) { Intent intent = new Intent(ViewGifImage.VIEW_GIF_ACTION, uri); - if (DrmHelper.isDrmFile(uri.toString())) { - intent.setDataAndType(uri, "image/gif"); - } activity.startActivity(intent); } } |