Loading packages/SystemUI/src/com/android/systemui/statusbar/phone/KeyguardAffordanceHelper.java +15 −9 Original line number Diff line number Diff line Loading @@ -59,9 +59,9 @@ public class KeyguardAffordanceHelper { private int mMinTranslationAmount; private int mMinFlingVelocity; private int mHintGrowAmount; private final KeyguardAffordanceView mLeftIcon; private final KeyguardAffordanceView mCenterIcon; private final KeyguardAffordanceView mRightIcon; private KeyguardAffordanceView mLeftIcon; private KeyguardAffordanceView mCenterIcon; private KeyguardAffordanceView mRightIcon; private Interpolator mAppearInterpolator; private Interpolator mDisappearInterpolator; private Animator mSwipeAnimator; Loading @@ -84,12 +84,7 @@ public class KeyguardAffordanceHelper { KeyguardAffordanceHelper(Callback callback, Context context) { mContext = context; mCallback = callback; mLeftIcon = mCallback.getLeftIcon(); mLeftIcon.setIsLeft(true); mCenterIcon = mCallback.getCenterIcon(); mRightIcon = mCallback.getRightIcon(); mLeftIcon.setPreviewView(mCallback.getLeftPreview()); mRightIcon.setPreviewView(mCallback.getRightPreview()); initIcons(); updateIcon(mLeftIcon, 0.0f, SWIPE_RESTING_ALPHA_AMOUNT, false); updateIcon(mCenterIcon, 0.0f, SWIPE_RESTING_ALPHA_AMOUNT, false); updateIcon(mRightIcon, 0.0f, SWIPE_RESTING_ALPHA_AMOUNT, false); Loading @@ -113,6 +108,16 @@ public class KeyguardAffordanceHelper { android.R.interpolator.fast_out_linear_in); } private void initIcons() { mLeftIcon = mCallback.getLeftIcon(); mLeftIcon.setIsLeft(true); mCenterIcon = mCallback.getCenterIcon(); mRightIcon = mCallback.getRightIcon(); mRightIcon.setIsLeft(false); mLeftIcon.setPreviewView(mCallback.getLeftPreview()); mRightIcon.setPreviewView(mCallback.getRightPreview()); } public boolean onTouchEvent(MotionEvent event) { int pointerIndex = event.findPointerIndex(mTrackingPointer); if (pointerIndex < 0) { Loading Loading @@ -436,6 +441,7 @@ public class KeyguardAffordanceHelper { public void onConfigurationChanged() { initDimens(); initIcons(); } public void reset(boolean animate) { Loading Loading
packages/SystemUI/src/com/android/systemui/statusbar/phone/KeyguardAffordanceHelper.java +15 −9 Original line number Diff line number Diff line Loading @@ -59,9 +59,9 @@ public class KeyguardAffordanceHelper { private int mMinTranslationAmount; private int mMinFlingVelocity; private int mHintGrowAmount; private final KeyguardAffordanceView mLeftIcon; private final KeyguardAffordanceView mCenterIcon; private final KeyguardAffordanceView mRightIcon; private KeyguardAffordanceView mLeftIcon; private KeyguardAffordanceView mCenterIcon; private KeyguardAffordanceView mRightIcon; private Interpolator mAppearInterpolator; private Interpolator mDisappearInterpolator; private Animator mSwipeAnimator; Loading @@ -84,12 +84,7 @@ public class KeyguardAffordanceHelper { KeyguardAffordanceHelper(Callback callback, Context context) { mContext = context; mCallback = callback; mLeftIcon = mCallback.getLeftIcon(); mLeftIcon.setIsLeft(true); mCenterIcon = mCallback.getCenterIcon(); mRightIcon = mCallback.getRightIcon(); mLeftIcon.setPreviewView(mCallback.getLeftPreview()); mRightIcon.setPreviewView(mCallback.getRightPreview()); initIcons(); updateIcon(mLeftIcon, 0.0f, SWIPE_RESTING_ALPHA_AMOUNT, false); updateIcon(mCenterIcon, 0.0f, SWIPE_RESTING_ALPHA_AMOUNT, false); updateIcon(mRightIcon, 0.0f, SWIPE_RESTING_ALPHA_AMOUNT, false); Loading @@ -113,6 +108,16 @@ public class KeyguardAffordanceHelper { android.R.interpolator.fast_out_linear_in); } private void initIcons() { mLeftIcon = mCallback.getLeftIcon(); mLeftIcon.setIsLeft(true); mCenterIcon = mCallback.getCenterIcon(); mRightIcon = mCallback.getRightIcon(); mRightIcon.setIsLeft(false); mLeftIcon.setPreviewView(mCallback.getLeftPreview()); mRightIcon.setPreviewView(mCallback.getRightPreview()); } public boolean onTouchEvent(MotionEvent event) { int pointerIndex = event.findPointerIndex(mTrackingPointer); if (pointerIndex < 0) { Loading Loading @@ -436,6 +441,7 @@ public class KeyguardAffordanceHelper { public void onConfigurationChanged() { initDimens(); initIcons(); } public void reset(boolean animate) { Loading