Fix RTL handling for Keyguard affordances

Bug: 17328362
Change-Id: Ieb076c46379085e043b0c16755355d4c3018bd7d
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/KeyguardAffordanceHelper.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/KeyguardAffordanceHelper.java
index 20ffba2..eca8e6a 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/KeyguardAffordanceHelper.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/KeyguardAffordanceHelper.java
@@ -59,9 +59,9 @@
     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;
@@ -84,12 +84,7 @@
     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);
@@ -113,6 +108,16 @@
                 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) {
@@ -436,6 +441,7 @@
 
     public void onConfigurationChanged() {
         initDimens();
+        initIcons();
     }
 
     public void reset(boolean animate) {