Snap for 11914274 from 38236869ee to 24Q3-release

Change-Id: Ia0c390e17bc222b39848ef554b1cd45d8905393b
This commit is contained in:
Android Build Coastguard Worker
2024-06-01 01:22:10 +00:00
83 changed files with 11020 additions and 3217 deletions

View File

@@ -661,12 +661,12 @@
priority="4"
summary="Using hardcoded color"
explanation="Hardcoded color values are bad because theme changes cannot be uniformly applied.Instead use the theme specific colors such as `?android:attr/textColorPrimary` in attributes.
This ensures that a theme change from a light to a dark theme can be uniformlyapplied across the app."
errorLine1=" android:textColor="@color/power_anomaly_primary_button_text_color""
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
errorLine1=" <item android:offset="0" android:color="#00669DF6"/>"
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
file="res/layout/battery_tips_card.xml"
line="58"
column="13"/>
file="res/drawable-night/accessibility_shortcut_type_gesture_preview.xml"
line="26"
column="34"/>
</issue>
<issue
@@ -677,12 +677,300 @@
priority="4"
summary="Using hardcoded color"
explanation="Hardcoded color values are bad because theme changes cannot be uniformly applied.Instead use the theme specific colors such as `?android:attr/textColorPrimary` in attributes.&#xA;This ensures that a theme change from a light to a dark theme can be uniformlyapplied across the app."
errorLine1=" android:textColor=&quot;@color/power_anomaly_primary_button_text_color&quot;"
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
errorLine1=" &lt;item android:offset=&quot;0&quot; android:color=&quot;#001A73E8&quot;/>"
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
file="res/layout/battery_tips_card.xml"
line="58"
column="13"/>
file="res/drawable/accessibility_shortcut_type_gesture_preview.xml"
line="26"
column="34"/>
</issue>
<issue
id="HardCodedColor"
severity="Error"
message="Avoid using hardcoded color"
category="Correctness"
priority="4"
summary="Using hardcoded color"
explanation="Hardcoded color values are bad because theme changes cannot be uniformly applied.Instead use the theme specific colors such as `?android:attr/textColorPrimary` in attributes.&#xA;This ensures that a theme change from a light to a dark theme can be uniformlyapplied across the app."
errorLine1=" &lt;item android:offset=&quot;0.69&quot; android:color=&quot;#FF669DF6&quot;/>"
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
file="res/drawable-night/accessibility_shortcut_type_gesture_preview.xml"
line="27"
column="37"/>
</issue>
<issue
id="HardCodedColor"
severity="Error"
message="Avoid using hardcoded color"
category="Correctness"
priority="4"
summary="Using hardcoded color"
explanation="Hardcoded color values are bad because theme changes cannot be uniformly applied.Instead use the theme specific colors such as `?android:attr/textColorPrimary` in attributes.&#xA;This ensures that a theme change from a light to a dark theme can be uniformlyapplied across the app."
errorLine1=" &lt;item android:offset=&quot;0.69&quot; android:color=&quot;#FF669DF6&quot;/>"
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
file="res/drawable/accessibility_shortcut_type_gesture_preview.xml"
line="27"
column="37"/>
</issue>
<issue
id="HardCodedColor"
severity="Error"
message="Avoid using hardcoded color"
category="Correctness"
priority="4"
summary="Using hardcoded color"
explanation="Hardcoded color values are bad because theme changes cannot be uniformly applied.Instead use the theme specific colors such as `?android:attr/textColorPrimary` in attributes.&#xA;This ensures that a theme change from a light to a dark theme can be uniformlyapplied across the app."
errorLine1=" &lt;item android:offset=&quot;0&quot; android:color=&quot;#00669DF6&quot;/>"
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
file="res/drawable-night/accessibility_shortcut_type_gesture_preview.xml"
line="40"
column="34"/>
</issue>
<issue
id="HardCodedColor"
severity="Error"
message="Avoid using hardcoded color"
category="Correctness"
priority="4"
summary="Using hardcoded color"
explanation="Hardcoded color values are bad because theme changes cannot be uniformly applied.Instead use the theme specific colors such as `?android:attr/textColorPrimary` in attributes.&#xA;This ensures that a theme change from a light to a dark theme can be uniformlyapplied across the app."
errorLine1=" &lt;item android:offset=&quot;0&quot; android:color=&quot;#001A73E8&quot;/>"
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
file="res/drawable/accessibility_shortcut_type_gesture_preview.xml"
line="40"
column="34"/>
</issue>
<issue
id="HardCodedColor"
severity="Error"
message="Avoid using hardcoded color"
category="Correctness"
priority="4"
summary="Using hardcoded color"
explanation="Hardcoded color values are bad because theme changes cannot be uniformly applied.Instead use the theme specific colors such as `?android:attr/textColorPrimary` in attributes.&#xA;This ensures that a theme change from a light to a dark theme can be uniformlyapplied across the app."
errorLine1=" &lt;item android:offset=&quot;0.69&quot; android:color=&quot;#FF669DF6&quot;/>"
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
file="res/drawable-night/accessibility_shortcut_type_gesture_preview.xml"
line="41"
column="37"/>
</issue>
<issue
id="HardCodedColor"
severity="Error"
message="Avoid using hardcoded color"
category="Correctness"
priority="4"
summary="Using hardcoded color"
explanation="Hardcoded color values are bad because theme changes cannot be uniformly applied.Instead use the theme specific colors such as `?android:attr/textColorPrimary` in attributes.&#xA;This ensures that a theme change from a light to a dark theme can be uniformlyapplied across the app."
errorLine1=" &lt;item android:offset=&quot;0.69&quot; android:color=&quot;#FF669DF6&quot;/>"
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
file="res/drawable/accessibility_shortcut_type_gesture_preview.xml"
line="41"
column="37"/>
</issue>
<issue
id="HardCodedColor"
severity="Error"
message="Avoid using hardcoded color"
category="Correctness"
priority="4"
summary="Using hardcoded color"
explanation="Hardcoded color values are bad because theme changes cannot be uniformly applied.Instead use the theme specific colors such as `?android:attr/textColorPrimary` in attributes.&#xA;This ensures that a theme change from a light to a dark theme can be uniformlyapplied across the app."
errorLine1=" &lt;item android:offset=&quot;0&quot; android:color=&quot;#00669DF6&quot;/>"
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
file="res/drawable-night/accessibility_shortcut_type_gesture_preview_screen_reader_on.xml"
line="26"
column="34"/>
</issue>
<issue
id="HardCodedColor"
severity="Error"
message="Avoid using hardcoded color"
category="Correctness"
priority="4"
summary="Using hardcoded color"
explanation="Hardcoded color values are bad because theme changes cannot be uniformly applied.Instead use the theme specific colors such as `?android:attr/textColorPrimary` in attributes.&#xA;This ensures that a theme change from a light to a dark theme can be uniformlyapplied across the app."
errorLine1=" &lt;item android:offset=&quot;0&quot; android:color=&quot;#001A73E8&quot;/>"
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
file="res/drawable/accessibility_shortcut_type_gesture_preview_screen_reader_on.xml"
line="26"
column="34"/>
</issue>
<issue
id="HardCodedColor"
severity="Error"
message="Avoid using hardcoded color"
category="Correctness"
priority="4"
summary="Using hardcoded color"
explanation="Hardcoded color values are bad because theme changes cannot be uniformly applied.Instead use the theme specific colors such as `?android:attr/textColorPrimary` in attributes.&#xA;This ensures that a theme change from a light to a dark theme can be uniformlyapplied across the app."
errorLine1=" &lt;item android:offset=&quot;0.69&quot; android:color=&quot;#FF669DF6&quot;/>"
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
file="res/drawable-night/accessibility_shortcut_type_gesture_preview_screen_reader_on.xml"
line="27"
column="37"/>
</issue>
<issue
id="HardCodedColor"
severity="Error"
message="Avoid using hardcoded color"
category="Correctness"
priority="4"
summary="Using hardcoded color"
explanation="Hardcoded color values are bad because theme changes cannot be uniformly applied.Instead use the theme specific colors such as `?android:attr/textColorPrimary` in attributes.&#xA;This ensures that a theme change from a light to a dark theme can be uniformlyapplied across the app."
errorLine1=" &lt;item android:offset=&quot;0.69&quot; android:color=&quot;#FF669DF6&quot;/>"
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
file="res/drawable/accessibility_shortcut_type_gesture_preview_screen_reader_on.xml"
line="27"
column="37"/>
</issue>
<issue
id="HardCodedColor"
severity="Error"
message="Avoid using hardcoded color"
category="Correctness"
priority="4"
summary="Using hardcoded color"
explanation="Hardcoded color values are bad because theme changes cannot be uniformly applied.Instead use the theme specific colors such as `?android:attr/textColorPrimary` in attributes.&#xA;This ensures that a theme change from a light to a dark theme can be uniformlyapplied across the app."
errorLine1=" &lt;item android:offset=&quot;0&quot; android:color=&quot;#00669DF6&quot;/>"
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
file="res/drawable-night/accessibility_shortcut_type_gesture_preview_screen_reader_on.xml"
line="40"
column="34"/>
</issue>
<issue
id="HardCodedColor"
severity="Error"
message="Avoid using hardcoded color"
category="Correctness"
priority="4"
summary="Using hardcoded color"
explanation="Hardcoded color values are bad because theme changes cannot be uniformly applied.Instead use the theme specific colors such as `?android:attr/textColorPrimary` in attributes.&#xA;This ensures that a theme change from a light to a dark theme can be uniformlyapplied across the app."
errorLine1=" &lt;item android:offset=&quot;0&quot; android:color=&quot;#001A73E8&quot;/>"
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
file="res/drawable/accessibility_shortcut_type_gesture_preview_screen_reader_on.xml"
line="40"
column="34"/>
</issue>
<issue
id="HardCodedColor"
severity="Error"
message="Avoid using hardcoded color"
category="Correctness"
priority="4"
summary="Using hardcoded color"
explanation="Hardcoded color values are bad because theme changes cannot be uniformly applied.Instead use the theme specific colors such as `?android:attr/textColorPrimary` in attributes.&#xA;This ensures that a theme change from a light to a dark theme can be uniformlyapplied across the app."
errorLine1=" &lt;item android:offset=&quot;0.69&quot; android:color=&quot;#FF669DF6&quot;/>"
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
file="res/drawable-night/accessibility_shortcut_type_gesture_preview_screen_reader_on.xml"
line="41"
column="37"/>
</issue>
<issue
id="HardCodedColor"
severity="Error"
message="Avoid using hardcoded color"
category="Correctness"
priority="4"
summary="Using hardcoded color"
explanation="Hardcoded color values are bad because theme changes cannot be uniformly applied.Instead use the theme specific colors such as `?android:attr/textColorPrimary` in attributes.&#xA;This ensures that a theme change from a light to a dark theme can be uniformlyapplied across the app."
errorLine1=" &lt;item android:offset=&quot;0.69&quot; android:color=&quot;#FF669DF6&quot;/>"
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
file="res/drawable/accessibility_shortcut_type_gesture_preview_screen_reader_on.xml"
line="41"
column="37"/>
</issue>
<issue
id="HardCodedColor"
severity="Error"
message="Avoid using hardcoded color"
category="Correctness"
priority="4"
summary="Using hardcoded color"
explanation="Hardcoded color values are bad because theme changes cannot be uniformly applied.Instead use the theme specific colors such as `?android:attr/textColorPrimary` in attributes.&#xA;This ensures that a theme change from a light to a dark theme can be uniformlyapplied across the app."
errorLine1=" &lt;item android:offset=&quot;0&quot; android:color=&quot;#00669DF6&quot;/>"
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
file="res/drawable-night/accessibility_shortcut_type_gesture_preview_screen_reader_on.xml"
line="54"
column="34"/>
</issue>
<issue
id="HardCodedColor"
severity="Error"
message="Avoid using hardcoded color"
category="Correctness"
priority="4"
summary="Using hardcoded color"
explanation="Hardcoded color values are bad because theme changes cannot be uniformly applied.Instead use the theme specific colors such as `?android:attr/textColorPrimary` in attributes.&#xA;This ensures that a theme change from a light to a dark theme can be uniformlyapplied across the app."
errorLine1=" &lt;item android:offset=&quot;0&quot; android:color=&quot;#001A73E8&quot;/>"
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
file="res/drawable/accessibility_shortcut_type_gesture_preview_screen_reader_on.xml"
line="54"
column="34"/>
</issue>
<issue
id="HardCodedColor"
severity="Error"
message="Avoid using hardcoded color"
category="Correctness"
priority="4"
summary="Using hardcoded color"
explanation="Hardcoded color values are bad because theme changes cannot be uniformly applied.Instead use the theme specific colors such as `?android:attr/textColorPrimary` in attributes.&#xA;This ensures that a theme change from a light to a dark theme can be uniformlyapplied across the app."
errorLine1=" &lt;item android:offset=&quot;0.69&quot; android:color=&quot;#FF669DF6&quot;/>"
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
file="res/drawable-night/accessibility_shortcut_type_gesture_preview_screen_reader_on.xml"
line="55"
column="37"/>
</issue>
<issue
id="HardCodedColor"
severity="Error"
message="Avoid using hardcoded color"
category="Correctness"
priority="4"
summary="Using hardcoded color"
explanation="Hardcoded color values are bad because theme changes cannot be uniformly applied.Instead use the theme specific colors such as `?android:attr/textColorPrimary` in attributes.&#xA;This ensures that a theme change from a light to a dark theme can be uniformlyapplied across the app."
errorLine1=" &lt;item android:offset=&quot;0.69&quot; android:color=&quot;#FF669DF6&quot;/>"
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
file="res/drawable/accessibility_shortcut_type_gesture_preview_screen_reader_on.xml"
line="55"
column="37"/>
</issue>
<issue
@@ -1325,22 +1613,6 @@
column="5"/>
</issue>
<issue
id="HardCodedColor"
severity="Error"
message="Avoid using hardcoded color"
category="Correctness"
priority="4"
summary="Using hardcoded color"
explanation="Hardcoded color values are bad because theme changes cannot be uniformly applied.Instead use the theme specific colors such as `?android:attr/textColorPrimary` in attributes.&#xA;This ensures that a theme change from a light to a dark theme can be uniformlyapplied across the app."
errorLine1=" &lt;color name=&quot;power_anomaly_primary_button_text_color&quot;>#2E3300&lt;/color>"
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
file="res/values-night/colors.xml"
line="61"
column="5"/>
</issue>
<issue
id="HardCodedColor"
severity="Error"
@@ -1373,6 +1645,22 @@
column="5"/>
</issue>
<issue
id="HardCodedColor"
severity="Error"
message="Avoid using hardcoded color"
category="Correctness"
priority="4"
summary="Using hardcoded color"
explanation="Hardcoded color values are bad because theme changes cannot be uniformly applied.Instead use the theme specific colors such as `?android:attr/textColorPrimary` in attributes.&#xA;This ensures that a theme change from a light to a dark theme can be uniformlyapplied across the app."
errorLine1=" &lt;color name=&quot;udfps_enroll_icon&quot;>#7DA7F1&lt;/color>"
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
file="res/values-night/colors.xml"
line="63"
column="5"/>
</issue>
<issue
id="HardCodedColor"
severity="Error"
@@ -1397,8 +1685,8 @@
priority="4"
summary="Using hardcoded color"
explanation="Hardcoded color values are bad because theme changes cannot be uniformly applied.Instead use the theme specific colors such as `?android:attr/textColorPrimary` in attributes.&#xA;This ensures that a theme change from a light to a dark theme can be uniformlyapplied across the app."
errorLine1=" &lt;color name=&quot;udfps_enroll_icon&quot;>#7DA7F1&lt;/color>"
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
errorLine1=" &lt;color name=&quot;udfps_moving_target_fill&quot;>#475670&lt;/color>"
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
file="res/values-night/colors.xml"
line="64"
@@ -1429,10 +1717,10 @@
priority="4"
summary="Using hardcoded color"
explanation="Hardcoded color values are bad because theme changes cannot be uniformly applied.Instead use the theme specific colors such as `?android:attr/textColorPrimary` in attributes.&#xA;This ensures that a theme change from a light to a dark theme can be uniformlyapplied across the app."
errorLine1=" &lt;color name=&quot;udfps_moving_target_fill&quot;>#475670&lt;/color>"
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
errorLine1=" &lt;color name=&quot;homepage_system_background&quot;>#9E9E9E&lt;/color>"
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
file="res/values-night/colors.xml"
file="res/values/colors.xml"
line="65"
column="5"/>
</issue>
@@ -1445,11 +1733,11 @@
priority="4"
summary="Using hardcoded color"
explanation="Hardcoded color values are bad because theme changes cannot be uniformly applied.Instead use the theme specific colors such as `?android:attr/textColorPrimary` in attributes.&#xA;This ensures that a theme change from a light to a dark theme can be uniformlyapplied across the app."
errorLine1=" &lt;color name=&quot;homepage_system_background&quot;>#9E9E9E&lt;/color>"
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
errorLine1=" &lt;color name=&quot;udfps_moving_target_fill_error&quot;>#80475670&lt;/color>"
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
file="res/values/colors.xml"
line="65"
file="res/values-night/colors.xml"
line="66"
column="5"/>
</issue>
@@ -1477,8 +1765,8 @@
priority="4"
summary="Using hardcoded color"
explanation="Hardcoded color values are bad because theme changes cannot be uniformly applied.Instead use the theme specific colors such as `?android:attr/textColorPrimary` in attributes.&#xA;This ensures that a theme change from a light to a dark theme can be uniformlyapplied across the app."
errorLine1=" &lt;color name=&quot;udfps_moving_target_fill_error&quot;>#80475670&lt;/color>"
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
errorLine1=" &lt;color name=&quot;udfps_enroll_progress&quot;>#7DA7F1&lt;/color>"
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
file="res/values-night/colors.xml"
line="67"
@@ -1509,8 +1797,8 @@
priority="4"
summary="Using hardcoded color"
explanation="Hardcoded color values are bad because theme changes cannot be uniformly applied.Instead use the theme specific colors such as `?android:attr/textColorPrimary` in attributes.&#xA;This ensures that a theme change from a light to a dark theme can be uniformlyapplied across the app."
errorLine1=" &lt;color name=&quot;udfps_enroll_progress&quot;>#7DA7F1&lt;/color>"
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
errorLine1=" &lt;color name=&quot;udfps_enroll_progress_help&quot;>#607DA7F1&lt;/color>"
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
file="res/values-night/colors.xml"
line="68"
@@ -1541,8 +1829,8 @@
priority="4"
summary="Using hardcoded color"
explanation="Hardcoded color values are bad because theme changes cannot be uniformly applied.Instead use the theme specific colors such as `?android:attr/textColorPrimary` in attributes.&#xA;This ensures that a theme change from a light to a dark theme can be uniformlyapplied across the app."
errorLine1=" &lt;color name=&quot;udfps_enroll_progress_help&quot;>#607DA7F1&lt;/color>"
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
errorLine1=" &lt;color name=&quot;udfps_enroll_progress_help_with_talkback&quot;>#FFEE675C&lt;/color>"
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
file="res/values-night/colors.xml"
line="69"
@@ -1573,11 +1861,11 @@
priority="4"
summary="Using hardcoded color"
explanation="Hardcoded color values are bad because theme changes cannot be uniformly applied.Instead use the theme specific colors such as `?android:attr/textColorPrimary` in attributes.&#xA;This ensures that a theme change from a light to a dark theme can be uniformlyapplied across the app."
errorLine1=" &lt;color name=&quot;udfps_enroll_progress_help_with_talkback&quot;>#FFEE675C&lt;/color>"
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
errorLine1=" &lt;color name=&quot;screen_flash_color_button_outer_circle_stroke_color&quot;>#FFFFFF&lt;/color>"
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
file="res/values-night/colors.xml"
line="70"
line="75"
column="5"/>
</issue>
@@ -1597,22 +1885,6 @@
column="5"/>
</issue>
<issue
id="HardCodedColor"
severity="Error"
message="Avoid using hardcoded color"
category="Correctness"
priority="4"
summary="Using hardcoded color"
explanation="Hardcoded color values are bad because theme changes cannot be uniformly applied.Instead use the theme specific colors such as `?android:attr/textColorPrimary` in attributes.&#xA;This ensures that a theme change from a light to a dark theme can be uniformlyapplied across the app."
errorLine1=" &lt;color name=&quot;screen_flash_color_button_outer_circle_stroke_color&quot;>#FFFFFF&lt;/color>"
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
file="res/values-night/colors.xml"
line="76"
column="5"/>
</issue>
<issue
id="HardCodedColor"
severity="Error"
@@ -1641,7 +1913,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
file="res/values-night/colors.xml"
line="79"
line="78"
column="5"/>
</issue>
@@ -2477,22 +2749,6 @@
column="5"/>
</issue>
<issue
id="HardCodedColor"
severity="Error"
message="Avoid using hardcoded color"
category="Correctness"
priority="4"
summary="Using hardcoded color"
explanation="Hardcoded color values are bad because theme changes cannot be uniformly applied.Instead use the theme specific colors such as `?android:attr/textColorPrimary` in attributes.&#xA;This ensures that a theme change from a light to a dark theme can be uniformlyapplied across the app."
errorLine1=" &lt;color name=&quot;power_anomaly_primary_button_text_color&quot;>#FFFFFF&lt;/color>"
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
file="res/values/colors.xml"
line="176"
column="5"/>
</issue>
<issue
id="HardCodedColor"
severity="Error"
@@ -2505,7 +2761,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
file="res/values/colors.xml"
line="179"
line="178"
column="5"/>
</issue>
@@ -2521,7 +2777,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
file="res/values/colors.xml"
line="180"
line="179"
column="5"/>
</issue>
@@ -2537,7 +2793,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
file="res/values/colors.xml"
line="182"
line="181"
column="5"/>
</issue>
@@ -2553,7 +2809,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
file="res/values/colors.xml"
line="183"
line="182"
column="5"/>
</issue>
@@ -2569,7 +2825,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
file="res/values/colors.xml"
line="184"
line="183"
column="5"/>
</issue>
@@ -2585,7 +2841,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
file="res/values/colors.xml"
line="185"
line="184"
column="5"/>
</issue>
@@ -2601,7 +2857,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
file="res/values/colors.xml"
line="189"
line="188"
column="5"/>
</issue>
@@ -2617,7 +2873,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
file="res/values/colors.xml"
line="190"
line="189"
column="5"/>
</issue>
@@ -2633,7 +2889,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
file="res/values/colors.xml"
line="193"
line="192"
column="5"/>
</issue>
@@ -2649,7 +2905,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
file="res/values/colors.xml"
line="194"
line="193"
column="5"/>
</issue>
@@ -2665,7 +2921,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
file="res/values/colors.xml"
line="195"
line="194"
column="5"/>
</issue>
@@ -2681,7 +2937,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
file="res/values/colors.xml"
line="196"
line="195"
column="5"/>
</issue>
@@ -2697,7 +2953,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
file="res/values/colors.xml"
line="197"
line="196"
column="5"/>
</issue>
@@ -2713,7 +2969,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
file="res/values/colors.xml"
line="198"
line="197"
column="5"/>
</issue>
@@ -2729,7 +2985,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
file="res/values/colors.xml"
line="199"
line="198"
column="5"/>
</issue>
@@ -2745,7 +3001,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
file="res/values/colors.xml"
line="200"
line="199"
column="5"/>
</issue>
@@ -2761,7 +3017,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
file="res/values/colors.xml"
line="201"
line="200"
column="5"/>
</issue>
@@ -2777,7 +3033,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
file="res/values/colors.xml"
line="202"
line="201"
column="5"/>
</issue>
@@ -2793,7 +3049,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
file="res/values/colors.xml"
line="203"
line="202"
column="5"/>
</issue>
@@ -2809,7 +3065,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
file="res/values/colors.xml"
line="204"
line="203"
column="5"/>
</issue>
@@ -2825,7 +3081,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
file="res/values/colors.xml"
line="207"
line="206"
column="5"/>
</issue>
@@ -2841,7 +3097,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
file="res/values/colors.xml"
line="208"
line="207"
column="5"/>
</issue>
@@ -2857,7 +3113,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
file="res/values/colors.xml"
line="209"
line="208"
column="5"/>
</issue>
@@ -2873,7 +3129,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
file="res/values/colors.xml"
line="210"
line="209"
column="5"/>
</issue>
@@ -2889,7 +3145,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
file="res/values/colors.xml"
line="211"
line="210"
column="5"/>
</issue>
@@ -2905,7 +3161,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
file="res/values/colors.xml"
line="212"
line="211"
column="5"/>
</issue>
@@ -2921,7 +3177,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
file="res/values/colors.xml"
line="213"
line="212"
column="5"/>
</issue>
@@ -2937,7 +3193,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
file="res/values/colors.xml"
line="214"
line="213"
column="5"/>
</issue>
@@ -2953,7 +3209,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
file="res/values/colors.xml"
line="215"
line="214"
column="5"/>
</issue>
@@ -2969,7 +3225,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
file="res/values/colors.xml"
line="216"
line="215"
column="5"/>
</issue>
@@ -2985,7 +3241,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
file="res/values/colors.xml"
line="217"
line="216"
column="5"/>
</issue>
@@ -3001,7 +3257,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
file="res/values/colors.xml"
line="218"
line="217"
column="5"/>
</issue>
@@ -3017,7 +3273,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
file="res/values/colors.xml"
line="221"
line="220"
column="5"/>
</issue>
@@ -3949,22 +4205,6 @@
column="13"/>
</issue>
<issue
id="HardCodedColor"
severity="Error"
message="Avoid using hardcoded color"
category="Correctness"
priority="4"
summary="Using hardcoded color"
explanation="Hardcoded color values are bad because theme changes cannot be uniformly applied.Instead use the theme specific colors such as `?android:attr/textColorPrimary` in attributes.&#xA;This ensures that a theme change from a light to a dark theme can be uniformlyapplied across the app."
errorLine1=" android:color=&quot;@color/accessibility_feature_background&quot;/>"
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
file="res/drawable/ic_color_contrast.xml"
line="22"
column="13"/>
</issue>
<issue
id="HardCodedColor"
severity="Error"

