Fix remaining 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 ".java:" Change-Id: Ib9dcddc675bdd540ae93a1eb5b1db00d1dccecb1
This commit is contained in:
@@ -92,13 +92,15 @@ final class DeadZone {
|
||||
}
|
||||
|
||||
private float getSize(long now) {
|
||||
if (mSizeMax == 0)
|
||||
if (mSizeMax == 0) {
|
||||
return 0;
|
||||
}
|
||||
long dt = (now - mLastPokeTime);
|
||||
if (dt > mHold + mDecay)
|
||||
if (dt > mHold + mDecay) {
|
||||
return mSizeMin;
|
||||
if (dt < mHold)
|
||||
} else if (dt < mHold) {
|
||||
return mSizeMax;
|
||||
}
|
||||
return (int) lerp(mSizeMax, mSizeMin, (float) (dt - mHold) / mDecay);
|
||||
}
|
||||
|
||||
@@ -177,8 +179,9 @@ final class DeadZone {
|
||||
|
||||
private void poke(MotionEvent event) {
|
||||
mLastPokeTime = event.getEventTime();
|
||||
if (DEBUG)
|
||||
if (DEBUG) {
|
||||
Log.v(TAG, "poked! size=" + getSize(mLastPokeTime));
|
||||
}
|
||||
if (mShouldFlash) mNavigationBarView.postInvalidate();
|
||||
}
|
||||
|
||||
|
||||
@@ -54,30 +54,30 @@ import android.view.View;
|
||||
final class KeyButtonDrawable extends Drawable {
|
||||
|
||||
public static final FloatProperty<KeyButtonDrawable> KEY_DRAWABLE_ROTATE =
|
||||
new FloatProperty<KeyButtonDrawable>("KeyButtonRotation") {
|
||||
@Override
|
||||
public void setValue(KeyButtonDrawable drawable, float degree) {
|
||||
drawable.setRotation(degree);
|
||||
}
|
||||
new FloatProperty<KeyButtonDrawable>("KeyButtonRotation") {
|
||||
@Override
|
||||
public void setValue(KeyButtonDrawable drawable, float degree) {
|
||||
drawable.setRotation(degree);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Float get(KeyButtonDrawable drawable) {
|
||||
return drawable.getRotation();
|
||||
}
|
||||
};
|
||||
@Override
|
||||
public Float get(KeyButtonDrawable drawable) {
|
||||
return drawable.getRotation();
|
||||
}
|
||||
};
|
||||
|
||||
public static final FloatProperty<KeyButtonDrawable> KEY_DRAWABLE_TRANSLATE_Y =
|
||||
new FloatProperty<KeyButtonDrawable>("KeyButtonTranslateY") {
|
||||
@Override
|
||||
public void setValue(KeyButtonDrawable drawable, float y) {
|
||||
drawable.setTranslationY(y);
|
||||
}
|
||||
new FloatProperty<KeyButtonDrawable>("KeyButtonTranslateY") {
|
||||
@Override
|
||||
public void setValue(KeyButtonDrawable drawable, float y) {
|
||||
drawable.setTranslationY(y);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Float get(KeyButtonDrawable drawable) {
|
||||
return drawable.getTranslationY();
|
||||
}
|
||||
};
|
||||
@Override
|
||||
public Float get(KeyButtonDrawable drawable) {
|
||||
return drawable.getTranslationY();
|
||||
}
|
||||
};
|
||||
|
||||
private final Paint mIconPaint = new Paint(Paint.ANTI_ALIAS_FLAG | Paint.FILTER_BITMAP_FLAG);
|
||||
private final Paint mShadowPaint = new Paint(Paint.ANTI_ALIAS_FLAG | Paint.FILTER_BITMAP_FLAG);
|
||||
|
||||
@@ -310,8 +310,8 @@ public class KeyButtonView extends ImageView implements ButtonInterface {
|
||||
switch (action) {
|
||||
case KeyEvent.ACTION_DOWN:
|
||||
handled = ims.onKeyDown(ev.getKeyCode(), ev);
|
||||
mTracking = handled && ev.getRepeatCount() == 0 &&
|
||||
(ev.getFlags() & KeyEvent.FLAG_START_TRACKING) != 0;
|
||||
mTracking = handled && ev.getRepeatCount() == 0
|
||||
&& (ev.getFlags() & KeyEvent.FLAG_START_TRACKING) != 0;
|
||||
break;
|
||||
case KeyEvent.ACTION_UP:
|
||||
handled = ims.onKeyUp(ev.getKeyCode(), ev);
|
||||
|
||||
@@ -59,4 +59,4 @@ public final class NavigationBarFrame extends FrameLayout {
|
||||
}
|
||||
return super.dispatchTouchEvent(event);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -139,7 +139,7 @@ public final class NavigationBarView extends FrameLayout {
|
||||
}
|
||||
|
||||
/**
|
||||
* Applies {@param consumer} to each of the nav bar views.
|
||||
* Applies {@code consumer} to each of the nav bar views.
|
||||
*/
|
||||
public void forEachView(Consumer<View> consumer) {
|
||||
if (mHorizontal != null) {
|
||||
|
||||
Reference in New Issue
Block a user