diff options
author | mingwax <mingwax@codeaurora.org> | 2016-11-29 16:33:00 +0800 |
---|---|---|
committer | mingwax <mingwax@codeaurora.org> | 2016-11-30 17:18:40 +0800 |
commit | 2f936e251c8e76d89b908041d0d1366e3bac576a (patch) | |
tree | cff42de29985083884b0e1274377b1e541447f31 | |
parent | 7fdeb80f7fb4e7077a306bf0119db884a3a0d7de (diff) | |
download | android_packages_apps_Snap-2f936e251c8e76d89b908041d0d1366e3bac576a.tar.gz android_packages_apps_Snap-2f936e251c8e76d89b908041d0d1366e3bac576a.tar.bz2 android_packages_apps_Snap-2f936e251c8e76d89b908041d0d1366e3bac576a.zip |
SnapdragonCamera: Path should be reseted in onLayout method
When proMode is inVisible, onLayout method is called in the
landscape screen, the screen will draw one more curve by path.
Add judgment condition, path should be reseted in onLayout
method.
CRs-Fixed: 1094491
Change-Id: Id76e2234517bfef662b9687e997219e693e907b1
-rw-r--r-- | src/com/android/camera/ui/ProMode.java | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/com/android/camera/ui/ProMode.java b/src/com/android/camera/ui/ProMode.java index 9f7d576dc..dbd89ec58 100644 --- a/src/com/android/camera/ui/ProMode.java +++ b/src/com/android/camera/ui/ProMode.java @@ -156,12 +156,14 @@ public class ProMode extends View { super.onLayout(changed, left, top, right, bottom); mWidth = right - left; mHeight = bottom - top; + mCurveLeft = mWidth / 10; mCurveRight = mWidth - mCurveLeft; mCurveHeight = mWidth / 7; mCurveY = (int) (mHeight * 0.67); float cx = (mCurveLeft + mCurveRight) / 2; + mCurvePath.reset(); mCurvePath.moveTo(mCurveLeft, mCurveY); mCurvePath.quadTo(cx, mCurveY - mCurveHeight, mCurveRight, mCurveY); mCurveMeasure = new PathMeasure(mCurvePath, false); |