From 2a611a4ee5171b360dffcc685be7e04a68902cf6 Mon Sep 17 00:00:00 2001 From: yongga Date: Thu, 14 Jan 2016 17:45:13 +0800 Subject: Gallery2: Hide "Delete" button on photo page if need. Delete operation is not supported when KEY_READONLY is true, so hide "Delete" button to avoid exception. Change-Id: Id10d02db937ed597e4de33650868c3c555842b8d CRs-Fixed: 960432 --- src/com/android/gallery3d/app/PhotoPage.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/com/android') diff --git a/src/com/android/gallery3d/app/PhotoPage.java b/src/com/android/gallery3d/app/PhotoPage.java index 1b2a68245..4e61df9c7 100644 --- a/src/com/android/gallery3d/app/PhotoPage.java +++ b/src/com/android/gallery3d/app/PhotoPage.java @@ -655,7 +655,7 @@ public abstract class PhotoPage extends ActivityState implements mShareIntent = new Intent(Intent.ACTION_SEND); return mShowBars; case R.id.photopage_bottom_control_delete: - return mShowBars; + return mShowBars && !mReadOnlyView; default: return false; } -- cgit v1.2.3