Revert to fix build breakage.

Revert "Add A11y SUW hub page. Minor alterations of Magnification screen to be consistent wtih most recent desigs."

This reverts commit bf95133f75.

Change-Id: I4559dfdcf5c0f6eea316a190d507a3bccd195149
This commit is contained in:
Anna Galusza
2016-01-06 21:42:43 +00:00
parent bf95133f75
commit 44be967e95
7 changed files with 2 additions and 227 deletions

View File

@@ -1,48 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (C) 2015 The Android Open Source Project
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<!-- Layout for a ButtonPreference. -->
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:paddingBottom="@dimen/accessibility_button_preference_padding_top_bottom"
android:paddingTop="@dimen/accessibility_button_preference_padding_top_bottom"
android:paddingStart="@dimen/accessibility_layout_margin_start_end"
android:paddingEnd="@dimen/accessibility_layout_margin_start_end"
android:focusable="true"
android:selectable="false"
android:persistent="false" >
<TextView xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+android:id/title"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:textAppearance="?android:attr/textAppearanceLarge"
android:selectable="true"
android:persistent="false"
android:gravity="left|center" />
<TextView xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+android:id/summary"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:textAppearance="?android:attr/textAppearanceSmall"
android:selectable="true"
android:persistent="false"
android:gravity="left|center" />
</LinearLayout>

View File

@@ -264,8 +264,4 @@
<!-- Display, Screen zoom -->
<dimen name="screen_zoom_preview_height">240dp</dimen>
<!-- Accessibility Settings -->
<dimen name="accessibility_layout_margin_start_end">24dp</dimen>
<dimen name="accessibility_button_preference_padding_top_bottom">18dp</dimen>
</resources>

View File

@@ -3623,8 +3623,6 @@
<string name="accessibility_settings">Accessibility</string>
<!-- Settings title for accessibility settings screen -->
<string name="accessibility_settings_title">Accessibility settings</string>
<!-- Settings title for a brief version of Accessibility Settings, as displayed in Setup Wizard -->
<string name="accessibility_settings_for_setup_wizard_title">Guide me</string>
<!-- Title for the accessibility preference category of accessibility services. [CHAR LIMIT=25] -->
<string name="accessibility_services_title">Services</string>
<!-- Title for the accessibility preference category of system related preferences. [CHAR LIMIT=25] -->
@@ -3636,7 +3634,7 @@
<!-- Title for the accessibility preference screen to enable screen magnification. [CHAR LIMIT=35] -->
<string name="accessibility_screen_magnification_title">Magnification gestures</string>
<!-- Summary for the accessibility preference screen to enable screen magnification. [CHAR LIMIT=none] -->
<string name="accessibility_screen_magnification_summary">Zoom in and out by triple-tapping the screen with one finger.\n\nWhile zoomed in, you can:\n<ul><li>Pan: Drag two or more fingers across the screen.</li>\n<li>Adjust zoom level: Pinch two or more fingers together or spread them apart.</li>\n<li>Temporariliy magnify: Triple-tap, hold, and drag your finger to explore different parts of the screen. Lift your finger to return to our previous state.</li></ul>\n\nTriple-tap for magnification works everywhere except the keyboard and navigation bar.</string>
<string name="accessibility_screen_magnification_summary">When this feature is turned on, you can zoom in and out by triple-tapping the screen.\n\nWhile zoomed in, you can:\n<ul><li>Pan: Drag two or more fingers across the screen.</li>\n<li>Adjust zoom level: Pinch two or more fingers together or spread them apart.</li></ul>\n\nYou can also temporarily magnify what\u2019s under your finger by triple-tapping and holding. In this magnified state, you can drag your finger to explore different parts of the screen. Lift your finger to return to your previous state.\n\nNote: Triple-tap for magnification works everywhere except the keyboard and navigation bar.</string>
<!-- Title for the preference to enable the global geture that turns on accessibility. [CHAR LIMIT=35] -->
<string name="accessibility_global_gesture_preference_title">Accessibility shortcut</string>
<!-- Summary for the preference to enable the global geture that turns on accessibility (on state). [CHAR LIMIT=60] -->

View File

@@ -16,13 +16,7 @@
<PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:settings="http://schemas.android.com/apk/res/com.android.settings"
android:title="@string/accessibility_settings"
android:persistent="true">
<PreferenceScreen
android:key="accessibility_settings_for_setup_wizard"
android:title="@string/accessibility_settings_for_setup_wizard_title"
android:fragment="com.android.settings.accessibility.AccessibilitySettingsForSetupWizard" />
android:title="@string/accessibility_settings">
<PreferenceCategory
android:key="services_category"

View File

