<xliff:g id="service" example="TalkBack">%1$s</xliff:g>?</string>
<!-- Summary for a warning message about security implications of enabling an accessibility service,
displayed as a dialog message when the user selects to enable an accessibility service (tablet). [CHAR LIMIT=NONE] -->
- <string name="accessibility_service_security_warning_summary">
+ <string name="accessibility_service_security_warning_summary" product="tablet">
<xliff:g id="accessibility_service_name">%1$s</xliff:g> can
collect all of the text you type, except passwords. This includes personal data such as credit card
- numbers. It can also collect data about your interactions with the device.</string>
+ numbers. It can also collect data about your interactions with the tablet.</string>
+ <!-- Summary for a warning message about security implications of enabling an accessibility service,
+ displayed as a dialog message when the user selects to enable an accessibility service (phone). [CHAR LIMIT=NONE] -->
+ <string name="accessibility_service_security_warning_summary" product="default">
+ <xliff:g id="accessibility_service_name">%1$s</xliff:g> can
+ collect all of the text you type, except passwords. This includes personal data such as credit card
+ numbers. It can also collect data about your interactions with the phone.</string>
<!-- Title for a warning about disabling an accessibility service displayed as a dialog message when the user
selects to disable that service. This avoids accidental disabling. [CHAR LIMIT=NONE] -->
<string name="accessibility_service_disable_warning_summary">Touching OK will
stop <xliff:g id="service" example="TalkBack">%1$s</xliff:g>.</string>
+ <!-- Title for the prompt shown as a placeholder if no accessibility serivices are installed. [CHAR LIMIT=50] -->
+ <string name="accessibility_no_services_installed">No services installed</string>
+
<!-- Title for the prompt that lets users know that they have no accessibility related apps
installed and that they can install TalkBack from Market. [CHAR LIMIT=50] -->
- <string name="accessibility_service_no_apps_title">No accessibility applications</string>
+ <string name="accessibility_service_no_apps_title">Need a screen reader?</string>
<!-- Message for the prompt that lets users know that they have no accessibility related apps
installed and that they can install TalkBack from Market. [CHAR LIMIT=NONE] -->
- <string name="accessibility_service_no_apps_message">You don\'t have accessibility
- applications installed. Do you want to download a screen reader from the Android Market?</string>
+ <string name="accessibility_service_no_apps_message">TalkBack provides spoken feedback to
+ help blind and low-vision users. Do you want to install it for free from Android
+ Market?</string>
<!-- Title for a warning about downloading accessibility scripts displayed as a dialog message
- when the user selects to enable script downloading. [CHAR LIMIT=40] -->
+ when the user selects to enable script downloading. [CHAR LIMIT=50] -->
<string name="accessibility_script_injection_security_warning_title">Install accessibility scripts?</string>
<!-- Warning message about security implications of downloading accessibility scripts,
displayed as a dialog message when the user selects to enable script downloading. [CHAR LIMIT=NONE] -->
<!-- Warning message that the interaction model changes on enabling touch exploration. [CHAR LIMIT=NONE] -->
<string name="accessibility_touch_exploration_warning">This feature changes the
way your device responds to touch. Turn on?</string>
- <!-- Default description for an accessiiblity serivice if the latter doesn't provide one. [CHAR LIMIT=NONE] -->
- <string name="accessibility_service_default_description">This accessibility service has no
- description.\n\nAccessibility services provide various types of feedback when you interact
- with the device. </string>
+ <!-- Default description for an accessibility serivice if the latter doesn't provide one (tablet). [CHAR LIMIT=NONE] -->
+ <string name="accessibility_service_default_description" product="tablet">This service has no
+ description.\n\nServices provide feedback when you interact with the tablet.</string>
+ <!-- Default description for an accessibility serivice if the latter doesn't provide one (phone). [CHAR LIMIT=NONE] -->
+ <string name="accessibility_service_default_description" product="default">This service has no
+ description.\n\nServices provide feedback when you interact with the phone.</string>
<!-- Accessibility settings: button for lauching settings for an accessibility service -->
<string name="settings_button">Settings</string>
<CheckBoxPreference
android:key="toggle_large_text_preference"
android:title="@string/accessibility_toggle_large_text_title"
- android:persistent="false"/>
+ android:persistent="false"
+ android:order="1"/>
<CheckBoxPreference
android:key="toggle_power_button_ends_call_preference"
android:title="@string/accessibility_power_button_ends_call_title"
- android:persistent="false"/>
+ android:persistent="false"
+ android:order="2"/>
<CheckBoxPreference
android:key="toggle_auto_rotate_screen_preference"
android:title="@string/accelerometer_title"
- android:persistent="false"/>
+ android:persistent="false"
+ android:order="3"/>
<PreferenceScreen
android:key="toggle_touch_exploration_preference"
android:title="@string/accessibility_touch_exploration_title"
- android:fragment="com.android.settings.AccessibilitySettings$ToggleTouchExplorationFragment" >
+ android:fragment="com.android.settings.AccessibilitySettings$ToggleTouchExplorationFragment"
+ android:order="4" >
<extra android:name="title" android:value="@string/accessibility_touch_exploration_title" />
<extra android:name="summary" android:value="@string/accessibility_touch_exploration_summary" />
<extra android:name="enable_warning_title" android:value="@android:string/dialog_alert_title" />
android:title="@string/accessibility_long_press_timeout_title"
android:entries="@array/long_press_timeout_selector_titles"
android:entryValues="@array/long_press_timeout_selector_values"
- android:persistent="false"/>
+ android:persistent="false"
+ android:order="5"/>
<com.android.settings.AccessibilityEnableScriptInjectionPreference
android:key="toggle_script_injection_preference"
android:dialogMessage="@string/accessibility_script_injection_security_warning_summary"
android:positiveButtonText="@string/accessibility_script_injection_button_allow"
android:negativeButtonText="@string/accessibility_script_injection_button_disallow"
- android:persistent="false"/>
+ android:persistent="false"
+ android:order="6"/>
</PreferenceCategory>
private Preference mToggleTouchExplorationPreference;
private ListPreference mSelectLongPressTimeoutPreference;
private AccessibilityEnableScriptInjectionPreference mToggleScriptInjectionPreference;
+ private Preference mNoServicesMessagePreference;
private int mLongPressTimeoutDefault;
containerView.setGravity(Gravity.CENTER);
TextView summaryView = (TextView) view.findViewById(R.id.summary);
- String title = getString(R.string.accessibility_service_no_apps_title);
+ String title = getString(R.string.accessibility_no_services_installed);
summaryView.setText(title);
}
};
}
}
- private Preference mNoServicesMessagePreference;
-
private void updateSystemPreferences() {
// Large text.
try {
mToggleAutoRotateScreenPreference.setChecked(autoRotationEnabled);
// Touch exploration enabled.
- final boolean touchExplorationEnabled = (Settings.Secure.getInt(getContentResolver(),
- Settings.Secure.TOUCH_EXPLORATION_ENABLED, 0) == 1);
- if (touchExplorationEnabled) {
- mToggleTouchExplorationPreference.setSummary(
- getString(R.string.accessibility_service_state_on));
- mToggleTouchExplorationPreference.getExtras().putBoolean(EXTRA_CHECKED, true);
+ if (AccessibilityManager.getInstance(getActivity()).isEnabled()) {
+ mSystemsCategory.addPreference(mToggleTouchExplorationPreference);
+ final boolean touchExplorationEnabled = (Settings.Secure.getInt(getContentResolver(),
+ Settings.Secure.TOUCH_EXPLORATION_ENABLED, 0) == 1);
+ if (touchExplorationEnabled) {
+ mToggleTouchExplorationPreference.setSummary(
+ getString(R.string.accessibility_service_state_on));
+ mToggleTouchExplorationPreference.getExtras().putBoolean(EXTRA_CHECKED, true);
+ } else {
+ mToggleTouchExplorationPreference.setSummary(
+ getString(R.string.accessibility_service_state_off));
+ mToggleTouchExplorationPreference.getExtras().putBoolean(EXTRA_CHECKED, false);
+ }
+
} else {
- mToggleTouchExplorationPreference.setSummary(
- getString(R.string.accessibility_service_state_off));
- mToggleTouchExplorationPreference.getExtras().putBoolean(EXTRA_CHECKED, false);
+ mSystemsCategory.removePreference(mToggleTouchExplorationPreference);
}
// Long press timeout.
}
private void offerInstallAccessibilitySerivceOnce() {
- if (mServicesCategory.getPreferenceCount() > 0) {
+ // There is always one preference - if no services it is just a message.
+ if (mServicesCategory.getPreference(0) != mNoServicesMessagePreference) {
return;
}
SharedPreferences preferences = getActivity().getPreferences(Context.MODE_PRIVATE);
// Enabling the first service enables accessibility.
Settings.Secure.putInt(getContentResolver(),
Settings.Secure.ACCESSIBILITY_ENABLED, 1);
-
} else if (length > 0) {
enabledServices += ENABLED_ACCESSIBILITY_SERVICES_SEPARATOR + preferenceKey;
Settings.Secure.putString(getContentResolver(),