View File

@@ -26,7 +26,6 @@
<item name="a11y_color_inversion_banner" type="raw" product="tablet">@raw/accessibility_color_inversion_banner_tablet</item>
<item name="a11y_magnification_banner" type="raw" product="default">@raw/accessibility_magnification_banner</item>
<item name="a11y_magnification_banner" type="raw" product="tablet">@raw/accessibility_magnification_banner_tablet</item>
<item name="a11y_extra_dim_banner" type="raw" product="default">@raw/extra_dim_banner</item>
<item name="a11y_extra_dim_banner" type="raw" product="tablet">@raw/extra_dim_banner_tablet</item>

View File

@@ -14,9 +14,6 @@
limitations under the License.
-->
<resources>
<drawable name="a11y_button_preview_base" product="default">@drawable/accessibility_button_preview_base</drawable>
<drawable name="a11y_button_preview_base" product="tablet">@drawable/accessibility_button_preview_base_tablet</drawable>
<drawable name="a11y_button_preview_large_floating_menu" product="default">@drawable/accessibility_button_preview_large_floating_menu</drawable>
<drawable name="a11y_button_preview_large_floating_menu" product="tablet">@drawable/accessibility_button_preview_large_floating_menu_tablet</drawable>
@@ -29,8 +26,6 @@
<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>
<drawable name="a11y_shortcut_type_quick_settings" product="default">@drawable/accessibility_shortcut_type_quick_settings</drawable>
<drawable name="a11y_shortcut_type_hardware" product="default">@drawable/accessibility_shortcut_type_hardware</drawable>
<drawable name="a11y_shortcut_type_hardware" product="tablet">@drawable/accessibility_shortcut_type_hardware_tablet</drawable>

View File

@@ -1,28 +0,0 @@
<?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.
-->
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="412dp"
android:height="300dp"
android:viewportWidth="412"
android:viewportHeight="300">
<path
android:fillColor="#FF000000"
android:pathData="M384.2,300H27.8C12.5,300 0,287.2 0,271.5v-243C0,12.8 12.5,0 27.8,0h356.5C399.5,0 412,12.8 412,28.5v243.2C412,287.2 399.5,300 384.2,300z"/>
<path
android:pathData="M325.4,231.9c0,9.8 -7.9,17.7 -17.7,17.7H103.9c-9.8,0 -17.7,-7.9 -17.7,-17.7V0h-4.4v231.9c0,12.2 9.9,22.2 22.1,22.2h203.8c12.2,0 22.1,-9.9 22.1,-22.2V14.8c2.4,0 4.4,-2 4.4,-4.4V0h-8.9L325.4,231.9L325.4,231.9z"
android:fillColor="#808589"/>
</vector>

View File

@@ -1,18 +0,0 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="412dp"
android:height="300dp"
android:viewportWidth="412"
android:viewportHeight="300">
<path
android:fillColor="#FF000000"
android:pathData="M384.18,300H27.82C12.53,300 0,287.17 0,271.52V28.48C0,12.83 12.53,0 27.82,0H384.29c15.18,0 27.71,12.83 27.71,28.48v243.15c0,15.54 -12.53,28.37 -27.82,28.37Z"/>
<path
android:pathData="M368.24,143.47L368.24,60.55c0,-5.67 -4.59,-10.26 -10.26,-10.26L54.02,50.29c-5.67,0 -10.26,4.59 -10.26,10.26L43.76,242.76c0,5.67 4.59,10.26 10.26,10.26L357.98,253.02c5.67,0 10.26,-4.59 10.26,-10.26v-99.29ZM365.88,243.14c0,4.15 -3.75,7.52 -7.9,7.52L54.02,250.66c-4.15,0 -7.9,-3.37 -7.9,-7.52L46.12,60.55c0,-4.15 3.75,-7.9 7.9,-7.9L357.98,52.65c4.15,0 7.9,3.75 7.9,7.9L365.88,243.14Z"
android:fillColor="#80868b"/>
<path
android:pathData="M319.83,50.29c-0,-1.28 -1.04,-2.31 -2.31,-2.31h-23.11c-1.28,0 -2.31,1.03 -2.31,2.31h27.74Z"
android:fillColor="#80868b"/>
<path
android:pathData="M344.42,50.29c-0,-1.28 -1.03,-2.31 -2.31,-2.31h-9.25c-1.28,0 -2.31,1.03 -2.31,2.31h13.87Z"
android:fillColor="#80868b"/>
</vector>

View File

@@ -0,0 +1,21 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="412dp"
android:height="300dp"
android:viewportWidth="412"
android:viewportHeight="300">
<group>
<clip-path
android:pathData="M412,0H0V300H412V0Z"/>
<path
android:pathData="M384.2,300H27.8C12.5,300 0,287.2 0,271.5V28.5C0,12.8 12.5,0 27.8,0H384.3C399.5,0 412,12.8 412,28.5V271.7C412,287.2 399.5,300 384.2,300Z"
android:fillColor="#000000"/>
</group>
<path
android:pathData="M412,116H336.04C316.92,116 298.61,123.61 285.1,137.24C271.6,150.83 264,169.26 264,188.5C264,207.74 271.6,226.17 285.1,239.76C298.61,253.35 316.92,261 336.04,261H412"
android:strokeWidth="4"
android:fillColor="#00000000"
android:strokeColor="#E8EAED"/>
<path
android:pathData="M336.04,132C324.96,131.96 314.14,135.26 304.91,141.41C295.68,147.57 288.5,156.31 284.27,166.54C280.05,176.77 278.9,188.04 281.08,198.9C283.27,209.76 288.57,219.73 296.39,227.59C304.21,235.41 314.21,240.74 325.07,242.93C335.93,245.08 347.2,243.97 357.42,239.74C367.65,235.48 376.4,228.33 382.55,219.1C388.7,209.91 392,199.05 392,188C392,173.14 386.11,158.91 375.62,148.42C365.13,137.89 350.9,132 336.04,132ZM336.04,158.98C337.52,159.09 338.89,159.76 339.9,160.84C340.9,161.95 341.45,163.36 341.45,164.84C341.45,166.32 340.9,167.77 339.9,168.84C338.89,169.92 337.52,170.58 336.04,170.73C335.23,170.77 334.41,170.7 333.63,170.4C332.86,170.14 332.15,169.73 331.56,169.18C330.96,168.62 330.48,167.95 330.15,167.21C329.82,166.47 329.67,165.65 329.67,164.84C329.67,164.02 329.85,163.21 330.15,162.47C330.48,161.73 330.96,161.06 331.56,160.5C332.15,159.95 332.86,159.54 333.63,159.28C334.41,159.02 335.23,158.91 336.04,158.98ZM344.83,179.52V217.65H338.97V200.01H333.08V217.62H327.22V179.52C321.29,179.03 315.4,178.07 309.62,176.59L311.1,170.73C327.48,174.62 344.6,174.62 360.98,170.73L362.43,176.59C356.61,178.07 350.68,179.07 344.68,179.52H344.83Z"
android:fillColor="#E8EAED"/>
</vector>

View File

@@ -0,0 +1,21 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="412dp"
android:height="300dp"
android:viewportWidth="412"
android:viewportHeight="300">
<group>
<clip-path
android:pathData="M412,0H0V300H412V0Z"/>
<path
android:pathData="M384.2,300H27.8C12.5,300 0,287.2 0,271.5V28.5C0,12.8 12.5,0 27.8,0H384.3C399.5,0 412,12.8 412,28.5V271.7C412,287.2 399.5,300 384.2,300Z"
android:fillColor="#000000"/>
</group>
<path
android:pathData="M412,169H363.75C351.61,169 339.98,173.83 331.4,182.47C322.83,191.1 318,202.79 318,215C318,227.21 322.83,238.9 331.4,247.53C339.98,256.15 351.61,261 363.75,261H412"
android:strokeWidth="4"
android:fillColor="#00000000"
android:strokeColor="#E8EAED"/>
<path
android:pathData="M363.53,179C356.5,178.98 349.64,181.07 343.79,184.97C337.94,188.87 333.39,194.41 330.71,200.9C328.03,207.38 327.3,214.53 328.69,221.41C330.07,228.29 333.43,234.62 338.39,239.6C343.35,244.55 349.69,247.94 356.57,249.32C363.46,250.69 370.6,249.98 377.08,247.3C383.57,244.6 389.11,240.07 393.01,234.21C396.91,228.39 399,221.5 399,214.5C399,205.08 395.27,196.06 388.62,189.41C381.97,182.74 372.95,179 363.53,179ZM363.53,196.1C364.47,196.18 365.33,196.6 365.97,197.28C366.6,197.99 366.96,198.88 366.96,199.82C366.96,200.76 366.6,201.67 365.97,202.35C365.33,203.04 364.47,203.46 363.53,203.55C363.01,203.58 362.49,203.53 362,203.34C361.51,203.18 361.06,202.92 360.68,202.57C360.31,202.21 360,201.79 359.79,201.32C359.58,200.85 359.49,200.34 359.49,199.82C359.49,199.3 359.6,198.78 359.79,198.31C360,197.84 360.31,197.42 360.68,197.07C361.06,196.72 361.51,196.46 362,196.29C362.49,196.13 363.01,196.06 363.53,196.1ZM369.09,209.12V233.3H365.38V222.12H361.65V233.28H357.93V209.12C354.18,208.82 350.44,208.21 346.78,207.27L347.72,203.55C358.1,206.02 368.95,206.02 379.34,203.55L380.25,207.27C376.57,208.21 372.81,208.84 369,209.12H369.09Z"
android:fillColor="#E8EAED"/>
</vector>

View File

@@ -0,0 +1,25 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="412dp"
android:height="300dp"
android:viewportWidth="412"
android:viewportHeight="300">
<group>
<clip-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"/>
<path
android:pathData="M206,401C344.62,401 457,288.62 457,150C457,11.38 344.62,-101 206,-101C67.38,-101 -45,11.38 -45,150C-45,288.62 67.38,401 206,401Z"
android:fillColor="#000000"/>
</group>
<path
android:pathData="M0,28C0,12.54 12.54,0 28,0H384C399.46,0 412,12.54 412,28V251H0V28Z"
android:fillColor="#3C4043"/>
<path
android:pathData="M286.79,185.64H266.26H253.9H158.09H147.72H125.2C121.45,185.64 118.36,188.7 118.36,192.41C118.36,196.12 121.45,199.18 125.2,199.18H147.72H156.33H255.66H266.26H286.79C290.54,199.18 293.63,196.12 293.63,192.41C293.63,188.7 290.54,185.64 286.79,185.64Z"
android:fillColor="#80868B"/>
<path
android:pathData="M179.64,177.98V139.31H196.02L172.87,98L149.71,139.31H166.1V177.98C162.6,179.52 159.76,182.17 157.79,185.49C156.26,188.14 155.39,191.01 155.39,194.33C155.39,195.87 155.61,197.64 156.05,199.19C158.01,206.48 164.78,212 172.87,212C180.73,212 187.5,206.48 189.69,199.19C190.13,197.64 190.34,196.09 190.34,194.33C190.34,191.01 189.47,188.14 187.94,185.49C186.19,182.17 183.13,179.52 179.64,177.98Z"
android:fillColor="#669DF6"/>
<path
android:pathData="M245.65,177.98V139.31H262.28L238.77,98L215.26,139.31H231.89V177.98C228.35,179.52 225.46,182.17 223.46,185.49C221.91,188.14 221.02,191.01 221.02,194.33C221.02,195.87 221.25,197.64 221.69,199.19C223.69,206.48 230.56,212 238.77,212C246.76,212 253.63,206.48 255.85,199.19C256.29,197.64 256.52,196.09 256.52,194.33C256.52,191.01 255.63,188.14 254.08,185.49C252.08,182.17 249.2,179.52 245.65,177.98Z"
android:fillColor="#669DF6"/>
</vector>

View File

@@ -0,0 +1,45 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:aapt="http://schemas.android.com/aapt"
android:width="412dp"
android:height="300dp"
android:viewportWidth="412"
android:viewportHeight="300">
<group>
<clip-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"/>
<path
android:pathData="M206,401C344.62,401 457,288.62 457,150C457,11.38 344.62,-101 206,-101C67.38,-101 -45,11.38 -45,150C-45,288.62 67.38,401 206,401Z"
android:fillColor="#000000"/>
</group>
<path
android:pathData="M0,28C0,12.54 12.54,0 28,0H384C399.46,0 412,12.54 412,28V251H0V28Z"
android:fillColor="#3C4043"/>
<path
android:pathData="M155.95,98C142.52,98 132,108.89 132,121.95V211.2H180.26V121.95C180.26,108.89 169.37,98 155.95,98Z">
<aapt:attr name="android:fillColor">
<gradient
android:startX="156.13"
android:startY="211.55"
android:endX="156.13"
android:endY="98.12"
android:type="linear">
<item android:offset="0" android:color="#00669DF6"/>
<item android:offset="0.69" android:color="#FF669DF6"/>
</gradient>
</aapt:attr>
</path>
<path
android:pathData="M255.06,98C241.64,98 231.12,108.89 231.12,121.95V211.2H279.37V121.95C279.37,108.89 268.49,98 255.06,98Z">
<aapt:attr name="android:fillColor">
<gradient
android:startX="255.25"
android:startY="211.55"
android:endX="255.25"
android:endY="98.12"
android:type="linear">
<item android:offset="0" android:color="#00669DF6"/>
<item android:offset="0.69" android:color="#FF669DF6"/>
</gradient>
</aapt:attr>
</path>
</vector>

View File

@@ -0,0 +1,59 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:aapt="http://schemas.android.com/aapt"
android:width="412dp"
android:height="300dp"
android:viewportWidth="412"
android:viewportHeight="300">
<group>
<clip-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"/>
<path
android:pathData="M206,401C344.62,401 457,288.62 457,150C457,11.38 344.62,-101 206,-101C67.38,-101 -45,11.38 -45,150C-45,288.62 67.38,401 206,401Z"
android:fillColor="#000000"/>
</group>
<path
android:pathData="M0,28C0,12.54 12.54,0 28,0H384C399.46,0 412,12.54 412,28V251H0V28Z"
android:fillColor="#3C4043"/>
<path
android:pathData="M123.95,98C110.52,98 100,108.89 100,121.95V211.2H148.26V121.95C148.26,108.89 137.37,98 123.95,98Z">
<aapt:attr name="android:fillColor">
<gradient
android:startX="124.13"
android:startY="211.55"
android:endX="124.13"
android:endY="98.12"
android:type="linear">
<item android:offset="0" android:color="#00669DF6"/>
<item android:offset="0.69" android:color="#FF669DF6"/>
</gradient>
</aapt:attr>
</path>
<path
android:pathData="M205.95,98C192.52,98 182,108.89 182,121.95V211.2H230.26V121.95C230.26,108.89 219.37,98 205.95,98Z">
<aapt:attr name="android:fillColor">
<gradient
android:startX="206.13"
android:startY="211.55"
android:endX="206.13"
android:endY="98.12"
android:type="linear">
<item android:offset="0" android:color="#00669DF6"/>
<item android:offset="0.69" android:color="#FF669DF6"/>
</gradient>
</aapt:attr>
</path>
<path
android:pathData="M287.95,98C274.52,98 264,108.89 264,121.95V211.2H312.26V121.95C312.26,108.89 301.37,98 287.95,98Z">
<aapt:attr name="android:fillColor">
<gradient
android:startX="288.13"
android:startY="211.55"
android:endX="288.13"
android:endY="98.12"
android:type="linear">
<item android:offset="0" android:color="#00669DF6"/>
<item android:offset="0.69" android:color="#FF669DF6"/>
</gradient>
</aapt:attr>
</path>
</vector>

View File

