summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorErin Dahlgren <edahlgren@google.com>2013-10-10 18:31:16 -0700
committerAndroid Git Automerger <android-git-automerger@android.com>2013-10-10 18:31:16 -0700
commit6cad9e09bef494a3ae9f19049ad8fa501d134613 (patch)
tree67cb7adf0cdd136e9598dec3abd8bd31e2cd4311
parentbc7ecede08af6cbd696f501301f3183bd0e4eab1 (diff)
parent36c21ca1365c0c3832742bc0cf75d3409723254b (diff)
downloadandroid_packages_apps_Snap-6cad9e09bef494a3ae9f19049ad8fa501d134613.tar.gz
android_packages_apps_Snap-6cad9e09bef494a3ae9f19049ad8fa501d134613.tar.bz2
android_packages_apps_Snap-6cad9e09bef494a3ae9f19049ad8fa501d134613.zip
am 36c21ca1: Merge "Check both the requestId of current item and total items in filmstrip for bottom controls." into gb-ub-photos-carlsbad
* commit '36c21ca1365c0c3832742bc0cf75d3409723254b': Check both the requestId of current item and total items in filmstrip for bottom controls.
-rw-r--r--src/com/android/camera/ui/FilmStripView.java12
1 files changed, 5 insertions, 7 deletions
diff --git a/src/com/android/camera/ui/FilmStripView.java b/src/com/android/camera/ui/FilmStripView.java
index 3e29dc0d3..e32cccf68 100644
--- a/src/com/android/camera/ui/FilmStripView.java
+++ b/src/com/android/camera/ui/FilmStripView.java
@@ -1027,14 +1027,12 @@ public class FilmStripView extends ViewGroup implements BottomControlsListener {
return;
}
- // We cannot rely on the requestIds to check for data changes,
- // because an item hands its id to its rightmost neighbor on
- // deletion. To avoid loading the ImageData, we check if the DataAdapter
- // has fewer total items. We don't want to miss setting the controls
- // for a photo while we're still in capture mode, so ignore its fixed
- // requestId (0).
+ // We cannot rely on the requestIds alone to check for data changes,
+ // because an item hands its id to its rightmost neighbor on deletion.
+ // To avoid loading the ImageData, we also check if the DataAdapter
+ // has fewer total items.
int total = mDataAdapter.getTotalNumber();
- if (!force && (requestId == 0 || mLastTotalNumber == total)) {
+ if (!force && requestId == mLastItemId && mLastTotalNumber == total) {
return;
}
mLastTotalNumber = total;