summaryrefslogtreecommitdiff
path: root/packages/SystemUI/src/com/android/keyguard/KeyguardPinBasedInputView.java
diff options
context:
space:
mode:
Diffstat (limited to 'packages/SystemUI/src/com/android/keyguard/KeyguardPinBasedInputView.java')
-rw-r--r--packages/SystemUI/src/com/android/keyguard/KeyguardPinBasedInputView.java20
1 files changed, 14 insertions, 6 deletions
diff --git a/packages/SystemUI/src/com/android/keyguard/KeyguardPinBasedInputView.java b/packages/SystemUI/src/com/android/keyguard/KeyguardPinBasedInputView.java
index 6a6b964c2a8f..4e06491621cb 100644
--- a/packages/SystemUI/src/com/android/keyguard/KeyguardPinBasedInputView.java
+++ b/packages/SystemUI/src/com/android/keyguard/KeyguardPinBasedInputView.java
@@ -24,14 +24,12 @@ import static com.android.keyguard.KeyguardSecurityView.PROMPT_REASON_TIMEOUT;
import static com.android.keyguard.KeyguardSecurityView.PROMPT_REASON_USER_REQUEST;
import android.content.Context;
-import android.content.res.ColorStateList;
import android.graphics.Rect;
import android.util.AttributeSet;
import android.view.KeyEvent;
import android.view.View;
import com.android.internal.widget.LockscreenCredential;
-import com.android.settingslib.Utils;
import com.android.systemui.R;
/**
@@ -167,6 +165,20 @@ public abstract class KeyguardPinBasedInputView extends KeyguardAbsKeyInputView
}
/**
+ * By default, the new layout will be enabled. When false, revert to the old style.
+ */
+ public void setIsNewLayoutEnabled(boolean isEnabled) {
+ if (!isEnabled) {
+ for (int i = 0; i < mButtons.length; i++) {
+ mButtons[i].disableNewLayout();
+ }
+ mDeleteButton.disableNewLayout();
+ mOkButton.disableNewLayout();
+ reloadColors();
+ }
+ }
+
+ /**
* Reload colors from resources.
**/
public void reloadColors() {
@@ -174,10 +186,6 @@ public abstract class KeyguardPinBasedInputView extends KeyguardAbsKeyInputView
key.reloadColors();
}
mPasswordEntry.reloadColors();
- int deleteColor = Utils.getColorAttr(getContext(), android.R.attr.textColorSecondary)
- .getDefaultColor();
- mDeleteButton.setImageTintList(ColorStateList.valueOf(deleteColor));
-
mDeleteButton.reloadColors();
mOkButton.reloadColors();
}