@@ -0,0 +1,28 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="412dp"
android:height="300dp"
android:viewportWidth="412"
android:viewportHeight="300">
<group>
<clip-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"/>
<path
android:pathData="M206,401C344.62,401 457,288.62 457,150C457,11.38 344.62,-101 206,-101C67.38,-101 -45,11.38 -45,150C-45,288.62 67.38,401 206,401Z"
android:fillColor="#171717"/>
</group>
<path
android:pathData="M0,28C0,12.54 12.54,0 28,0H384C399.46,0 412,12.54 412,28V251H0V28Z"
android:fillColor="#3C4043"/>
<path
android:pathData="M286.43,185.64H265.9H253.54H157.74H147.36H124.84C121.09,185.64 118,188.7 118,192.41C118,196.12 121.09,199.18 124.84,199.18H147.36H155.97H255.31H265.9H286.43C290.18,199.18 293.27,196.12 293.27,192.41C293.27,188.7 290.18,185.64 286.43,185.64Z"
android:fillColor="#80868B"/>
<path
android:pathData="M159.33,177.98V139.31H175.71L152.55,98L129.4,139.31H145.78V177.98C142.29,179.52 139.45,182.17 137.48,185.49C135.95,188.14 135.08,191.01 135.08,194.33C135.08,195.87 135.3,197.64 135.73,199.19C137.7,206.48 144.47,212 152.55,212C160.42,212 167.19,206.48 169.38,199.19C169.81,197.64 170.03,196.09 170.03,194.33C170.03,191.01 169.16,188.14 167.63,185.49C165.88,182.17 162.82,179.52 159.33,177.98Z"
android:fillColor="#669DF6"/>
<path
android:pathData="M212.51,177.98V139.31H229.15L205.64,98L182.13,139.31H198.76V177.98C195.21,179.52 192.33,182.17 190.33,185.49C188.78,188.14 187.89,191.01 187.89,194.33C187.89,195.87 188.11,197.64 188.56,199.19C190.55,206.48 197.43,212 205.64,212C213.62,212 220.5,206.48 222.72,199.19C223.16,197.64 223.38,196.09 223.38,194.33C223.38,191.01 222.5,188.14 220.94,185.49C218.95,182.17 216.06,179.52 212.51,177.98Z"
android:fillColor="#669DF6"/>
<path
android:pathData="M265.95,177.98V139.31H282.59L259.08,98L235.56,139.31H252.2V177.98C248.65,179.52 245.77,182.17 243.77,185.49C242.22,188.14 241.33,191.01 241.33,194.33C241.33,195.87 241.55,197.64 241.99,199.19C243.99,206.48 250.87,212 259.08,212C267.06,212 273.94,206.48 276.15,199.19C276.6,197.64 276.82,196.09 276.82,194.33C276.82,191.01 275.93,188.14 274.38,185.49C272.38,182.17 269.5,179.52 265.95,177.98Z"
android:fillColor="#669DF6"/>
</vector>

View File

@@ -0,0 +1,26 @@
<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"/>
<path
android:pathData="M0,156H412V272C412,287.46 399.46,300 384,300H28C12.54,300 0,287.46 0,272V156Z"
android:fillColor="#3C4043"/>
<path
android:pathData="M320.5,203C323.27,203 325.48,205.26 325.48,208.08C325.48,210.9 323.27,213.16 320.5,213.16C317.73,213.16 315.52,210.9 315.52,208.08C315.52,205.26 317.73,203 320.5,203ZM328.06,220.88V254H322.9V238.76H317.92V254H312.94V220.88C307.96,220.5 302.61,219.56 298,218.24L299.29,213.16C305.75,214.86 313.49,215.8 320.5,215.8C327.51,215.8 335.25,215.04 341.71,213.16L343,218.24C338.39,219.56 333.04,220.5 328.06,220.88Z"
android:fillColor="#ffffff"/>
<path
android:pathData="M206.5,248C216.16,248 224,240.16 224,230.5C224,220.84 216.16,213 206.5,213C196.84,213 189,220.84 189,230.5C189,240.16 196.84,248 206.5,248Z"
android:fillColor="#80868B"/>
<path
android:pathData="M69,230.6L99,248V213L69,230.6Z"
android:fillColor="#80868B"/>
<path
android:pathData="M320.5,228.5m-57.5,0a57.5,57.5 0,1 1,115 0a57.5,57.5 0,1 1,-115 0"
android:strokeWidth="4"
android:fillColor="#00000000"
android:strokeColor="#669DF6"/>
</vector>

View File

@@ -0,0 +1,28 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="412dp"
android:height="300dp"
android:viewportWidth="412"
android:viewportHeight="300">
<group>
<clip-path
android:pathData="M384,300L28,300A28,28 0,0 1,0 272L0,28A28,28 0,0 1,28 0L384,0A28,28 0,0 1,412 28L412,272A28,28 0,0 1,384 300z"/>
<path
android:pathData="M206,-101C67.38,-101 -45,11.38 -45,150C-45,288.62 67.38,401 206,401C344.62,401 457,288.62 457,150C457,11.38 344.62,-101 206,-101Z"
android:fillColor="#000000"/>
</group>
<path
android:pathData="M412,272C412,287.46 399.46,300 384,300L28,300C12.54,300 0,287.46 0,272L0,49L412,49L412,272Z"
android:fillColor="#3C4043"/>
<path
android:pathData="M364.36,75H226.64C218,75 211,82.04 211,90.71V153.29C211,161.96 218,169 226.64,169H364.36C373,169 380,161.96 380,153.29V90.71C380,82.04 373,75 364.36,75Z"
android:fillColor="#669DF6"/>
<path
android:pathData="M364.36,178H226.64C218,178 211,184.96 211,193.55V255.45C211,264.04 218,271 226.64,271H364.36C373,271 380,264.04 380,255.45V193.55C380,184.96 373,178 364.36,178Z"
android:fillColor="#80868B"/>
<path
android:pathData="M185.27,75H46.74C38.04,75 31,82.04 31,90.71V153.29C31,161.96 38.04,169 46.74,169H185.27C193.96,169 201,161.96 201,153.29V90.71C201,82.04 193.96,75 185.27,75Z"
android:fillColor="#80868B"/>
<path
android:pathData="M185.27,178H46.74C38.04,178 31,184.96 31,193.55V255.45C31,264.04 38.04,271 46.74,271H185.27C193.96,271 201,264.04 201,255.45V193.55C201,184.96 193.96,178 185.27,178Z"
android:fillColor="#80868B"/>
</vector>

View File

@@ -0,0 +1,48 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="412dp"
android:height="300dp"
android:viewportWidth="412"
android:viewportHeight="300">
<group>
<clip-path
android:pathData="M0,0h412v300h-412z"/>
<path
android:pathData="M384.2,300H27.8C12.5,300 0,287.2 0,271.5V28.5C0,12.8 12.5,0 27.8,0H384.3C399.5,0 412,12.8 412,28.5V271.7C412,287.2 399.5,300 384.2,300Z"
android:fillColor="#000000"/>
<group>
<clip-path
android:pathData="M28,344C12.54,344 -0,331.46 -0,316L-0,-40C-0,-55.46 12.54,-68 28,-68L295,-68C310.46,-68 323,-55.46 323,-40L323,316C323,331.46 310.46,344 295,344L28,344Z"/>
<path
android:pathData="M384.2,300H27.8C12.5,300 0,287.2 0,271.5V28.5C0,12.8 12.5,0 27.8,0H384.3C399.5,0 412,12.8 412,28.5V271.7C412,287.2 399.5,300 384.2,300Z"
android:fillColor="#3C4043"/>
</group>
<path
android:pathData="M328.51,34.32V-139.64C328.51,-165.22 307.73,-186 282.15,-186H-106.64C-132.22,-186 -153,-165.22 -153,-139.64V401.64V403.72L-151.29,404.91C-149.88,405.9 -148.53,406.9 -147.14,407.92L-147.12,407.93C-145.74,408.95 -144.32,410 -142.82,411.05L-136.53,415.45V407.77V-139.64C-136.53,-156.13 -123.13,-169.53 -106.64,-169.53H282.15C298.64,-169.53 312.04,-156.13 312.04,-139.64V-1.84V135.96V411.57V419.25L318.33,414.85C321.36,412.73 324.07,410.62 327.01,408.27L328.51,407.06V405.14V260.97C333.43,259.3 336.98,254.64 336.98,249.15V209.14V208.75V205.14V204.75V164.74C336.98,159.25 333.43,154.59 328.51,152.92V91.84C333.43,90.17 336.98,85.51 336.98,80.02V46.14C336.98,40.65 333.43,35.99 328.51,34.32Z"
android:strokeWidth="8"
android:fillColor="#80868B"
android:strokeColor="#80868B"/>
<path
android:pathData="M332,258.99C336.67,258.99 340.47,255.2 340.47,250.52V230.08V209.63L340,209.63V207L340.47,207V166.1C340.47,161.43 336.67,157.63 332,157.63"
android:fillColor="#669DF6"/>
<group>
<clip-path
android:pathData="M332,149.63h17v118h-17zM332,258.99C336.67,258.99 340.47,255.2 340.47,250.52V230.08V209.63L340,209.63V207L340.47,207V166.1C340.47,161.43 336.67,157.63 332,157.63"/>
<path
android:pathData="M340.47,209.63H348.47V201.63L340.47,201.63L340.47,209.63ZM340,209.63H332V217.63L340,217.63L340,209.63ZM340,207L340,199L332,199V207H340ZM340.47,207L340.47,215L348.47,215V207H340.47ZM332,266.99C341.09,266.99 348.47,259.62 348.47,250.52H332.47C332.47,250.78 332.26,250.99 332,250.99V266.99ZM340.47,201.63L340,201.63L340,217.63L340.47,217.63L340.47,201.63ZM348,209.63V207H332V209.63H348ZM340,215L340.47,215L340.47,199L340,199L340,215ZM348.47,207V166.1H332.47V207H348.47ZM348.47,166.1C348.47,157.01 341.09,149.63 332,149.63V165.63C332.26,165.63 332.47,165.85 332.47,166.1H348.47ZM348.47,250.52V230.08H332.47V250.52H348.47ZM348.47,230.08V209.63H332.47V230.08H348.47Z"
android:fillColor="#669DF6"/>
</group>
<path
android:pathData="M332,93C336.41,93 340,91.01 340,88.57V77.88V67.19L339.55,67.19V65.81L340,65.81V44.43C340,41.99 336.41,40 332,40"
android:fillColor="#80868B"/>
<group>
<clip-path
android:pathData="M331,32h17v69h-17zM332,93C336.41,93 340,91.01 340,88.57V77.88V67.19L339.55,67.19V65.81L340,65.81V44.43C340,41.99 336.41,40 332,40"/>
<path
android:pathData="M340,67.19H348V59.19L340,59.19L340,67.19ZM339.55,67.19H331.55V75.19L339.55,75.19L339.55,67.19ZM339.55,65.81L339.55,57.81L331.55,57.81V65.81H339.55ZM340,65.81L340,73.81L348,73.81V65.81H340ZM332,101C335.3,101 338.69,100.27 341.53,98.7C344.09,97.28 348,94.04 348,88.57H332C332,87.12 332.55,86.04 333.02,85.43C333.24,85.14 333.44,84.96 333.56,84.86C333.69,84.75 333.77,84.71 333.78,84.7C333.79,84.7 333.63,84.78 333.29,84.86C332.95,84.94 332.51,85 332,85V101ZM340,59.19L339.55,59.19L339.55,75.19L340,75.19L340,59.19ZM347.55,67.19V65.81H331.55V67.19H347.55ZM339.55,73.81H340L340,57.81L339.55,57.81L339.55,73.81ZM348,65.81V44.43H332V65.81H348ZM348,44.43C348,38.96 344.09,35.72 341.53,34.3C338.69,32.73 335.3,32 332,32V48C332.51,48 332.95,48.06 333.29,48.14C333.63,48.22 333.79,48.3 333.78,48.3C333.77,48.29 333.69,48.25 333.56,48.14C333.44,48.04 333.24,47.85 333.02,47.57C332.55,46.96 332,45.88 332,44.43H348ZM348,88.57V77.88H332V88.57H348ZM348,77.88V67.19H332V77.88H348Z"
android:fillColor="#80868B"/>
</group>
<path
android:pathData="M332,206h20v4h-20z"
android:fillColor="#000000"/>
</group>
</vector>

View File

@@ -1,28 +0,0 @@
<?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.
-->
<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="M384.2,300H27.8C12.5,300 0,287.2 0,271.5v-243C0,12.8 12.5,0 27.8,0h356.5C399.5,0 412,12.8 412,28.5v243.2C412,287.2 399.5,300 384.2,300z"
android:fillColor="#FFFFFF"/>
<path
android:pathData="M325.4,231.9c0,9.8 -7.9,17.7 -17.7,17.7H103.9c-9.8,0 -17.7,-7.9 -17.7,-17.7V0h-4.4v231.9c0,12.2 9.9,22.2 22.1,22.2h203.8c12.2,0 22.1,-9.9 22.1,-22.2V14.8c2.4,0 4.4,-2 4.4,-4.4V0h-8.9L325.4,231.9L325.4,231.9z"
android:fillColor="#DADCE0"/>
</vector>

View File

@@ -1,18 +0,0 @@
<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="M384.18,300H27.82C12.53,300 0,287.17 0,271.52V28.48C0,12.83 12.53,0 27.82,0H384.29c15.18,0 27.71,12.83 27.71,28.48v243.15c0,15.54 -12.53,28.37 -27.82,28.37Z"
android:fillColor="#fff"/>
<path
android:pathData="M368.24,143.47L368.24,60.55c0,-5.67 -4.59,-10.26 -10.26,-10.26L54.02,50.29c-5.67,0 -10.26,4.59 -10.26,10.26L43.76,242.76c0,5.67 4.59,10.26 10.26,10.26L357.98,253.02c5.67,0 10.26,-4.59 10.26,-10.26v-99.29ZM365.88,243.14c0,4.15 -3.75,7.52 -7.9,7.52L54.02,250.66c-4.15,0 -7.9,-3.37 -7.9,-7.52L46.12,60.55c0,-4.15 3.75,-7.9 7.9,-7.9L357.98,52.65c4.15,0 7.9,3.75 7.9,7.9L365.88,243.14Z"
android:fillColor="#dadce0"/>
<path
android:pathData="M319.83,50.29c-0,-1.28 -1.04,-2.31 -2.31,-2.31h-23.11c-1.28,0 -2.31,1.03 -2.31,2.31h27.74Z"
android:fillColor="#dadce0"/>
<path
android:pathData="M344.42,50.29c-0,-1.28 -1.03,-2.31 -2.31,-2.31h-9.25c-1.28,0 -2.31,1.03 -2.31,2.31h13.87Z"
android:fillColor="#dadce0"/>
</vector>

View File

@@ -0,0 +1,21 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="412dp"
android:height="300dp"
android:viewportWidth="412"
android:viewportHeight="300">
<group>
<clip-path
android:pathData="M412,0H0V300H412V0Z"/>
<path
android:pathData="M384.2,300H27.8C12.5,300 0,287.2 0,271.5V28.5C0,12.8 12.5,0 27.8,0H384.3C399.5,0 412,12.8 412,28.5V271.7C412,287.2 399.5,300 384.2,300Z"
android:fillColor="#ffffff"/>
</group>
<path
android:pathData="M412,116H336.04C316.92,116 298.61,123.61 285.1,137.24C271.6,150.83 264,169.26 264,188.5C264,207.74 271.6,226.17 285.1,239.76C298.61,253.35 316.92,261 336.04,261H412"
android:strokeWidth="4"
android:fillColor="#00000000"
android:strokeColor="#3C4043"/>
<path
android:pathData="M336.04,132C324.96,131.96 314.14,135.26 304.91,141.41C295.68,147.57 288.5,156.31 284.27,166.54C280.05,176.77 278.9,188.04 281.08,198.9C283.27,209.76 288.57,219.73 296.39,227.59C304.21,235.41 314.21,240.74 325.07,242.93C335.93,245.08 347.2,243.97 357.42,239.74C367.65,235.48 376.4,228.33 382.55,219.1C388.7,209.91 392,199.05 392,188C392,173.14 386.11,158.91 375.62,148.42C365.13,137.89 350.9,132 336.04,132ZM336.04,158.98C337.52,159.09 338.89,159.76 339.9,160.84C340.9,161.95 341.45,163.36 341.45,164.84C341.45,166.32 340.9,167.77 339.9,168.84C338.89,169.92 337.52,170.58 336.04,170.73C335.23,170.77 334.41,170.7 333.63,170.4C332.86,170.14 332.15,169.73 331.56,169.18C330.96,168.62 330.48,167.95 330.15,167.21C329.82,166.47 329.67,165.65 329.67,164.84C329.67,164.02 329.85,163.21 330.15,162.47C330.48,161.73 330.96,161.06 331.56,160.5C332.15,159.95 332.86,159.54 333.63,159.28C334.41,159.02 335.23,158.91 336.04,158.98ZM344.83,179.52V217.65H338.97V200.01H333.08V217.62H327.22V179.52C321.29,179.03 315.4,178.07 309.62,176.59L311.1,170.73C327.48,174.62 344.6,174.62 360.98,170.73L362.43,176.59C356.61,178.07 350.68,179.07 344.68,179.52H344.83Z"
android:fillColor="#3C4043"/>
</vector>

View File

@@ -0,0 +1,21 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="412dp"
android:height="300dp"
android:viewportWidth="412"
android:viewportHeight="300">
<group>
<clip-path
android:pathData="M412,0H0V300H412V0Z"/>
<path
android:pathData="M384.2,300H27.8C12.5,300 0,287.2 0,271.5V28.5C0,12.8 12.5,0 27.8,0H384.3C399.5,0 412,12.8 412,28.5V271.7C412,287.2 399.5,300 384.2,300Z"
android:fillColor="#ffffff"/>
</group>
<path
android:pathData="M412,169H363.75C351.61,169 339.98,173.83 331.4,182.47C322.83,191.1 318,202.79 318,215C318,227.21 322.83,238.9 331.4,247.53C339.98,256.15 351.61,261 363.75,261H412"
android:strokeWidth="4"
android:fillColor="#00000000"
android:strokeColor="#3C4043"/>
<path
android:pathData="M363.53,179C356.5,178.98 349.64,181.07 343.79,184.97C337.94,188.87 333.39,194.41 330.71,200.9C328.03,207.38 327.3,214.53 328.69,221.41C330.07,228.29 333.43,234.62 338.39,239.6C343.35,244.55 349.69,247.94 356.57,249.32C363.46,250.69 370.6,249.98 377.08,247.3C383.57,244.6 389.11,240.07 393.01,234.21C396.91,228.39 399,221.5 399,214.5C399,205.08 395.27,196.06 388.62,189.41C381.97,182.74 372.95,179 363.53,179ZM363.53,196.1C364.47,196.18 365.33,196.6 365.97,197.28C366.6,197.99 366.96,198.88 366.96,199.82C366.96,200.76 366.6,201.67 365.97,202.35C365.33,203.04 364.47,203.46 363.53,203.55C363.01,203.58 362.49,203.53 362,203.34C361.51,203.18 361.06,202.92 360.68,202.57C360.31,202.21 360,201.79 359.79,201.32C359.58,200.85 359.49,200.34 359.49,199.82C359.49,199.3 359.6,198.78 359.79,198.31C360,197.84 360.31,197.42 360.68,197.07C361.06,196.72 361.51,196.46 362,196.29C362.49,196.13 363.01,196.06 363.53,196.1ZM369.09,209.12V233.3H365.38V222.12H361.65V233.28H357.93V209.12C354.18,208.82 350.44,208.21 346.78,207.27L347.72,203.55C358.1,206.02 368.95,206.02 379.34,203.55L380.25,207.27C376.57,208.21 372.81,208.84 369,209.12H369.09Z"
android:fillColor="#3C4043"/>
</vector>

View File