@@ -1,50 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (C) 2009 The Android Open Source Project
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:settings="http://schemas.android.com/apk/res/com.android.settings"
android:title="@string/accessibility_settings_title"
android:persistent="true" >
<Preference
android:fragment="com.android.settings.accessibility.ToggleScreenMagnificationPreferenceFragment"
android:key="screen_magnification_preference"
android:layout="@layout/preference_button"
android:title="@string/accessibility_screen_magnification_title" />
<Preference
android:key="font_size_preference"
android:layout="@layout/preference_button"
android:title="@string/title_font_size" />
<com.android.settings.DisplayDensityPreference
android:key="force_density_preference"
android:layout="@layout/preference_button"
settings:keywords="@string/force_density_keywords"
android:title="@string/force_density_preference_title"
android:summary="%s" />
<Preference
android:fragment="com.android.settings.accessibility.ToggleDaltonizerPreferenceFragment"
android:key="daltonizer_preference"
android:layout="@layout/preference_button"
android:title="@string/accessibility_display_daltonizer_preference_title" />
<Preference
android:key="talkback_preference"
android:layout="@layout/preference_button" />
</PreferenceScreen>

View File

@@ -554,7 +554,6 @@ public class AccessibilitySettings extends SettingsPreferenceFragment implements
}
mToggleLargeTextPreference.setChecked(mCurConfig.fontScale == LARGE_FONT_SCALE);
// Text contrast.
mToggleHighTextContrastPreference.setChecked(
Settings.Secure.getInt(getContentResolver(),
Settings.Secure.ACCESSIBILITY_HIGH_TEXT_CONTRAST_ENABLED, 0) == 1);

View File

@@ -1,114 +0,0 @@
/*
* Copyright (C) 2015 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.android.settings.accessibility;
import android.os.Bundle;
import android.provider.Settings;
import android.support.v7.preference.Preference;
import com.android.internal.logging.MetricsLogger;
import com.android.settings.DialogCreatable;
import com.android.settings.R;
import com.android.settings.SettingsPreferenceFragment;
/**
* Activity with the accessibility settings specific to Setup Wizard.
*/
public class AccessibilitySettingsForSetupWizard extends SettingsPreferenceFragment
implements DialogCreatable, Preference.OnPreferenceChangeListener {
// Preferences
private static final String DISPLAY_MAGNIFICATION_PREFERENCE =
"screen_magnification_preference";
private static final String DISPLAY_DALTONIZER_PREFERENCE = "daltonizer_preference";
private static final String TALKBACK_PREFERENCE = "talkback_preference";
private static final String TALKBACK_NAME = "Talkback";
// Preference controls.
private Preference mDisplayMagnificationPreference;
private Preference mDisplayDaltonizerPreference;
private Preference mTalkbackPreference;
@Override
protected int getMetricsCategory() {
return MetricsLogger.ACCESSIBILITY;
}
@Override
protected int getHelpResource() {
return R.string.help_uri_accessibility;
}
@Override
public void onCreate(Bundle icicle) {
super.onCreate(icicle);
addPreferencesFromResource(R.xml.accessibility_settings_for_setup_wizard);
mDisplayMagnificationPreference = findPreference(DISPLAY_MAGNIFICATION_PREFERENCE);
mDisplayDaltonizerPreference = findPreference(DISPLAY_DALTONIZER_PREFERENCE);
mTalkbackPreference = findPreference(TALKBACK_PREFERENCE);
mTalkbackPreference.setTitle(TALKBACK_NAME);
}
@Override
public void onActivityCreated(Bundle savedInstanceState) {
super.onActivityCreated(savedInstanceState);
setHasOptionsMenu(false);
}
@Override
public void onResume() {
super.onResume();
updatePreferences();
}
@Override
public boolean onPreferenceChange(Preference preference, Object newValue) {
return false;
}
@Override
public boolean onPreferenceTreeClick(Preference preference) {
if (mDisplayMagnificationPreference == preference) {
Bundle extras = mDisplayMagnificationPreference.getExtras();
extras.putString(AccessibilitySettings.EXTRA_TITLE,
getString(R.string.accessibility_screen_magnification_title));
extras.putCharSequence(AccessibilitySettings.EXTRA_SUMMARY,
getActivity().getResources().getText(
R.string.accessibility_screen_magnification_summary));
extras.putBoolean(AccessibilitySettings.EXTRA_CHECKED,
Settings.Secure.getInt(getContentResolver(),
Settings.Secure.ACCESSIBILITY_DISPLAY_MAGNIFICATION_ENABLED, 0) == 1);
}
return super.onPreferenceTreeClick(preference);
}
private void updatePreferences() {
updateFeatureSummary(Settings.Secure.ACCESSIBILITY_DISPLAY_MAGNIFICATION_ENABLED,
mDisplayMagnificationPreference);
updateFeatureSummary(Settings.Secure.ACCESSIBILITY_DISPLAY_DALTONIZER_ENABLED,
mDisplayDaltonizerPreference);
}
private void updateFeatureSummary(String prefKey, Preference pref) {
final boolean enabled = Settings.Secure.getInt(getContentResolver(), prefKey, 0) == 1;
pref.setSummary(enabled ? R.string.accessibility_feature_state_on
: R.string.accessibility_feature_state_off);
}
}