diff options
author | Erin Dahlgren <edahlgren@google.com> | 2013-10-02 20:36:06 +0000 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2013-10-02 20:36:07 +0000 |
commit | cf7babd5cbe69cf99d96e46c306d6733837f48eb (patch) | |
tree | 6c1a73a9a2c7d0b5164dc07028ca93fe64d79e1d /src/com | |
parent | 45f5976f2c1d4eda46be4ea591c6196c683f2ded (diff) | |
parent | b7a52a4caafd270dbb6aaa41f890a516359e44b8 (diff) | |
download | android_packages_apps_Snap-cf7babd5cbe69cf99d96e46c306d6733837f48eb.tar.gz android_packages_apps_Snap-cf7babd5cbe69cf99d96e46c306d6733837f48eb.tar.bz2 android_packages_apps_Snap-cf7babd5cbe69cf99d96e46c306d6733837f48eb.zip |
Merge "Reads PhotoSphere metadata once fully loaded so that PhotoSphere viewer icon is visible." into gb-ub-photos-carlsbad
Diffstat (limited to 'src/com')
-rw-r--r-- | src/com/android/camera/ui/FilmStripView.java | 26 |
1 files changed, 17 insertions, 9 deletions
diff --git a/src/com/android/camera/ui/FilmStripView.java b/src/com/android/camera/ui/FilmStripView.java index d1c4b3f9d..93707a1d5 100644 --- a/src/com/android/camera/ui/FilmStripView.java +++ b/src/com/android/camera/ui/FilmStripView.java @@ -984,10 +984,12 @@ public class FilmStripView extends ViewGroup implements BottomControlsListener { } /** - * Updates the visibility of the bottom controls depending on the current - * data item. + * Updates the visibility of the bottom controls. + * + * @param force update the bottom controls even if the current id + * has been checked for button visibilities */ - private void updateBottomControls() { + private void updateBottomControls(boolean force) { if (mBottomControls == null) { mBottomControls = (FilmstripBottomControls) ((View) getParent()) .findViewById(R.id.filmstrip_bottom_controls); @@ -997,10 +999,14 @@ public class FilmStripView extends ViewGroup implements BottomControlsListener { final int requestId = getCurrentId(); - // Check if the item has changed since the last time we updated the - // visibility status. Only then check of the current image is a photo - // sphere. - if (requestId == mLastItemId || requestId < 0) { + if (requestId < 0) { + return; + } + + // If not a forced update, check if the item has changed since the last + // time we updated the visibility status. Only then check if the current + // image is a photo sphere. + if (!force && requestId == mLastItemId) { return; } @@ -1273,7 +1279,7 @@ public class FilmStripView extends ViewGroup implements BottomControlsListener { stepIfNeeded(); adjustChildZOrder(); - updateBottomControls(); + updateBottomControls(false /* no forced update */); mLastItemId = getCurrentId(); } @@ -1743,8 +1749,10 @@ public class FilmStripView extends ViewGroup implements BottomControlsListener { } } } - // request a layout to find the measured width/height of the view first. + // Request a layout to find the measured width/height of the view first. requestLayout(); + // Update photo sphere visibility after metadata fully written. + updateBottomControls(true /* forced update */); } /** |