@@ -0,0 +1,25 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="413dp"
android:height="300dp"
android:viewportWidth="413"
android:viewportHeight="300">
<group>
<clip-path
android:pathData="M29,0L385,0A28,28 0,0 1,413 28L413,272A28,28 0,0 1,385 300L29,300A28,28 0,0 1,1 272L1,28A28,28 0,0 1,29 0z"/>
<path
android:pathData="M207,401C345.62,401 458,288.62 458,150C458,11.38 345.62,-101 207,-101C68.38,-101 -44,11.38 -44,150C-44,288.62 68.38,401 207,401Z"
android:fillColor="#ffffff"/>
</group>
<path
android:pathData="M0,28C0,12.54 12.54,0 28,0H385C400.46,0 413,12.54 413,28V251H0V28Z"
android:fillColor="#E8EAED"/>
<path
android:pathData="M287.79,185.64H267.26H254.9H159.09H148.72H126.2C122.45,185.64 119.36,188.7 119.36,192.41C119.36,196.12 122.45,199.18 126.2,199.18H148.72H157.33H256.67H267.26H287.79C291.54,199.18 294.63,196.12 294.63,192.41C294.63,188.7 291.54,185.64 287.79,185.64Z"
android:fillColor="#DADCE0"/>
<path
android:pathData="M180.64,177.98V139.31H197.02L173.87,98L150.71,139.31H167.1V177.98C163.6,179.52 160.76,182.17 158.79,185.49C157.26,188.14 156.39,191.01 156.39,194.33C156.39,195.87 156.61,197.64 157.05,199.19C159.01,206.48 165.78,212 173.87,212C181.73,212 188.5,206.48 190.69,199.19C191.13,197.64 191.34,196.09 191.34,194.33C191.34,191.01 190.47,188.14 188.94,185.49C187.19,182.17 184.13,179.52 180.64,177.98Z"
android:fillColor="#1A73E8"/>
<path
android:pathData="M246.65,177.98V139.31H263.28L239.77,98L216.26,139.31H232.89V177.98C229.35,179.52 226.46,182.17 224.46,185.49C222.91,188.14 222.02,191.01 222.02,194.33C222.02,195.87 222.25,197.64 222.69,199.19C224.69,206.48 231.56,212 239.77,212C247.76,212 254.63,206.48 256.85,199.19C257.29,197.64 257.52,196.09 257.52,194.33C257.52,191.01 256.63,188.14 255.08,185.49C253.08,182.17 250.2,179.52 246.65,177.98Z"
android:fillColor="#1A73E8"/>
</vector>

View File

@@ -0,0 +1,45 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:aapt="http://schemas.android.com/aapt"
android:width="413dp"
android:height="300dp"
android:viewportWidth="413"
android:viewportHeight="300">
<group>
<clip-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"/>
<path
android:pathData="M206,401C344.62,401 457,288.62 457,150C457,11.38 344.62,-101 206,-101C67.38,-101 -45,11.38 -45,150C-45,288.62 67.38,401 206,401Z"
android:fillColor="#ffffff"/>
</group>
<path
android:pathData="M0,28C0,12.54 12.54,0 28,0H385C400.46,0 413,12.54 413,28V251H0V28Z"
android:fillColor="#E8EAED"/>
<path
android:pathData="M155.95,98C142.52,98 132,108.89 132,121.95V211.2H180.26V121.95C180.26,108.89 169.37,98 155.95,98Z">
<aapt:attr name="android:fillColor">
<gradient
android:startX="156.13"
android:startY="211.55"
android:endX="156.13"
android:endY="98.12"
android:type="linear">
<item android:offset="0" android:color="#001A73E8"/>
<item android:offset="0.69" android:color="#FF669DF6"/>
</gradient>
</aapt:attr>
</path>
<path
android:pathData="M255.06,98C241.64,98 231.12,108.89 231.12,121.95V211.2H279.37V121.95C279.37,108.89 268.49,98 255.06,98Z">
<aapt:attr name="android:fillColor">
<gradient
android:startX="255.25"
android:startY="211.55"
android:endX="255.25"
android:endY="98.12"
android:type="linear">
<item android:offset="0" android:color="#001A73E8"/>
<item android:offset="0.69" android:color="#FF669DF6"/>
</gradient>
</aapt:attr>
</path>
</vector>

View File

@@ -0,0 +1,59 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:aapt="http://schemas.android.com/aapt"
android:width="412dp"
android:height="300dp"
android:viewportWidth="412"
android:viewportHeight="300">
<group>
<clip-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"/>
<path
android:pathData="M206,401C344.62,401 457,288.62 457,150C457,11.38 344.62,-101 206,-101C67.38,-101 -45,11.38 -45,150C-45,288.62 67.38,401 206,401Z"
android:fillColor="#ffffff"/>
</group>
<path
android:pathData="M0,28C0,12.54 12.54,0 28,0H384C399.46,0 412,12.54 412,28V251H0V28Z"
android:fillColor="#E8EAED"/>
<path
android:pathData="M123.95,98C110.52,98 100,108.89 100,121.95V211.2H148.26V121.95C148.26,108.89 137.37,98 123.95,98Z">
<aapt:attr name="android:fillColor">
<gradient
android:startX="124.13"
android:startY="211.55"
android:endX="124.13"
android:endY="98.12"
android:type="linear">
<item android:offset="0" android:color="#001A73E8"/>
<item android:offset="0.69" android:color="#FF669DF6"/>
</gradient>
</aapt:attr>
</path>
<path
android:pathData="M205.95,98C192.52,98 182,108.89 182,121.95V211.2H230.26V121.95C230.26,108.89 219.37,98 205.95,98Z">
<aapt:attr name="android:fillColor">
<gradient
android:startX="206.13"
android:startY="211.55"
android:endX="206.13"
android:endY="98.12"
android:type="linear">
<item android:offset="0" android:color="#001A73E8"/>
<item android:offset="0.69" android:color="#FF669DF6"/>
</gradient>
</aapt:attr>
</path>
<path
android:pathData="M287.95,98C274.52,98 264,108.89 264,121.95V211.2H312.26V121.95C312.26,108.89 301.37,98 287.95,98Z">
<aapt:attr name="android:fillColor">
<gradient
android:startX="288.13"
android:startY="211.55"
android:endX="288.13"
android:endY="98.12"
android:type="linear">
<item android:offset="0" android:color="#001A73E8"/>
<item android:offset="0.69" android:color="#FF669DF6"/>
</gradient>
</aapt:attr>
</path>
</vector>

View File

@@ -0,0 +1,28 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="413dp"
android:height="300dp"
android:viewportWidth="413"
android:viewportHeight="300">
<group>
<clip-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"/>
<path
android:pathData="M206,401C344.62,401 457,288.62 457,150C457,11.38 344.62,-101 206,-101C67.38,-101 -45,11.38 -45,150C-45,288.62 67.38,401 206,401Z"
android:fillColor="#ffffff"/>
</group>
<path
android:pathData="M0,28C0,12.54 12.54,0 28,0H385C400.46,0 413,12.54 413,28V251H0V28Z"
android:fillColor="#E8EAED"/>
<path
android:pathData="M286.43,185.64H265.9H253.54H157.74H147.36H124.84C121.09,185.64 118,188.7 118,192.41C118,196.12 121.09,199.18 124.84,199.18H147.36H155.97H255.31H265.9H286.43C290.18,199.18 293.27,196.12 293.27,192.41C293.27,188.7 290.18,185.64 286.43,185.64Z"
android:fillColor="#DADCE0"/>
<path
android:pathData="M159.33,177.98V139.31H175.71L152.55,98L129.4,139.31H145.78V177.98C142.29,179.52 139.45,182.17 137.48,185.49C135.95,188.14 135.08,191.01 135.08,194.33C135.08,195.87 135.3,197.64 135.73,199.19C137.7,206.48 144.47,212 152.55,212C160.42,212 167.19,206.48 169.38,199.19C169.81,197.64 170.03,196.09 170.03,194.33C170.03,191.01 169.16,188.14 167.63,185.49C165.88,182.17 162.82,179.52 159.33,177.98Z"
android:fillColor="#1A73E8"/>
<path
android:pathData="M212.51,177.98V139.31H229.15L205.64,98L182.13,139.31H198.76V177.98C195.21,179.52 192.33,182.17 190.33,185.49C188.78,188.14 187.89,191.01 187.89,194.33C187.89,195.87 188.11,197.64 188.56,199.19C190.55,206.48 197.43,212 205.64,212C213.62,212 220.5,206.48 222.72,199.19C223.16,197.64 223.38,196.09 223.38,194.33C223.38,191.01 222.5,188.14 220.94,185.49C218.95,182.17 216.06,179.52 212.51,177.98Z"
android:fillColor="#1A73E8"/>
<path
android:pathData="M265.95,177.98V139.31H282.59L259.08,98L235.56,139.31H252.2V177.98C248.65,179.52 245.77,182.17 243.77,185.49C242.22,188.14 241.33,191.01 241.33,194.33C241.33,195.87 241.55,197.64 241.99,199.19C243.99,206.48 250.87,212 259.08,212C267.06,212 273.94,206.48 276.15,199.19C276.6,197.64 276.82,196.09 276.82,194.33C276.82,191.01 275.93,188.14 274.38,185.49C272.38,182.17 269.5,179.52 265.95,177.98Z"
android:fillColor="#1A73E8"/>
</vector>

View File

@@ -0,0 +1,26 @@
<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"/>
<path
android:pathData="M0,156H412V272C412,287.46 399.46,300 384,300H28C12.54,300 0,287.46 0,272V156Z"
android:fillColor="#E8EAED"/>
<path
android:pathData="M320.5,203C323.27,203 325.48,205.26 325.48,208.08C325.48,210.9 323.27,213.16 320.5,213.16C317.73,213.16 315.52,210.9 315.52,208.08C315.52,205.26 317.73,203 320.5,203ZM328.06,220.88V254H322.9V238.76H317.92V254H312.94V220.88C307.96,220.5 302.61,219.56 298,218.24L299.29,213.16C305.75,214.86 313.49,215.8 320.5,215.8C327.51,215.8 335.25,215.04 341.71,213.16L343,218.24C338.39,219.56 333.04,220.5 328.06,220.88Z"
android:fillColor="#000000"/>
<path
android:pathData="M206.5,248C216.16,248 224,240.16 224,230.5C224,220.84 216.16,213 206.5,213C196.84,213 189,220.84 189,230.5C189,240.16 196.84,248 206.5,248Z"
android:fillColor="#BEC1C5"/>
<path
android:pathData="M69,230.6L99,248V213L69,230.6Z"
android:fillColor="#BEC1C5"/>
<path
android:pathData="M320.5,228.5m-57.5,0a57.5,57.5 0,1 1,115 0a57.5,57.5 0,1 1,-115 0"
android:strokeWidth="4"
android:fillColor="#00000000"
android:strokeColor="#1A73E8"/>
</vector>

View File

@@ -1,56 +1,28 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
~
~ Copyright 2024 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
~
~ https://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="312dp"
android:height="130dp"
android:viewportWidth="312"
android:viewportHeight="130">
<group>
<clip-path
android:pathData="M24,0L288,0A24,24 0,0 1,312 24L312,106A24,24 0,0 1,288 130L24,130A24,24 0,0 1,0 106L0,24A24,24 0,0 1,24 0z"/>
<path
android:pathData="M24,0L288,0A24,24 0,0 1,312 24L312,106A24,24 0,0 1,288 130L24,130A24,24 0,0 1,0 106L0,24A24,24 0,0 1,24 0z"
android:fillColor="@color/settingslib_protection_color"/>
<path
android:pathData="M209,139.62H210V138.62V32C210,24.82 204.18,19 197,19H115C107.82,19 102,24.82 102,32V138.62V139.62H103H209Z"
android:strokeWidth="2"
android:fillColor="#00000000"
android:strokeColor="#6D6D6D"/>
<path
android:pathData="M103,32C103,25.37 108.37,20 115,20H197C203.63,20 209,25.37 209,32V91.93H103V32Z"
android:fillColor="#484848"/>
<path
android:pathData="M113.31,38.93L149.48,38.93A4,4 0,0 1,153.48 42.93L153.48,52.6A4,4 0,0 1,149.48 56.6L113.31,56.6A4,4 0,0 1,109.31 52.6L109.31,42.93A4,4 0,0 1,113.31 38.93z"
android:fillColor="#69B2C9"/>
<path
android:pathData="M113.31,61.64L149.48,61.64A4,4 0,0 1,153.48 65.64L153.48,75.31A4,4 0,0 1,149.48 79.31L113.31,79.31A4,4 0,0 1,109.31 75.31L109.31,65.64A4,4 0,0 1,113.31 61.64z"
android:fillColor="#646464"/>
<path
android:pathData="M162.52,38.93L198.69,38.93A4,4 0,0 1,202.69 42.93L202.69,52.6A4,4 0,0 1,198.69 56.6L162.52,56.6A4,4 0,0 1,158.52 52.6L158.52,42.93A4,4 0,0 1,162.52 38.93z"
android:fillColor="#646464"/>
<path
android:pathData="M162.52,61.64L198.69,61.64A4,4 0,0 1,202.69 65.64L202.69,75.31A4,4 0,0 1,198.69 79.31L162.52,79.31A4,4 0,0 1,158.52 75.31L158.52,65.64A4,4 0,0 1,162.52 61.64z"
android:fillColor="#646464"/>
</group>
android:width="412dp"
android:height="300dp"
android:viewportWidth="412"
android:viewportHeight="300">
<group>
<clip-path
android:pathData="M384,300L28,300A28,28 0,0 1,0 272L0,28A28,28 0,0 1,28 0L384,0A28,28 0,0 1,412 28L412,272A28,28 0,0 1,384 300z"/>
<path
android:pathData="M206,-101C67.38,-101 -45,11.38 -45,150C-45,288.62 67.38,401 206,401C344.62,401 457,288.62 457,150C457,11.38 344.62,-101 206,-101Z"
android:fillColor="#ffffff"/>
</group>
<path
android:pathData="M412,272C412,287.46 399.46,300 384,300L28,300C12.54,300 0,287.46 0,272L0,49L412,49L412,272Z"
android:fillColor="#E8EAED"/>
<path
android:pathData="M364.36,75H226.64C218,75 211,82.04 211,90.71V153.29C211,161.96 218,169 226.64,169H364.36C373,169 380,161.96 380,153.29V90.71C380,82.04 373,75 364.36,75Z"
android:fillColor="#1A73E8"/>
<path
android:pathData="M364.36,178H226.64C218,178 211,184.96 211,193.55V255.45C211,264.04 218,271 226.64,271H364.36C373,271 380,264.04 380,255.45V193.55C380,184.96 373,178 364.36,178Z"
android:fillColor="#DADCE0"/>
<path
android:pathData="M185.27,75H46.74C38.04,75 31,82.04 31,90.71V153.29C31,161.96 38.04,169 46.74,169H185.27C193.96,169 201,161.96 201,153.29V90.71C201,82.04 193.96,75 185.27,75Z"
android:fillColor="#DADCE0"/>
<path
android:pathData="M185.27,178H46.74C38.04,178 31,184.96 31,193.55V255.45C31,264.04 38.04,271 46.74,271H185.27C193.96,271 201,264.04 201,255.45V193.55C201,184.96 193.96,178 185.27,178Z"
android:fillColor="#DADCE0"/>
</vector>

View File

@@ -0,0 +1,48 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="412dp"
android:height="300dp"
android:viewportWidth="412"
android:viewportHeight="300">
<group>
<clip-path
android:pathData="M0,0h412v300h-412z"/>
<path
android:pathData="M384.2,300H27.8C12.5,300 0,287.2 0,271.5V28.5C0,12.8 12.5,0 27.8,0H384.3C399.5,0 412,12.8 412,28.5V271.7C412,287.2 399.5,300 384.2,300Z"
android:fillColor="#ffffff"/>
<group>
<clip-path
android:pathData="M28,344C12.54,344 -0,331.46 -0,316L-0,-40C-0,-55.46 12.54,-68 28,-68L295,-68C310.46,-68 323,-55.46 323,-40L323,316C323,331.46 310.46,344 295,344L28,344Z"/>
<path
android:pathData="M384.2,300H27.8C12.5,300 0,287.2 0,271.5V28.5C0,12.8 12.5,0 27.8,0H384.3C399.5,0 412,12.8 412,28.5V271.7C412,287.2 399.5,300 384.2,300Z"
android:fillColor="#E8EAED"/>
</group>
<path
android:pathData="M328.51,34.32V-139.64C328.51,-165.22 307.73,-186 282.15,-186H-106.64C-132.22,-186 -153,-165.22 -153,-139.64V401.64V403.72L-151.29,404.91C-149.88,405.9 -148.53,406.9 -147.14,407.92L-147.12,407.93C-145.74,408.95 -144.32,410 -142.82,411.05L-136.53,415.45V407.77V-139.64C-136.53,-156.13 -123.13,-169.53 -106.64,-169.53H282.15C298.64,-169.53 312.04,-156.13 312.04,-139.64V-1.84V135.96V411.57V419.25L318.33,414.85C321.36,412.73 324.07,410.62 327.01,408.27L328.51,407.06V405.14V260.97C333.43,259.3 336.98,254.64 336.98,249.15V209.14V208.75V205.14V204.75V164.74C336.98,159.25 333.43,154.59 328.51,152.92V91.84C333.43,90.17 336.98,85.51 336.98,80.02V46.14C336.98,40.65 333.43,35.99 328.51,34.32Z"
android:strokeWidth="8"
android:fillColor="#DADCE0"
android:strokeColor="#DADCE0"/>
<path
android:pathData="M332,258.99C336.67,258.99 340.47,255.2 340.47,250.52V230.08V209.63L340,209.63V207L340.47,207V166.1C340.47,161.43 336.67,157.63 332,157.63"
android:fillColor="#1A73E8"/>
<group>
<clip-path
android:pathData="M332,149.63h17v118h-17zM332,258.99C336.67,258.99 340.47,255.2 340.47,250.52V230.08V209.63L340,209.63V207L340.47,207V166.1C340.47,161.43 336.67,157.63 332,157.63"/>
<path
android:pathData="M340.47,209.63H348.47V201.63L340.47,201.63L340.47,209.63ZM340,209.63H332V217.63L340,217.63L340,209.63ZM340,207L340,199L332,199V207H340ZM340.47,207L340.47,215L348.47,215V207H340.47ZM332,266.99C341.09,266.99 348.47,259.62 348.47,250.52H332.47C332.47,250.78 332.26,250.99 332,250.99V266.99ZM340.47,201.63L340,201.63L340,217.63L340.47,217.63L340.47,201.63ZM348,209.63V207H332V209.63H348ZM340,215L340.47,215L340.47,199L340,199L340,215ZM348.47,207V166.1H332.47V207H348.47ZM348.47,166.1C348.47,157.01 341.09,149.63 332,149.63V165.63C332.26,165.63 332.47,165.85 332.47,166.1H348.47ZM348.47,250.52V230.08H332.47V250.52H348.47ZM348.47,230.08V209.63H332.47V230.08H348.47Z"
android:fillColor="#1A73E8"/>
</group>
<path
android:pathData="M332,93C336.41,93 340,91.01 340,88.57V77.88V67.19L339.55,67.19V65.81L340,65.81V44.43C340,41.99 336.41,40 332,40"
android:fillColor="#DADCE0"/>
<group>
<clip-path
android:pathData="M331,32h17v69h-17zM332,93C336.41,93 340,91.01 340,88.57V77.88V67.19L339.55,67.19V65.81L340,65.81V44.43C340,41.99 336.41,40 332,40"/>
<path
android:pathData="M340,67.19H348V59.19L340,59.19L340,67.19ZM339.55,67.19H331.55V75.19L339.55,75.19L339.55,67.19ZM339.55,65.81L339.55,57.81L331.55,57.81V65.81H339.55ZM340,65.81L340,73.81L348,73.81V65.81H340ZM332,101C335.3,101 338.69,100.27 341.53,98.7C344.09,97.28 348,94.04 348,88.57H332C332,87.12 332.55,86.04 333.02,85.43C333.24,85.14 333.44,84.96 333.56,84.86C333.69,84.75 333.77,84.71 333.78,84.7C333.79,84.7 333.63,84.78 333.29,84.86C332.95,84.94 332.51,85 332,85V101ZM340,59.19L339.55,59.19L339.55,75.19L340,75.19L340,59.19ZM347.55,67.19V65.81H331.55V67.19H347.55ZM339.55,73.81H340L340,57.81L339.55,57.81L339.55,73.81ZM348,65.81V44.43H332V65.81H348ZM348,44.43C348,38.96 344.09,35.72 341.53,34.3C338.69,32.73 335.3,32 332,32V48C332.51,48 332.95,48.06 333.29,48.14C333.63,48.22 333.79,48.3 333.78,48.3C333.77,48.29 333.69,48.25 333.56,48.14C333.44,48.04 333.24,47.85 333.02,47.57C332.55,46.96 332,45.88 332,44.43H348ZM348,88.57V77.88H332V88.57H348ZM348,77.88V67.19H332V77.88H348Z"
android:fillColor="#DADCE0"/>
</group>
<path
android:pathData="M332,206h20v4h-20z"
android:fillColor="#ffffff"/>
</group>
</vector>

View File

@@ -1,26 +0,0 @@
<!--
~ Copyright (C) 2024 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="24.0dp"
android:height="24.0dp"
android:viewportWidth="24.0"
android:viewportHeight="24.0"
android:tint="?android:attr/colorControlNormal">
<path android:fillColor="@android:color/white"
android:pathData="M612,668L668,612L520,464L520,280L440,280L440,496L612,668ZM480,880Q397,880 324,848.5Q251,817 197,763Q143,709 111.5,636Q80,563 80,480Q80,397 111.5,324Q143,251 197,197Q251,143 324,111.5Q397,80 480,80Q563,80 636,111.5Q709,143 763,197Q817,251 848.5,324Q880,397 880,480Q880,563 848.5,636Q817,709 763,763Q709,817 636,848.5Q563,880 480,880ZM480,480Q480,480 480,480Q480,480 480,480Q480,480 480,480Q480,480 480,480Q480,480 480,480Q480,480 480,480Q480,480 480,480Q480,480 480,480ZM480,800Q613,800 706.5,706.5Q800,613 800,480Q800,347 706.5,253.5Q613,160 480,160Q347,160 253.5,253.5Q160,347 160,480Q160,613 253.5,706.5Q347,800 480,800Z"/>
</vector>

