Gallery2: Get rid of read only view

This serves no purpose whatsoever.

Change-Id: Ie2cf1ca622e6c6395e0aec9068a8a42ed8583a77
diff --git a/src/com/android/gallery3d/app/GalleryActivity.java b/src/com/android/gallery3d/app/GalleryActivity.java
index 27e9f9a..86698dd 100755
--- a/src/com/android/gallery3d/app/GalleryActivity.java
+++ b/src/com/android/gallery3d/app/GalleryActivity.java
@@ -76,7 +76,6 @@
     public static final String KEY_TYPE_BITS = "type-bits";
     public static final String KEY_MEDIA_TYPES = "mediaTypes";
     public static final String KEY_DISMISS_KEYGUARD = "dismiss-keyguard";
-    public static final String KEY_FROM_SNAPCAM = "from-snapcam";
     public static final String KEY_TOTAL_NUMBER = "total-number";
     public static final String QSST = "QSST";
 
@@ -455,16 +454,13 @@
                 Path albumPath = dm.getDefaultSetOf(itemPath);
 
                 data.putString(PhotoPage.KEY_MEDIA_ITEM_PATH, itemPath.toString());
-                if (!intent.getBooleanExtra(KEY_FROM_SNAPCAM, false)) {
-                    data.putBoolean(PhotoPage.KEY_READONLY, true);
-                } else {
-                    int hintIndex = 0;
-                    if (View.LAYOUT_DIRECTION_RTL == TextUtils
-                        .getLayoutDirectionFromLocale(Locale.getDefault())) {
-                        hintIndex = intent.getIntExtra(KEY_TOTAL_NUMBER, 1) - 1;
-                    }
-                    data.putInt(PhotoPage.KEY_INDEX_HINT, hintIndex);
+
+                int hintIndex = 0;
+                if (View.LAYOUT_DIRECTION_RTL == TextUtils
+                    .getLayoutDirectionFromLocale(Locale.getDefault())) {
+                    hintIndex = intent.getIntExtra(KEY_TOTAL_NUMBER, 1) - 1;
                 }
+                data.putInt(PhotoPage.KEY_INDEX_HINT, hintIndex);
 
                 // TODO: Make the parameter "SingleItemOnly" public so other
                 //       activities can reference it.
diff --git a/src/com/android/gallery3d/app/PhotoPage.java b/src/com/android/gallery3d/app/PhotoPage.java
index 7f69e0c..619667b 100755
--- a/src/com/android/gallery3d/app/PhotoPage.java
+++ b/src/com/android/gallery3d/app/PhotoPage.java
@@ -124,7 +124,6 @@
     public static final String KEY_RETURN_INDEX_HINT = "return-index-hint";
     public static final String KEY_SHOW_WHEN_LOCKED = "show_when_locked";
     public static final String KEY_IN_CAMERA_ROLL = "in_camera_roll";
-    public static final String KEY_READONLY = "read-only";
     public static final String KEY_FROM_VIDEOS_SCREEN = "from-video-screen";
     public static final String KEY_FROM_TIMELINE_SCREEN = "from-timeline-screen";
 
@@ -169,7 +168,6 @@
     private boolean mShowSpinner;
     private String mSetPathString;
     // This is the original mSetPathString before adding the camera preview item.
-    private boolean mReadOnlyView = false;
     private String mOriginalSetPathString;
     private AppBridge mAppBridge;
     private SnailItem mScreenNailItem;
@@ -411,7 +409,6 @@
         };
 
         mSetPathString = data.getString(KEY_MEDIA_SET_PATH);
-        mReadOnlyView = data.getBoolean(KEY_READONLY);
         mOriginalSetPathString = mSetPathString;
         setupNfcBeamPush();
         String itemPathString = data.getString(KEY_MEDIA_ITEM_PATH);
@@ -659,7 +656,6 @@
         case R.id.photopage_bottom_control_edit:
             return mHaveImageEditor
                     && mShowBars
-                    && !mReadOnlyView
                     && !mPhotoView.getFilmMode()
                     && (mCurrentPhoto.getSupportedOperations() & MediaItem.SUPPORT_EDIT) != 0
                     && mCurrentPhoto.getMediaType() == MediaObject.MEDIA_TYPE_IMAGE;
@@ -667,7 +663,7 @@
             mShareIntent = new Intent(Intent.ACTION_SEND);
             return mShowBars;
         case R.id.photopage_bottom_control_delete:
-            return mShowBars && !mReadOnlyView;
+            return mShowBars;
         default:
             return false;
         }
@@ -921,9 +917,6 @@
         if (mCurrentPhoto == null) return;
 
         int supportedOperations = mCurrentPhoto.getSupportedOperations();
-        if (mReadOnlyView) {
-            supportedOperations &= ~MediaObject.SUPPORT_EDIT;
-        }
         if (mSecureAlbum != null) {
             supportedOperations &= MediaObject.SUPPORT_DELETE;
         } else {