diff options
author | Erin Dahlgren <edahlgren@google.com> | 2013-10-02 14:28:24 -0700 |
---|---|---|
committer | Android Git Automerger <android-git-automerger@android.com> | 2013-10-02 14:28:24 -0700 |
commit | 03b10508d51f03695d91268826a4044f24929340 (patch) | |
tree | 883424228b9e890befc4fccc7ff33f137628b0d9 | |
parent | 632afc196121cb15a53b4cffd3b93df4fcd39f46 (diff) | |
parent | cf7babd5cbe69cf99d96e46c306d6733837f48eb (diff) | |
download | android_packages_apps_Snap-03b10508d51f03695d91268826a4044f24929340.tar.gz android_packages_apps_Snap-03b10508d51f03695d91268826a4044f24929340.tar.bz2 android_packages_apps_Snap-03b10508d51f03695d91268826a4044f24929340.zip |
am cf7babd5: Merge "Reads PhotoSphere metadata once fully loaded so that PhotoSphere viewer icon is visible." into gb-ub-photos-carlsbad
* commit 'cf7babd5cbe69cf99d96e46c306d6733837f48eb':
Reads PhotoSphere metadata once fully loaded so that PhotoSphere viewer icon is visible.
-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 */); } /** |