View File

@@ -0,0 +1,25 @@
<!--
Copyright (C) 2024 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="24dp"
android:height="24dp"
android:tint="?android:attr/colorControlNormal"
android:viewportHeight="960"
android:viewportWidth="960">
<path
android:fillColor="@android:color/white"
android:pathData="M524,920Q440,920 366.5,888Q293,856 238.5,801.5Q184,747 152,673.5Q120,600 120,516Q120,370 213,258.5Q306,147 450,120Q432,219 461,313.5Q490,408 561,479Q632,550 726.5,579Q821,608 920,590Q894,734 782,827Q670,920 524,920ZM524,840Q612,840 687,796Q762,752 805,675Q719,667 642,631.5Q565,596 504,535Q443,474 407,397Q371,320 364,234Q287,277 243.5,352.5Q200,428 200,516Q200,651 294.5,745.5Q389,840 524,840ZM504,535Q504,535 504,535Q504,535 504,535Q504,535 504,535Q504,535 504,535Q504,535 504,535Q504,535 504,535Q504,535 504,535Q504,535 504,535Q504,535 504,535Q504,535 504,535Z" />
</vector>

View File

@@ -0,0 +1,25 @@
<!--
Copyright (C) 2024 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="24dp"
android:height="24dp"
android:tint="?android:attr/colorControlNormal"
android:viewportHeight="960"
android:viewportWidth="960">
<path
android:fillColor="@android:color/white"
android:pathData="M240,760L240,800Q240,817 228.5,828.5Q217,840 200,840L160,840Q143,840 131.5,828.5Q120,817 120,800L120,480L204,240Q210,222 225.5,211Q241,200 260,200L700,200Q719,200 734.5,211Q750,222 756,240L840,480L840,800Q840,817 828.5,828.5Q817,840 800,840L760,840Q743,840 731.5,828.5Q720,817 720,800L720,760L240,760ZM232,400L728,400L686,280L274,280L232,400ZM200,480L200,480L200,680L200,680L200,480ZM300,640Q325,640 342.5,622.5Q360,605 360,580Q360,555 342.5,537.5Q325,520 300,520Q275,520 257.5,537.5Q240,555 240,580Q240,605 257.5,622.5Q275,640 300,640ZM660,640Q685,640 702.5,622.5Q720,605 720,580Q720,555 702.5,537.5Q685,520 660,520Q635,520 617.5,537.5Q600,555 600,580Q600,605 617.5,622.5Q635,640 660,640ZM200,680L760,680L760,480L200,480L200,680Z" />
</vector>

View File

@@ -0,0 +1,25 @@
<!--
Copyright (C) 2024 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="24dp"
android:height="24dp"
android:tint="?android:attr/colorControlNormal"
android:viewportHeight="960"
android:viewportWidth="960">
<path
android:fillColor="@android:color/white"
android:pathData="M440,560L520,560L520,280L440,280L440,560ZM560,500L640,500L640,320L560,320L560,500ZM320,480L400,480L400,320L320,320L320,480ZM240,880L240,708Q183,656 151.5,586.5Q120,517 120,440Q120,290 225,185Q330,80 480,80Q605,80 701.5,153.5Q798,227 827,345L879,550Q884,569 872,584.5Q860,600 840,600L760,600L760,720Q760,753 736.5,776.5Q713,800 680,800L600,800L600,880L520,880L520,720L680,720Q680,720 680,720Q680,720 680,720L680,520L788,520L750,365Q727,274 652,217Q577,160 480,160Q364,160 282,241Q200,322 200,438Q200,498 224.5,552Q249,606 294,648L320,672L320,880L240,880ZM494,520L494,520L494,520Q494,520 494,520Q494,520 494,520Q494,520 494,520Q494,520 494,520Q494,520 494,520Q494,520 494,520L494,520L494,520L494,520Q494,520 494,520Q494,520 494,520L494,520L494,520Z" />
</vector>

View File

@@ -0,0 +1,25 @@
<!--
Copyright (C) 2024 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="24dp"
android:height="24dp"
android:tint="?android:attr/colorControlNormal"
android:viewportHeight="960"
android:viewportWidth="960">
<path
android:fillColor="@android:color/white"
android:pathData="M234,684Q285,645 348,622.5Q411,600 480,600Q549,600 612,622.5Q675,645 726,684Q761,643 780.5,591Q800,539 800,480Q800,347 706.5,253.5Q613,160 480,160Q347,160 253.5,253.5Q160,347 160,480Q160,539 179.5,591Q199,643 234,684ZM480,520Q421,520 380.5,479.5Q340,439 340,380Q340,321 380.5,280.5Q421,240 480,240Q539,240 579.5,280.5Q620,321 620,380Q620,439 579.5,479.5Q539,520 480,520ZM480,880Q397,880 324,848.5Q251,817 197,763Q143,709 111.5,636Q80,563 80,480Q80,397 111.5,324Q143,251 197,197Q251,143 324,111.5Q397,80 480,80Q563,80 636,111.5Q709,143 763,197Q817,251 848.5,324Q880,397 880,480Q880,563 848.5,636Q817,709 763,763Q709,817 636,848.5Q563,880 480,880ZM480,800Q533,800 580,784.5Q627,769 666,740Q627,711 580,695.5Q533,680 480,680Q427,680 380,695.5Q333,711 294,740Q333,769 380,784.5Q427,800 480,800ZM480,440Q506,440 523,423Q540,406 540,380Q540,354 523,337Q506,320 480,320Q454,320 437,337Q420,354 420,380Q420,406 437,423Q454,440 480,440ZM480,380Q480,380 480,380Q480,380 480,380Q480,380 480,380Q480,380 480,380Q480,380 480,380Q480,380 480,380Q480,380 480,380Q480,380 480,380ZM480,740Q480,740 480,740Q480,740 480,740Q480,740 480,740Q480,740 480,740Q480,740 480,740Q480,740 480,740Q480,740 480,740Q480,740 480,740Z" />
</vector>

View File

@@ -0,0 +1,25 @@
<!--
Copyright (C) 2024 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="24dp"
android:height="24dp"
android:tint="?android:attr/colorControlNormal"
android:viewportHeight="960"
android:viewportWidth="960">
<path
android:fillColor="@android:color/white"
android:pathData="M354,673L480,597L606,674L573,530L684,434L538,421L480,285L422,420L276,433L387,530L354,673ZM233,840L298,559L80,370L368,345L480,80L592,345L880,370L662,559L727,840L480,691L233,840ZM480,490L480,490L480,490L480,490L480,490L480,490L480,490L480,490L480,490L480,490Z" />
</vector>

View File

@@ -0,0 +1,26 @@
<!--
~ Copyright (C) 2024 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="24dp"
android:height="24dp"
android:tint="?android:attr/colorControlNormal"
android:viewportHeight="960"
android:viewportWidth="960">
<path
android:fillColor="@android:color/white"
android:pathData="M612,668L668,612L520,464L520,280L440,280L440,496L612,668ZM480,880Q397,880 324,848.5Q251,817 197,763Q143,709 111.5,636Q80,563 80,480Q80,397 111.5,324Q143,251 197,197Q251,143 324,111.5Q397,80 480,80Q563,80 636,111.5Q709,143 763,197Q817,251 848.5,324Q880,397 880,480Q880,563 848.5,636Q817,709 763,763Q709,817 636,848.5Q563,880 480,880ZM480,480Q480,480 480,480Q480,480 480,480Q480,480 480,480Q480,480 480,480Q480,480 480,480Q480,480 480,480Q480,480 480,480Q480,480 480,480ZM480,800Q613,800 706.5,706.5Q800,613 800,480Q800,347 706.5,253.5Q613,160 480,160Q347,160 253.5,253.5Q160,347 160,480Q160,613 253.5,706.5Q347,800 480,800Z" />
</vector>

View File

@@ -0,0 +1,25 @@
<!--
Copyright (C) 2024 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="24dp"
android:height="24dp"
android:tint="?android:attr/colorControlNormal"
android:viewportHeight="960"
android:viewportWidth="960">
<path
android:fillColor="@android:color/white"
android:pathData="M160,840L160,120L240,120L240,200L320,200L320,120L640,120L640,200L720,200L720,120L800,120L800,840L720,840L720,760L640,760L640,840L320,840L320,760L240,760L240,840L160,840ZM240,680L320,680L320,600L240,600L240,680ZM240,520L320,520L320,440L240,440L240,520ZM240,360L320,360L320,280L240,280L240,360ZM640,680L720,680L720,600L640,600L640,680ZM640,520L720,520L720,440L640,440L640,520ZM640,360L720,360L720,280L640,280L640,360ZM400,760L560,760L560,200L400,200L400,760ZM400,200L400,200L560,200L560,200L400,200Z" />
</vector>

View File

@@ -0,0 +1,25 @@
<!--
Copyright (C) 2024 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="24dp"
android:height="24dp"
android:tint="?android:attr/colorControlNormal"
android:viewportHeight="960"
android:viewportWidth="960">
<path
android:fillColor="@android:color/white"
android:pathData="M480,880Q407,871 335,840.5Q263,810 206.5,753Q150,696 115,609Q80,522 80,400L80,360L120,360Q171,360 225,373Q279,386 326,412Q338,326 380.5,235.5Q423,145 480,80Q537,145 579.5,235.5Q622,326 634,412Q681,386 735,373Q789,360 840,360L880,360L880,400Q880,522 845,609Q810,696 753.5,753Q697,810 625.5,840.5Q554,871 480,880ZM478,798Q467,632 379.5,547Q292,462 162,442Q173,613 263.5,697Q354,781 478,798ZM480,544Q495,522 516.5,498.5Q538,475 558,458Q556,401 535.5,339Q515,277 480,218Q445,277 424.5,339Q404,401 402,458Q422,475 444,498.5Q466,522 480,544ZM558,780Q595,768 635,745Q675,722 709.5,682.5Q744,643 768.5,584Q793,525 798,442Q704,456 633,504.5Q562,553 524,628Q536,660 544.5,698Q553,736 558,780ZM480,544Q480,544 480,544Q480,544 480,544Q480,544 480,544Q480,544 480,544Q480,544 480,544Q480,544 480,544Q480,544 480,544Q480,544 480,544ZM558,780Q558,780 558,780Q558,780 558,780Q558,780 558,780Q558,780 558,780Q558,780 558,780Q558,780 558,780Q558,780 558,780Q558,780 558,780ZM478,798Q478,798 478,798Q478,798 478,798Q478,798 478,798Q478,798 478,798ZM524,628L524,628Q524,628 524,628Q524,628 524,628L524,628L524,628L524,628Q524,628 524,628Q524,628 524,628L524,628Q524,628 524,628Q524,628 524,628ZM480,880L480,880Q480,880 480,880Q480,880 480,880Q480,880 480,880Q480,880 480,880Q480,880 480,880Q480,880 480,880Q480,880 480,880Q480,880 480,880Q480,880 480,880Q480,880 480,880L480,880Q480,880 480,880Q480,880 480,880L480,880Q480,880 480,880Q480,880 480,880L480,880Z" />
</vector>

View File

@@ -77,8 +77,8 @@
android:layout_marginTop="@dimen/settingslib_illustration_padding"
android:layout_marginBottom="@dimen/settingslib_illustration_padding"
android:adjustViewBounds="true"
android:background="@drawable/protection_background"
android:maxHeight="@dimen/accessibility_imageview_size"
android:scaleType="fitStart"
app:layout_constrainedHeight="true"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0"

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -46,7 +46,6 @@ public class AccessibilityButtonPreviewPreferenceController extends BasePreferen
private final ContentResolver mContentResolver;
@VisibleForTesting
final ContentObserver mContentObserver;
private AccessibilityLayerDrawable mAccessibilityPreviewDrawable;
@VisibleForTesting
IllustrationPreference mIllustrationPreference;
@@ -108,34 +107,23 @@ public class AccessibilityButtonPreviewPreferenceController extends BasePreferen
if (AccessibilityUtil.isFloatingMenuEnabled(mContext)) {
final int size = Settings.Secure.getInt(mContentResolver,
Settings.Secure.ACCESSIBILITY_FLOATING_MENU_SIZE, DEFAULT_SIZE);
// The alpha range when set on a drawable is [0-255]
final int opacity = (int) (Settings.Secure.getFloat(mContentResolver,
Settings.Secure.ACCESSIBILITY_FLOATING_MENU_OPACITY, DEFAULT_OPACITY) * 100);
Settings.Secure.ACCESSIBILITY_FLOATING_MENU_OPACITY, DEFAULT_OPACITY) * 255);
final int floatingMenuIconId = (size == SMALL_SIZE)
? R.drawable.a11y_button_preview_small_floating_menu
: R.drawable.a11y_button_preview_large_floating_menu;
mIllustrationPreference.setImageDrawable(
getAccessibilityPreviewDrawable(floatingMenuIconId, opacity));
? R.drawable.accessibility_shortcut_type_fab_size_small_preview
: R.drawable.accessibility_shortcut_type_fab_size_large_preview;
Drawable fabDrawable = mContext.getDrawable(floatingMenuIconId);
fabDrawable.setAlpha(opacity);
mIllustrationPreference.setImageDrawable(fabDrawable);
} else if (AccessibilityUtil.isGestureNavigateEnabled(mContext)) {
mIllustrationPreference.setImageDrawable(mContext.getDrawable(
AccessibilityUtil.isTouchExploreEnabled(mContext)
? R.drawable.a11y_button_preview_three_finger
: R.drawable.a11y_button_preview_two_finger));
? R.drawable.accessibility_shortcut_type_gesture_touch_explore_on
: R.drawable.accessibility_shortcut_type_gesture));
} else {
mIllustrationPreference.setImageDrawable(
mContext.getDrawable(R.drawable.a11y_button_navigation));
mContext.getDrawable(R.drawable.accessibility_shortcut_type_navbar));
}
}
private Drawable getAccessibilityPreviewDrawable(int resId, int opacity) {
if (mAccessibilityPreviewDrawable == null) {
mAccessibilityPreviewDrawable = AccessibilityLayerDrawable.createLayerDrawable(
mContext, resId, opacity);
} else {
mAccessibilityPreviewDrawable.updateLayerDrawable(mContext, resId, opacity);
// Only change alpha (opacity) value did not change drawable id. It needs to force to
// redraw.
mAccessibilityPreviewDrawable.invalidateSelf();
}
return mAccessibilityPreviewDrawable;
}
}

View File

@@ -1,133 +0,0 @@
/*
* 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.
*/
package com.android.settings.accessibility;
import android.content.Context;
import android.graphics.drawable.Drawable;
import android.graphics.drawable.LayerDrawable;
import androidx.annotation.NonNull;
import androidx.annotation.VisibleForTesting;
import com.android.settings.R;
import java.util.Objects;
/** LayerDrawable that contains device icon as background and given icon as foreground. */
public class AccessibilityLayerDrawable extends LayerDrawable {
private AccessibilityLayerDrawableState mState;
/**
* Creates a new layer drawable with the list of specified layers.
*
* @param layers a list of drawables to use as layers in this new drawable,
* must be non-null
*/
private AccessibilityLayerDrawable(@NonNull Drawable[] layers) {
super(layers);
}
/**
* Create the {@link LayerDrawable} that contains device icon as background and given menu icon
* with given {@code opacity} value as foreground.
*
* @param context the valid context used to get the icon
* @param resId the resource ID of the given icon
* @param opacity the opacity to apply to the given icon
* @return the drawable that combines the device icon and the given icon
*/
public static AccessibilityLayerDrawable createLayerDrawable(Context context, int resId,
int opacity) {
final Drawable bg = context.getDrawable(R.drawable.a11y_button_preview_base);
final AccessibilityLayerDrawable basicDrawable = new AccessibilityLayerDrawable(
new Drawable[]{bg, null});
basicDrawable.updateLayerDrawable(context, resId, opacity);
return basicDrawable;
}
/**
* Update the drawable with given {@code resId} drawable and {@code opacity}(alpha)
* value at index 1 layer.
*
* @param context the valid context used to get the icon
* @param resId the resource ID of the given icon
* @param opacity the opacity to apply to the given icon
*/
public void updateLayerDrawable(Context context, int resId, int opacity) {
final Drawable icon = context.getDrawable(resId);
icon.setAlpha(opacity);
this.setDrawable(/* index= */ 1, icon);
this.setConstantState(context, resId, opacity);
}
@Override
public ConstantState getConstantState() {
return mState;
}
/** Stores the constant state and data to the given drawable. */
private void setConstantState(Context context, int resId, int opacity) {
mState = new AccessibilityLayerDrawableState(context, resId, opacity);
}
/** {@link ConstantState} to store the data of {@link AccessibilityLayerDrawable}. */
@VisibleForTesting
static class AccessibilityLayerDrawableState extends ConstantState {
private final Context mContext;
private final int mResId;
private final int mOpacity;
AccessibilityLayerDrawableState(Context context, int resId, int opacity) {
mContext = context;
mResId = resId;
mOpacity = opacity;
}
@NonNull
@Override
public Drawable newDrawable() {
return createLayerDrawable(mContext, mResId, mOpacity);
}
@Override
public int getChangingConfigurations() {
return 0;
}
@Override
public boolean equals(Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
final AccessibilityLayerDrawableState that = (AccessibilityLayerDrawableState) o;
return mResId == that.mResId
&& mOpacity == that.mOpacity
&& Objects.equals(mContext, that.mContext);
}
@Override
public int hashCode() {
return Objects.hash(mContext, mResId, mOpacity);
}
}
}

View File

@@ -246,8 +246,9 @@ public final class AccessibilityShortcutsTutorial {
final ImageView imageView = view.findViewById(R.id.image);
final int gestureSettingsImageResId =
isTouchExploreEnabled ? R.drawable.a11y_gesture_navigation_three_finger_preview
: R.drawable.a11y_gesture_navigation_two_finger_preview;
isTouchExploreEnabled
? R.drawable.accessibility_shortcut_type_gesture_preview_touch_explore_on
: R.drawable.accessibility_shortcut_type_gesture_preview;
imageView.setImageResource(gestureSettingsImageResId);
final TextView textView = view.findViewById(R.id.gesture_tutorial_message);
@@ -408,7 +409,7 @@ public final class AccessibilityShortcutsTutorial {
final CharSequence title =
context.getText(R.string.accessibility_tutorial_dialog_title_volume);
final View image =
createIllustrationView(context, R.drawable.a11y_shortcut_type_hardware);
createIllustrationView(context, R.drawable.accessibility_shortcut_type_volume_keys);
final ImageView indicatorIcon =
createImageView(context, R.drawable.ic_accessibility_page_indicator);
final CharSequence instruction =
@@ -424,7 +425,7 @@ public final class AccessibilityShortcutsTutorial {
context.getText(R.string.accessibility_tutorial_dialog_title_triple);
final View image =
createIllustrationViewWithImageRawResource(context,
R.raw.a11y_shortcut_type_triple_tap);
R.raw.accessibility_shortcut_type_tripletap);
final CharSequence instruction = context.getString(
R.string.accessibility_tutorial_dialog_tripletap_instruction, 3);
final ImageView indicatorIcon =
@@ -439,10 +440,9 @@ public final class AccessibilityShortcutsTutorial {
final int numFingers = 2;
final CharSequence title = context.getString(
R.string.accessibility_tutorial_dialog_title_two_finger_double, numFingers);
// TODO(b/308088945): Update tutorial image when UX provides them
final View image =
createIllustrationViewWithImageRawResource(context,
R.raw.a11y_shortcut_type_triple_tap);
R.raw.accessibility_shortcut_type_2finger_doubletap);
final CharSequence instruction = context.getString(
R.string.accessibility_tutorial_dialog_twofinger_doubletap_instruction, numFingers);
final ImageView indicatorIcon =
@@ -459,7 +459,7 @@ public final class AccessibilityShortcutsTutorial {
context.getText(R.string.accessibility_tutorial_dialog_title_quick_setting);
final View image =
createIllustrationView(context,
R.drawable.a11y_shortcut_type_quick_settings);
R.drawable.accessibility_shortcut_type_quick_settings);
// Remove the unneeded background, since the main image already includes a background
image.findViewById(R.id.image_background).setVisibility(GONE);
final int numFingers = AccessibilityUtil.isTouchExploreEnabled(context) ? 2 : 1;
@@ -526,13 +526,14 @@ public final class AccessibilityShortcutsTutorial {
private static View createSoftwareImage(Context context) {
int resId;
if (AccessibilityUtil.isFloatingMenuEnabled(context)) {
resId = R.drawable.a11y_shortcut_type_software_floating;
return createIllustrationViewWithImageRawResource(
context, R.raw.accessibility_shortcut_type_fab);
} else if (AccessibilityUtil.isGestureNavigateEnabled(context)) {
resId = AccessibilityUtil.isTouchExploreEnabled(context)
? R.drawable.a11y_shortcut_type_software_gesture_talkback
: R.drawable.a11y_shortcut_type_software_gesture;
? R.drawable.accessibility_shortcut_type_gesture_touch_explore_on
: R.drawable.accessibility_shortcut_type_gesture;
} else {
resId = R.drawable.a11y_shortcut_type_software;
resId = R.drawable.accessibility_shortcut_type_navbar;
}
return createIllustrationView(context, resId);
}

View File

@@ -60,6 +60,7 @@ import com.android.settings.accessibility.AccessibilityUtil.UserShortcutType;
import com.android.settings.accessibility.shortcuts.EditShortcutsPreferenceFragment;
import com.android.settings.utils.LocaleUtils;
import com.android.settingslib.core.AbstractPreferenceController;
import com.android.settingslib.widget.IllustrationPreference;
import com.google.android.setupcompat.util.WizardManagerHelper;
@@ -130,6 +131,11 @@ public class ToggleScreenMagnificationPreferenceFragment extends
@Override
public void onResume() {
super.onResume();
final IllustrationPreference illustrationPreference =
getPreferenceScreen().findPreference(KEY_ANIMATED_IMAGE);
if (illustrationPreference != null) {
illustrationPreference.applyDynamicColor();
}
final AccessibilityManager am = getPrefContext().getSystemService(
AccessibilityManager.class);

View File

@@ -44,8 +44,7 @@ public class FloatingButtonShortcutOptionController
if (preference instanceof ShortcutOptionPreference shortcutOptionPreference) {
shortcutOptionPreference.setTitle(
R.string.accessibility_shortcut_edit_dialog_title_software);
shortcutOptionPreference.setIntroImageResId(
R.drawable.a11y_shortcut_type_software_floating);
shortcutOptionPreference.setIntroImageRawResId(R.raw.accessibility_shortcut_type_fab);
}
}

View File

@@ -45,8 +45,8 @@ public class GestureShortcutOptionController extends SoftwareShortcutOptionPrefe
R.string.accessibility_shortcut_edit_dialog_title_software_by_gesture);
int resId = AccessibilityUtil.isTouchExploreEnabled(mContext)
? R.drawable.a11y_shortcut_type_software_gesture_talkback
: R.drawable.a11y_shortcut_type_software_gesture;
? R.drawable.accessibility_shortcut_type_gesture_touch_explore_on
: R.drawable.accessibility_shortcut_type_gesture;
shortcutOptionPreference.setIntroImageResId(resId);
}
}

