Snap for 7478986 from be845d1541 to sc-release
Change-Id: I14970c067c370453908d30d579388aaf365d569d
This commit is contained in:
@@ -1823,6 +1823,10 @@
|
||||
android:exported="false"
|
||||
android:screenOrientation="portrait"/>
|
||||
|
||||
<activity android:name=".biometrics.BiometricHandoffActivity"
|
||||
android:exported="false"
|
||||
android:screenOrientation="portrait"/>
|
||||
|
||||
<!-- Must not be exported -->
|
||||
<activity android:name=".biometrics.BiometricEnrollActivity$InternalActivity"
|
||||
android:exported="false"
|
||||
|
||||
@@ -4493,4 +4493,259 @@
|
||||
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.
This ensures that a theme change from a light to a dark theme can be uniformlyapplied across the app."
|
||||
errorLine1=" android:fillColor="@color/fingerprint_enrollment_finish_color_outline"/>"
|
||||
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
|
||||
<location
|
||||
file="res/drawable/fingerprint_enroll_finish.xml"
|
||||
line="25"
|
||||
column="9"/>
|
||||
</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.
This ensures that a theme change from a light to a dark theme can be uniformlyapplied across the app."
|
||||
errorLine1=" android:fillColor="@color/fingerprint_enrollment_finish_color_outline"/>"
|
||||
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
|
||||
<location
|
||||
file="res/drawable/fingerprint_enroll_finish.xml"
|
||||
line="31"
|
||||
column="9"/>
|
||||
</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.
This ensures that a theme change from a light to a dark theme can be uniformlyapplied across the app."
|
||||
errorLine1=" android:fillColor="@color/fingerprint_enrollment_finish_color_outline"/>"
|
||||
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
|
||||
<location
|
||||
file="res/drawable/fingerprint_enroll_finish.xml"
|
||||
line="34"
|
||||
column="9"/>
|
||||
</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.
This ensures that a theme change from a light to a dark theme can be uniformlyapplied across the app."
|
||||
errorLine1=" android:fillColor="@color/fingerprint_enrollment_finish_color_outline"/>"
|
||||
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
|
||||
<location
|
||||
file="res/drawable/fingerprint_enroll_finish.xml"
|
||||
line="37"
|
||||
column="9"/>
|
||||
</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.
This ensures that a theme change from a light to a dark theme can be uniformlyapplied across the app."
|
||||
errorLine1=" android:fillColor="@color/fingerprint_enrollment_finish_color_outline"/>"
|
||||
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
|
||||
<location
|
||||
file="res/drawable/fingerprint_enroll_finish.xml"
|
||||
line="40"
|
||||
column="9"/>
|
||||
</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.
This ensures that a theme change from a light to a dark theme can be uniformlyapplied across the app."
|
||||
errorLine1=" android:fillColor="@color/fingerprint_enrollment_finish_color_outline"/>"
|
||||
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
|
||||
<location
|
||||
file="res/drawable/fingerprint_enroll_finish.xml"
|
||||
line="43"
|
||||
column="9"/>
|
||||
</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.
This ensures that a theme change from a light to a dark theme can be uniformlyapplied across the app."
|
||||
errorLine1=" android:fillColor="@color/fingerprint_enrollment_finish_color_outline"/>"
|
||||
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
|
||||
<location
|
||||
file="res/drawable/fingerprint_enroll_finish.xml"
|
||||
line="46"
|
||||
column="9"/>
|
||||
</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.
This ensures that a theme change from a light to a dark theme can be uniformlyapplied across the app."
|
||||
errorLine1=" android:fillColor="@color/fingerprint_enrollment_finish_color_outline"/>"
|
||||
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
|
||||
<location
|
||||
file="res/drawable/fingerprint_enroll_finish.xml"
|
||||
line="25"
|
||||
column="9"/>
|
||||
</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.
This ensures that a theme change from a light to a dark theme can be uniformlyapplied across the app."
|
||||
errorLine1=" android:fillColor="@color/fingerprint_enrollment_finish_color_outline"/>"
|
||||
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
|
||||
<location
|
||||
file="res/drawable/fingerprint_enroll_finish.xml"
|
||||
line="31"
|
||||
column="9"/>
|
||||
</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.
This ensures that a theme change from a light to a dark theme can be uniformlyapplied across the app."
|
||||
errorLine1=" android:fillColor="@color/fingerprint_enrollment_finish_color_outline"/>"
|
||||
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
|
||||
<location
|
||||
file="res/drawable/fingerprint_enroll_finish.xml"
|
||||
line="34"
|
||||
column="9"/>
|
||||
</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.
This ensures that a theme change from a light to a dark theme can be uniformlyapplied across the app."
|
||||
errorLine1=" android:fillColor="@color/fingerprint_enrollment_finish_color_outline"/>"
|
||||
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
|
||||
<location
|
||||
file="res/drawable/fingerprint_enroll_finish.xml"
|
||||
line="37"
|
||||
column="9"/>
|
||||
</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.
This ensures that a theme change from a light to a dark theme can be uniformlyapplied across the app."
|
||||
errorLine1=" android:fillColor="@color/fingerprint_enrollment_finish_color_outline"/>"
|
||||
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
|
||||
<location
|
||||
file="res/drawable/fingerprint_enroll_finish.xml"
|
||||
line="40"
|
||||
column="9"/>
|
||||
</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.
This ensures that a theme change from a light to a dark theme can be uniformlyapplied across the app."
|
||||
errorLine1=" android:fillColor="@color/fingerprint_enrollment_finish_color_outline"/>"
|
||||
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
|
||||
<location
|
||||
file="res/drawable/fingerprint_enroll_finish.xml"
|
||||
line="43"
|
||||
column="9"/>
|
||||
</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.
This ensures that a theme change from a light to a dark theme can be uniformlyapplied across the app."
|
||||
errorLine1=" android:fillColor="@color/fingerprint_enrollment_finish_color_outline"/>"
|
||||
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
|
||||
<location
|
||||
file="res/drawable/fingerprint_enroll_finish.xml"
|
||||
line="46"
|
||||
column="9"/>
|
||||
</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.
This ensures that a theme change from a light to a dark theme can be uniformlyapplied across the app."
|
||||
errorLine1=" <color name="fingerprint_enrollment_finish_color_outline">#669df6</color>"
|
||||
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
|
||||
<location
|
||||
file="res/values-night/colors.xml"
|
||||
line="51"
|
||||
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.
This ensures that a theme change from a light to a dark theme can be uniformlyapplied across the app."
|
||||
errorLine1=" <color name="fingerprint_enrollment_finish_color_outline">#669df6</color>"
|
||||
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
|
||||
<location
|
||||
file="res/values/colors.xml"
|
||||
line="209"
|
||||
column="5"/>
|
||||
</issue>
|
||||
</issues>
|
||||
|
||||
@@ -16,85 +16,32 @@
|
||||
-->
|
||||
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="228dp"
|
||||
android:height="228dp"
|
||||
android:viewportHeight="228.0"
|
||||
android:viewportWidth="228.0">
|
||||
android:width="216dp"
|
||||
android:height="216dp"
|
||||
android:viewportWidth="216"
|
||||
android:viewportHeight="216">
|
||||
<path
|
||||
android:fillColor="#4285F4"
|
||||
android:pathData="M114,4c29.38,0 57.01,11.44 77.78,32.22C212.56,56.99 224,84.62 224,114s-11.44,57.01 -32.22,77.78S143.38,224 114,224s-57.01,-11.44 -77.78,-32.22C15.44,171.01 4,143.38 4,114s11.44,-57.01 32.22,-77.78C56.99,15.44 84.62,4 114,4M114,0C51.04,0 0,51.04 0,114s51.04,114 114,114s114,-51.04 114,-114S176.96,0 114,0L114,0z" />
|
||||
android:pathData="M107.5,214.9C48.8,214.9 1,167.1 1,108.4C1.1,49.7 48.8,2 107.5,2C166.2,2 214,49.7 214,108.4C214,167.1 166.2,214.9 107.5,214.9ZM107.5,12C54.3,12 11,55.3 11,108.5C11,161.7 54.3,205 107.5,205C160.7,205 204,161.7 204,108.5C204,55.3 160.7,12 107.5,12Z"
|
||||
android:fillColor="@color/fingerprint_enrollment_finish_color_outline"/>
|
||||
<path
|
||||
android:fillAlpha="0.25"
|
||||
android:fillColor="#FF000000"
|
||||
android:pathData="M152.18,156.55c0.11,1.46 -0.89,2.8 -2.42,3.07c-3.32,0.64 -6.24,0.7 -7.06,0.7c-6.94,0 -13.07,-1.75 -18.08,-5.19c-8.48,-5.74 -13.61,-14.99 -13.86,-24.85c-0.01,0.08 -0.02,0.16 -0.02,0.25c0,10.15 5.19,19.72 13.88,25.61c5.02,3.44 11.14,5.19 18.08,5.19c0.82,0 3.73,-0.06 7.06,-0.7c1.97,-0.4 2.67,-1.8 2.44,-3.99C152.19,156.6 152.18,156.58 152.18,156.55z"
|
||||
android:strokeAlpha="0.25" />
|
||||
android:pathData="M182.2,201.7C196.007,201.7 207.2,190.507 207.2,176.7C207.2,162.893 196.007,151.7 182.2,151.7C168.393,151.7 157.2,162.893 157.2,176.7C157.2,190.507 168.393,201.7 182.2,201.7Z"
|
||||
android:fillColor="?android:attr/colorBackground"/>
|
||||
<path
|
||||
android:fillAlpha="0.25"
|
||||
android:fillColor="#FF000000"
|
||||
android:pathData="M81.57,70.73c9.98,-5.48 20.94,-8.23 32.49,-8.23c11.61,0 21.29,2.45 32.49,8.23c0.41,0.23 0.88,0.35 1.34,0.35c1.05,0 2.04,-0.58 2.57,-1.63c0.32,-0.59 0.46,-2.04 0.35,-2.66c-0.02,-0.09 -0.04,-0.17 -0.07,-0.24c0.12,0.63 0.05,1.29 -0.28,1.9c-0.53,1.05 -1.52,1.63 -2.57,1.63c-0.47,0 -0.93,-0.12 -1.34,-0.35c-11.2,-5.77 -20.88,-8.22 -32.49,-8.22c-11.55,0 -22.52,2.74 -32.49,8.22c-1.4,0.76 -3.15,0.23 -3.97,-1.17c-0.36,-0.66 -0.42,-1.41 -0.25,-2.1c-0.01,0.02 -0.01,0.03 -0.02,0.04c-0.25,0.75 -0.13,2.32 0.27,3.05C78.42,70.96 80.17,71.48 81.57,70.73z"
|
||||
android:strokeAlpha="0.25" />
|
||||
android:pathData="M182.2,149C166.9,149 154.4,161.4 154.4,176.8C154.4,192.2 166.8,204.6 182.2,204.6C197.6,204.6 210,192.2 210,176.8C210,161.4 197.5,149 182.2,149ZM182.2,198.9C170,198.9 160,188.9 160,176.7C160,164.5 170,154.5 182.2,154.5C194.4,154.5 204.4,164.5 204.4,176.7C204.4,189 194.4,198.9 182.2,198.9ZM176.7,182.8L169.5,175.6L165.6,179.5L176.7,190.6L198.9,168.4L195,164.5L176.7,182.8Z"
|
||||
android:fillColor="@color/fingerprint_enrollment_finish_color_outline"/>
|
||||
<path
|
||||
android:fillAlpha="0.25"
|
||||
android:fillColor="#FF000000"
|
||||
android:pathData="M166.41,97.07c0,-0.02 -0.01,-0.03 -0.01,-0.05c0.22,1.1 -0.19,2.29 -1.18,2.98c-1.34,0.93 -3.15,0.64 -4.08,-0.7c-5.25,-7.35 -11.9,-13.12 -19.77,-17.15c-16.74,-8.57 -38.15,-8.57 -54.83,0.06c-7.93,4.08 -14.58,9.92 -19.83,17.27c-0.47,0.82 -1.34,1.23 -2.27,1.23c-0.58,0 -1.17,-0.18 -1.69,-0.53c-0.9,-0.63 -1.32,-1.65 -1.22,-2.66c-0.01,0.03 -0.02,0.05 -0.02,0.1c-0.18,1.57 0.27,2.89 1.24,3.56c0.52,0.35 1.11,0.52 1.69,0.52c0.93,0 1.81,-0.41 2.27,-1.22c5.25,-7.35 11.9,-13.18 19.83,-17.27c16.68,-8.63 38.09,-8.63 54.83,-0.06c7.88,4.02 14.52,9.8 19.77,17.15c0.93,1.34 2.74,1.63 4.08,0.7C166.18,100.33 166.75,98.98 166.41,97.07z"
|
||||
android:strokeAlpha="0.25" />
|
||||
android:pathData="M81.8,62C80.4,62 79,61.2 78.4,59.9C77.5,58 78.2,55.7 80.1,54.8C88.4,50.6 97.9,48.4 107.6,48.4C117.3,48.4 126.8,50.6 135.1,54.8C137,55.7 137.8,58 136.8,59.9C135.9,61.8 133.6,62.6 131.7,61.6C124.4,58 116.1,56.1 107.7,56.1C99.2,56.1 90.9,58 83.7,61.6C82.9,61.9 82.4,62 81.8,62Z"
|
||||
android:fillColor="@color/fingerprint_enrollment_finish_color_outline"/>
|
||||
<path
|
||||
android:fillAlpha="0.25"
|
||||
android:fillColor="#FF000000"
|
||||
android:pathData="M144.1,132.43c-1.63,0 -2.92,-1.28 -2.92,-2.92c0,-14.12 -12.19,-25.61 -27.18,-25.61s-27.18,11.49 -27.18,25.61c0,0.17 0.01,0.33 0.01,0.49c0.29,-13.88 12.36,-25.1 27.17,-25.1c14.99,0 27.18,11.49 27.18,25.61c0,1.63 1.28,2.92 2.92,2.92c1.63,0 2.92,-1.28 2.92,-2.92c0,-0.26 -0.01,-0.52 -0.02,-0.79C146.89,131.26 145.66,132.43 144.1,132.43z"
|
||||
android:strokeAlpha="0.25" />
|
||||
android:pathData="M147.3,93.501C146,93.501 144.8,92.901 144.1,91.701C137.5,81.401 123.1,74.701 107.5,74.701C91.9,74.701 77.5,81.401 70.9,91.701C69.8,93.501 67.4,94.001 65.6,92.901C63.8,91.801 63.3,89.401 64.4,87.601C72.5,75.001 89,67.101 107.4,67.101C125.8,67.101 142.3,75.001 150.4,87.601C151.5,89.401 151,91.801 149.2,92.901C148.8,93.301 148.1,93.501 147.3,93.501Z"
|
||||
android:fillColor="@color/fingerprint_enrollment_finish_color_outline"/>
|
||||
<path
|
||||
android:fillAlpha="0.25"
|
||||
android:fillColor="#FF000000"
|
||||
android:pathData="M103.82,167.68c0.15,0.9 -0.11,1.85 -0.79,2.56c-0.64,0.58 -1.4,0.88 -2.16,0.88s-1.52,-0.29 -2.04,-0.88c-5.08,-5.08 -7.82,-8.34 -11.72,-15.4c-3.95,-7.05 -6.04,-15.62 -6.11,-24.83c0,0.17 -0.01,0.34 -0.01,0.51c0,9.39 2.1,18.14 6.12,25.32c3.91,7.06 6.65,10.32 11.72,15.4c0.53,0.58 1.28,0.88 2.04,0.88s1.52,-0.29 2.16,-0.88c0.69,-0.73 1.21,-1.88 0.79,-3.53C103.82,167.69 103.82,167.69 103.82,167.68z"
|
||||
android:strokeAlpha="0.25" />
|
||||
android:pathData="M106.8,149.701C106.5,149.701 106.1,149.701 105.8,149.601C94.6,146.401 87.5,130.001 89.1,118.501C90.3,109.801 96.2,104.601 104.8,104.601C112.3,104.601 118.7,110.001 120,117.401L121.3,125.301C122,129.601 125.7,132.701 130,132.701C134.9,132.701 138.9,128.701 138.9,123.801V122.401C138.9,120.301 140.6,118.601 142.7,118.601C144.8,118.601 146.5,120.301 146.5,122.401V123.801C146.5,132.901 139.1,140.301 130,140.301C121.9,140.301 115.1,134.501 113.7,126.501L112.4,118.601C111.8,114.901 108.6,112.201 104.8,112.201C100,112.201 97.4,114.601 96.7,119.501C95.5,128.301 101.4,140.301 107.9,142.101C109.9,142.701 111.1,144.801 110.5,146.801C110,148.601 108.5,149.701 106.8,149.701Z"
|
||||
android:fillColor="@color/fingerprint_enrollment_finish_color_outline"/>
|
||||
<path
|
||||
android:fillAlpha="0.25"
|
||||
android:fillColor="#FF000000"
|
||||
android:pathData="M133.72,170.12c-0.29,1.34 -1.52,2.22 -2.74,2.22c-0.23,0 -0.53,-0.06 -0.76,-0.12c-9.28,-2.57 -15.34,-6.01 -21.7,-12.25c-8,-7.95 -12.47,-18.47 -12.64,-29.76c0,0.11 -0.02,0.21 -0.02,0.31c0,11.55 4.49,22.34 12.66,30.45c6.36,6.24 12.43,9.68 21.7,12.25c0.23,0.06 0.53,0.12 0.76,0.12c1.22,0 2.45,-0.88 2.74,-2.22c0.11,-0.42 0.24,-1.49 0.07,-2.13C133.84,169.35 133.82,169.74 133.72,170.12z"
|
||||
android:strokeAlpha="0.25" />
|
||||
android:pathData="M75,140.4C73.5,140.4 72,139.5 71.4,137.9C68.6,130.5 68.5,122.8 68.5,122.5C68.5,102 85.6,85.9 107.5,85.9C129.4,85.9 146.5,102 146.5,122.5C146.5,124.6 144.8,126.3 142.7,126.3C140.6,126.3 138.9,124.6 138.9,122.5C138.9,106.3 125.2,93.5 107.6,93.5C90.1,93.5 76.3,106.2 76.3,122.5C76.3,122.6 76.3,129.1 78.7,135.2C79.5,137.2 78.5,139.4 76.5,140.2C76,140.3 75.5,140.4 75,140.4Z"
|
||||
android:fillColor="@color/fingerprint_enrollment_finish_color_outline"/>
|
||||
<path
|
||||
android:fillAlpha="0.25"
|
||||
android:fillColor="#FF000000"
|
||||
android:pathData="M143.93,146.61c-9.92,0 -17.97,-7.7 -17.97,-17.15c0,-6.24 -5.43,-11.32 -12.13,-11.32c-6.71,0 -12.13,5.08 -12.13,11.32c0,0.23 0.01,0.46 0.02,0.69c0.18,-6.1 5.52,-11.01 12.12,-11.01c6.71,0 12.13,5.08 12.13,11.32c0,9.45 8.05,17.15 17.97,17.15s17.97,-7.7 17.97,-17.15c0,-0.22 -0.01,-0.44 -0.02,-0.67C161.68,139.09 153.72,146.61 143.93,146.61z"
|
||||
android:strokeAlpha="0.25" />
|
||||
<path
|
||||
android:fillAlpha="0.25"
|
||||
android:fillColor="#FF000000"
|
||||
android:pathData="M65.99,130.52c0,7.88 1.4,14.46 4.26,22.1c-2.8,-7.47 -4.19,-14.89 -4.25,-22.58C66,130.2 65.99,130.36 65.99,130.52z"
|
||||
android:strokeAlpha="0.25" />
|
||||
<path
|
||||
android:fillAlpha="0.25"
|
||||
android:fillColor="#FF000000"
|
||||
android:pathData="M113.77,89.67c-16.57,0 -31.73,9.22 -38.56,23.51c-2.28,4.72 -3.44,10.27 -3.44,16.33c0,0.26 0,0.52 0,0.8c0.03,-5.99 1.19,-11.46 3.44,-16.13c6.82,-14.29 21.99,-23.51 38.56,-23.51c23.1,0 41.89,17.49 42.27,39.17c0,-0.11 0.02,-0.22 0.02,-0.33C156.06,107.52 137.1,89.67 113.77,89.67z"
|
||||
android:strokeAlpha="0.25" />
|
||||
<path
|
||||
android:fillAlpha="0.25"
|
||||
android:fillColor="#FF000000"
|
||||
android:pathData="M73.98,154.31c-1.52,0.58 -3.21,-0.23 -3.73,-1.69c0.6,1.81 2.09,3.08 3.73,2.69c1.52,-0.53 2.85,-1.63 1.81,-4.34c-0.02,-0.04 -0.03,-0.09 -0.05,-0.13C76.15,152.28 75.41,153.81 73.98,154.31z"
|
||||
android:strokeAlpha="0.25" />
|
||||
<path
|
||||
android:fillColor="#4285F4"
|
||||
android:pathData="M147.89,70.07c-0.47,0 -0.93,-0.12 -1.34,-0.35c-11.2,-5.78 -20.88,-8.23 -32.49,-8.23c-11.55,0 -22.52,2.74 -32.49,8.23c-1.4,0.76 -3.15,0.23 -3.97,-1.17c-0.76,-1.4 -0.23,-3.21 1.17,-3.97c10.85,-5.89 22.75,-8.93 35.29,-8.93c12.43,0 23.27,2.74 35.18,8.87c1.46,0.76 1.98,2.51 1.22,3.91C149.93,69.49 148.94,70.07 147.89,70.07z" />
|
||||
<path
|
||||
android:fillColor="#4285F4"
|
||||
android:pathData="M64.42,100.7c-0.58,0 -1.17,-0.17 -1.69,-0.53c-1.34,-0.93 -1.63,-2.74 -0.7,-4.08c5.78,-8.17 13.12,-14.58 21.88,-19.08c18.32,-9.45 41.77,-9.51 60.14,-0.06c8.75,4.49 16.1,10.85 21.88,18.96c0.93,1.28 0.64,3.15 -0.7,4.08s-3.15,0.64 -4.08,-0.7c-5.25,-7.35 -11.9,-13.12 -19.77,-17.15c-16.74,-8.57 -38.15,-8.57 -54.83,0.06c-7.93,4.08 -14.58,9.92 -19.83,17.27C66.22,100.29 65.35,100.7 64.42,100.7z" />
|
||||
<path
|
||||
android:fillColor="#4285F4"
|
||||
android:pathData="M100.87,171.11c-0.76,0 -1.52,-0.29 -2.04,-0.88c-5.08,-5.07 -7.82,-8.34 -11.72,-15.4c-4.03,-7.17 -6.12,-15.92 -6.12,-25.32c0,-17.32 14.82,-31.44 33.02,-31.44s33.02,14.12 33.02,31.44c0,1.63 -1.28,2.92 -2.92,2.92c-1.63,0 -2.92,-1.28 -2.92,-2.92c0,-14.12 -12.19,-25.61 -27.18,-25.61s-27.18,11.49 -27.18,25.61c0,8.4 1.87,16.16 5.43,22.46c3.73,6.71 6.3,9.57 10.79,14.12c1.11,1.17 1.11,2.98 0,4.14C102.39,170.82 101.63,171.11 100.87,171.11z" />
|
||||
<path
|
||||
android:fillColor="#4285F4"
|
||||
android:pathData="M142.7,160.32c-6.94,0 -13.07,-1.75 -18.08,-5.19c-8.69,-5.89 -13.88,-15.46 -13.88,-25.61c0,-1.63 1.28,-2.92 2.92,-2.92s2.92,1.28 2.92,2.92c0,8.22 4.2,15.98 11.32,20.77c4.14,2.8 8.98,4.14 14.82,4.14c1.4,0 3.73,-0.18 6.07,-0.58c1.57,-0.29 3.09,0.76 3.38,2.39c0.29,1.58 -0.76,3.09 -2.39,3.38C146.43,160.26 143.52,160.32 142.7,160.32z" />
|
||||
<path
|
||||
android:fillColor="#4285F4"
|
||||
android:pathData="M130.97,172.33c-0.23,0 -0.53,-0.06 -0.76,-0.12c-9.27,-2.57 -15.34,-6.01 -21.7,-12.25c-8.17,-8.11 -12.66,-18.9 -12.66,-30.45c0,-9.45 8.05,-17.15 17.97,-17.15s17.97,7.7 17.97,17.15c0,6.24 5.43,11.32 12.13,11.32c6.71,0 12.13,-5.07 12.13,-11.32c0,-21.99 -18.96,-39.84 -42.29,-39.84c-16.57,0 -31.73,9.22 -38.56,23.51c-2.28,4.73 -3.44,10.27 -3.44,16.33c0,4.55 0.41,11.73 3.91,21.06c0.58,1.52 -0.18,3.21 -1.69,3.73c-1.52,0.58 -3.21,-0.23 -3.73,-1.69c-2.86,-7.64 -4.26,-15.23 -4.26,-23.1c0,-7 1.34,-13.36 3.97,-18.9c7.76,-16.28 24.97,-26.83 43.81,-26.83c26.54,0 48.12,20.47 48.12,45.68c0,9.45 -8.05,17.15 -17.97,17.15s-17.97,-7.7 -17.97,-17.15c0,-6.24 -5.43,-11.32 -12.13,-11.32s-12.13,5.07 -12.13,11.32c0,9.98 3.85,19.31 10.91,26.31c5.54,5.48 10.85,8.52 19.07,10.79c1.58,0.41 2.45,2.04 2.04,3.56C133.42,171.46 132.2,172.33 130.97,172.33z" />
|
||||
<path
|
||||
android:fillColor="#FFFFFF"
|
||||
android:pathData="M192.86,217.88c-13.8,0 -25.02,-11.22 -25.02,-25.02s11.22,-25.02 25.02,-25.02s25.02,11.22 25.02,25.02S206.66,217.88 192.86,217.88z" />
|
||||
<path
|
||||
android:fillColor="#32A753"
|
||||
android:pathData="M192.86,169.83c12.7,0 23.04,10.33 23.04,23.04s-10.33,23.04 -23.04,23.04s-23.04,-10.33 -23.04,-23.04S180.16,169.83 192.86,169.83M192.86,165.86c-14.91,0 -27,12.09 -27,27s12.09,27 27,27c14.91,0 27,-12.09 27,-27S207.77,165.86 192.86,165.86L192.86,165.86z" />
|
||||
<path
|
||||
android:fillColor="#32A753"
|
||||
android:pathData="M188.45,205.22l-12.67,-12.67l2.83,-2.83l9.84,9.84l18.15,-18.15l2.83,2.83z" />
|
||||
android:pathData="M107.5,168.5C98.3,168.5 89.9,165.8 83,160.6C81.3,159.3 81,156.9 82.3,155.2C83.6,153.5 86,153.2 87.7,154.5C93.2,158.7 100.1,160.9 107.6,160.9C115.7,160.9 123.3,158.2 129.1,153.2C130.7,151.8 133.1,152 134.5,153.6C135.9,155.2 135.7,157.6 134.1,159C126.9,165.1 117.5,168.5 107.5,168.5Z"
|
||||
android:fillColor="@color/fingerprint_enrollment_finish_color_outline"/>
|
||||
</vector>
|
||||
|
||||
27
res/drawable/ic_info_outline_24.xml
Normal file
27
res/drawable/ic_info_outline_24.xml
Normal file
@@ -0,0 +1,27 @@
|
||||
<?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="24dp"
|
||||
android:height="24dp"
|
||||
android:viewportWidth="24.0"
|
||||
android:viewportHeight="24.0"
|
||||
android:tint="?android:attr/colorControlNormal">
|
||||
<path
|
||||
android:fillColor="#FF000000"
|
||||
android:pathData="M11,17h2v-6h-2v6zM12,2C6.48,2 2,6.48 2,12s4.48,10 10,10 10,-4.48 10,-10S17.52,2 12,2zM12,20c-4.41,0 -8,-3.59 -8,-8s3.59,-8 8,-8 8,3.59 8,8 -3.59,8 -8,8zM11,9h2L13,7h-2v2z"/>
|
||||
</vector>
|
||||
24
res/layout/biometric_handoff.xml
Normal file
24
res/layout/biometric_handoff.xml
Normal file
@@ -0,0 +1,24 @@
|
||||
<?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.
|
||||
-->
|
||||
|
||||
<com.google.android.setupdesign.GlifLayout
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
style="?attr/face_layout_theme"
|
||||
android:id="@+id/setup_wizard_layout"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
</com.google.android.setupdesign.GlifLayout>
|
||||
@@ -48,5 +48,6 @@
|
||||
<color name="biometric_enroll_intro_color_bar">#5bb974</color>
|
||||
<color name="biometric_enroll_intro_color_icon">#669df6</color>
|
||||
<color name="biometric_enroll_intro_color_outline">#5e5e5e</color>
|
||||
<color name="fingerprint_enrollment_finish_color_outline">#669df6</color>
|
||||
</resources>
|
||||
|
||||
|
||||
@@ -15,8 +15,7 @@
|
||||
limitations under the License.
|
||||
-->
|
||||
|
||||
<resources
|
||||
xmlns:androidprv="http://schemas.android.com/apk/prv/res/android">
|
||||
<resources>
|
||||
|
||||
<style name="Theme.Settings.Home" parent="Theme.Settings.HomeBase">
|
||||
<item name="colorPrimary">@*android:color/primary_device_default_settings</item>
|
||||
|
||||
@@ -204,4 +204,7 @@
|
||||
<color name="battery_info_error_color_red">#fce8e6</color> <!-- Material Red 50 -->
|
||||
<!-- Dialog error color. -->
|
||||
<color name="settings_dialog_colorError">#d93025</color> <!-- Red 600 -->
|
||||
|
||||
<!-- Fingerprint enrollment color -->
|
||||
<color name="fingerprint_enrollment_finish_color_outline">#1A73E8</color>
|
||||
</resources>
|
||||
|
||||
@@ -85,7 +85,7 @@
|
||||
<dimen name="notification_importance_button_padding">14dp</dimen>
|
||||
|
||||
<dimen name="notification_history_header_drawable_start">26dp</dimen>
|
||||
<dimen name="conversation_icon_size">48dp</dimen>
|
||||
<dimen name="conversation_icon_size">32dp</dimen>
|
||||
|
||||
<dimen name="zen_mode_icon_size">36dp</dimen>
|
||||
<dimen name="zen_mode_icon_margin">16dp</dimen>
|
||||
|
||||
@@ -1008,6 +1008,10 @@
|
||||
<string name="biometric_settings_use_biometric_unlock_phone">Unlocking your phone</string>
|
||||
<!-- Text shown on a toggle which allows or disallows the device to use biometric for authentication. [CHAR LIMIT=50] -->
|
||||
<string name="biometric_settings_use_biometric_for_apps">Authentication in apps</string>
|
||||
<!-- Message shown during enrollment to prompt a child to give the device to a parent or guardian. [CHAR LIMIT=NONE]-->
|
||||
<string name="biometric_settings_hand_back_to_guardian">Hand the phone back to your parent</string>
|
||||
<!-- Button text shown during enrollment to proceed after a child user has handed the device to a parent or guardian. [CHAR LIMIT=22] -->
|
||||
<string name="biometric_settings_hand_back_to_guardian_ok">OK</string>
|
||||
|
||||
<!-- Title of dialog shown when the user tries to skip setting up a screen lock, warning them of potential consequences of not doing so [CHAR LIMIT=30]-->
|
||||
<string name="lock_screen_intro_skip_title">Skip screen lock?</string>
|
||||
@@ -1208,6 +1212,8 @@
|
||||
<annotation id="url">Learn more</annotation></string>
|
||||
<!-- Text shown in fingerprint enroll when we didn't observe progress for a few seconds. [CHAR LIMIT=100] -->
|
||||
<string name="security_settings_fingerprint_enroll_lift_touch_again">Lift finger, then touch sensor again</string>
|
||||
<!-- Text shown during fingerprint enrollment to indicate bad sensor calibration. [CHAR LIMIT=100] -->
|
||||
<string name="security_settings_fingerprint_bad_calibration">Please recalibrate the fingerprint sensor.</string>
|
||||
|
||||
<!-- Text shown when "Add fingerprint" button is disabled -->
|
||||
<string name="fingerprint_add_max">You can add up to <xliff:g id="count" example="5">%d</xliff:g> fingerprints</string>
|
||||
@@ -5853,29 +5859,29 @@
|
||||
<!-- List of synonyms used in the settings search bar to find the “Magnification”. [CHAR LIMIT=NONE] -->
|
||||
<string name="keywords_magnification">Window Magnifier, Zoom, Magnification, Low vision, Enlarge, make bigger</string>
|
||||
<!-- List of synonyms used in the settings search bar to find the “TalkBack”. [CHAR LIMIT=NONE] -->
|
||||
<string name="keywords_talkback">Screen reader, Voice Over, VoiceOver, Voice Assistance, Blind, Low Vision, TTS, text to speech, spoken feedback</string>
|
||||
<string name="keywords_talkback"></string>
|
||||
<!-- List of synonyms used in the settings search bar to find the “Live Caption”. [CHAR LIMIT=NONE] -->
|
||||
<string name="keywords_live_caption">Captions, closed captions, CC, Live Transcribe, hard of hearing, hearing loss, CART, speech to text, subtitle</string>
|
||||
<!-- List of synonyms used in the settings search bar to find the “Live Transcribe”. [CHAR LIMIT=NONE] -->
|
||||
<string name="keywords_live_transcribe">Captions, closed captions, CC, Live Caption, hard of hearing, hearing loss, CART, speech to text, subtitle</string>
|
||||
<string name="keywords_live_transcribe"></string>
|
||||
<!-- List of synonyms used in the settings search bar to find the “Sound Notifications”. [CHAR LIMIT=NONE] -->
|
||||
<string name="keywords_sound_notifications">Notifications, hard of hearing, hearing loss, notify</string>
|
||||
<string name="keywords_sound_notifications"></string>
|
||||
<!-- List of synonyms used in the settings search bar to find the “Sound Amplifier”. [CHAR LIMIT=NONE] -->
|
||||
<string name="keywords_sound_amplifier">PSAP, amplify, sound amplification, hard of hearing, hearing loss, amplification</string>
|
||||
<string name="keywords_sound_amplifier"></string>
|
||||
<!-- List of synonyms used in the settings search bar to find the “Display size”. [CHAR LIMIT=NONE] -->
|
||||
<string name="keywords_display_size">screen size, large screen</string>
|
||||
<!-- List of synonyms used in the settings search bar to find the “Bold text”. [CHAR LIMIT=NONE] -->
|
||||
<string name="keywords_bold_text">High contrast, low vision, bold font, bold face</string>
|
||||
<!-- List of synonyms used in the settings search bar to find the “Select to Speak”. [CHAR LIMIT=NONE] -->
|
||||
<string name="keywords_select_to_speak">Hear text, read aloud, speak screen, screen reader</string>
|
||||
<string name="keywords_select_to_speak"></string>
|
||||
<!-- List of synonyms used in the settings search bar to find the “Color correction”. [CHAR LIMIT=NONE] -->
|
||||
<string name="keywords_color_correction">adjust color </string>
|
||||
<!-- List of synonyms used in the settings search bar to find the “Color inversion”. [CHAR LIMIT=NONE] -->
|
||||
<string name="keywords_color_inversion">turn screen dark, turn screen light</string>
|
||||
<!-- List of synonyms used in the settings search bar to find the “Accessibility Menu”. [CHAR LIMIT=NONE] -->
|
||||
<string name="keywords_accessibility_menu">motor, quick menu, assistive menu, touch, dexterity</string>
|
||||
<string name="keywords_accessibility_menu"></string>
|
||||
<!-- List of synonyms used in the settings search bar to find the “Switch Access”. [CHAR LIMIT=NONE] -->
|
||||
<string name="keywords_switch_access">motor, switch, hand, AT, assistive technology, paralysis, ALS, scanning, step scanning</string>
|
||||
<string name="keywords_switch_access"></string>
|
||||
<!-- List of synonyms used in the settings search bar to find the “Autoclick(dwell timing)”. [CHAR LIMIT=NONE] -->
|
||||
<string name="keywords_auto_click">motor, mouse</string>
|
||||
<!-- List of synonyms used in the settings search bar to find the “Hearing aids”. [CHAR LIMIT=NONE] -->
|
||||
@@ -5883,7 +5889,7 @@
|
||||
<!-- List of synonyms used in the settings search bar to find the “Real-time text (RTT)”. [CHAR LIMIT=NONE] -->
|
||||
<string name="keywords_rtt">hard of hearing, hearing loss, captions, Teletype, tty</string>
|
||||
<!-- List of synonyms used in the settings search bar to find the “Voice Access”. [CHAR LIMIT=NONE] -->
|
||||
<string name="keywords_voice_access">voice, voice control, motor, hand, mic, microphone, dictation, talk, control</string>
|
||||
<string name="keywords_voice_access"></string>
|
||||
|
||||
<!-- Printing settings -->
|
||||
<skip />
|
||||
|
||||
@@ -14,8 +14,7 @@
|
||||
limitations under the License.
|
||||
-->
|
||||
|
||||
<resources
|
||||
xmlns:androidprv="http://schemas.android.com/apk/prv/res/android">
|
||||
<resources>
|
||||
|
||||
<style name="Transparent">
|
||||
<item name="alertDialogTheme">@style/Theme.AlertDialog</item>
|
||||
|
||||
@@ -63,7 +63,7 @@
|
||||
android:title="@string/lockscreen_bypass_title"
|
||||
android:summary="@string/lockscreen_bypass_summary"
|
||||
settings:keywords="@string/keywords_lockscreen_bypass"
|
||||
settings:controller="com.android.settings.biometrics.face.FaceSettingsLockscreenBypassPreferenceController" />
|
||||
settings:controller="com.android.settings.biometrics.face.BiometricLockscreenBypassPreferenceController" />
|
||||
</PreferenceCategory>
|
||||
|
||||
<com.android.settingslib.widget.LayoutPreference
|
||||
|
||||
@@ -0,0 +1,37 @@
|
||||
/*
|
||||
* 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 com.android.settingslib.search.SearchIndexableRaw;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* Provider for Accessibility Search related features.
|
||||
*/
|
||||
public interface AccessibilitySearchFeatureProvider {
|
||||
|
||||
/**
|
||||
* Returns a list of raw data for indexing. See {@link SearchIndexableRaw}
|
||||
*
|
||||
* @param context a valid context {@link Context} instance
|
||||
* @return a list of {@link SearchIndexableRaw} references. Can be null.
|
||||
*/
|
||||
List<SearchIndexableRaw> getSearchIndexableRawData(Context context);
|
||||
}
|
||||
@@ -0,0 +1,34 @@
|
||||
/*
|
||||
* 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 com.android.settingslib.search.SearchIndexableRaw;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* Provider implementation for Accessibility Search related features.
|
||||
*/
|
||||
public class AccessibilitySearchFeatureProviderImpl implements AccessibilitySearchFeatureProvider {
|
||||
|
||||
@Override
|
||||
public List<SearchIndexableRaw> getSearchIndexableRawData(Context context) {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
@@ -50,12 +50,14 @@ import com.android.settings.R;
|
||||
import com.android.settings.Utils;
|
||||
import com.android.settings.accessibility.AccessibilityUtil.AccessibilityServiceFragmentType;
|
||||
import com.android.settings.dashboard.DashboardFragment;
|
||||
import com.android.settings.overlay.FeatureFactory;
|
||||
import com.android.settings.search.BaseSearchIndexProvider;
|
||||
import com.android.settingslib.RestrictedLockUtils.EnforcedAdmin;
|
||||
import com.android.settingslib.RestrictedLockUtilsInternal;
|
||||
import com.android.settingslib.RestrictedPreference;
|
||||
import com.android.settingslib.accessibility.AccessibilityUtils;
|
||||
import com.android.settingslib.search.SearchIndexable;
|
||||
import com.android.settingslib.search.SearchIndexableRaw;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collection;
|
||||
@@ -494,7 +496,15 @@ public class AccessibilitySettings extends DashboardFragment {
|
||||
}
|
||||
|
||||
public static final BaseSearchIndexProvider SEARCH_INDEX_DATA_PROVIDER =
|
||||
new BaseSearchIndexProvider(R.xml.accessibility_settings);
|
||||
new BaseSearchIndexProvider(R.xml.accessibility_settings) {
|
||||
@Override
|
||||
public List<SearchIndexableRaw> getRawDataToIndex(Context context,
|
||||
boolean enabled) {
|
||||
return FeatureFactory.getFactory(context)
|
||||
.getAccessibilitySearchFeatureProvider().getSearchIndexableRawData(
|
||||
context);
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
* This class helps setup RestrictedPreference.
|
||||
@@ -559,7 +569,6 @@ public class AccessibilitySettings extends DashboardFragment {
|
||||
|
||||
setRestrictedPreferenceEnabled(preference, packageName, serviceAllowed,
|
||||
serviceEnabled);
|
||||
|
||||
final String prefKey = preference.getKey();
|
||||
final int imageRes = info.getAnimatedImageRes();
|
||||
final CharSequence description = getServiceDescription(mContext, info,
|
||||
|
||||
@@ -69,6 +69,8 @@ public class BiometricEnrollActivity extends InstrumentedActivity {
|
||||
private static final int REQUEST_CONFIRM_LOCK = 2;
|
||||
// prompt for parental consent options
|
||||
private static final int REQUEST_CHOOSE_OPTIONS = 3;
|
||||
// prompt hand phone back to parent after enrollment
|
||||
private static final int REQUEST_HANDOFF_PARENT = 4;
|
||||
|
||||
public static final int RESULT_SKIP = BiometricEnrollBase.RESULT_SKIP;
|
||||
|
||||
@@ -303,11 +305,8 @@ public class BiometricEnrollActivity extends InstrumentedActivity {
|
||||
final boolean isStillPrompting = mParentalConsentHelper.launchNext(
|
||||
this, REQUEST_CHOOSE_OPTIONS, resultCode, data);
|
||||
if (!isStillPrompting) {
|
||||
Log.d(TAG, "Enrollment options set, starting enrollment now");
|
||||
|
||||
mParentalOptions = mParentalConsentHelper.getConsentResult();
|
||||
mParentalConsentHelper = null;
|
||||
startEnroll();
|
||||
Log.d(TAG, "Enrollment options set, requesting handoff");
|
||||
launchHandoffToParent();
|
||||
}
|
||||
} else {
|
||||
Log.d(TAG, "Unknown or cancelled parental consent");
|
||||
@@ -315,6 +314,18 @@ public class BiometricEnrollActivity extends InstrumentedActivity {
|
||||
finish();
|
||||
}
|
||||
break;
|
||||
case REQUEST_HANDOFF_PARENT:
|
||||
if (resultCode == RESULT_OK) {
|
||||
Log.d(TAG, "Enrollment options set, starting enrollment");
|
||||
mParentalOptions = mParentalConsentHelper.getConsentResult();
|
||||
mParentalConsentHelper = null;
|
||||
startEnroll();
|
||||
} else {
|
||||
Log.d(TAG, "Unknown or cancelled handoff");
|
||||
setResult(RESULT_CANCELED);
|
||||
finish();
|
||||
}
|
||||
break;
|
||||
default:
|
||||
Log.w(TAG, "Unknown consenting requestCode: " + requestCode + ", finishing");
|
||||
finish();
|
||||
@@ -492,6 +503,11 @@ public class BiometricEnrollActivity extends InstrumentedActivity {
|
||||
mMultiBiometricEnrollHelper.startNextStep();
|
||||
}
|
||||
|
||||
private void launchHandoffToParent() {
|
||||
final Intent intent = BiometricUtils.getHandoffToParentIntent(this, getIntent());
|
||||
startActivityForResult(intent, REQUEST_HANDOFF_PARENT);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getMetricsCategory() {
|
||||
return SettingsEnums.BIOMETRIC_ENROLL_ACTIVITY;
|
||||
|
||||
@@ -0,0 +1,75 @@
|
||||
/*
|
||||
* 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.biometrics;
|
||||
|
||||
import android.app.settings.SettingsEnums;
|
||||
import android.os.Bundle;
|
||||
import android.view.View;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.annotation.Nullable;
|
||||
|
||||
import com.android.settings.R;
|
||||
|
||||
import com.google.android.setupcompat.template.FooterBarMixin;
|
||||
import com.google.android.setupcompat.template.FooterButton;
|
||||
import com.google.android.setupdesign.GlifLayout;
|
||||
|
||||
/**
|
||||
* Prompts the user to hand the device to their parent or guardian.
|
||||
*/
|
||||
public class BiometricHandoffActivity extends BiometricEnrollBase {
|
||||
|
||||
@Nullable
|
||||
private FooterButton mPrimaryFooterButton;
|
||||
|
||||
@Override
|
||||
protected void onCreate(@Nullable Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
setContentView(R.layout.biometric_handoff);
|
||||
|
||||
setHeaderText(R.string.biometric_settings_hand_back_to_guardian);
|
||||
|
||||
final GlifLayout layout = getLayout();
|
||||
mFooterBarMixin = layout.getMixin(FooterBarMixin.class);
|
||||
mFooterBarMixin.setPrimaryButton(getPrimaryFooterButton());
|
||||
}
|
||||
|
||||
@NonNull
|
||||
protected FooterButton getPrimaryFooterButton() {
|
||||
if (mPrimaryFooterButton == null) {
|
||||
mPrimaryFooterButton = new FooterButton.Builder(this)
|
||||
.setText(R.string.biometric_settings_hand_back_to_guardian_ok)
|
||||
.setButtonType(FooterButton.ButtonType.NEXT)
|
||||
.setListener(this::onNextButtonClick)
|
||||
.setTheme(R.style.SudGlifButton_Primary)
|
||||
.build();
|
||||
}
|
||||
return mPrimaryFooterButton;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onNextButtonClick(View view) {
|
||||
setResult(RESULT_OK);
|
||||
finish();
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getMetricsCategory() {
|
||||
return SettingsEnums.BIOMETRIC_CONSENT_PARENT_TO_CHILD;
|
||||
}
|
||||
}
|
||||
@@ -176,6 +176,19 @@ public class BiometricUtils {
|
||||
return intent;
|
||||
}
|
||||
|
||||
/**
|
||||
* Start an activity that prompts the user to hand the device to their parent or guardian.
|
||||
* @param context caller's context
|
||||
* @param activityIntent The intent that started the caller's activity
|
||||
* @return Intent for starting BiometricHandoffActivity
|
||||
*/
|
||||
public static Intent getHandoffToParentIntent(@NonNull Context context,
|
||||
@NonNull Intent activityIntent) {
|
||||
final Intent intent = new Intent(context, BiometricHandoffActivity.class);
|
||||
WizardManagerHelper.copyWizardManagerExtras(activityIntent, intent);
|
||||
return intent;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param activity Reference to the calling activity, used to startActivity
|
||||
* @param intent Intent pointing to the enrollment activity
|
||||
|
||||
@@ -0,0 +1,41 @@
|
||||
/*
|
||||
* 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.biometrics.face;
|
||||
|
||||
import android.content.Context;
|
||||
|
||||
import com.android.settings.Utils;
|
||||
|
||||
/**
|
||||
* Preference controller that controls whether unlocking directly to home.
|
||||
*/
|
||||
public class BiometricLockscreenBypassPreferenceController extends
|
||||
FaceSettingsLockscreenBypassPreferenceController {
|
||||
public BiometricLockscreenBypassPreferenceController(Context context, String preferenceKey) {
|
||||
super(context, preferenceKey);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getAvailabilityStatus() {
|
||||
// When the device supports multiple biometrics auth, this preference will be shown
|
||||
// in face unlock category.
|
||||
if (Utils.isMultipleBiometricsSupported(mContext)) {
|
||||
return AVAILABLE;
|
||||
}
|
||||
return UNSUPPORTED_ON_DEVICE;
|
||||
}
|
||||
}
|
||||
@@ -18,6 +18,7 @@ package com.android.settings.biometrics.face;
|
||||
|
||||
import static android.hardware.biometrics.BiometricAuthenticator.TYPE_FACE;
|
||||
|
||||
import android.app.settings.SettingsEnums;
|
||||
import android.content.Intent;
|
||||
import android.os.Bundle;
|
||||
import android.view.View;
|
||||
@@ -29,8 +30,6 @@ import com.android.settings.R;
|
||||
|
||||
/**
|
||||
* Displays parental consent information for face authentication.
|
||||
*
|
||||
* TODO(b/188847063): swap strings for consent screen
|
||||
*/
|
||||
public class FaceEnrollParentalConsent extends FaceEnrollIntroduction {
|
||||
|
||||
@@ -103,4 +102,9 @@ public class FaceEnrollParentalConsent extends FaceEnrollIntroduction {
|
||||
protected int getHeaderResDefault() {
|
||||
return R.string.security_settings_face_enroll_consent_introduction_title;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getMetricsCategory() {
|
||||
return SettingsEnums.FACE_PARENTAL_CONSENT;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -83,10 +83,10 @@ public class FaceSettingsLockscreenBypassPreferenceController
|
||||
|
||||
@Override
|
||||
public int getAvailabilityStatus() {
|
||||
// When the device supports multiple biometrics auth, this preference will be shown
|
||||
// When the device supports multiple biometrics auth, this preference won't be shown
|
||||
// in face unlock category.
|
||||
if (Utils.isMultipleBiometricsSupported(mContext)) {
|
||||
return AVAILABLE;
|
||||
return UNSUPPORTED_ON_DEVICE;
|
||||
}
|
||||
if (mUserManager.isManagedProfile(UserHandle.myUserId())) {
|
||||
return UNSUPPORTED_ON_DEVICE;
|
||||
|
||||
@@ -18,6 +18,7 @@ package com.android.settings.biometrics.fingerprint;
|
||||
|
||||
import static android.hardware.biometrics.BiometricAuthenticator.TYPE_FINGERPRINT;
|
||||
|
||||
import android.app.settings.SettingsEnums;
|
||||
import android.content.Intent;
|
||||
import android.os.Bundle;
|
||||
import android.view.View;
|
||||
@@ -29,8 +30,6 @@ import com.android.settings.R;
|
||||
|
||||
/**
|
||||
* Displays parental consent information for fingerprint authentication.
|
||||
*
|
||||
* TODO(b/188847063): swap strings for consent screen
|
||||
*/
|
||||
public class FingerprintEnrollParentalConsent extends FingerprintEnrollIntroduction {
|
||||
|
||||
@@ -97,4 +96,9 @@ public class FingerprintEnrollParentalConsent extends FingerprintEnrollIntroduct
|
||||
protected int getHeaderResDefault() {
|
||||
return R.string.security_settings_fingerprint_enroll_consent_introduction_title;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getMetricsCategory() {
|
||||
return SettingsEnums.FINGERPRINT_PARENTAL_CONSENT;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -45,6 +45,8 @@ public class FingerprintErrorDialog extends BiometricErrorDialog {
|
||||
// This message happens when the underlying crypto layer decides to revoke the
|
||||
// enrollment auth token.
|
||||
return R.string.security_settings_fingerprint_enroll_error_timeout_dialog_message;
|
||||
case FingerprintManager.FINGERPRINT_ERROR_BAD_CALIBARTION:
|
||||
return R.string.security_settings_fingerprint_bad_calibration;
|
||||
default:
|
||||
// There's nothing specific to tell the user about. Ask them to try again.
|
||||
return R.string.security_settings_fingerprint_enroll_error_generic_dialog_message;
|
||||
|
||||
@@ -359,9 +359,7 @@ public class BatteryAppListPreferenceController extends AbstractPreferenceContro
|
||||
componentId < BatteryConsumer.FIRST_CUSTOM_POWER_COMPONENT_ID
|
||||
+ deviceConsumer.getCustomPowerComponentCount();
|
||||
componentId++) {
|
||||
if (!showAllApps
|
||||
&& mBatteryUtils.shouldHideCustomDevicePowerComponent(deviceConsumer,
|
||||
componentId)) {
|
||||
if (!showAllApps) {
|
||||
continue;
|
||||
}
|
||||
|
||||
|
||||
@@ -81,8 +81,6 @@ public class BatteryUtils {
|
||||
|
||||
private static final String TAG = "BatteryUtils";
|
||||
|
||||
private static final double MIN_POWER_THRESHOLD_MILLI_AMP_HOURS = 0.002;
|
||||
|
||||
private static BatteryUtils sInstance;
|
||||
private PackageManager mPackageManager;
|
||||
|
||||
@@ -180,8 +178,7 @@ public class BatteryUtils {
|
||||
* battery consumption list.
|
||||
*/
|
||||
public boolean shouldHideUidBatteryConsumer(UidBatteryConsumer consumer, String[] packages) {
|
||||
return consumer.getConsumedPower() < MIN_POWER_THRESHOLD_MILLI_AMP_HOURS
|
||||
|| mPowerUsageFeatureProvider.isTypeSystem(consumer.getUid(), packages)
|
||||
return mPowerUsageFeatureProvider.isTypeSystem(consumer.getUid(), packages)
|
||||
|| shouldHideUidBatteryConsumerUnconditionally(consumer, packages);
|
||||
}
|
||||
|
||||
@@ -208,21 +205,10 @@ public class BatteryUtils {
|
||||
case BatteryConsumer.POWER_COMPONENT_WIFI:
|
||||
return true;
|
||||
default:
|
||||
return consumer.getConsumedPower(powerComponentId)
|
||||
< MIN_POWER_THRESHOLD_MILLI_AMP_HOURS;
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns true if the specified device custom power component should be excluded from the
|
||||
* summary battery consumption list.
|
||||
*/
|
||||
public boolean shouldHideCustomDevicePowerComponent(BatteryConsumer consumer,
|
||||
int customPowerComponentId) {
|
||||
return consumer.getConsumedPowerForCustomComponent(customPowerComponentId)
|
||||
< MIN_POWER_THRESHOLD_MILLI_AMP_HOURS;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns true if one the specified packages belongs to a hidden system module.
|
||||
*/
|
||||
|
||||
@@ -30,14 +30,12 @@ import android.util.Log;
|
||||
import com.android.internal.annotations.VisibleForTesting;
|
||||
import com.android.settings.R;
|
||||
import com.android.settings.SidecarFragment;
|
||||
import com.android.settings.core.SettingsBaseActivity;
|
||||
import com.android.settings.network.EnableMultiSimSidecar;
|
||||
import com.android.settings.network.SubscriptionUtil;
|
||||
import com.android.settings.network.SwitchToEuiccSubscriptionSidecar;
|
||||
import com.android.settings.network.SwitchToRemovableSlotSidecar;
|
||||
import com.android.settings.network.UiccSlotUtil;
|
||||
import com.android.settings.sim.SimActivationNotifier;
|
||||
import com.android.settingslib.transition.SettingsTransitionHelper;
|
||||
|
||||
import com.google.common.collect.ImmutableList;
|
||||
|
||||
@@ -70,9 +68,6 @@ public class ToggleSubscriptionDialogActivity extends SubscriptionActionDialogAc
|
||||
Intent intent = new Intent(context, ToggleSubscriptionDialogActivity.class);
|
||||
intent.putExtra(ARG_SUB_ID, subId);
|
||||
intent.putExtra(ARG_enable, enable);
|
||||
// suppress page transition as this is a dialog
|
||||
intent.putExtra(SettingsBaseActivity.EXTRA_PAGE_TRANSITION_TYPE,
|
||||
SettingsTransitionHelper.TransitionType.TRANSITION_NONE);
|
||||
return intent;
|
||||
}
|
||||
|
||||
|
||||
@@ -33,6 +33,7 @@ import com.android.settings.R;
|
||||
import com.android.settings.applications.AppInfoBase;
|
||||
import com.android.settings.core.SubSettingLauncher;
|
||||
import com.android.settings.notification.NotificationBackend;
|
||||
import com.android.settingslib.widget.AppPreference;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collections;
|
||||
@@ -144,7 +145,7 @@ public class AppConversationListPreferenceController extends NotificationPrefere
|
||||
}
|
||||
|
||||
protected Preference createConversationPref(final ConversationChannelWrapper conversation) {
|
||||
Preference pref = new Preference(mContext);
|
||||
AppPreference pref = new AppPreference(mContext);
|
||||
populateConversationPreference(conversation, pref);
|
||||
return pref;
|
||||
}
|
||||
|
||||
@@ -18,7 +18,6 @@ package com.android.settings.notification.app;
|
||||
|
||||
import android.app.settings.SettingsEnums;
|
||||
import android.content.Context;
|
||||
import android.content.Intent;
|
||||
import android.content.pm.ShortcutInfo;
|
||||
import android.os.Bundle;
|
||||
import android.os.UserHandle;
|
||||
@@ -34,6 +33,7 @@ import com.android.settings.applications.AppInfoBase;
|
||||
import com.android.settings.core.SubSettingLauncher;
|
||||
import com.android.settings.notification.NotificationBackend;
|
||||
import com.android.settingslib.core.AbstractPreferenceController;
|
||||
import com.android.settingslib.widget.AppPreference;
|
||||
|
||||
import java.text.Collator;
|
||||
import java.util.Comparator;
|
||||
@@ -96,7 +96,7 @@ public abstract class ConversationListPreferenceController extends AbstractPrefe
|
||||
|
||||
protected Preference createConversationPref(final ConversationChannelWrapper conversation,
|
||||
int order) {
|
||||
Preference pref = new Preference(mContext);
|
||||
AppPreference pref = new AppPreference(mContext);
|
||||
pref.setOrder(order);
|
||||
|
||||
pref.setTitle(getTitle(conversation));
|
||||
|
||||
@@ -23,6 +23,7 @@ import android.util.Log;
|
||||
import androidx.annotation.Nullable;
|
||||
|
||||
import com.android.settings.R;
|
||||
import com.android.settings.accessibility.AccessibilitySearchFeatureProvider;
|
||||
import com.android.settings.accounts.AccountFeatureProvider;
|
||||
import com.android.settings.applications.ApplicationFeatureProvider;
|
||||
import com.android.settings.applications.GameSettingsFeatureProvider;
|
||||
@@ -174,6 +175,11 @@ public abstract class FeatureFactory {
|
||||
*/
|
||||
public abstract GameSettingsFeatureProvider getGameSettingsFeatureProvider();
|
||||
|
||||
/**
|
||||
* Retrieve implementation for Accessibility search index feature.
|
||||
*/
|
||||
public abstract AccessibilitySearchFeatureProvider getAccessibilitySearchFeatureProvider();
|
||||
|
||||
public static final class FactoryNotFoundException extends RuntimeException {
|
||||
public FactoryNotFoundException(Throwable throwable) {
|
||||
super("Unable to create factory. Did you misconfigure Proguard?", throwable);
|
||||
|
||||
@@ -25,6 +25,8 @@ import android.os.UserManager;
|
||||
|
||||
import androidx.annotation.Keep;
|
||||
|
||||
import com.android.settings.accessibility.AccessibilitySearchFeatureProvider;
|
||||
import com.android.settings.accessibility.AccessibilitySearchFeatureProviderImpl;
|
||||
import com.android.settings.accounts.AccountFeatureProvider;
|
||||
import com.android.settings.accounts.AccountFeatureProviderImpl;
|
||||
import com.android.settings.applications.ApplicationFeatureProvider;
|
||||
@@ -106,6 +108,7 @@ public class FeatureFactoryImpl extends FeatureFactory {
|
||||
private ExtraAppInfoFeatureProvider mExtraAppInfoFeatureProvider;
|
||||
private SecuritySettingsFeatureProvider mSecuritySettingsFeatureProvider;
|
||||
private GameSettingsFeatureProvider mGameSettingsFeatureProvider;
|
||||
private AccessibilitySearchFeatureProvider mAccessibilitySearchFeatureProvider;
|
||||
|
||||
@Override
|
||||
public SupportFeatureProvider getSupportFeatureProvider(Context context) {
|
||||
@@ -335,4 +338,12 @@ public class FeatureFactoryImpl extends FeatureFactory {
|
||||
}
|
||||
return mGameSettingsFeatureProvider;
|
||||
}
|
||||
|
||||
@Override
|
||||
public AccessibilitySearchFeatureProvider getAccessibilitySearchFeatureProvider() {
|
||||
if (mAccessibilitySearchFeatureProvider == null) {
|
||||
mAccessibilitySearchFeatureProvider = new AccessibilitySearchFeatureProviderImpl();
|
||||
}
|
||||
return mAccessibilitySearchFeatureProvider;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -16,6 +16,8 @@
|
||||
|
||||
package com.android.settings.password;
|
||||
|
||||
import static android.view.View.ACCESSIBILITY_LIVE_REGION_POLITE;
|
||||
|
||||
import static com.android.settings.password.ChooseLockSettingsHelper.EXTRA_KEY_UNIFICATION_PROFILE_CREDENTIAL;
|
||||
import static com.android.settings.password.ChooseLockSettingsHelper.EXTRA_KEY_UNIFICATION_PROFILE_ID;
|
||||
|
||||
@@ -496,6 +498,7 @@ public class ChooseLockPattern extends SettingsActivity {
|
||||
R.layout.choose_lock_pattern, container, false);
|
||||
updateActivityTitle();
|
||||
layout.setHeaderText(getActivity().getTitle());
|
||||
layout.getHeaderTextView().setAccessibilityLiveRegion(ACCESSIBILITY_LIVE_REGION_POLITE);
|
||||
if (getResources().getBoolean(R.bool.config_lock_pattern_minimal_ui)) {
|
||||
View iconView = layout.findViewById(R.id.sud_layout_icon);
|
||||
if (iconView != null) {
|
||||
|
||||
@@ -56,6 +56,7 @@ import com.android.settings.testutils.shadow.ShadowDeviceConfig;
|
||||
import com.android.settings.testutils.shadow.ShadowFragment;
|
||||
import com.android.settings.testutils.shadow.ShadowUserManager;
|
||||
import com.android.settingslib.RestrictedPreference;
|
||||
import com.android.settingslib.search.SearchIndexableRaw;
|
||||
|
||||
import org.junit.Before;
|
||||
import org.junit.Rule;
|
||||
@@ -77,12 +78,12 @@ import java.io.IOException;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
/** Test for {@link AccessibilitySettings}. */
|
||||
@RunWith(RobolectricTestRunner.class)
|
||||
public class AccessibilitySettingsTest {
|
||||
private static final String PACKAGE_NAME = "com.android.test";
|
||||
private static final String CLASS_NAME = PACKAGE_NAME + ".test_a11y_service";
|
||||
private static final ComponentName COMPONENT_NAME = new ComponentName(PACKAGE_NAME,
|
||||
CLASS_NAME);
|
||||
private static final ComponentName COMPONENT_NAME = new ComponentName(PACKAGE_NAME, CLASS_NAME);
|
||||
private static final int ON = 1;
|
||||
private static final int OFF = 0;
|
||||
private static final String EMPTY_STRING = "";
|
||||
@@ -132,6 +133,14 @@ public class AccessibilitySettingsTest {
|
||||
assertThat(keys).containsAtLeastElementsIn(niks);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void getRawDataToIndex_isNull() {
|
||||
final List<SearchIndexableRaw> indexableRawList =
|
||||
AccessibilitySettings.SEARCH_INDEX_DATA_PROVIDER.getRawDataToIndex(mContext, true);
|
||||
|
||||
assertThat(indexableRawList).isNull();
|
||||
}
|
||||
|
||||
@Test
|
||||
@Config(shadows = {ShadowDeviceConfig.class})
|
||||
public void isRampingRingerEnabled_settingsFlagOn_Enabled() {
|
||||
@@ -362,7 +371,7 @@ public class AccessibilitySettingsTest {
|
||||
try {
|
||||
final AccessibilityServiceInfo info = new AccessibilityServiceInfo(resolveInfo,
|
||||
mContext);
|
||||
info.setComponentName(new ComponentName(PACKAGE_NAME, CLASS_NAME));
|
||||
info.setComponentName(new ComponentName(packageName, className));
|
||||
return info;
|
||||
} catch (XmlPullParserException | IOException e) {
|
||||
// Do nothing
|
||||
|
||||
@@ -0,0 +1,59 @@
|
||||
/*
|
||||
* 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.biometrics.face;
|
||||
|
||||
import static com.google.common.truth.Truth.assertThat;
|
||||
|
||||
import static org.mockito.Mockito.spy;
|
||||
|
||||
import android.content.Context;
|
||||
|
||||
import com.android.settings.testutils.shadow.ShadowUtils;
|
||||
|
||||
import org.junit.After;
|
||||
import org.junit.Before;
|
||||
import org.junit.Test;
|
||||
import org.junit.runner.RunWith;
|
||||
import org.robolectric.RobolectricTestRunner;
|
||||
import org.robolectric.RuntimeEnvironment;
|
||||
import org.robolectric.annotation.Config;
|
||||
|
||||
@RunWith(RobolectricTestRunner.class)
|
||||
@Config(shadows = {ShadowUtils.class})
|
||||
public class BiometricLockscreenBypassPreferenceControllerTest {
|
||||
|
||||
private Context mContext;
|
||||
private BiometricLockscreenBypassPreferenceController mController;
|
||||
|
||||
@Before
|
||||
public void setUp() {
|
||||
mContext = spy(RuntimeEnvironment.application);
|
||||
mController = spy(new BiometricLockscreenBypassPreferenceController(mContext, "test_key"));
|
||||
}
|
||||
|
||||
@After
|
||||
public void tearDown() {
|
||||
ShadowUtils.reset();
|
||||
}
|
||||
|
||||
@Test
|
||||
public void isAvailable_multipleBiometricsSupported_shouldReturnAvailable() {
|
||||
ShadowUtils.setIsMultipleBiometricsSupported(true);
|
||||
|
||||
assertThat(mController.isAvailable()).isTrue();
|
||||
}
|
||||
}
|
||||
@@ -31,9 +31,11 @@ import android.hardware.face.FaceManager;
|
||||
import android.os.UserManager;
|
||||
import android.provider.Settings;
|
||||
|
||||
import com.android.settings.testutils.shadow.ShadowUtils;
|
||||
import com.android.settingslib.RestrictedLockUtils.EnforcedAdmin;
|
||||
import com.android.settingslib.RestrictedSwitchPreference;
|
||||
|
||||
import org.junit.After;
|
||||
import org.junit.Before;
|
||||
import org.junit.Test;
|
||||
import org.junit.runner.RunWith;
|
||||
@@ -41,9 +43,11 @@ import org.mockito.Mock;
|
||||
import org.mockito.MockitoAnnotations;
|
||||
import org.robolectric.RobolectricTestRunner;
|
||||
import org.robolectric.RuntimeEnvironment;
|
||||
import org.robolectric.annotation.Config;
|
||||
import org.robolectric.util.ReflectionHelpers;
|
||||
|
||||
@RunWith(RobolectricTestRunner.class)
|
||||
@Config(shadows = {ShadowUtils.class})
|
||||
public class FaceSettingsLockscreenBypassPreferenceControllerTest {
|
||||
|
||||
@Mock
|
||||
@@ -69,7 +73,11 @@ public class FaceSettingsLockscreenBypassPreferenceControllerTest {
|
||||
"test_key"));
|
||||
ReflectionHelpers.setField(mController, "mFaceManager", mFaceManager);
|
||||
ReflectionHelpers.setField(mController, "mUserManager", mUserManager);
|
||||
}
|
||||
|
||||
@After
|
||||
public void tearDown() {
|
||||
ShadowUtils.reset();
|
||||
}
|
||||
|
||||
@Test
|
||||
@@ -86,6 +94,13 @@ public class FaceSettingsLockscreenBypassPreferenceControllerTest {
|
||||
assertThat(mController.isAvailable()).isFalse();
|
||||
}
|
||||
|
||||
@Test
|
||||
public void isAvailable_multipleBiometricsSupported_shouldReturnUnsupported() {
|
||||
ShadowUtils.setIsMultipleBiometricsSupported(true);
|
||||
|
||||
assertThat(mController.isAvailable()).isFalse();
|
||||
}
|
||||
|
||||
@Test
|
||||
public void onPreferenceChange_settingIsUpdated() {
|
||||
boolean defaultValue = mContext.getResources().getBoolean(
|
||||
|
||||
@@ -246,17 +246,7 @@ public class BatteryUtilsTest {
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testShouldHideSystemConsumer_LowPower_ReturnTrue() {
|
||||
when(mAggregateBatteryConsumer.getConsumedPower(
|
||||
BatteryConsumer.POWER_COMPONENT_FLASHLIGHT)).thenReturn(0.0005);
|
||||
assertThat(mBatteryUtils.shouldHideDevicePowerComponent(mAggregateBatteryConsumer,
|
||||
BatteryConsumer.POWER_COMPONENT_FLASHLIGHT)).isTrue();
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testShouldHideSystemConsumer_HighPower_ReturnFalse() {
|
||||
when(mAggregateBatteryConsumer.getConsumedPower(
|
||||
BatteryConsumer.POWER_COMPONENT_FLASHLIGHT)).thenReturn(0.5);
|
||||
public void testShouldHideSystemConsumer_OtherType_ReturnFalse() {
|
||||
assertThat(mBatteryUtils.shouldHideDevicePowerComponent(mAggregateBatteryConsumer,
|
||||
BatteryConsumer.POWER_COMPONENT_FLASHLIGHT)).isFalse();
|
||||
}
|
||||
|
||||
@@ -21,6 +21,7 @@ import static org.mockito.Mockito.when;
|
||||
|
||||
import android.content.Context;
|
||||
|
||||
import com.android.settings.accessibility.AccessibilitySearchFeatureProvider;
|
||||
import com.android.settings.accounts.AccountFeatureProvider;
|
||||
import com.android.settings.applications.ApplicationFeatureProvider;
|
||||
import com.android.settings.applications.GameSettingsFeatureProvider;
|
||||
@@ -87,6 +88,7 @@ public class FakeFeatureFactory extends FeatureFactory {
|
||||
public ExtraAppInfoFeatureProvider extraAppInfoFeatureProvider;
|
||||
public SecuritySettingsFeatureProvider securitySettingsFeatureProvider;
|
||||
public GameSettingsFeatureProvider gameSettingsFeatureProvider;
|
||||
public AccessibilitySearchFeatureProvider mAccessibilitySearchFeatureProvider;
|
||||
|
||||
/**
|
||||
* Call this in {@code @Before} method of the test class to use fake factory.
|
||||
@@ -136,6 +138,7 @@ public class FakeFeatureFactory extends FeatureFactory {
|
||||
extraAppInfoFeatureProvider = mock(ExtraAppInfoFeatureProvider.class);
|
||||
securitySettingsFeatureProvider = mock(SecuritySettingsFeatureProvider.class);
|
||||
gameSettingsFeatureProvider = mock(GameSettingsFeatureProvider.class);
|
||||
mAccessibilitySearchFeatureProvider = mock(AccessibilitySearchFeatureProvider.class);
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -272,4 +275,9 @@ public class FakeFeatureFactory extends FeatureFactory {
|
||||
public GameSettingsFeatureProvider getGameSettingsFeatureProvider() {
|
||||
return gameSettingsFeatureProvider;
|
||||
}
|
||||
|
||||
@Override
|
||||
public AccessibilitySearchFeatureProvider getAccessibilitySearchFeatureProvider() {
|
||||
return mAccessibilitySearchFeatureProvider;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -48,6 +48,7 @@ public class ShadowUtils {
|
||||
private static ArraySet<String> sResultLinks = new ArraySet<>();
|
||||
private static boolean sIsBatteryPresent;
|
||||
private static boolean sIsPageTransitionEnabled;
|
||||
private static boolean sIsMultipleBiometricsSupported;
|
||||
|
||||
@Implementation
|
||||
protected static int enforceSameOwner(Context context, int userId) {
|
||||
@@ -71,6 +72,7 @@ public class ShadowUtils {
|
||||
sResultLinks = new ArraySet<>();
|
||||
sIsBatteryPresent = true;
|
||||
sIsPageTransitionEnabled = true;
|
||||
sIsMultipleBiometricsSupported = false;
|
||||
}
|
||||
|
||||
public static void setIsDemoUser(boolean isDemoUser) {
|
||||
@@ -177,4 +179,13 @@ public class ShadowUtils {
|
||||
public static void setIsPageTransitionEnabled(boolean isPageTransitionEnabled) {
|
||||
sIsPageTransitionEnabled = isPageTransitionEnabled;
|
||||
}
|
||||
|
||||
@Implementation
|
||||
protected static boolean isMultipleBiometricsSupported(Context context) {
|
||||
return sIsMultipleBiometricsSupported;
|
||||
}
|
||||
|
||||
public static void setIsMultipleBiometricsSupported(boolean isMultipleBiometricsSupported) {
|
||||
sIsMultipleBiometricsSupported = isMultipleBiometricsSupported;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -19,6 +19,7 @@ import static org.mockito.Mockito.mock;
|
||||
|
||||
import android.content.Context;
|
||||
|
||||
import com.android.settings.accessibility.AccessibilitySearchFeatureProvider;
|
||||
import com.android.settings.accounts.AccountFeatureProvider;
|
||||
import com.android.settings.applications.ApplicationFeatureProvider;
|
||||
import com.android.settings.applications.GameSettingsFeatureProvider;
|
||||
@@ -82,6 +83,7 @@ public class FakeFeatureFactory extends FeatureFactory {
|
||||
public ExtraAppInfoFeatureProvider extraAppInfoFeatureProvider;
|
||||
public SecuritySettingsFeatureProvider securitySettingsFeatureProvider;
|
||||
public GameSettingsFeatureProvider gameSettingsFeatureProvider;
|
||||
public AccessibilitySearchFeatureProvider mAccessibilitySearchFeatureProvider;
|
||||
|
||||
/**
|
||||
* Call this in {@code @Before} method of the test class to use fake factory.
|
||||
@@ -258,4 +260,9 @@ public class FakeFeatureFactory extends FeatureFactory {
|
||||
public GameSettingsFeatureProvider getGameSettingsFeatureProvider() {
|
||||
return gameSettingsFeatureProvider;
|
||||
}
|
||||
|
||||
@Override
|
||||
public AccessibilitySearchFeatureProvider getAccessibilitySearchFeatureProvider() {
|
||||
return mAccessibilitySearchFeatureProvider;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user