diff options
| author | Kenny Guy <kennyguy@google.com> | 2014-09-04 18:16:17 +0100 |
|---|---|---|
| committer | Kenny Guy <kennyguy@google.com> | 2014-09-04 18:24:31 +0100 |
| commit | 692356b7c392130b7f38f46a60570617c978ba75 (patch) | |
| tree | d1371bc1bb7c10168d42491431b1dba496df36a4 /core/java/android/widget/TextView.java | |
| parent | d2961355bd433c3319f293eb53cbe6ad30b79276 (diff) | |
Revert "Ensure all RemoteViews use myUserId rather than context."
This reverts commit 5287e37687f117ac0b690100ad90842eff58d15a.
Reverting because only worked if settings cache had been populated
already.
Bug: 17302505
Change-Id: I4360606e9d9c6409951f0a02bd0b78c55085e0c6
Diffstat (limited to 'core/java/android/widget/TextView.java')
| -rw-r--r-- | core/java/android/widget/TextView.java | 12 |
1 files changed, 2 insertions, 10 deletions
diff --git a/core/java/android/widget/TextView.java b/core/java/android/widget/TextView.java index 188a3e9970e2..3e1b674892a1 100644 --- a/core/java/android/widget/TextView.java +++ b/core/java/android/widget/TextView.java @@ -41,7 +41,6 @@ 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; @@ -8338,15 +8337,8 @@ public class TextView extends View implements ViewTreeObserver.OnPreDrawListener * to speak passwords. */ private boolean shouldSpeakPasswordsForAccessibility() { - // OK, this is gross but needed. This class is supported by the - // remote views mechanism and as a part of that the remote views - // can be inflated by a context for another user without the app - // having interact users permission - just for loading resources. - // For example, when adding widgets from a user profile to the - // home screen. Therefore, we access settings as user the app is - // running as not the one the context is for. - return (Settings.Secure.getIntForUser(mContext.getContentResolver(), - Settings.Secure.ACCESSIBILITY_SPEAK_PASSWORD, 0, UserHandle.myUserId()) == 1); + return (Settings.Secure.getInt(mContext.getContentResolver(), + Settings.Secure.ACCESSIBILITY_SPEAK_PASSWORD, 0) == 1); } @Override |
