Loading packages/SystemUI/src/com/android/systemui/statusbar/notification/TransformState.java +10 −6 Original line number Diff line number Diff line Loading @@ -137,8 +137,12 @@ public class TransformState { final View transformedView = mTransformedView; boolean transformX = (transformationFlags & TRANSFORM_X) != 0; boolean transformY = (transformationFlags & TRANSFORM_Y) != 0; boolean differentHeight = otherState.getViewHeight() != getViewHeight(); boolean differentWidth = otherState.getViewWidth() != getViewWidth(); int viewHeight = getViewHeight(); int otherHeight = otherState.getViewHeight(); boolean differentHeight = otherHeight != viewHeight && otherHeight != 0 && viewHeight != 0; int viewWidth = getViewWidth(); int otherWidth = otherState.getViewWidth(); boolean differentWidth = otherWidth != viewWidth && otherWidth != 0 && viewWidth != 0; boolean transformScale = transformScale(otherState) && (differentHeight || differentWidth); // lets animate the positions correctly if (transformationAmount == 0.0f Loading @@ -165,15 +169,15 @@ public class TransformState { // we also want to animate the scale if we're the same View otherView = otherState.getTransformedView(); if (transformScale && differentWidth) { setTransformationStartScaleX(otherState.getViewWidth() * otherView.getScaleX() / (float) getViewWidth()); setTransformationStartScaleX(otherWidth * otherView.getScaleX() / (float) viewWidth); transformedView.setPivotX(0); } else { setTransformationStartScaleX(UNDEFINED); } if (transformScale && differentHeight) { setTransformationStartScaleY(otherState.getViewHeight() * otherView.getScaleY() / (float) getViewHeight()); setTransformationStartScaleY(otherHeight * otherView.getScaleY() / (float) viewHeight); transformedView.setPivotY(0); } else { setTransformationStartScaleY(UNDEFINED); Loading Loading
packages/SystemUI/src/com/android/systemui/statusbar/notification/TransformState.java +10 −6 Original line number Diff line number Diff line Loading @@ -137,8 +137,12 @@ public class TransformState { final View transformedView = mTransformedView; boolean transformX = (transformationFlags & TRANSFORM_X) != 0; boolean transformY = (transformationFlags & TRANSFORM_Y) != 0; boolean differentHeight = otherState.getViewHeight() != getViewHeight(); boolean differentWidth = otherState.getViewWidth() != getViewWidth(); int viewHeight = getViewHeight(); int otherHeight = otherState.getViewHeight(); boolean differentHeight = otherHeight != viewHeight && otherHeight != 0 && viewHeight != 0; int viewWidth = getViewWidth(); int otherWidth = otherState.getViewWidth(); boolean differentWidth = otherWidth != viewWidth && otherWidth != 0 && viewWidth != 0; boolean transformScale = transformScale(otherState) && (differentHeight || differentWidth); // lets animate the positions correctly if (transformationAmount == 0.0f Loading @@ -165,15 +169,15 @@ public class TransformState { // we also want to animate the scale if we're the same View otherView = otherState.getTransformedView(); if (transformScale && differentWidth) { setTransformationStartScaleX(otherState.getViewWidth() * otherView.getScaleX() / (float) getViewWidth()); setTransformationStartScaleX(otherWidth * otherView.getScaleX() / (float) viewWidth); transformedView.setPivotX(0); } else { setTransformationStartScaleX(UNDEFINED); } if (transformScale && differentHeight) { setTransformationStartScaleY(otherState.getViewHeight() * otherView.getScaleY() / (float) getViewHeight()); setTransformationStartScaleY(otherHeight * otherView.getScaleY() / (float) viewHeight); transformedView.setPivotY(0); } else { setTransformationStartScaleY(UNDEFINED); Loading