mirror of
https://github.com/Divested-Mobile/DivestOS-Build.git
synced 2024-12-24 15:09:34 -05:00
51 lines
3.1 KiB
Diff
51 lines
3.1 KiB
Diff
From 938608ff6a4c61b4c1db2f6b94e81cae1a970aae Mon Sep 17 00:00:00 2001
|
|
From: Daniel Micay <danielmicay@gmail.com>
|
|
Date: Wed, 27 May 2015 00:29:08 -0400
|
|
Subject: [PATCH] hide passwords by default
|
|
|
|
---
|
|
core/java/android/text/method/TextKeyListener.java | 2 +-
|
|
core/java/com/android/internal/widget/PasswordEntryKeyboardHelper.java | 2 +-
|
|
packages/Keyguard/src/com/android/keyguard/PasswordTextView.java | 2 +-
|
|
3 files changed, 3 insertions(+), 3 deletions(-)
|
|
|
|
diff --git a/core/java/android/text/method/TextKeyListener.java b/core/java/android/text/method/TextKeyListener.java
|
|
index 994f3d7..b2ac244 100644
|
|
--- a/core/java/android/text/method/TextKeyListener.java
|
|
+++ b/core/java/android/text/method/TextKeyListener.java
|
|
@@ -291,7 +291,7 @@ private void updatePrefs(ContentResolver resolver) {
|
|
boolean cap = System.getInt(resolver, System.TEXT_AUTO_CAPS, 1) > 0;
|
|
boolean text = System.getInt(resolver, System.TEXT_AUTO_REPLACE, 1) > 0;
|
|
boolean period = System.getInt(resolver, System.TEXT_AUTO_PUNCTUATE, 1) > 0;
|
|
- boolean pw = System.getInt(resolver, System.TEXT_SHOW_PASSWORD, 1) > 0;
|
|
+ boolean pw = System.getInt(resolver, System.TEXT_SHOW_PASSWORD, 0) > 0;
|
|
|
|
mPrefs = (cap ? AUTO_CAP : 0) |
|
|
(text ? AUTO_TEXT : 0) |
|
|
diff --git a/core/java/com/android/internal/widget/PasswordEntryKeyboardHelper.java b/core/java/com/android/internal/widget/PasswordEntryKeyboardHelper.java
|
|
index b2c9dc5..dc5b7f9 100644
|
|
--- a/core/java/com/android/internal/widget/PasswordEntryKeyboardHelper.java
|
|
+++ b/core/java/com/android/internal/widget/PasswordEntryKeyboardHelper.java
|
|
@@ -159,7 +159,7 @@ public void setKeyboardMode(int mode) {
|
|
mKeyboardState = KEYBOARD_STATE_NORMAL;
|
|
final boolean visiblePassword = Settings.System.getInt(
|
|
mContext.getContentResolver(),
|
|
- Settings.System.TEXT_SHOW_PASSWORD, 1) != 0;
|
|
+ Settings.System.TEXT_SHOW_PASSWORD, 0) != 0;
|
|
final boolean enablePreview = false; // TODO: grab from configuration
|
|
mKeyboardView.setPreviewEnabled(visiblePassword && enablePreview);
|
|
break;
|
|
diff --git a/packages/Keyguard/src/com/android/keyguard/PasswordTextView.java b/packages/Keyguard/src/com/android/keyguard/PasswordTextView.java
|
|
index 50e7ecb..7d29928 100644
|
|
--- a/packages/Keyguard/src/com/android/keyguard/PasswordTextView.java
|
|
+++ b/packages/Keyguard/src/com/android/keyguard/PasswordTextView.java
|
|
@@ -129,7 +129,7 @@ public PasswordTextView(Context context, AttributeSet attrs, int defStyleAttr,
|
|
mCharPadding = getContext().getResources().getDimensionPixelSize(R.dimen
|
|
.password_char_padding);
|
|
mShowPassword = Settings.System.getInt(mContext.getContentResolver(),
|
|
- Settings.System.TEXT_SHOW_PASSWORD, 1) == 1;
|
|
+ Settings.System.TEXT_SHOW_PASSWORD, 0) == 1;
|
|
mAppearInterpolator = AnimationUtils.loadInterpolator(mContext,
|
|
android.R.interpolator.linear_out_slow_in);
|
|
mDisappearInterpolator = AnimationUtils.loadInterpolator(mContext,
|