summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorshenfe <shenfe@codeaurora.org>2016-10-24 11:07:40 +0800
committerGerrit - the friendly Code Review server <code-review@localhost>2016-10-23 20:18:17 -0700
commitff98f5cc9fccf78030ac30ef1ba12922a5fdbfed (patch)
treeddbc12aec41962a9fa0479eec074eddacb5a5566
parentd277584b126e285e24aaf21847aef66234ac1f31 (diff)
downloadandroid_packages_apps_Gallery2-ff98f5cc9fccf78030ac30ef1ba12922a5fdbfed.tar.gz
android_packages_apps_Gallery2-ff98f5cc9fccf78030ac30ef1ba12922a5fdbfed.tar.bz2
android_packages_apps_Gallery2-ff98f5cc9fccf78030ac30ef1ba12922a5fdbfed.zip
SnapdragonGallery: Fix photo show blank.
If the picture not running complete, it can't be selected. Change-Id: Id8d96e484f7ab12b3c360e6ec9d5a9faaf714fd3 CRs-Fixed: 1080039
-rwxr-xr-xsrc/com/android/gallery3d/app/TimeLinePage.java1
-rw-r--r--src/com/android/gallery3d/ui/ActionModeHandler.java4
2 files changed, 5 insertions, 0 deletions
diff --git a/src/com/android/gallery3d/app/TimeLinePage.java b/src/com/android/gallery3d/app/TimeLinePage.java
index 978909849..ab16b72af 100755
--- a/src/com/android/gallery3d/app/TimeLinePage.java
+++ b/src/com/android/gallery3d/app/TimeLinePage.java
@@ -281,6 +281,7 @@ public class TimeLinePage extends ActivityState implements
} else {
MediaItem item = mAlbumDataAdapter.get(slotIndex);
if (item == null) return; // Item not ready yet, ignore the click
+ if (!ActionModeHandler.isThreadComplete) return;
mSelectionManager.toggle(item.getPath());
mSlotView.invalidate();
}
diff --git a/src/com/android/gallery3d/ui/ActionModeHandler.java b/src/com/android/gallery3d/ui/ActionModeHandler.java
index 04d361a19..0b367d7dc 100644
--- a/src/com/android/gallery3d/ui/ActionModeHandler.java
+++ b/src/com/android/gallery3d/ui/ActionModeHandler.java
@@ -67,6 +67,8 @@ public class ActionModeHandler implements Callback, PopupList.OnPopupItemClickLi
public boolean onActionItemClicked(MenuItem item);
}
+ public static boolean isThreadComplete = false;
+
private final AbstractGalleryActivity mActivity;
private final MenuExecutor mMenuExecutor;
private final SelectionManager mSelectionManager;
@@ -452,6 +454,7 @@ public class ActionModeHandler implements Callback, PopupList.OnPopupItemClickLi
// Disable share actions until share intent is in good shape
if (mSharePanoramaMenuItem != null) mSharePanoramaMenuItem.setEnabled(false);
if (mShareMenuItem != null) mShareMenuItem.setEnabled(false);
+ isThreadComplete = false;
// Generate sharing intent and update supported operations in the background
// The task can take a long time and be canceled in the mean time.
@@ -550,6 +553,7 @@ public class ActionModeHandler implements Callback, PopupList.OnPopupItemClickLi
showShareMaxDialogIfNeed(canShare);
mShareMenuItem.setEnabled(canShare);
+ isThreadComplete = true;
shareIntent = share_intent;
}
}