Merge "fix(tablet assets): update a11y button navigation asset for tablets" into tm-qpr-dev am: aa189347fb

Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/21466796

Change-Id: If09f5e93946ec39b2a8848de07b9c331f2a57dfb
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
Menghan Li
2023-02-18 03:36:43 +00:00
committed by Automerger Merge Worker
5 changed files with 113 additions and 2 deletions

View File

@@ -0,0 +1,54 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (C) 2023 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.
-->
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="412dp"
android:height="300dp"
android:viewportWidth="412"
android:viewportHeight="300">
<path
android:pathData="M28,0L384,0A28,28 0,0 1,412 28L412,272A28,28 0,0 1,384 300L28,300A28,28 0,0 1,0 272L0,28A28,28 0,0 1,28 0z"
android:fillColor="#000000"/>
<group>
<clip-path
android:pathData="M62.23,50.19L349.77,50.19A16,16 0,0 1,365.77 66.19L365.77,236.14A16,16 0,0 1,349.77 252.14L62.23,252.14A16,16 0,0 1,46.23 236.14L46.23,66.19A16,16 0,0 1,62.23 50.19z"/>
<path
android:pathData="M46.23,204.14h320v48h-320z"
android:fillColor="#3D4043"/>
<path
android:pathData="M268.93,214.14C270.43,214.14 271.63,215.34 271.63,216.84C271.63,218.34 270.43,219.54 268.93,219.54C267.43,219.54 266.23,218.34 266.23,216.84C266.23,215.34 267.43,214.14 268.93,214.14ZM273.03,223.64V241.24H270.23V233.14H267.53V241.24H264.83V223.64C262.13,223.44 259.23,222.94 256.73,222.24L257.43,219.54C260.93,220.44 265.13,220.94 268.93,220.94C272.73,220.94 276.93,220.54 280.43,219.54L281.13,222.24C278.63,222.94 275.73,223.44 273.03,223.64Z"
android:fillColor="#ffffff"/>
<path
android:pathData="M206.23,238.04C211.42,238.04 215.63,233.83 215.63,228.64C215.63,223.45 211.42,219.24 206.23,219.24C201.04,219.24 196.83,223.45 196.83,228.64C196.83,233.83 201.04,238.04 206.23,238.04Z"
android:fillColor="#808589"/>
<path
android:pathData="M131.33,228.64L147.33,237.84V219.34L131.33,228.64Z"
android:fillColor="#808589"/>
</group>
<path
android:pathData="M62.23,51.69L349.77,51.69A14.5,14.5 0,0 1,364.27 66.19L364.27,236.14A14.5,14.5 0,0 1,349.77 250.64L62.23,250.64A14.5,14.5 0,0 1,47.73 236.14L47.73,66.19A14.5,14.5 0,0 1,62.23 51.69z"
android:strokeWidth="3"
android:fillColor="#00000000"
android:strokeColor="#80868B"/>
<path
android:pathData="M311.45,50.35C311.45,48.98 312.56,47.87 313.92,47.87L322.84,47.87C324.2,47.87 325.32,48.98 325.32,50.35L319.37,51.34L311.45,50.35Z"
android:fillColor="#80868B"/>
<path
android:pathData="M263.59,50.35C263.59,48.98 264.7,47.87 266.06,47.87L287.85,47.87C289.22,47.87 290.33,48.98 290.33,50.35L277.45,51.34L263.59,50.35Z"
android:fillColor="#80868B"/>
<path
android:pathData="M268.93,259.69C251.31,259.69 236.93,245.3 236.93,227.69C236.93,210.07 251.31,195.69 268.93,195.69C286.55,195.69 300.93,210.07 300.93,227.69C300.93,245.3 286.55,259.69 268.93,259.69ZM268.93,198.38C252.84,198.38 239.72,211.51 239.72,227.6C239.72,243.69 252.84,256.81 268.93,256.81C285.02,256.81 298.14,243.69 298.14,227.6C298.14,211.51 285.02,198.38 268.93,198.38Z"
android:fillColor="#729CEE"/>
</vector>

View File

