diff options
author | Erin Dahlgren <edahlgren@google.com> | 2013-10-01 11:00:12 -0700 |
---|---|---|
committer | Erin Dahlgren <edahlgren@google.com> | 2013-10-01 16:10:01 -0700 |
commit | b7a52a4caafd270dbb6aaa41f890a516359e44b8 (patch) | |
tree | 3ee4a6cea003b9e3dde287ed71fbd5d5890be552 /src/com/android/camera/ui/FilmStripView.java | |
parent | 7fc104e4e75ac881269fd4a093513da01565e5d6 (diff) | |
download | android_packages_apps_Snap-b7a52a4caafd270dbb6aaa41f890a516359e44b8.tar.gz android_packages_apps_Snap-b7a52a4caafd270dbb6aaa41f890a516359e44b8.tar.bz2 android_packages_apps_Snap-b7a52a4caafd270dbb6aaa41f890a516359e44b8.zip |
Reads PhotoSphere metadata once fully loaded so that PhotoSphere viewer icon is visible.
Bug: 10715651
Change-Id: Ib71a3e4469d1ecee87b9423b03b8898294a7ffa6
Diffstat (limited to 'src/com/android/camera/ui/FilmStripView.java')
-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 75886df05..f04629660 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(); } @@ -1741,8 +1747,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 */); } /** |