Fix whitespace-related lint erros under a.i.navigationbar

This is a mechanical cleanup CL.  There should be no behavior change.

Bug: 215443343
Test: prebuilts/checkstyle/checkstyle.py -f \
  frameworks/base/core/java/android/inputmethodservice/navigationbar/ \
  | grep "whitespace"
Change-Id: I342af73d675f6432b16acd2604d2e43a5055b701
This commit is contained in:
Yohei Yukawa
2022-03-08 20:23:22 -08:00
parent dc4679a818
commit 76adda5ef3
4 changed files with 11 additions and 11 deletions

View File

@@ -126,7 +126,7 @@ final class KeyButtonRipple extends Drawable {
private void drawSoftware(Canvas canvas) {
if (mGlowAlpha > 0f) {
final Paint p = getRipplePaint();
p.setAlpha((int)(mGlowAlpha * 255f));
p.setAlpha((int) (mGlowAlpha * 255f));
final float w = getBounds().width();
final float h = getBounds().height();
@@ -412,7 +412,7 @@ final class KeyButtonRipple extends Drawable {
mDrawingHardwareGlow = true;
setExtendStart(CanvasProperty.createFloat(getExtendSize() / 2));
final RenderNodeAnimator startAnim = new RenderNodeAnimator(getExtendStart(),
getExtendSize()/2 - GLOW_MAX_SCALE_FACTOR * getRippleSize()/2);
getExtendSize() / 2 - GLOW_MAX_SCALE_FACTOR * getRippleSize() / 2);
startAnim.setDuration(ANIMATION_DURATION_SCALE);
startAnim.setInterpolator(mInterpolator);
startAnim.addListener(mAnimatorListener);
@@ -420,7 +420,7 @@ final class KeyButtonRipple extends Drawable {
setExtendEnd(CanvasProperty.createFloat(getExtendSize() / 2));
final RenderNodeAnimator endAnim = new RenderNodeAnimator(getExtendEnd(),
getExtendSize()/2 + GLOW_MAX_SCALE_FACTOR * getRippleSize()/2);
getExtendSize() / 2 + GLOW_MAX_SCALE_FACTOR * getRippleSize() / 2);
endAnim.setDuration(ANIMATION_DURATION_SCALE);
endAnim.setInterpolator(mInterpolator);
endAnim.addListener(mAnimatorListener);
@@ -430,13 +430,13 @@ final class KeyButtonRipple extends Drawable {
if (isHorizontal()) {
mTopProp = CanvasProperty.createFloat(0f);
mBottomProp = CanvasProperty.createFloat(getBounds().height());
mRxProp = CanvasProperty.createFloat(getBounds().height()/2);
mRyProp = CanvasProperty.createFloat(getBounds().height()/2);
mRxProp = CanvasProperty.createFloat(getBounds().height() / 2);
mRyProp = CanvasProperty.createFloat(getBounds().height() / 2);
} else {
mLeftProp = CanvasProperty.createFloat(0f);
mRightProp = CanvasProperty.createFloat(getBounds().width());
mRxProp = CanvasProperty.createFloat(getBounds().width()/2);
mRyProp = CanvasProperty.createFloat(getBounds().width()/2);
mRxProp = CanvasProperty.createFloat(getBounds().width() / 2);
mRyProp = CanvasProperty.createFloat(getBounds().width() / 2);
}
mGlowScale = GLOW_MAX_SCALE_FACTOR;

View File

@@ -200,8 +200,8 @@ public class KeyButtonView extends ImageView implements ButtonInterface {
postDelayed(mCheckLongPress, ViewConfiguration.getLongPressTimeout());
break;
case MotionEvent.ACTION_MOVE:
x = (int)ev.getRawX();
y = (int)ev.getRawY();
x = (int) ev.getRawX();
y = (int) ev.getRawY();
float slop = getQuickStepTouchSlopPx(getContext());
if (Math.abs(x - mTouchDownX) > slop || Math.abs(y - mTouchDownY) > slop) {

View File

@@ -398,7 +398,7 @@ public final class NavigationBarInflaterView extends FrameLayout {
mButtonDispatchers.valueAt(indexOfKey).addView(v);
}
if (v instanceof ViewGroup) {
final ViewGroup viewGroup = (ViewGroup)v;
final ViewGroup viewGroup = (ViewGroup) v;
final int N = viewGroup.getChildCount();
for (int i = 0; i < N; i++) {
addToDispatchers(viewGroup.getChildAt(i));

View File

@@ -211,7 +211,7 @@ public final class NavigationBarView extends FrameLayout {
// Animate the back button's rotation to the new degrees and only in portrait move up the
// back button to line up with the other buttons
float targetY = useAltBack
? - dpToPx(NAVBAR_BACK_BUTTON_IME_OFFSET, getResources())
? -dpToPx(NAVBAR_BACK_BUTTON_IME_OFFSET, getResources())
: 0;
ObjectAnimator navBarAnimator = ObjectAnimator.ofPropertyValuesHolder(drawable,
PropertyValuesHolder.ofFloat(KeyButtonDrawable.KEY_DRAWABLE_ROTATE, degrees),