diff options
author | Santhosh Kumar H E <skhara@codeaurora.org> | 2013-12-05 16:36:52 +0530 |
---|---|---|
committer | Santhosh Kumar H E <skhara@codeaurora.org> | 2013-12-06 18:58:24 +0530 |
commit | dbdb7620da136374eea95170261032f910015db0 (patch) | |
tree | 007242cdb44941ecb855751c85da69aa97cc6a43 /src/com/android/camera/ui/CameraRootView.java | |
parent | 1c7734057201ffd1b6d165d9e24793ef3d213043 (diff) | |
parent | df2b0819907c440a660e228414a18184732816d1 (diff) | |
download | android_packages_apps_Snap-dbdb7620da136374eea95170261032f910015db0.tar.gz android_packages_apps_Snap-dbdb7620da136374eea95170261032f910015db0.tar.bz2 android_packages_apps_Snap-dbdb7620da136374eea95170261032f910015db0.zip |
Merge remote-tracking branch into merge_branch
Delay onResume tasks to speed up lockscreen onResume->onPause->onResume launch sequence.
Import translations. DO NOT MERGE
gcam: Clean up placeholders, and add deletion robustness.
Fix issue of focus indicator staying on without being hidden
Ensure view size gets updated after phone decors change.
Show the 100% state of the progress at least one frame.
Add parameters and deduplicate parameter changes
Revert parallel opening camera in photo mode.
Differentiate the InProgressData from the normal PhotoData.
Close mode menus if another control is touched
Start gcam module directly when handling capture intent.
Import translations. DO NOT MERGE
Add a null check to fix NPE
Add logging to various actions
Ensure mOpenCameraThread has been setup before dereferencing.
Add logging to various actions
Ensure mOpenCameraThread has been setup before dereferencing.
Add GCam progress indicator.
hide preview cover on arrival of new preview data if hidden
Fix photo mode is getting stuck in a single CameraState.
...
Conflicts:
res/layout/photo_module.xml
res/values/arrays.xml
src/com/android/camera/CameraActivity.java
src/com/android/camera/PhotoUI.java
src/com/android/camera/Storage.java
src/com/android/camera/WideAnglePanoramaModule.java
src/com/android/camera/ui/FilmStripView.java
Change-Id: Ic41b4e7e07b2b0ed7936b78a6c5f05270d05985f
Diffstat (limited to 'src/com/android/camera/ui/CameraRootView.java')
-rw-r--r-- | src/com/android/camera/ui/CameraRootView.java | 23 |
1 files changed, 14 insertions, 9 deletions
diff --git a/src/com/android/camera/ui/CameraRootView.java b/src/com/android/camera/ui/CameraRootView.java index 505549c80..daaefc027 100644 --- a/src/com/android/camera/ui/CameraRootView.java +++ b/src/com/android/camera/ui/CameraRootView.java @@ -37,7 +37,7 @@ public class CameraRootView extends FrameLayout { private int mBottomMargin = 0; private int mLeftMargin = 0; private int mRightMargin = 0; - private Rect mCurrentInsets; + private final Rect mCurrentInsets = new Rect(0, 0, 0, 0); private int mOffset = 0; private Object mDisplayListener; private MyDisplayListener mListener; @@ -53,19 +53,24 @@ public class CameraRootView extends FrameLayout { @Override protected boolean fitSystemWindows(Rect insets) { - mCurrentInsets = insets; // insets include status bar, navigation bar, etc // In this case, we are only concerned with the size of nav bar - if (mOffset > 0) { - return true; + if (mCurrentInsets.equals(insets)) { + // Local copy of the insets is up to date. No need to do anything. + return false; } - if (insets.bottom > 0) { - mOffset = insets.bottom; - } else if (insets.right > 0) { - mOffset = insets.right; + if (mOffset == 0) { + if (insets.bottom > 0) { + mOffset = insets.bottom; + } else if (insets.right > 0) { + mOffset = insets.right; + } } - return true; + mCurrentInsets.set(insets); + // Make sure onMeasure will be called to adapt to the new insets. + requestLayout(); + return false; } public void initDisplayListener() { |