View File

@@ -47,7 +47,8 @@ public class NavButtonShortcutOptionController extends SoftwareShortcutOptionPre
if (preference instanceof ShortcutOptionPreference shortcutOptionPreference) {
shortcutOptionPreference.setTitle(
R.string.accessibility_shortcut_edit_dialog_title_software);
shortcutOptionPreference.setIntroImageResId(R.drawable.a11y_shortcut_type_software);
shortcutOptionPreference.setIntroImageResId(
R.drawable.accessibility_shortcut_type_navbar);
shortcutOptionPreference.setSummaryProvider(
new Preference.SummaryProvider<ShortcutOptionPreference>() {
@Override

View File

@@ -65,7 +65,7 @@ public class QuickSettingsShortcutOptionController extends ShortcutOptionPrefere
shortcutOptionPreference.setTitle(
R.string.accessibility_shortcut_edit_dialog_title_quick_settings);
shortcutOptionPreference.setIntroImageResId(
R.drawable.a11y_shortcut_type_quick_settings);
R.drawable.accessibility_shortcut_type_quick_settings);
}
}

View File

@@ -97,7 +97,7 @@ public class ShortcutOptionPreference extends CheckBoxPreference {
result));
imageView.setAnimation(mIntroImageRawResId);
imageView.setRepeatCount(LottieDrawable.INFINITE);
LottieColorUtils.applyDynamicColors(getContext(), imageView);
LottieColorUtils.applyDynamicColors(imageView.getContext(), imageView);
imageView.playAnimation();
} else {
imageView.setImageResource(mIntroImageResId);

View File

@@ -57,7 +57,7 @@ public class TripleTapShortcutOptionController extends ShortcutOptionPreferenceC
shortcutOptionPreference.setSummary(summary);
shortcutOptionPreference.setIntroImageRawResId(
R.raw.a11y_shortcut_type_triple_tap);
R.raw.accessibility_shortcut_type_tripletap);
}
}

View File

@@ -63,9 +63,8 @@ public class TwoFingerDoubleTapShortcutOptionController
numFingers);
shortcutOptionPreference.setSummary(summary);
// TODO (b/306153204): Update shortcut image when UX provides them
shortcutOptionPreference.setIntroImageRawResId(
R.raw.a11y_shortcut_type_triple_tap);
R.raw.accessibility_shortcut_type_2finger_doubletap);
}
}

View File

@@ -53,7 +53,7 @@ public class VolumeKeysShortcutOptionController extends ShortcutOptionPreference
shortcutOptionPreference.setSummary(
R.string.accessibility_shortcut_edit_dialog_summary_hardware);
shortcutOptionPreference.setIntroImageResId(
R.drawable.a11y_shortcut_type_hardware);
R.drawable.accessibility_shortcut_type_volume_keys);
}
}

View File

@@ -19,6 +19,7 @@ package com.android.settings.biometrics.face;
import static android.app.Activity.RESULT_OK;
import static android.app.admin.DevicePolicyResources.Strings.Settings.FACE_SETTINGS_FOR_WORK_TITLE;
import static com.android.settings.Utils.isPrivateProfile;
import static com.android.settings.biometrics.BiometricEnrollBase.CONFIRM_REQUEST;
import static com.android.settings.biometrics.BiometricEnrollBase.ENROLL_REQUEST;
import static com.android.settings.biometrics.BiometricEnrollBase.RESULT_FINISHED;
@@ -172,6 +173,10 @@ public class FaceSettings extends DashboardFragment {
mDevicePolicyManager.getResources().getString(FACE_SETTINGS_FOR_WORK_TITLE,
() -> getActivity().getResources().getString(
R.string.security_settings_face_profile_preference_title)));
} else if (isPrivateProfile(mUserId, getContext())) {
getActivity().setTitle(
getActivity().getResources().getString(
R.string.private_space_face_unlock_title));
}
mLockscreenController = Utils.isMultipleBiometricsSupported(context)

View File

@@ -22,6 +22,7 @@ import static android.app.admin.DevicePolicyResources.Strings.Settings.WORK_PROF
import static android.app.admin.DevicePolicyResources.UNDEFINED;
import static com.android.settings.Utils.SETTINGS_PACKAGE_NAME;
import static com.android.settings.Utils.isPrivateProfile;
import static com.android.settings.biometrics.BiometricEnrollBase.EXTRA_FROM_SETTINGS_SUMMARY;
import static com.android.settings.biometrics.BiometricEnrollBase.EXTRA_KEY_CHALLENGE;
@@ -127,7 +128,10 @@ public class FingerprintSettings extends SubSettings {
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
CharSequence msg = getText(R.string.security_settings_fingerprint_preference_title);
final int userId = getIntent().getIntExtra(Intent.EXTRA_USER_ID, UserHandle.myUserId());
CharSequence msg = getText(isPrivateProfile(userId, this)
? R.string.private_space_fingerprint_unlock_title
: R.string.security_settings_fingerprint_preference_title);
setTitle(msg);
}

View File

@@ -17,6 +17,7 @@ package com.android.settings.connecteddevice;
import static com.android.settingslib.Utils.isAudioModeOngoingCall;
import android.app.settings.SettingsEnums;
import android.bluetooth.BluetoothDevice;
import android.bluetooth.BluetoothLeBroadcast;
import android.bluetooth.BluetoothLeBroadcastAssistant;
@@ -47,6 +48,7 @@ import com.android.settings.connecteddevice.audiosharing.AudioSharingDialogHandl
import com.android.settings.connecteddevice.audiosharing.AudioSharingUtils;
import com.android.settings.core.BasePreferenceController;
import com.android.settings.dashboard.DashboardFragment;
import com.android.settings.overlay.FeatureFactory;
import com.android.settingslib.bluetooth.BluetoothCallback;
import com.android.settingslib.bluetooth.BluetoothUtils;
import com.android.settingslib.bluetooth.CachedBluetoothDevice;
@@ -279,6 +281,8 @@ public class AvailableMediaDeviceGroupController extends BasePreferenceControlle
((BluetoothDevicePreference) preference).getBluetoothDevice();
if (AudioSharingUtils.isFeatureEnabled() && mDialogHandler != null) {
mDialogHandler.handleDeviceConnected(cachedDevice, /* userTriggered= */ true);
FeatureFactory.getFeatureFactory().getMetricsFeatureProvider()
.action(mContext, SettingsEnums.ACTION_MEDIA_DEVICE_CLICK);
} else {
cachedDevice.setActive();
}

View File

@@ -16,6 +16,7 @@
package com.android.settings.connecteddevice.audiosharing;
import android.app.settings.SettingsEnums;
import android.content.Context;
import android.util.Log;
@@ -70,6 +71,7 @@ public class AudioSharingBluetoothDeviceUpdater extends BluetoothDeviceUpdater
@Override
public boolean onPreferenceClick(Preference preference) {
mMetricsFeatureProvider.logClickedPreference(preference, mMetricsCategory);
mMetricsFeatureProvider.action(mContext, SettingsEnums.ACTION_AUDIO_SHARING_DEVICE_CLICK);
return true;
}

View File

@@ -51,7 +51,7 @@ public class AudioSharingCallAudioDialogFragment extends InstrumentedDialogFragm
@Override
public int getMetricsCategory() {
return SettingsEnums.DIALOG_AUDIO_SHARING_SWITCH_ACTIVE;
return SettingsEnums.DIALOG_AUDIO_SHARING_CALL_AUDIO;
}
/**

View File

@@ -16,6 +16,7 @@
package com.android.settings.connecteddevice.audiosharing;
import android.app.settings.SettingsEnums;
import android.bluetooth.BluetoothLeBroadcast;
import android.bluetooth.BluetoothLeBroadcastMetadata;
import android.content.Context;
@@ -32,9 +33,11 @@ import androidx.preference.TwoStatePreference;
import com.android.settings.R;
import com.android.settings.bluetooth.Utils;
import com.android.settings.core.TogglePreferenceController;
import com.android.settings.overlay.FeatureFactory;
import com.android.settingslib.bluetooth.LocalBluetoothLeBroadcast;
import com.android.settingslib.bluetooth.LocalBluetoothManager;
import com.android.settingslib.bluetooth.LocalBluetoothProfileManager;
import com.android.settingslib.core.instrumentation.MetricsFeatureProvider;
import com.android.settingslib.utils.ThreadUtils;
import java.util.concurrent.Executor;
@@ -53,6 +56,7 @@ public class AudioSharingCompatibilityPreferenceController extends TogglePrefere
@Nullable private final LocalBluetoothLeBroadcast mBroadcast;
@Nullable private TwoStatePreference mPreference;
private final Executor mExecutor;
private final MetricsFeatureProvider mMetricsFeatureProvider;
private AtomicBoolean mCallbacksRegistered = new AtomicBoolean(false);
private final BluetoothLeBroadcast.Callback mBroadcastCallback =
@@ -108,6 +112,7 @@ public class AudioSharingCompatibilityPreferenceController extends TogglePrefere
mProfileManager = mBtManager == null ? null : mBtManager.getProfileManager();
mBroadcast = mProfileManager == null ? null : mProfileManager.getLeAudioBroadcastProfile();
mExecutor = Executors.newSingleThreadExecutor();
mMetricsFeatureProvider = FeatureFactory.getFeatureFactory().getMetricsFeatureProvider();
}
@Override
@@ -178,6 +183,8 @@ public class AudioSharingCompatibilityPreferenceController extends TogglePrefere
}
mBroadcast.setImproveCompatibility(isChecked);
// TODO: call updateBroadcast once framework change ready.
mMetricsFeatureProvider.action(
mContext, SettingsEnums.ACTION_AUDIO_SHARING_IMPROVE_COMPATIBILITY, isChecked);
return true;
}

View File

@@ -17,6 +17,7 @@
package com.android.settings.connecteddevice.audiosharing;
import android.app.Dialog;
import android.app.settings.SettingsEnums;
import android.os.Bundle;
import android.util.Log;
@@ -33,8 +34,7 @@ public class AudioSharingConfirmDialogFragment extends InstrumentedDialogFragmen
@Override
public int getMetricsCategory() {
// TODO: add metrics category.
return 0;
return SettingsEnums.DIALOG_AUDIO_SHARING_CONFIRMATION;
}
/**
@@ -63,7 +63,7 @@ public class AudioSharingConfirmDialogFragment extends InstrumentedDialogFragmen
.setTitleIcon(com.android.settingslib.R.drawable.ic_bt_le_audio_sharing)
.setIsCustomBodyEnabled(true)
.setCustomMessage(R.string.audio_sharing_comfirm_dialog_content)
.setPositiveButton(com.android.settings.R.string.okay, (d, w) -> dismiss())
.setPositiveButton(com.android.settings.R.string.okay, (d, w) -> {})
.build();
dialog.setCanceledOnTouchOutside(true);
return dialog;

View File

@@ -16,6 +16,7 @@
package com.android.settings.connecteddevice.audiosharing;
import android.app.settings.SettingsEnums;
import android.bluetooth.BluetoothCsipSetCoordinator;
import android.bluetooth.BluetoothDevice;
import android.content.Context;
@@ -156,6 +157,10 @@ public class AudioSharingDeviceVolumeControlUpdater extends BluetoothDeviceUpdat
if (mVolumeControl != null) {
mVolumeControl.setDeviceVolume(
cachedDevice.getDevice(), progress, /* isGroupOp= */ true);
mMetricsFeatureProvider.action(
mContext,
SettingsEnums.ACTION_AUDIO_SHARING_CHANGE_MEDIA_DEVICE_VOLUME,
/* isPrimary= */ false);
}
}
@@ -170,6 +175,10 @@ public class AudioSharingDeviceVolumeControlUpdater extends BluetoothDeviceUpdat
- audioManager.getStreamMinVolume(AudioManager.STREAM_MUSIC);
int volume = Math.round((float) progress * streamVolumeRange / seekbarRange);
audioManager.setStreamVolume(AudioManager.STREAM_MUSIC, volume, 0);
mMetricsFeatureProvider.action(
mContext,
SettingsEnums.ACTION_AUDIO_SHARING_CHANGE_MEDIA_DEVICE_VOLUME,
/* isPrimary= */ true);
} catch (RuntimeException e) {
Log.e(TAG, "Fail to setAudioManagerStreamVolumeForFallbackDevice, error = " + e);
}

View File

