Fix default for a11y shortcut setting

Settings thought the default for "Allow from lock screen" was
on. It's really off.

Bug: 37158451
Test: Manually confirmed that a fresh device now shows off.
Change-Id: I38dc4f6d2bfec5e0c8562c0d2c6e034db461aa98
This commit is contained in:
Phil Weaver
2017-04-19 11:09:23 -07:00
parent d4ce883c64
commit a989b19646

View File

@@ -95,7 +95,7 @@ public class AccessibilityShortcutPreferenceFragment extends ToggleFeaturePrefer
CharSequence serviceName = getServiceName(getContext());
mServicePreference.setSummary(serviceName);
mOnLockScreenSwitchPreference.setChecked(Settings.Secure.getInt(
cr, Settings.Secure.ACCESSIBILITY_SHORTCUT_ON_LOCK_SCREEN, 1) == 1);
cr, Settings.Secure.ACCESSIBILITY_SHORTCUT_ON_LOCK_SCREEN, 0) == 1);
if (TextUtils.equals(serviceName, getString(R.string.accessibility_no_service_selected))) {
// If there's no service configured, enabling the shortcut will have no effect
// It should already be disabled, but force the switch to off just in case