Loading res/values-sw300dp-land-v31/dimens.xmldeleted 100644 → 0 +0 −19 Original line number Diff line number Diff line <?xml version="1.0" encoding="utf-8"?> <!-- Copyright (C) 2021 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. --> <resources> <!-- Top margin for preview view pager --> <dimen name="preview_size_top_margin">0dp</dimen> </resources> No newline at end of file res/values/config.xml +3 −0 Original line number Diff line number Diff line Loading @@ -529,6 +529,9 @@ <!-- Whether to show Smart Storage toggle --> <bool name="config_show_smart_storage_toggle">true</bool> <!-- Whether suw to support two panes --> <bool name="config_suw_supported_two_panes">false</bool> <!-- Display settings screen, Color mode options. Must be the same length and order as config_color_mode_options_values below. Only the values that also appear in frameworks/base/core/res/res/values/config.xml's config_availableColorModes are shown. --> Loading src/com/android/settings/accessibility/AccessibilityScreenSizeForSetupWizardActivity.java +15 −2 Original line number Diff line number Diff line Loading @@ -21,6 +21,7 @@ import android.app.settings.SettingsEnums; import android.content.Intent; import android.os.Bundle; import android.view.View; import android.widget.LinearLayout; import android.widget.ScrollView; import android.widget.TextView; Loading Loading @@ -69,7 +70,7 @@ public class AccessibilityScreenSizeForSetupWizardActivity extends InstrumentedA ? R.style.SudDynamicColorThemeGlifV3_DayNight : R.style.SudThemeGlifV3_DayNight; setTheme(appliedTheme); setContentView(R.layout.accessibility_screen_size_setup_wizard); generateHeader(); updateHeaderLayout(); scrollToBottom(); initFooterButton(); if (savedInstanceState == null) { Loading Loading @@ -101,7 +102,15 @@ public class AccessibilityScreenSizeForSetupWizardActivity extends InstrumentedA } @VisibleForTesting void generateHeader() { void updateHeaderLayout() { if (ThemeHelper.shouldApplyExtendedPartnerConfig(this) && isSuwSupportedTwoPanes()) { final GlifLayout layout = findViewById(R.id.setup_wizard_layout); final LinearLayout headerLayout = layout.findManagedViewById(R.id.sud_layout_header); if (headerLayout != null) { headerLayout.setPadding(0, layout.getPaddingTop(), 0, layout.getPaddingBottom()); } } ((TextView) findViewById(R.id.suc_layout_title)).setText( getFragmentType(getIntent()) == FragmentType.FONT_SIZE ? R.string.title_font_size Loading @@ -112,6 +121,10 @@ public class AccessibilityScreenSizeForSetupWizardActivity extends InstrumentedA : R.string.screen_zoom_short_summary); } private boolean isSuwSupportedTwoPanes() { return getResources().getBoolean(R.bool.config_suw_supported_two_panes); } private void initFooterButton() { final GlifLayout layout = findViewById(R.id.setup_wizard_layout); final FooterBarMixin mixin = layout.getMixin(FooterBarMixin.class); Loading tests/robotests/src/com/android/settings/accessibility/AccessibilityScreenSizeForSetupWizardActivityTest.java +2 −2 Original line number Diff line number Diff line Loading @@ -126,14 +126,14 @@ public class AccessibilityScreenSizeForSetupWizardActivityTest { } @Test public void generateHeader_displaySizePage_returnDisplaySizeTitle() { public void updateHeaderLayout_displaySizePage_returnDisplaySizeTitle() { final Intent intent = new Intent(); intent.putExtra(VISION_FRAGMENT_NO, FragmentType.SCREEN_SIZE); intent.putExtra(EXTRA_PAGE_TRANSITION_TYPE, TransitionType.TRANSITION_FADE); final AccessibilityScreenSizeForSetupWizardActivity activity = Robolectric.buildActivity( AccessibilityScreenSizeForSetupWizardActivity.class, intent).get(); activity.setContentView(R.layout.accessibility_screen_size_setup_wizard); activity.generateHeader(); activity.updateHeaderLayout(); final GlifLayout layout = activity.findViewById(R.id.setup_wizard_layout); assertThat(layout.getHeaderText()).isEqualTo(mContext.getText(R.string.screen_zoom_title)); } Loading Loading
res/values-sw300dp-land-v31/dimens.xmldeleted 100644 → 0 +0 −19 Original line number Diff line number Diff line <?xml version="1.0" encoding="utf-8"?> <!-- Copyright (C) 2021 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. --> <resources> <!-- Top margin for preview view pager --> <dimen name="preview_size_top_margin">0dp</dimen> </resources> No newline at end of file
res/values/config.xml +3 −0 Original line number Diff line number Diff line Loading @@ -529,6 +529,9 @@ <!-- Whether to show Smart Storage toggle --> <bool name="config_show_smart_storage_toggle">true</bool> <!-- Whether suw to support two panes --> <bool name="config_suw_supported_two_panes">false</bool> <!-- Display settings screen, Color mode options. Must be the same length and order as config_color_mode_options_values below. Only the values that also appear in frameworks/base/core/res/res/values/config.xml's config_availableColorModes are shown. --> Loading
src/com/android/settings/accessibility/AccessibilityScreenSizeForSetupWizardActivity.java +15 −2 Original line number Diff line number Diff line Loading @@ -21,6 +21,7 @@ import android.app.settings.SettingsEnums; import android.content.Intent; import android.os.Bundle; import android.view.View; import android.widget.LinearLayout; import android.widget.ScrollView; import android.widget.TextView; Loading Loading @@ -69,7 +70,7 @@ public class AccessibilityScreenSizeForSetupWizardActivity extends InstrumentedA ? R.style.SudDynamicColorThemeGlifV3_DayNight : R.style.SudThemeGlifV3_DayNight; setTheme(appliedTheme); setContentView(R.layout.accessibility_screen_size_setup_wizard); generateHeader(); updateHeaderLayout(); scrollToBottom(); initFooterButton(); if (savedInstanceState == null) { Loading Loading @@ -101,7 +102,15 @@ public class AccessibilityScreenSizeForSetupWizardActivity extends InstrumentedA } @VisibleForTesting void generateHeader() { void updateHeaderLayout() { if (ThemeHelper.shouldApplyExtendedPartnerConfig(this) && isSuwSupportedTwoPanes()) { final GlifLayout layout = findViewById(R.id.setup_wizard_layout); final LinearLayout headerLayout = layout.findManagedViewById(R.id.sud_layout_header); if (headerLayout != null) { headerLayout.setPadding(0, layout.getPaddingTop(), 0, layout.getPaddingBottom()); } } ((TextView) findViewById(R.id.suc_layout_title)).setText( getFragmentType(getIntent()) == FragmentType.FONT_SIZE ? R.string.title_font_size Loading @@ -112,6 +121,10 @@ public class AccessibilityScreenSizeForSetupWizardActivity extends InstrumentedA : R.string.screen_zoom_short_summary); } private boolean isSuwSupportedTwoPanes() { return getResources().getBoolean(R.bool.config_suw_supported_two_panes); } private void initFooterButton() { final GlifLayout layout = findViewById(R.id.setup_wizard_layout); final FooterBarMixin mixin = layout.getMixin(FooterBarMixin.class); Loading
tests/robotests/src/com/android/settings/accessibility/AccessibilityScreenSizeForSetupWizardActivityTest.java +2 −2 Original line number Diff line number Diff line Loading @@ -126,14 +126,14 @@ public class AccessibilityScreenSizeForSetupWizardActivityTest { } @Test public void generateHeader_displaySizePage_returnDisplaySizeTitle() { public void updateHeaderLayout_displaySizePage_returnDisplaySizeTitle() { final Intent intent = new Intent(); intent.putExtra(VISION_FRAGMENT_NO, FragmentType.SCREEN_SIZE); intent.putExtra(EXTRA_PAGE_TRANSITION_TYPE, TransitionType.TRANSITION_FADE); final AccessibilityScreenSizeForSetupWizardActivity activity = Robolectric.buildActivity( AccessibilityScreenSizeForSetupWizardActivity.class, intent).get(); activity.setContentView(R.layout.accessibility_screen_size_setup_wizard); activity.generateHeader(); activity.updateHeaderLayout(); final GlifLayout layout = activity.findViewById(R.id.setup_wizard_layout); assertThat(layout.getHeaderText()).isEqualTo(mContext.getText(R.string.screen_zoom_title)); } Loading