@@ -56,7 +56,7 @@ public class AudioSharingJoinDialogFragment extends InstrumentedDialogFragment {
@Override
public int getMetricsCategory() {
return AudioSharingUtils.isBroadcasting(Utils.getLocalBtManager(getContext()))
? SettingsEnums.DIALOG_START_AUDIO_SHARING
? SettingsEnums.DIALOG_AUDIO_SHARING_ADD_DEVICE
: SettingsEnums.DIALOG_START_AUDIO_SHARING;
}

View File

@@ -16,6 +16,7 @@
package com.android.settings.connecteddevice.audiosharing;
import android.app.settings.SettingsEnums;
import android.content.ContentResolver;
import android.content.Context;
import android.media.AudioAttributes;
@@ -31,6 +32,8 @@ import androidx.lifecycle.LifecycleOwner;
import androidx.preference.PreferenceScreen;
import com.android.settings.R;
import com.android.settings.overlay.FeatureFactory;
import com.android.settingslib.core.instrumentation.MetricsFeatureProvider;
public class AudioSharingPlaySoundPreferenceController
extends AudioSharingBasePreferenceController {
@@ -39,6 +42,7 @@ public class AudioSharingPlaySoundPreferenceController
private static final String PREF_KEY = "audio_sharing_play_sound";
private final MetricsFeatureProvider mMetricsFeatureProvider;
private Ringtone mRingtone;
public AudioSharingPlaySoundPreferenceController(Context context) {
@@ -47,6 +51,7 @@ public class AudioSharingPlaySoundPreferenceController
if (mRingtone != null) {
mRingtone.setStreamType(AudioManager.STREAM_MUSIC);
}
mMetricsFeatureProvider = FeatureFactory.getFeatureFactory().getMetricsFeatureProvider();
}
@Override
@@ -74,6 +79,9 @@ public class AudioSharingPlaySoundPreferenceController
.build());
if (!mRingtone.isPlaying()) {
mRingtone.play();
mMetricsFeatureProvider.action(
mContext,
SettingsEnums.ACTION_AUDIO_SHARING_PLAY_TEST_SOUND);
}
} catch (Throwable e) {
Log.w(TAG, "Fail to play sample, error = " + e);

View File

@@ -20,6 +20,7 @@ import android.app.Notification;
import android.app.NotificationChannel;
import android.app.NotificationManager;
import android.app.PendingIntent;
import android.app.settings.SettingsEnums;
import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;
@@ -30,8 +31,10 @@ import androidx.core.app.NotificationCompat;
import com.android.settings.R;
import com.android.settings.bluetooth.Utils;
import com.android.settings.overlay.FeatureFactory;
import com.android.settingslib.bluetooth.LocalBluetoothLeBroadcast;
import com.android.settingslib.bluetooth.LocalBluetoothManager;
import com.android.settingslib.core.instrumentation.MetricsFeatureProvider;
public class AudioSharingReceiver extends BroadcastReceiver {
private static final String TAG = "AudioSharingNotification";
@@ -54,6 +57,8 @@ public class AudioSharingReceiver extends BroadcastReceiver {
Log.w(TAG, "Received unexpected intent with null action.");
return;
}
MetricsFeatureProvider metricsFeatureProvider =
FeatureFactory.getFeatureFactory().getMetricsFeatureProvider();
switch (action) {
case LocalBluetoothLeBroadcast.ACTION_LE_AUDIO_SHARING_STATE_CHANGE:
int state =
@@ -61,8 +66,12 @@ public class AudioSharingReceiver extends BroadcastReceiver {
LocalBluetoothLeBroadcast.EXTRA_LE_AUDIO_SHARING_STATE, -1);
if (state == LocalBluetoothLeBroadcast.BROADCAST_STATE_ON) {
showSharingNotification(context);
metricsFeatureProvider.action(
context, SettingsEnums.ACTION_SHOW_AUDIO_SHARING_NOTIFICATION);
} else if (state == LocalBluetoothLeBroadcast.BROADCAST_STATE_OFF) {
cancelSharingNotification(context);
metricsFeatureProvider.action(
context, SettingsEnums.ACTION_CANCEL_AUDIO_SHARING_NOTIFICATION);
} else {
Log.w(
TAG,
@@ -72,6 +81,8 @@ public class AudioSharingReceiver extends BroadcastReceiver {
case ACTION_LE_AUDIO_SHARING_STOP:
LocalBluetoothManager manager = Utils.getLocalBtManager(context);
AudioSharingUtils.stopBroadcasting(manager);
metricsFeatureProvider.action(
context, SettingsEnums.ACTION_STOP_AUDIO_SHARING_FROM_NOTIFICATION);
break;
default:
Log.w(TAG, "Received unexpected intent " + intent.getAction());
@@ -98,7 +109,11 @@ public class AudioSharingReceiver extends BroadcastReceiver {
stopIntent,
PendingIntent.FLAG_IMMUTABLE);
Intent settingsIntent =
new Intent(ACTION_LE_AUDIO_SHARING_SETTINGS).setPackage(context.getPackageName());
new Intent(ACTION_LE_AUDIO_SHARING_SETTINGS)
.setPackage(context.getPackageName())
.putExtra(
MetricsFeatureProvider.EXTRA_SOURCE_METRICS_CATEGORY,
SettingsEnums.NOTIFICATION_AUDIO_SHARING);
PendingIntent settingsPendingIntent =
PendingIntent.getActivity(
context,

View File

@@ -16,6 +16,8 @@
package com.android.settings.localepicker;
import static android.window.OnBackInvokedDispatcher.PRIORITY_DEFAULT;
import android.app.FragmentTransaction;
import android.content.Intent;
import android.os.Bundle;
@@ -23,6 +25,7 @@ import android.os.LocaleList;
import android.provider.Settings;
import android.util.Log;
import android.view.MenuItem;
import android.window.OnBackInvokedCallback;
import androidx.core.view.ViewCompat;
@@ -39,6 +42,10 @@ public class LocalePickerWithRegionActivity extends SettingsBaseActivity
private LocalePickerWithRegion mSelector;
private final OnBackInvokedCallback mOnBackInvokedCallback = () -> {
handleBackPressed();
};
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
@@ -52,7 +59,8 @@ public class LocalePickerWithRegionActivity extends SettingsBaseActivity
: bundle.getParcelable(Settings.EXTRA_EXPLICIT_LOCALES, LocaleList.class);
Log.i(TAG, "Has explicit locales : " + explicitLocales);
}
getOnBackInvokedDispatcher()
.registerOnBackInvokedCallback(PRIORITY_DEFAULT, mOnBackInvokedCallback);
mSelector = LocalePickerWithRegion.createLanguagePicker(
this,
LocalePickerWithRegionActivity.this,
@@ -68,6 +76,12 @@ public class LocalePickerWithRegionActivity extends SettingsBaseActivity
.commit();
}
@Override
public void onDestroy() {
super.onDestroy();
getOnBackInvokedDispatcher().unregisterOnBackInvokedCallback(mOnBackInvokedCallback);
}
@Override
public boolean onOptionsItemSelected(MenuItem item) {
if (item.getItemId() == android.R.id.home) {
@@ -85,11 +99,6 @@ public class LocalePickerWithRegionActivity extends SettingsBaseActivity
finish();
}
@Override
public void onBackPressed() {
handleBackPressed();
}
private void handleBackPressed() {
if (getFragmentManager().getBackStackEntryCount() > 1) {
super.onBackPressed();

View File

@@ -56,47 +56,42 @@ class IconLoader {
@Nullable // Until first usage
private static IconLoader sInstance;
private final Context mContext;
private final LruCache<String, Drawable> mCache;
private final ListeningExecutorService mBackgroundExecutor;
static IconLoader getInstance(Context context) {
static IconLoader getInstance() {
if (sInstance == null) {
sInstance = new IconLoader(context);
sInstance = new IconLoader();
}
return sInstance;
}
private IconLoader(Context context) {
this(context, Executors.newFixedThreadPool(4));
private IconLoader() {
this(Executors.newFixedThreadPool(4));
}
@VisibleForTesting
IconLoader(Context context, ExecutorService backgroundExecutor) {
mContext = context.getApplicationContext();
IconLoader(ExecutorService backgroundExecutor) {
mCache = new LruCache<>(50);
mBackgroundExecutor =
MoreExecutors.listeningDecorator(backgroundExecutor);
}
Context getContext() {
return mContext;
}
@NonNull
ListenableFuture<Drawable> getIcon(@NonNull AutomaticZenRule rule) {
ListenableFuture<Drawable> getIcon(Context context, @NonNull AutomaticZenRule rule) {
if (rule.getIconResId() == 0) {
return Futures.immediateFuture(getFallbackIcon(rule.getType()));
return Futures.immediateFuture(getFallbackIcon(context, rule.getType()));
}
return FluentFuture.from(loadIcon(rule.getPackageName(), rule.getIconResId()))
return FluentFuture.from(loadIcon(context, rule.getPackageName(), rule.getIconResId()))
.transform(icon ->
icon != null ? icon : getFallbackIcon(rule.getType()),
icon != null ? icon : getFallbackIcon(context, rule.getType()),
MoreExecutors.directExecutor());
}
@NonNull
private ListenableFuture</* @Nullable */ Drawable> loadIcon(String pkg, int iconResId) {
private ListenableFuture</* @Nullable */ Drawable> loadIcon(Context context, String pkg,
int iconResId) {
String cacheKey = pkg + ":" + iconResId;
synchronized (mCache) {
Drawable cachedValue = mCache.get(cacheKey);
@@ -107,9 +102,9 @@ class IconLoader {
return FluentFuture.from(mBackgroundExecutor.submit(() -> {
if (TextUtils.isEmpty(pkg) || SystemZenRules.PACKAGE_ANDROID.equals(pkg)) {
return mContext.getDrawable(iconResId);
return context.getDrawable(iconResId);
} else {
Context appContext = mContext.createPackageContext(pkg, 0);
Context appContext = context.createPackageContext(pkg, 0);
Drawable appDrawable = AppCompatResources.getDrawable(appContext, iconResId);
return getMonochromeIconIfPresent(appDrawable);
}
@@ -126,21 +121,21 @@ class IconLoader {
}, MoreExecutors.directExecutor());
}
private Drawable getFallbackIcon(int ruleType) {
private static Drawable getFallbackIcon(Context context, int ruleType) {
int iconResIdFromType = switch (ruleType) {
// TODO: b/333528437 - continue replacing with proper default icons
case AutomaticZenRule.TYPE_UNKNOWN -> R.drawable.ic_do_not_disturb_on_24dp;
case AutomaticZenRule.TYPE_OTHER -> R.drawable.ic_do_not_disturb_on_24dp;
case AutomaticZenRule.TYPE_SCHEDULE_TIME -> R.drawable.ic_modes_time;
case AutomaticZenRule.TYPE_SCHEDULE_CALENDAR -> R.drawable.ic_modes_event;
case AutomaticZenRule.TYPE_BEDTIME -> R.drawable.ic_do_not_disturb_on_24dp;
case AutomaticZenRule.TYPE_DRIVING -> R.drawable.ic_do_not_disturb_on_24dp;
case AutomaticZenRule.TYPE_IMMERSIVE -> R.drawable.ic_do_not_disturb_on_24dp;
case AutomaticZenRule.TYPE_THEATER -> R.drawable.ic_do_not_disturb_on_24dp;
case AutomaticZenRule.TYPE_MANAGED -> R.drawable.ic_do_not_disturb_on_24dp;
default -> R.drawable.ic_do_not_disturb_on_24dp;
case AutomaticZenRule.TYPE_UNKNOWN -> R.drawable.ic_zen_mode_type_unknown;
case AutomaticZenRule.TYPE_OTHER -> R.drawable.ic_zen_mode_type_other;
case AutomaticZenRule.TYPE_SCHEDULE_TIME -> R.drawable.ic_zen_mode_type_schedule_time;
case AutomaticZenRule.TYPE_SCHEDULE_CALENDAR ->
R.drawable.ic_zen_mode_type_schedule_calendar;
case AutomaticZenRule.TYPE_BEDTIME -> R.drawable.ic_zen_mode_type_bedtime;
case AutomaticZenRule.TYPE_DRIVING -> R.drawable.ic_zen_mode_type_driving;
case AutomaticZenRule.TYPE_IMMERSIVE -> R.drawable.ic_zen_mode_type_immersive;
case AutomaticZenRule.TYPE_THEATER -> R.drawable.ic_zen_mode_type_theater;
case AutomaticZenRule.TYPE_MANAGED -> R.drawable.ic_zen_mode_type_managed;
default -> R.drawable.ic_zen_mode_type_unknown;
};
return requireNonNull(mContext.getDrawable(iconResIdFromType));
return requireNonNull(context.getDrawable(iconResIdFromType));
}
private static Drawable getMonochromeIconIfPresent(Drawable icon) {

View File

@@ -118,14 +118,14 @@ class ZenMode {
}
@NonNull
public ListenableFuture<Drawable> getIcon(@NonNull IconLoader iconLoader) {
Context context = iconLoader.getContext();
public ListenableFuture<Drawable> getIcon(@NonNull Context context,
@NonNull IconLoader iconLoader) {
if (mIsManualDnd) {
return Futures.immediateFuture(requireNonNull(
context.getDrawable(R.drawable.ic_do_not_disturb_on_24dp)));
}
return iconLoader.getIcon(mRule);
return iconLoader.getIcon(context, mRule);
}
@NonNull

View File

@@ -62,7 +62,7 @@ class ZenModeHeaderController extends AbstractZenModePreferenceController {
}
FutureUtil.whenDone(
zenMode.getIcon(IconLoader.getInstance(mContext)),
zenMode.getIcon(mContext, IconLoader.getInstance()),
icon -> mHeaderController.setIcon(icon)
.setLabel(zenMode.getRule().getName())
.done(false /* rebindActions */),

View File

@@ -23,6 +23,7 @@ import android.os.Bundle;
import com.android.settings.core.SubSettingLauncher;
import com.android.settingslib.RestrictedPreference;
import com.android.settingslib.Utils;
/**
* Preference representing a single mode item on the modes aggregator page. Clicking on this
@@ -54,10 +55,15 @@ class ZenModeListPreference extends RestrictedPreference {
mZenMode = zenMode;
setTitle(mZenMode.getRule().getName());
setSummary(mZenMode.getRule().getTriggerDescription());
setIconSize(ICON_SIZE_SMALL);
FutureUtil.whenDone(
mZenMode.getIcon(IconLoader.getInstance(mContext)),
icon -> setIcon(icon),
mZenMode.getIcon(mContext, IconLoader.getInstance()),
icon -> {
icon.setTintList(
Utils.getColorAttr(mContext, android.R.attr.colorControlNormal));
setIcon(icon);
},
mContext.getMainExecutor());
}
}

View File

@@ -61,6 +61,7 @@ import com.android.internal.net.LegacyVpnInfo;
import com.android.internal.net.VpnConfig;
import com.android.internal.net.VpnProfile;
import com.android.settings.R;
import com.android.settings.Utils;
import com.android.settings.dashboard.RestrictedDashboardFragment;
import com.android.settings.overlay.FeatureFactory;
import com.android.settings.widget.GearPreference;
@@ -592,6 +593,9 @@ public class VpnSettings extends RestrictedDashboardFragment implements
// Mark connected third-party services
Set<AppVpnInfo> connections = new ArraySet<>();
for (UserHandle profile : mUserManager.getUserProfiles()) {
if (Utils.shouldHideUser(profile, mUserManager)) {
continue;
}
VpnConfig config = mVpnManager.getVpnConfig(profile.getIdentifier());
if (config != null && !config.legacy) {
connections.add(new AppVpnInfo(profile.getIdentifier(), config.user));
@@ -604,6 +608,9 @@ public class VpnSettings extends RestrictedDashboardFragment implements
private Set<AppVpnInfo> getAlwaysOnAppVpnInfos() {
Set<AppVpnInfo> result = new ArraySet<>();
for (UserHandle profile : mUserManager.getUserProfiles()) {
if (Utils.shouldHideUser(profile, mUserManager)) {
continue;
}
final int profileId = profile.getIdentifier();
final String packageName = mVpnManager.getAlwaysOnVpnPackageForUser(profileId);
if (packageName != null) {
@@ -627,7 +634,11 @@ public class VpnSettings extends RestrictedDashboardFragment implements
final Set<Integer> profileIds;
if (includeProfiles) {
profileIds = new ArraySet<>();
for (UserHandle profile : UserManager.get(context).getUserProfiles()) {
UserManager userManager = UserManager.get(context);
for (UserHandle profile : userManager.getUserProfiles()) {
if (Utils.shouldHideUser(profile, userManager)) {
continue;
}
profileIds.add(profile.getIdentifier());
}
} else {

View File

@@ -19,18 +19,18 @@ package com.android.settings.accessibility;
import static android.provider.Settings.Secure.ACCESSIBILITY_BUTTON_MODE_FLOATING_MENU;
import static android.provider.Settings.Secure.ACCESSIBILITY_BUTTON_MODE_NAVIGATION_BAR;
import static com.android.settings.testutils.ImageTestUtils.drawableToBitmap;
import static com.google.common.truth.Truth.assertThat;
import static org.mockito.Mockito.verify;
import static org.mockito.Mockito.when;
import static org.robolectric.Shadows.shadowOf;
import android.content.ContentResolver;
import android.content.Context;
import android.graphics.drawable.Drawable;
import android.provider.Settings;
import androidx.preference.PreferenceScreen;
import androidx.test.core.app.ApplicationProvider;
import com.android.settings.R;
@@ -45,6 +45,7 @@ import org.mockito.Spy;
import org.mockito.junit.MockitoJUnit;
import org.mockito.junit.MockitoRule;
import org.robolectric.RobolectricTestRunner;
import org.robolectric.shadows.ShadowDrawable;
/** Tests for {@link AccessibilityButtonPreviewPreferenceController}. */
@RunWith(RobolectricTestRunner.class)
@@ -52,18 +53,22 @@ public class AccessibilityButtonPreviewPreferenceControllerTest {
@Rule
public MockitoRule mocks = MockitoJUnit.rule();
private static final String PREF_KEY = "test_key";
@Spy
private final Context mContext = ApplicationProvider.getApplicationContext();
@Mock
private ContentResolver mContentResolver;
@Mock
private PreferenceScreen mPreferenceScreen;
private AccessibilityButtonPreviewPreferenceController mController;
@Before
public void setUp() {
when(mContext.getContentResolver()).thenReturn(mContentResolver);
mController = new AccessibilityButtonPreviewPreferenceController(mContext, "test_key");
mController = new AccessibilityButtonPreviewPreferenceController(mContext, PREF_KEY);
mController.mIllustrationPreference = new IllustrationPreference(mContext);
when(mPreferenceScreen.findPreference(PREF_KEY))
.thenReturn(mController.mIllustrationPreference);
}
@Test
@@ -73,29 +78,31 @@ public class AccessibilityButtonPreviewPreferenceControllerTest {
mController.mContentObserver.onChange(false);
final Drawable navigationBarDrawable = mContext.getDrawable(
R.drawable.a11y_button_navigation);
assertThat(drawableToBitmap(mController.mIllustrationPreference.getImageDrawable()).sameAs(
drawableToBitmap(navigationBarDrawable))).isTrue();
ShadowDrawable drawable = shadowOf(mController.mIllustrationPreference.getImageDrawable());
assertThat(drawable.getCreatedFromResId())
.isEqualTo(R.drawable.accessibility_shortcut_type_navbar);
}
@Test
public void onChange_updatePreviewPreferenceWithConfig_expectedPreviewDrawable() {
public void onChange_updateFloatingMenuSize_expectedPreviewDrawable() {
Settings.Secure.putInt(mContentResolver,
Settings.Secure.ACCESSIBILITY_BUTTON_MODE, ACCESSIBILITY_BUTTON_MODE_FLOATING_MENU);
Settings.Secure.putInt(mContentResolver,
Settings.Secure.ACCESSIBILITY_FLOATING_MENU_SIZE, /* small size */ 0);
Settings.Secure.putFloat(mContentResolver,
Settings.Secure.ACCESSIBILITY_FLOATING_MENU_OPACITY, 0.1f);
mController.displayPreference(mPreferenceScreen);
Drawable actualDrawable = mController.mIllustrationPreference.getImageDrawable();
ShadowDrawable shadowDrawable = shadowOf(actualDrawable);
assertThat(shadowDrawable.getCreatedFromResId())
.isEqualTo(R.drawable.accessibility_shortcut_type_fab_size_small_preview);
Settings.Secure.putInt(mContentResolver,
Settings.Secure.ACCESSIBILITY_FLOATING_MENU_SIZE, /* large size */ 1);
mController.mContentObserver.onChange(false);
final Drawable smallFloatingMenuWithTenOpacityDrawable =
AccessibilityLayerDrawable.createLayerDrawable(mContext,
R.drawable.a11y_button_preview_small_floating_menu, 10);
assertThat(
mController.mIllustrationPreference.getImageDrawable().getConstantState())
.isEqualTo(smallFloatingMenuWithTenOpacityDrawable.getConstantState());
actualDrawable = mController.mIllustrationPreference.getImageDrawable();
shadowDrawable = shadowOf(actualDrawable);
assertThat(shadowDrawable.getCreatedFromResId())
.isEqualTo(R.drawable.accessibility_shortcut_type_fab_size_large_preview);
}
@Test

View File

@@ -1,73 +0,0 @@
/*
* 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.
*/
package com.android.settings.accessibility;
import static com.google.common.truth.Truth.assertThat;
import android.content.Context;
import android.graphics.drawable.Drawable;
import androidx.test.core.app.ApplicationProvider;
import com.android.settings.R;
import com.android.settings.testutils.ImageTestUtils;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.robolectric.RobolectricTestRunner;
/** Tests for {@link AccessibilityLayerDrawable}. */
@RunWith(RobolectricTestRunner.class)
public class AccessibilityLayerDrawableTest {
private static final int TEST_RES_ID =
com.android.internal.R.drawable.ic_accessibility_magnification;
private static final int TEST_RES_ID_2 =
com.android.internal.R.drawable.ic_accessibility_color_inversion;
private final Context mContext = ApplicationProvider.getApplicationContext();
@Test
public void createLayerDrawable_configCorrect() {
final Drawable expected1stDrawable = mContext.getDrawable(
R.drawable.a11y_button_preview_base);
final Drawable expected2ndDrawable = mContext.getDrawable(TEST_RES_ID);
final AccessibilityLayerDrawable actualDrawable =
AccessibilityLayerDrawable.createLayerDrawable(mContext, TEST_RES_ID,
/* opacity= */ 27);
final Drawable actual1stDrawable = actualDrawable.getDrawable(0);
final Drawable actual2ndDrawable = actualDrawable.getDrawable(1);
assertThat(ImageTestUtils.drawableToBitmap(actual1stDrawable).sameAs(
ImageTestUtils.drawableToBitmap(expected1stDrawable))).isTrue();
assertThat(ImageTestUtils.drawableToBitmap(actual2ndDrawable).sameAs(
ImageTestUtils.drawableToBitmap(expected2ndDrawable))).isTrue();
}
@Test
public void updateLayerDrawable_expectedFloatingMenuLayerDrawableState() {
final AccessibilityLayerDrawable originalDrawable =
AccessibilityLayerDrawable.createLayerDrawable(mContext, TEST_RES_ID, /* opacity= */
72);
originalDrawable.updateLayerDrawable(mContext, TEST_RES_ID_2, /* opacity= */ 27);
assertThat(originalDrawable.getConstantState()).isEqualTo(
new AccessibilityLayerDrawable.AccessibilityLayerDrawableState(mContext,
TEST_RES_ID_2, /* opacity= */ 27));
}
}

View File

@@ -61,7 +61,8 @@ public class ShortcutOptionPreferenceTest {
@Test
public void bindViewHolder_imageResIdSet_shouldShowImageView() {
mShortcutOptionPreference.setIntroImageResId(R.drawable.a11y_shortcut_type_hardware);
mShortcutOptionPreference.setIntroImageResId(
R.drawable.accessibility_shortcut_type_hardware);
mShortcutOptionPreference.onBindViewHolder(mViewHolder);

View File

@@ -30,6 +30,7 @@ import static org.mockito.Mockito.when;
import static org.robolectric.Shadows.shadowOf;
import static org.robolectric.shadows.ShadowLooper.shadowMainLooper;
import android.app.settings.SettingsEnums;
import android.bluetooth.BluetoothAdapter;
import android.bluetooth.BluetoothDevice;
import android.bluetooth.BluetoothLeBroadcast;
@@ -58,6 +59,7 @@ import com.android.settings.bluetooth.AvailableMediaBluetoothDeviceUpdater;
import com.android.settings.bluetooth.BluetoothDevicePreference;
import com.android.settings.bluetooth.Utils;
import com.android.settings.connecteddevice.audiosharing.AudioSharingDialogHandler;
import com.android.settings.testutils.FakeFeatureFactory;
import com.android.settings.testutils.shadow.ShadowAlertDialogCompat;
import com.android.settings.testutils.shadow.ShadowAudioManager;
import com.android.settings.testutils.shadow.ShadowBluetoothAdapter;
@@ -128,6 +130,7 @@ public class AvailableMediaDeviceGroupControllerTest {
private PreferenceGroup mPreferenceGroup;
private Context mContext;
private FragmentManager mFragManager;
private FakeFeatureFactory mFeatureFactory;
private Preference mPreference;
private AvailableMediaDeviceGroupController mAvailableMediaDeviceGroupController;
private AudioManager mAudioManager;
@@ -157,6 +160,7 @@ public class AvailableMediaDeviceGroupControllerTest {
BluetoothStatusCodes.FEATURE_NOT_SUPPORTED);
ShadowBluetoothUtils.sLocalBluetoothManager = mLocalBluetoothManager;
mLocalBluetoothManager = Utils.getLocalBtManager(mContext);
mFeatureFactory = FakeFeatureFactory.setupForTest();
mAudioManager = mContext.getSystemService(AudioManager.class);
doReturn(mEventManager).when(mLocalBluetoothManager).getEventManager();
when(mLocalBluetoothManager.getProfileManager()).thenReturn(mLocalBtProfileManager);
@@ -414,6 +418,8 @@ public class AvailableMediaDeviceGroupControllerTest {
mAvailableMediaDeviceGroupController.onDeviceClick(preference);
verify(mDialogHandler)
.handleDeviceConnected(mCachedBluetoothDevice, /* userTriggered= */ true);
verify(mFeatureFactory.metricsFeatureProvider)
.action(mContext, SettingsEnums.ACTION_MEDIA_DEVICE_CLICK);
}
private void setUpBroadcast() {

View File

@@ -26,6 +26,7 @@ import static org.mockito.Mockito.verify;
import static org.mockito.Mockito.when;
import static org.robolectric.Shadows.shadowOf;
import android.app.settings.SettingsEnums;
import android.bluetooth.BluetoothAdapter;
import android.bluetooth.BluetoothDevice;
import android.bluetooth.BluetoothLeBroadcastReceiveState;
@@ -43,6 +44,7 @@ import androidx.test.core.app.ApplicationProvider;
import com.android.settings.bluetooth.BluetoothDevicePreference;
import com.android.settings.bluetooth.Utils;
import com.android.settings.connecteddevice.DevicePreferenceCallback;
import com.android.settings.testutils.FakeFeatureFactory;
import com.android.settings.testutils.shadow.ShadowBluetoothAdapter;
import com.android.settings.testutils.shadow.ShadowBluetoothUtils;
import com.android.settings.testutils.shadow.ShadowThreadUtils;
@@ -102,6 +104,7 @@ public class AudioSharingBluetoothDeviceUpdaterTest {
private AudioSharingBluetoothDeviceUpdater mDeviceUpdater;
private Collection<CachedBluetoothDevice> mCachedDevices;
private ShadowBluetoothAdapter mShadowBluetoothAdapter;
private FakeFeatureFactory mFeatureFactory;
@Before
public void setUp() {
@@ -113,6 +116,7 @@ public class AudioSharingBluetoothDeviceUpdaterTest {
mShadowBluetoothAdapter.setIsLeAudioBroadcastAssistantSupported(
BluetoothStatusCodes.FEATURE_SUPPORTED);
ShadowBluetoothUtils.sLocalBluetoothManager = mLocalBtManager;
mFeatureFactory = FakeFeatureFactory.setupForTest();
mLocalBtManager = Utils.getLocalBtManager(mContext);
when(mLocalBtManager.getCachedDeviceManager()).thenReturn(mCachedDeviceManager);
when(mLocalBtManager.getProfileManager()).thenReturn(mLocalBtProfileManager);
@@ -255,6 +259,14 @@ public class AudioSharingBluetoothDeviceUpdaterTest {
assertThat(mDeviceUpdater.getPreferenceKey()).isEqualTo(PREF_KEY);
}
@Test
public void onPreferenceClick_logClick() {
Preference preference = new Preference(mContext);
mDeviceUpdater.onPreferenceClick(preference);
verify(mFeatureFactory.metricsFeatureProvider)
.action(mContext, SettingsEnums.ACTION_AUDIO_SHARING_DEVICE_CLICK);
}
private void setupPreferenceMapWithDevice() {
// Add device to preferenceMap
mSetFlagsRule.enableFlags(Flags.FLAG_ENABLE_LE_AUDIO_SHARING);

View File

@@ -20,6 +20,7 @@ import static com.google.common.truth.Truth.assertThat;
import static org.robolectric.shadows.ShadowLooper.shadowMainLooper;
import android.app.settings.SettingsEnums;
import android.bluetooth.BluetoothAdapter;
import android.bluetooth.BluetoothStatusCodes;
import android.platform.test.flag.junit.SetFlagsRule;
@@ -82,6 +83,12 @@ public class AudioSharingCallAudioDialogFragmentTest {
mParent, FragmentActivity.class, /* containerViewId= */ 0, /* bundle= */ null);
}
@Test
public void getMetricsCategory_correctValue() {
assertThat(mFragment.getMetricsCategory())
.isEqualTo(SettingsEnums.DIALOG_AUDIO_SHARING_CALL_AUDIO);
}
@Test
public void onCreateDialog_flagOff_dialogNotExist() {
mSetFlagsRule.disableFlags(Flags.FLAG_ENABLE_LE_AUDIO_SHARING);

View File

@@ -27,9 +27,11 @@ import static org.mockito.ArgumentMatchers.eq;
import static org.mockito.Mockito.doNothing;
import static org.mockito.Mockito.times;
import static org.mockito.Mockito.verify;
import static org.mockito.Mockito.verifyNoInteractions;
import static org.mockito.Mockito.when;
import static org.robolectric.Shadows.shadowOf;
import android.app.settings.SettingsEnums;
import android.bluetooth.BluetoothAdapter;
import android.bluetooth.BluetoothLeBroadcast;
import android.bluetooth.BluetoothStatusCodes;
@@ -44,6 +46,7 @@ import androidx.test.core.app.ApplicationProvider;
import com.android.settings.R;
import com.android.settings.bluetooth.Utils;
import com.android.settings.testutils.FakeFeatureFactory;
import com.android.settings.testutils.shadow.ShadowBluetoothAdapter;
import com.android.settings.testutils.shadow.ShadowBluetoothUtils;
import com.android.settings.testutils.shadow.ShadowThreadUtils;
@@ -94,6 +97,7 @@ public class AudioSharingCompatibilityPreferenceControllerTest {
private AudioSharingCompatibilityPreferenceController mController;
private ShadowBluetoothAdapter mShadowBluetoothAdapter;
private LocalBluetoothManager mLocalBluetoothManager;
private FakeFeatureFactory mFeatureFactory;
private Lifecycle mLifecycle;
private LifecycleOwner mLifecycleOwner;
@@ -109,6 +113,7 @@ public class AudioSharingCompatibilityPreferenceControllerTest {
mLifecycle = new Lifecycle(mLifecycleOwner);
ShadowBluetoothUtils.sLocalBluetoothManager = mLocalBtManager;
mLocalBluetoothManager = Utils.getLocalBtManager(mContext);
mFeatureFactory = FakeFeatureFactory.setupForTest();
when(mLocalBluetoothManager.getEventManager()).thenReturn(mBtEventManager);
when(mLocalBluetoothManager.getProfileManager()).thenReturn(mBtProfileManager);
when(mBtProfileManager.getLeAudioBroadcastProfile()).thenReturn(mBroadcast);
@@ -258,6 +263,8 @@ public class AudioSharingCompatibilityPreferenceControllerTest {
doNothing().when(mBroadcast).setImproveCompatibility(anyBoolean());
boolean setChecked = mController.setChecked(false);
verify(mBroadcast).setImproveCompatibility(false);
verify(mFeatureFactory.metricsFeatureProvider)
.action(mContext, SettingsEnums.ACTION_AUDIO_SHARING_IMPROVE_COMPATIBILITY, false);
assertThat(setChecked).isTrue();
}
@@ -266,6 +273,7 @@ public class AudioSharingCompatibilityPreferenceControllerTest {
when(mBroadcast.getImproveCompatibility()).thenReturn(true);
boolean setChecked = mController.setChecked(true);
verify(mBroadcast, times(0)).setImproveCompatibility(anyBoolean());
verifyNoInteractions(mFeatureFactory.metricsFeatureProvider);
assertThat(setChecked).isFalse();
}
}

View File

@@ -28,6 +28,7 @@ import static org.mockito.Mockito.verifyNoInteractions;
import static org.mockito.Mockito.when;
import static org.robolectric.Shadows.shadowOf;
import android.app.settings.SettingsEnums;
import android.bluetooth.BluetoothDevice;
import android.bluetooth.BluetoothLeBroadcastReceiveState;
import android.bluetooth.BluetoothProfile;
@@ -42,6 +43,7 @@ import androidx.test.core.app.ApplicationProvider;
import com.android.settings.bluetooth.Utils;
import com.android.settings.connecteddevice.DevicePreferenceCallback;
import com.android.settings.testutils.FakeFeatureFactory;
import com.android.settings.testutils.shadow.ShadowBluetoothUtils;
import com.android.settingslib.bluetooth.CachedBluetoothDevice;
import com.android.settingslib.bluetooth.CachedBluetoothDeviceManager;
@@ -96,12 +98,14 @@ public class AudioSharingDeviceVolumeControlUpdaterTest {
private Context mContext;
private AudioSharingDeviceVolumeControlUpdater mDeviceUpdater;
private Collection<CachedBluetoothDevice> mCachedDevices;
private FakeFeatureFactory mFeatureFactory;
@Before
public void setUp() {
mContext = spy(ApplicationProvider.getApplicationContext());
ShadowBluetoothUtils.sLocalBluetoothManager = mLocalBtManager;
mLocalBtManager = Utils.getLocalBtManager(mContext);
mFeatureFactory = FakeFeatureFactory.setupForTest();
when(mLocalBtManager.getCachedDeviceManager()).thenReturn(mCachedDeviceManager);
when(mLocalBtManager.getProfileManager()).thenReturn(mLocalBtProfileManager);
when(mLocalBtProfileManager.getLeAudioBroadcastProfile()).thenReturn(mBroadcast);
@@ -250,6 +254,11 @@ public class AudioSharingDeviceVolumeControlUpdaterTest {
verify(mVolumeControl).setDeviceVolume(mBluetoothDevice, 255, true);
verifyNoInteractions(mAudioManager);
verify(mFeatureFactory.metricsFeatureProvider)
.action(
mContext,
SettingsEnums.ACTION_AUDIO_SHARING_CHANGE_MEDIA_DEVICE_VOLUME,
/* isPrimary= */ false);
}
@Test
@@ -272,6 +281,11 @@ public class AudioSharingDeviceVolumeControlUpdaterTest {
verifyNoInteractions(mVolumeControl);
verify(mAudioManager).setStreamVolume(AudioManager.STREAM_MUSIC, 10, 0);
verify(mFeatureFactory.metricsFeatureProvider)
.action(
mContext,
SettingsEnums.ACTION_AUDIO_SHARING_CHANGE_MEDIA_DEVICE_VOLUME,
/* isPrimary= */ true);
}
@Test

View File

@@ -21,6 +21,7 @@ import static com.google.common.truth.Truth.assertThat;
import static org.mockito.Mockito.when;
import static org.robolectric.shadows.ShadowLooper.shadowMainLooper;
import android.app.settings.SettingsEnums;
import android.bluetooth.BluetoothAdapter;
import android.bluetooth.BluetoothStatusCodes;
import android.platform.test.flag.junit.SetFlagsRule;
@@ -30,9 +31,14 @@ import androidx.fragment.app.Fragment;
import androidx.fragment.app.FragmentActivity;
import com.android.settings.R;
import com.android.settings.bluetooth.Utils;
import com.android.settings.testutils.shadow.ShadowAlertDialogCompat;
import com.android.settings.testutils.shadow.ShadowBluetoothAdapter;
import com.android.settings.testutils.shadow.ShadowBluetoothUtils;
import com.android.settingslib.bluetooth.CachedBluetoothDevice;
import com.android.settingslib.bluetooth.LocalBluetoothLeBroadcast;
import com.android.settingslib.bluetooth.LocalBluetoothManager;
import com.android.settingslib.bluetooth.LocalBluetoothProfileManager;
import com.android.settingslib.flags.Flags;
import org.junit.Before;
@@ -55,6 +61,7 @@ import java.util.concurrent.atomic.AtomicBoolean;
shadows = {
ShadowAlertDialogCompat.class,
ShadowBluetoothAdapter.class,
ShadowBluetoothUtils.class,
})
public class AudioSharingJoinDialogFragmentTest {
@@ -78,6 +85,9 @@ public class AudioSharingJoinDialogFragmentTest {
@Mock private CachedBluetoothDevice mCachedDevice1;
@Mock private CachedBluetoothDevice mCachedDevice2;
@Mock private LocalBluetoothManager mLocalBtManager;
@Mock private LocalBluetoothProfileManager mBtProfileManager;
@Mock private LocalBluetoothLeBroadcast mBroadcast;
private Fragment mParent;
private AudioSharingJoinDialogFragment mFragment;
private ShadowBluetoothAdapter mShadowBluetoothAdapter;
@@ -98,11 +108,32 @@ public class AudioSharingJoinDialogFragmentTest {
when(mCachedDevice1.getName()).thenReturn(TEST_DEVICE_NAME1);
when(mCachedDevice2.getName()).thenReturn(TEST_DEVICE_NAME2);
mFragment = new AudioSharingJoinDialogFragment();
ShadowBluetoothUtils.sLocalBluetoothManager = mLocalBtManager;
mLocalBtManager = Utils.getLocalBtManager(mFragment.getContext());
when(mLocalBtManager.getProfileManager()).thenReturn(mBtProfileManager);
when(mBtProfileManager.getLeAudioBroadcastProfile()).thenReturn(mBroadcast);
mParent = new Fragment();
FragmentController.setupFragment(
mParent, FragmentActivity.class, /* containerViewId= */ 0, /* bundle= */ null);
}
@Test
public void getMetricsCategory_notInSharing_correctValue() {
when(mBroadcast.isEnabled(null)).thenReturn(false);
int category = mFragment.getMetricsCategory();
shadowMainLooper().idle();
assertThat(category).isEqualTo(SettingsEnums.DIALOG_START_AUDIO_SHARING);
}
@Test
public void getMetricsCategory_inSharing_correctValue() {
mSetFlagsRule.enableFlags(Flags.FLAG_ENABLE_LE_AUDIO_SHARING);
when(mBroadcast.isEnabled(null)).thenReturn(true);
int category = mFragment.getMetricsCategory();
shadowMainLooper().idle();
assertThat(category).isEqualTo(SettingsEnums.DIALOG_AUDIO_SHARING_ADD_DEVICE);
}
@Test
public void onCreateDialog_flagOff_dialogNotExist() {
mSetFlagsRule.disableFlags(Flags.FLAG_ENABLE_LE_AUDIO_SHARING);

View File

@@ -26,6 +26,7 @@ import static org.mockito.Mockito.times;
import static org.mockito.Mockito.verify;
import static org.mockito.Mockito.when;
import android.app.settings.SettingsEnums;
import android.bluetooth.BluetoothAdapter;
import android.bluetooth.BluetoothStatusCodes;
import android.content.Context;
@@ -39,6 +40,7 @@ import androidx.preference.Preference;
import androidx.preference.PreferenceScreen;
import androidx.test.core.app.ApplicationProvider;
import com.android.settings.testutils.FakeFeatureFactory;
import com.android.settings.testutils.shadow.ShadowBluetoothAdapter;
import com.android.settingslib.core.lifecycle.Lifecycle;
import com.android.settingslib.flags.Flags;
@@ -71,6 +73,7 @@ public class AudioSharingPlaySoundPreferenceControllerTest {
private Lifecycle mLifecycle;
private LifecycleOwner mLifecycleOwner;
private Preference mPreference;
private FakeFeatureFactory mFeatureFactory;
@Before
public void setUp() {
@@ -80,6 +83,7 @@ public class AudioSharingPlaySoundPreferenceControllerTest {
BluetoothStatusCodes.FEATURE_SUPPORTED);
mShadowBluetoothAdapter.setIsLeAudioBroadcastAssistantSupported(
BluetoothStatusCodes.FEATURE_SUPPORTED);
mFeatureFactory = FakeFeatureFactory.setupForTest();
mLifecycleOwner = () -> mLifecycle;
mLifecycle = new Lifecycle(mLifecycleOwner);
when(mRingtone.getStreamType()).thenReturn(AudioManager.STREAM_MUSIC);
@@ -165,6 +169,8 @@ public class AudioSharingPlaySoundPreferenceControllerTest {
mController.displayPreference(mScreen);
mPreference.performClick();
verify(mRingtone).play();
verify(mFeatureFactory.metricsFeatureProvider)
.action(mContext, SettingsEnums.ACTION_AUDIO_SHARING_PLAY_TEST_SOUND);
}
@Test

View File

@@ -32,6 +32,7 @@ import static org.mockito.Mockito.when;
import android.app.Notification;
import android.app.NotificationManager;
import android.app.settings.SettingsEnums;
import android.bluetooth.BluetoothAdapter;
import android.bluetooth.BluetoothStatusCodes;
import android.content.BroadcastReceiver;
@@ -40,6 +41,7 @@ import android.content.Intent;
import android.platform.test.flag.junit.SetFlagsRule;
import com.android.settings.bluetooth.Utils;
import com.android.settings.testutils.FakeFeatureFactory;
import com.android.settings.testutils.shadow.ShadowBluetoothAdapter;
import com.android.settings.testutils.shadow.ShadowBluetoothUtils;
import com.android.settingslib.R;
@@ -77,6 +79,7 @@ public class AudioSharingReceiverTest {
private ShadowApplication mShadowApplication;
private ShadowBluetoothAdapter mShadowBluetoothAdapter;
private LocalBluetoothManager mLocalBluetoothManager;
private FakeFeatureFactory mFeatureFactory;
@Mock private LocalBluetoothProfileManager mLocalBtProfileManager;
@Mock private LocalBluetoothLeBroadcast mBroadcast;
@Mock private LocalBluetoothManager mLocalBtManager;
@@ -97,6 +100,7 @@ public class AudioSharingReceiverTest {
mLocalBluetoothManager = Utils.getLocalBtManager(mContext);
when(mLocalBluetoothManager.getProfileManager()).thenReturn(mLocalBtProfileManager);
when(mLocalBtProfileManager.getLeAudioBroadcastProfile()).thenReturn(mBroadcast);
mFeatureFactory = FakeFeatureFactory.setupForTest();
}
@Test
@@ -156,6 +160,8 @@ public class AudioSharingReceiverTest {
verify(mNm, times(1))
.notify(eq(R.drawable.ic_bt_le_audio_sharing), any(Notification.class));
verify(mFeatureFactory.metricsFeatureProvider)
.action(mContext, SettingsEnums.ACTION_SHOW_AUDIO_SHARING_NOTIFICATION);
}
@Test
@@ -170,6 +176,8 @@ public class AudioSharingReceiverTest {
audioSharingReceiver.onReceive(mContext, intent);
verify(mNm, times(1)).cancel(R.drawable.ic_bt_le_audio_sharing);
verify(mFeatureFactory.metricsFeatureProvider)
.action(mContext, SettingsEnums.ACTION_CANCEL_AUDIO_SHARING_NOTIFICATION);
}
@Test
@@ -196,6 +204,8 @@ public class AudioSharingReceiverTest {
audioSharingReceiver.onReceive(mContext, intent);
verify(mBroadcast, times(1)).stopBroadcast(broadcastId);
verify(mFeatureFactory.metricsFeatureProvider)
.action(mContext, SettingsEnums.ACTION_STOP_AUDIO_SHARING_FROM_NOTIFICATION);
}
private AudioSharingReceiver getAudioSharingReceiver(Intent intent) {

View File

@@ -21,6 +21,7 @@ import static android.app.NotificationManager.INTERRUPTION_FILTER_PRIORITY;
import static com.google.common.truth.Truth.assertThat;
import android.app.AutomaticZenRule;
import android.content.Context;
import android.graphics.drawable.Drawable;
import android.net.Uri;
import android.service.notification.ZenPolicy;
@@ -37,12 +38,13 @@ import org.robolectric.RuntimeEnvironment;
@RunWith(RobolectricTestRunner.class)
public class IconLoaderTest {
private Context mContext;
private IconLoader mLoader;
@Before
public void setUp() {
mLoader = new IconLoader(RuntimeEnvironment.application,
MoreExecutors.newDirectExecutorService());
mContext = RuntimeEnvironment.application;
mLoader = new IconLoader(MoreExecutors.newDirectExecutorService());
}
@Test
@@ -52,7 +54,7 @@ public class IconLoaderTest {
.setIconResId(android.R.drawable.ic_media_play)
.build();
ListenableFuture<Drawable> loadFuture = mLoader.getIcon(systemRule);
ListenableFuture<Drawable> loadFuture = mLoader.getIcon(mContext, systemRule);
assertThat(loadFuture.isDone()).isTrue();
assertThat(loadFuture.get()).isNotNull();
}
@@ -64,7 +66,7 @@ public class IconLoaderTest {
.setPackage("com.blah")
.build();
ListenableFuture<Drawable> loadFuture = mLoader.getIcon(rule);
ListenableFuture<Drawable> loadFuture = mLoader.getIcon(mContext, rule);
assertThat(loadFuture.isDone()).isTrue();
assertThat(loadFuture.get()).isNotNull();
}
@@ -77,7 +79,7 @@ public class IconLoaderTest {
.setIconResId(-123456)
.build();
ListenableFuture<Drawable> loadFuture = mLoader.getIcon(rule);
ListenableFuture<Drawable> loadFuture = mLoader.getIcon(mContext, rule);
assertThat(loadFuture.get()).isNotNull();
}

View File

@@ -1,47 +0,0 @@
/*
* 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.
*/
package com.android.settings.testutils;
import android.graphics.Bitmap;
import android.graphics.Canvas;
import android.graphics.drawable.Drawable;
import androidx.annotation.Nullable;
/**
* Utilities for testing images within unit tests.
*/
public class ImageTestUtils {
/** Converts the drawable object to bitmap. */
@Nullable
public static Bitmap drawableToBitmap(@Nullable Drawable drawable) {
if (drawable == null) {
return null;
}
final Bitmap bitmap =
Bitmap.createBitmap(
drawable.getIntrinsicWidth(), drawable.getIntrinsicHeight(),
Bitmap.Config.ARGB_8888);
final Canvas canvas = new Canvas(bitmap);
drawable.setBounds(0, 0, canvas.getWidth(), canvas.getHeight());
drawable.draw(canvas);
return bitmap;
}
}