@@ -0,0 +1,54 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (C) 2023 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.
-->
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="412dp"
android:height="300dp"
android:viewportWidth="412"
android:viewportHeight="300">
<path
android:pathData="M28,0L384,0A28,28 0,0 1,412 28L412,272A28,28 0,0 1,384 300L28,300A28,28 0,0 1,0 272L0,28A28,28 0,0 1,28 0z"
android:fillColor="#ffffff"/>
<group>
<clip-path
android:pathData="M62.23,50.19L349.77,50.19A16,16 0,0 1,365.77 66.19L365.77,236.14A16,16 0,0 1,349.77 252.14L62.23,252.14A16,16 0,0 1,46.23 236.14L46.23,66.19A16,16 0,0 1,62.23 50.19z"/>
<path
android:pathData="M46.23,204.14h320v48h-320z"
android:fillColor="#000000"/>
<path
android:pathData="M268.93,214.14C270.43,214.14 271.63,215.34 271.63,216.84C271.63,218.34 270.43,219.54 268.93,219.54C267.43,219.54 266.23,218.34 266.23,216.84C266.23,215.34 267.43,214.14 268.93,214.14ZM273.03,223.64V241.24H270.23V233.14H267.53V241.24H264.83V223.64C262.13,223.44 259.23,222.94 256.73,222.24L257.43,219.54C260.93,220.44 265.13,220.94 268.93,220.94C272.73,220.94 276.93,220.54 280.43,219.54L281.13,222.24C278.63,222.94 275.73,223.44 273.03,223.64Z"
android:fillColor="#ffffff"/>
<path
android:pathData="M206.23,238.04C211.42,238.04 215.63,233.83 215.63,228.64C215.63,223.45 211.42,219.24 206.23,219.24C201.04,219.24 196.83,223.45 196.83,228.64C196.83,233.83 201.04,238.04 206.23,238.04Z"
android:fillColor="#BDC0C4"/>
<path
android:pathData="M131.33,228.64L147.33,237.84V219.34L131.33,228.64Z"
android:fillColor="#BDC0C4"/>
</group>
<path
android:pathData="M62.23,51.69L349.77,51.69A14.5,14.5 0,0 1,364.27 66.19L364.27,236.14A14.5,14.5 0,0 1,349.77 250.64L62.23,250.64A14.5,14.5 0,0 1,47.73 236.14L47.73,66.19A14.5,14.5 0,0 1,62.23 51.69z"
android:strokeWidth="3"
android:fillColor="#00000000"
android:strokeColor="#DADCE0"/>
<path
android:pathData="M311.45,50.35C311.45,48.98 312.56,47.87 313.92,47.87L322.84,47.87C324.2,47.87 325.32,48.98 325.32,50.35L319.37,51.34L311.45,50.35Z"
android:fillColor="#DADCE0"/>
<path
android:pathData="M263.59,50.35C263.59,48.98 264.7,47.87 266.06,47.87L287.85,47.87C289.22,47.87 290.33,48.98 290.33,50.35L277.45,51.34L263.59,50.35Z"
android:fillColor="#DADCE0"/>
<path
android:pathData="M268.93,259.69C251.31,259.69 236.93,245.3 236.93,227.69C236.93,210.07 251.31,195.69 268.93,195.69C286.55,195.69 300.93,210.07 300.93,227.69C300.93,245.3 286.55,259.69 268.93,259.69ZM268.93,198.38C252.84,198.38 239.72,211.51 239.72,227.6C239.72,243.69 252.84,256.81 268.93,256.81C285.02,256.81 298.14,243.69 298.14,227.6C298.14,211.51 285.02,198.38 268.93,198.38Z"
android:fillColor="#729CEE"/>
</vector>

View File

@@ -32,6 +32,9 @@
<drawable name="a11y_button_preview_two_finger" product="default">@drawable/accessibility_button_preview_two_finger</drawable>
<drawable name="a11y_button_preview_two_finger" product="tablet">@drawable/accessibility_button_preview_two_finger_tablet</drawable>
<drawable name="a11y_button_navigation" product="default">@drawable/accessibility_button_navigation</drawable>
<drawable name="a11y_button_navigation" product="tablet">@drawable/accessibility_button_navigation_tablet</drawable>
<drawable name="a11y_captioning_banner" product="default">@drawable/accessibility_captioning_banner</drawable>
<drawable name="a11y_captioning_banner" product="tablet">@drawable/accessibility_captioning_banner_tablet</drawable>

View File

@@ -122,7 +122,7 @@ public class AccessibilityButtonPreviewPreferenceController extends BasePreferen
: R.drawable.a11y_button_preview_two_finger));
} else {
mIllustrationPreference.setImageDrawable(
mContext.getDrawable(R.drawable.accessibility_button_navigation));
mContext.getDrawable(R.drawable.a11y_button_navigation));
}
}

View File

@@ -74,7 +74,7 @@ public class AccessibilityButtonPreviewPreferenceControllerTest {
mController.mContentObserver.onChange(false);
final Drawable navigationBarDrawable = mContext.getDrawable(
R.drawable.accessibility_button_navigation);
R.drawable.a11y_button_navigation);
assertThat(drawableToBitmap(mController.mIllustrationPreference.getImageDrawable()).sameAs(
drawableToBitmap(navigationBarDrawable))).isTrue();
}