summaryrefslogtreecommitdiff
path: root/core/java/android
diff options
context:
space:
mode:
Diffstat (limited to 'core/java/android')
-rw-r--r--core/java/android/inputmethodservice/KeyboardView.java6
-rw-r--r--core/java/android/os/UserHandle.java4
-rw-r--r--core/java/android/widget/TextView.java5
3 files changed, 9 insertions, 6 deletions
diff --git a/core/java/android/inputmethodservice/KeyboardView.java b/core/java/android/inputmethodservice/KeyboardView.java
index af75a0ab2047..317534517533 100644
--- a/core/java/android/inputmethodservice/KeyboardView.java
+++ b/core/java/android/inputmethodservice/KeyboardView.java
@@ -31,6 +31,7 @@ import android.inputmethodservice.Keyboard.Key;
import android.media.AudioManager;
import android.os.Handler;
import android.os.Message;
+import android.os.UserHandle;
import android.provider.Settings;
import android.util.AttributeSet;
import android.util.TypedValue;
@@ -980,8 +981,9 @@ public class KeyboardView extends View implements View.OnClickListener {
onInitializeAccessibilityEvent(event);
String text = null;
// This is very efficient since the properties are cached.
- final boolean speakPassword = Settings.Secure.getInt(mContext.getContentResolver(),
- Settings.Secure.ACCESSIBILITY_SPEAK_PASSWORD, 0) != 0;
+ final boolean speakPassword = Settings.Secure.getIntForUser(
+ mContext.getContentResolver(), Settings.Secure.ACCESSIBILITY_SPEAK_PASSWORD, 0,
+ UserHandle.USER_CURRENT) != 0;
// Add text only if password announcement is enabled or if headset is
// used to avoid leaking passwords.
if (speakPassword || mAudioManager.isBluetoothA2dpOn()
diff --git a/core/java/android/os/UserHandle.java b/core/java/android/os/UserHandle.java
index 0ff5f6a26092..74e064e39498 100644
--- a/core/java/android/os/UserHandle.java
+++ b/core/java/android/os/UserHandle.java
@@ -45,12 +45,12 @@ public final class UserHandle implements Parcelable {
/** @hide A user id to indicate that we would like to send to the current
* user, but if this is calling from a user process then we will send it
- * to the caller's user instead of failing wiht a security exception */
+ * to the caller's user instead of failing with a security exception */
public static final int USER_CURRENT_OR_SELF = -3;
/** @hide A user handle to indicate that we would like to send to the current
* user, but if this is calling from a user process then we will send it
- * to the caller's user instead of failing wiht a security exception */
+ * to the caller's user instead of failing with a security exception */
public static final UserHandle CURRENT_OR_SELF = new UserHandle(USER_CURRENT_OR_SELF);
/** @hide An undefined user id */
diff --git a/core/java/android/widget/TextView.java b/core/java/android/widget/TextView.java
index bc8b53553cb9..139354a8afd7 100644
--- a/core/java/android/widget/TextView.java
+++ b/core/java/android/widget/TextView.java
@@ -42,6 +42,7 @@ import android.os.Bundle;
import android.os.Parcel;
import android.os.Parcelable;
import android.os.SystemClock;
+import android.os.UserHandle;
import android.provider.Settings;
import android.text.BoringLayout;
import android.text.DynamicLayout;
@@ -8390,8 +8391,8 @@ public class TextView extends View implements ViewTreeObserver.OnPreDrawListener
* to speak passwords.
*/
private boolean shouldSpeakPasswordsForAccessibility() {
- return (Settings.Secure.getInt(mContext.getContentResolver(),
- Settings.Secure.ACCESSIBILITY_SPEAK_PASSWORD, 0) == 1);
+ return (Settings.Secure.getIntForUser(mContext.getContentResolver(),
+ Settings.Secure.ACCESSIBILITY_SPEAK_PASSWORD, 0, UserHandle.USER_CURRENT) == 1);
}
@Override