Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit d2876544 authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Deprecate "speak passwords" setting."

parents 0df2b375 385912ee
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -34264,7 +34264,7 @@ package android.provider {
    method public static final deprecated void setLocationProviderEnabled(android.content.ContentResolver, java.lang.String, boolean);
    field public static final java.lang.String ACCESSIBILITY_DISPLAY_INVERSION_ENABLED = "accessibility_display_inversion_enabled";
    field public static final java.lang.String ACCESSIBILITY_ENABLED = "accessibility_enabled";
    field public static final java.lang.String ACCESSIBILITY_SPEAK_PASSWORD = "speak_password";
    field public static final deprecated java.lang.String ACCESSIBILITY_SPEAK_PASSWORD = "speak_password";
    field public static final deprecated java.lang.String ADB_ENABLED = "adb_enabled";
    field public static final java.lang.String ALLOWED_GEOLOCATION_ORIGINS = "allowed_geolocation_origins";
    field public static final deprecated java.lang.String ALLOW_MOCK_LOCATION = "mock_location";
+1 −1
Original line number Diff line number Diff line
@@ -37369,7 +37369,7 @@ package android.provider {
    method public static final deprecated void setLocationProviderEnabled(android.content.ContentResolver, java.lang.String, boolean);
    field public static final java.lang.String ACCESSIBILITY_DISPLAY_INVERSION_ENABLED = "accessibility_display_inversion_enabled";
    field public static final java.lang.String ACCESSIBILITY_ENABLED = "accessibility_enabled";
    field public static final java.lang.String ACCESSIBILITY_SPEAK_PASSWORD = "speak_password";
    field public static final deprecated java.lang.String ACCESSIBILITY_SPEAK_PASSWORD = "speak_password";
    field public static final deprecated java.lang.String ADB_ENABLED = "adb_enabled";
    field public static final java.lang.String ALLOWED_GEOLOCATION_ORIGINS = "allowed_geolocation_origins";
    field public static final deprecated java.lang.String ALLOW_MOCK_LOCATION = "mock_location";
+1 −1
Original line number Diff line number Diff line
@@ -34387,7 +34387,7 @@ package android.provider {
    method public static final deprecated void setLocationProviderEnabled(android.content.ContentResolver, java.lang.String, boolean);
    field public static final java.lang.String ACCESSIBILITY_DISPLAY_INVERSION_ENABLED = "accessibility_display_inversion_enabled";
    field public static final java.lang.String ACCESSIBILITY_ENABLED = "accessibility_enabled";
    field public static final java.lang.String ACCESSIBILITY_SPEAK_PASSWORD = "speak_password";
    field public static final deprecated java.lang.String ACCESSIBILITY_SPEAK_PASSWORD = "speak_password";
    field public static final deprecated java.lang.String ADB_ENABLED = "adb_enabled";
    field public static final java.lang.String ALLOWED_GEOLOCATION_ORIGINS = "allowed_geolocation_origins";
    field public static final deprecated java.lang.String ALLOW_MOCK_LOCATION = "mock_location";
+25 −43
Original line number Diff line number Diff line
@@ -988,15 +988,7 @@ public class KeyboardView extends View implements View.OnClickListener {
        if (mAccessibilityManager.isEnabled()) {
            AccessibilityEvent event = AccessibilityEvent.obtain(eventType);
            onInitializeAccessibilityEvent(event);
            String text = null;
            // This is very efficient since the properties are cached.
            final boolean speakPassword = Settings.Secure.getIntForUser(
                    mContext.getContentResolver(), Settings.Secure.ACCESSIBILITY_SPEAK_PASSWORD, 0,
                    UserHandle.USER_CURRENT_OR_SELF) != 0;
            // Add text only if password announcement is enabled or if headset is
            // used to avoid leaking passwords.
            if (speakPassword || mAudioManager.isBluetoothA2dpOn()
                    || mAudioManager.isWiredHeadsetOn()) {
            final String text;
            switch (code) {
                case Keyboard.KEYCODE_ALT:
                    text = mContext.getString(R.string.keyboardview_keycode_alt);
@@ -1022,16 +1014,6 @@ public class KeyboardView extends View implements View.OnClickListener {
                default:
                    text = String.valueOf((char) code);
            }
            } else if (!mHeadsetRequiredToHearPasswordsAnnounced) {
                // We want the waring for required head set to be send with both the
                // hover enter and hover exit event, so set the flag after the exit.
                if (eventType == AccessibilityEvent.TYPE_VIEW_HOVER_EXIT) {
                    mHeadsetRequiredToHearPasswordsAnnounced = true;
                }
                text = mContext.getString(R.string.keyboard_headset_required_to_hear_password);
            } else {
                text = mContext.getString(R.string.keyboard_password_character_no_headset);
            }
            event.getText().add(text);
            mAccessibilityManager.sendAccessibilityEvent(event);
        }
+5 −0
Original line number Diff line number Diff line
@@ -5492,7 +5492,12 @@ public final class Settings {

        /**
         * Whether to speak passwords while in accessibility mode.
         *
         * @deprecated The speaking of passwords is controlled by individual accessibility services.
         * Apps should ignore this setting and provide complete information to accessibility
         * at all times, which was the behavior when this value was {@code true}.
         */
        @Deprecated
        public static final String ACCESSIBILITY_SPEAK_PASSWORD = "speak_password";

        /**
Loading