Snap for 5567188 from 6b2030a17a to qt-release
Change-Id: Ia549bb5ad8604b2759033e1c24b4a02307db5cab
This commit is contained in:
@@ -1448,6 +1448,16 @@
|
||||
<action android:name="android.settings.ACCESSIBILITY_SETTINGS_FOR_SUW" />
|
||||
<category android:name="android.intent.category.DEFAULT" />
|
||||
</intent-filter>
|
||||
<meta-data android:name="com.android.settings.FRAGMENT_CLASS"
|
||||
android:value="com.android.settings.accessibility.AccessibilitySettingsForSetupWizard" />
|
||||
<meta-data android:name="com.android.settings.PRIMARY_PROFILE_CONTROLLED"
|
||||
android:value="true" />
|
||||
</activity>
|
||||
|
||||
<activity-alias
|
||||
android:name=".FontSizeSettingsForSetupWizardActivity"
|
||||
android:exported="true"
|
||||
android:targetActivity=".accessibility.AccessibilitySettingsForSetupWizardActivity">
|
||||
<intent-filter>
|
||||
<action android:name="android.intent.action.MAIN" />
|
||||
<category android:name="com.android.settings.suggested.category.DISPLAY_SETTINGS" />
|
||||
@@ -1458,9 +1468,7 @@
|
||||
android:value="true" />
|
||||
<meta-data android:name="com.android.settings.FRAGMENT_CLASS"
|
||||
android:value="com.android.settings.accessibility.AccessibilitySettingsForSetupWizard" />
|
||||
<meta-data android:name="com.android.settings.PRIMARY_PROFILE_CONTROLLED"
|
||||
android:value="true" />
|
||||
</activity>
|
||||
</activity-alias>
|
||||
|
||||
<activity
|
||||
android:name="Settings$AccessibilityDaltonizerSettingsActivity"
|
||||
|
||||
@@ -133,12 +133,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=" <color name="switchbar_switch_track_tint">#82000000</color>"
|
||||
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
|
||||
errorLine1=" <color name="switchbar_switch_track_tint">#82000000</color>"
|
||||
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
|
||||
<location
|
||||
file="res/values-night/colors.xml"
|
||||
line="18"
|
||||
column="3"/>
|
||||
column="5"/>
|
||||
</issue>
|
||||
|
||||
<issue
|
||||
@@ -165,12 +165,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=" <color name="homepage_accessibility_background">#783BE5</color>"
|
||||
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
|
||||
errorLine1=" <color name="homepage_accessibility_background">#783BE5</color>"
|
||||
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
|
||||
<location
|
||||
file="res/values-night/colors.xml"
|
||||
line="20"
|
||||
column="3"/>
|
||||
column="5"/>
|
||||
</issue>
|
||||
|
||||
<issue
|
||||
@@ -197,12 +197,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=" <color name="homepage_support_background">#3F5FBD</color>"
|
||||
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
|
||||
errorLine1=" <color name="homepage_support_background">#3F5FBD</color>"
|
||||
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
|
||||
<location
|
||||
file="res/values-night/colors.xml"
|
||||
line="21"
|
||||
column="3"/>
|
||||
column="5"/>
|
||||
</issue>
|
||||
|
||||
<issue
|
||||
@@ -237,22 +237,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.
This ensures that a theme change from a light to a dark theme can be uniformlyapplied across the app."
|
||||
errorLine1=" <color name="homepage_status_bar_color">#cc000000</color>"
|
||||
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
|
||||
<location
|
||||
file="res/values-night/colors.xml"
|
||||
line="23"
|
||||
column="3"/>
|
||||
</issue>
|
||||
|
||||
<issue
|
||||
id="HardCodedColor"
|
||||
severity="Error"
|
||||
@@ -269,6 +253,38 @@
|
||||
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="notification_importance_button_selected">#AECBFA</color> <!-- material blue 200 -->"
|
||||
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
|
||||
<location
|
||||
file="res/values-night/colors.xml"
|
||||
line="28"
|
||||
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="notification_importance_button_unselected">#5F6368</color>"
|
||||
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
|
||||
<location
|
||||
file="res/values-night/colors.xml"
|
||||
line="29"
|
||||
column="5"/>
|
||||
</issue>
|
||||
|
||||
<issue
|
||||
id="HardCodedColor"
|
||||
severity="Error"
|
||||
@@ -281,7 +297,7 @@
|
||||
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
|
||||
<location
|
||||
file="res/values/colors.xml"
|
||||
line="27"
|
||||
line="29"
|
||||
column="5"/>
|
||||
</issue>
|
||||
|
||||
@@ -297,26 +313,10 @@
|
||||
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
|
||||
<location
|
||||
file="res/values/colors.xml"
|
||||
line="29"
|
||||
line="31"
|
||||
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="notification_importance_button_selected">#AECBFA</color> <!-- material blue 200 -->"
|
||||
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
|
||||
<location
|
||||
file="res/values-night/colors.xml"
|
||||
line="30"
|
||||
column="3"/>
|
||||
</issue>
|
||||
|
||||
<issue
|
||||
id="HardCodedColor"
|
||||
severity="Error"
|
||||
@@ -329,26 +329,10 @@
|
||||
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
|
||||
<location
|
||||
file="res/values/colors.xml"
|
||||
line="30"
|
||||
line="32"
|
||||
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="notification_importance_button_unselected">#5F6368</color>"
|
||||
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
|
||||
<location
|
||||
file="res/values-night/colors.xml"
|
||||
line="31"
|
||||
column="3"/>
|
||||
</issue>
|
||||
|
||||
<issue
|
||||
id="HardCodedColor"
|
||||
severity="Error"
|
||||
@@ -361,7 +345,7 @@
|
||||
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
|
||||
<location
|
||||
file="res/values/colors.xml"
|
||||
line="31"
|
||||
line="33"
|
||||
column="5"/>
|
||||
</issue>
|
||||
|
||||
@@ -377,7 +361,7 @@
|
||||
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
|
||||
<location
|
||||
file="res/values/colors.xml"
|
||||
line="33"
|
||||
line="35"
|
||||
column="5"/>
|
||||
</issue>
|
||||
|
||||
@@ -393,7 +377,7 @@
|
||||
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
|
||||
<location
|
||||
file="res/values/colors.xml"
|
||||
line="34"
|
||||
line="36"
|
||||
column="5"/>
|
||||
</issue>
|
||||
|
||||
@@ -409,7 +393,7 @@
|
||||
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
|
||||
<location
|
||||
file="res/values/colors.xml"
|
||||
line="36"
|
||||
line="38"
|
||||
column="5"/>
|
||||
</issue>
|
||||
|
||||
@@ -425,7 +409,7 @@
|
||||
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
|
||||
<location
|
||||
file="res/values/colors.xml"
|
||||
line="41"
|
||||
line="43"
|
||||
column="5"/>
|
||||
</issue>
|
||||
|
||||
@@ -441,7 +425,7 @@
|
||||
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
|
||||
<location
|
||||
file="res/values/colors.xml"
|
||||
line="42"
|
||||
line="44"
|
||||
column="5"/>
|
||||
</issue>
|
||||
|
||||
@@ -457,7 +441,7 @@
|
||||
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
|
||||
<location
|
||||
file="res/values/colors.xml"
|
||||
line="44"
|
||||
line="46"
|
||||
column="5"/>
|
||||
</issue>
|
||||
|
||||
@@ -473,7 +457,7 @@
|
||||
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
|
||||
<location
|
||||
file="res/values/colors.xml"
|
||||
line="45"
|
||||
line="47"
|
||||
column="5"/>
|
||||
</issue>
|
||||
|
||||
@@ -489,7 +473,7 @@
|
||||
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
|
||||
<location
|
||||
file="res/values/colors.xml"
|
||||
line="49"
|
||||
line="51"
|
||||
column="5"/>
|
||||
</issue>
|
||||
|
||||
@@ -505,7 +489,7 @@
|
||||
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
|
||||
<location
|
||||
file="res/values/colors.xml"
|
||||
line="52"
|
||||
line="54"
|
||||
column="5"/>
|
||||
</issue>
|
||||
|
||||
@@ -521,7 +505,7 @@
|
||||
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
|
||||
<location
|
||||
file="res/values/colors.xml"
|
||||
line="55"
|
||||
line="57"
|
||||
column="5"/>
|
||||
</issue>
|
||||
|
||||
@@ -537,7 +521,7 @@
|
||||
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
|
||||
<location
|
||||
file="res/values/colors.xml"
|
||||
line="56"
|
||||
line="58"
|
||||
column="5"/>
|
||||
</issue>
|
||||
|
||||
@@ -553,7 +537,7 @@
|
||||
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
|
||||
<location
|
||||
file="res/values/colors.xml"
|
||||
line="57"
|
||||
line="59"
|
||||
column="5"/>
|
||||
</issue>
|
||||
|
||||
@@ -569,7 +553,7 @@
|
||||
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
|
||||
<location
|
||||
file="res/values/colors.xml"
|
||||
line="58"
|
||||
line="60"
|
||||
column="5"/>
|
||||
</issue>
|
||||
|
||||
@@ -585,7 +569,7 @@
|
||||
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
|
||||
<location
|
||||
file="res/values/colors.xml"
|
||||
line="60"
|
||||
line="62"
|
||||
column="5"/>
|
||||
</issue>
|
||||
|
||||
@@ -601,7 +585,7 @@
|
||||
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
|
||||
<location
|
||||
file="res/values/colors.xml"
|
||||
line="61"
|
||||
line="63"
|
||||
column="5"/>
|
||||
</issue>
|
||||
|
||||
@@ -617,7 +601,7 @@
|
||||
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
|
||||
<location
|
||||
file="res/values/colors.xml"
|
||||
line="62"
|
||||
line="64"
|
||||
column="5"/>
|
||||
</issue>
|
||||
|
||||
@@ -633,7 +617,7 @@
|
||||
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
|
||||
<location
|
||||
file="res/values/colors.xml"
|
||||
line="63"
|
||||
line="65"
|
||||
column="5"/>
|
||||
</issue>
|
||||
|
||||
@@ -649,7 +633,7 @@
|
||||
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
|
||||
<location
|
||||
file="res/values/colors.xml"
|
||||
line="64"
|
||||
line="66"
|
||||
column="5"/>
|
||||
</issue>
|
||||
|
||||
@@ -665,7 +649,7 @@
|
||||
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
|
||||
<location
|
||||
file="res/values/colors.xml"
|
||||
line="65"
|
||||
line="67"
|
||||
column="5"/>
|
||||
</issue>
|
||||
|
||||
@@ -681,7 +665,7 @@
|
||||
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
|
||||
<location
|
||||
file="res/values/colors.xml"
|
||||
line="66"
|
||||
line="68"
|
||||
column="5"/>
|
||||
</issue>
|
||||
|
||||
@@ -697,7 +681,7 @@
|
||||
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
|
||||
<location
|
||||
file="res/values/colors.xml"
|
||||
line="67"
|
||||
line="69"
|
||||
column="5"/>
|
||||
</issue>
|
||||
|
||||
@@ -713,7 +697,7 @@
|
||||
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
|
||||
<location
|
||||
file="res/values/colors.xml"
|
||||
line="68"
|
||||
line="70"
|
||||
column="5"/>
|
||||
</issue>
|
||||
|
||||
@@ -729,7 +713,7 @@
|
||||
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
|
||||
<location
|
||||
file="res/values/colors.xml"
|
||||
line="69"
|
||||
line="71"
|
||||
column="5"/>
|
||||
</issue>
|
||||
|
||||
@@ -745,7 +729,7 @@
|
||||
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
|
||||
<location
|
||||
file="res/values/colors.xml"
|
||||
line="71"
|
||||
line="73"
|
||||
column="5"/>
|
||||
</issue>
|
||||
|
||||
@@ -761,7 +745,7 @@
|
||||
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
|
||||
<location
|
||||
file="res/values/colors.xml"
|
||||
line="74"
|
||||
line="76"
|
||||
column="5"/>
|
||||
</issue>
|
||||
|
||||
@@ -777,7 +761,7 @@
|
||||
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
|
||||
<location
|
||||
file="res/values/colors.xml"
|
||||
line="77"
|
||||
line="79"
|
||||
column="5"/>
|
||||
</issue>
|
||||
|
||||
@@ -793,7 +777,7 @@
|
||||
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
|
||||
<location
|
||||
file="res/values/colors.xml"
|
||||
line="80"
|
||||
line="82"
|
||||
column="5"/>
|
||||
</issue>
|
||||
|
||||
@@ -809,7 +793,7 @@
|
||||
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
|
||||
<location
|
||||
file="res/values/colors.xml"
|
||||
line="83"
|
||||
line="85"
|
||||
column="5"/>
|
||||
</issue>
|
||||
|
||||
@@ -825,7 +809,7 @@
|
||||
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
|
||||
<location
|
||||
file="res/values/colors.xml"
|
||||
line="84"
|
||||
line="86"
|
||||
column="5"/>
|
||||
</issue>
|
||||
|
||||
@@ -841,7 +825,7 @@
|
||||
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
|
||||
<location
|
||||
file="res/values/colors.xml"
|
||||
line="85"
|
||||
line="87"
|
||||
column="5"/>
|
||||
</issue>
|
||||
|
||||
@@ -857,7 +841,7 @@
|
||||
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
|
||||
<location
|
||||
file="res/values/colors.xml"
|
||||
line="86"
|
||||
line="88"
|
||||
column="5"/>
|
||||
</issue>
|
||||
|
||||
@@ -873,7 +857,7 @@
|
||||
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
|
||||
<location
|
||||
file="res/values/colors.xml"
|
||||
line="87"
|
||||
line="89"
|
||||
column="5"/>
|
||||
</issue>
|
||||
|
||||
@@ -889,7 +873,7 @@
|
||||
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
|
||||
<location
|
||||
file="res/values/colors.xml"
|
||||
line="88"
|
||||
line="90"
|
||||
column="5"/>
|
||||
</issue>
|
||||
|
||||
@@ -905,7 +889,7 @@
|
||||
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
|
||||
<location
|
||||
file="res/values/colors.xml"
|
||||
line="89"
|
||||
line="91"
|
||||
column="5"/>
|
||||
</issue>
|
||||
|
||||
@@ -921,7 +905,7 @@
|
||||
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
|
||||
<location
|
||||
file="res/values/colors.xml"
|
||||
line="90"
|
||||
line="92"
|
||||
column="5"/>
|
||||
</issue>
|
||||
|
||||
@@ -937,7 +921,7 @@
|
||||
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
|
||||
<location
|
||||
file="res/values/colors.xml"
|
||||
line="91"
|
||||
line="93"
|
||||
column="5"/>
|
||||
</issue>
|
||||
|
||||
@@ -953,7 +937,7 @@
|
||||
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
|
||||
<location
|
||||
file="res/values/colors.xml"
|
||||
line="92"
|
||||
line="94"
|
||||
column="5"/>
|
||||
</issue>
|
||||
|
||||
@@ -969,7 +953,7 @@
|
||||
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
|
||||
<location
|
||||
file="res/values/colors.xml"
|
||||
line="93"
|
||||
line="95"
|
||||
column="5"/>
|
||||
</issue>
|
||||
|
||||
@@ -985,7 +969,7 @@
|
||||
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
|
||||
<location
|
||||
file="res/values/colors.xml"
|
||||
line="94"
|
||||
line="96"
|
||||
column="5"/>
|
||||
</issue>
|
||||
|
||||
@@ -1001,7 +985,7 @@
|
||||
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
|
||||
<location
|
||||
file="res/values/colors.xml"
|
||||
line="95"
|
||||
line="97"
|
||||
column="5"/>
|
||||
</issue>
|
||||
|
||||
@@ -1017,7 +1001,7 @@
|
||||
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
|
||||
<location
|
||||
file="res/values/colors.xml"
|
||||
line="96"
|
||||
line="98"
|
||||
column="5"/>
|
||||
</issue>
|
||||
|
||||
@@ -1033,7 +1017,7 @@
|
||||
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
|
||||
<location
|
||||
file="res/values/colors.xml"
|
||||
line="97"
|
||||
line="99"
|
||||
column="5"/>
|
||||
</issue>
|
||||
|
||||
@@ -1049,7 +1033,7 @@
|
||||
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
|
||||
<location
|
||||
file="res/values/colors.xml"
|
||||
line="98"
|
||||
line="100"
|
||||
column="5"/>
|
||||
</issue>
|
||||
|
||||
@@ -1065,7 +1049,7 @@
|
||||
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
|
||||
<location
|
||||
file="res/values/colors.xml"
|
||||
line="100"
|
||||
line="102"
|
||||
column="5"/>
|
||||
</issue>
|
||||
|
||||
@@ -1081,7 +1065,7 @@
|
||||
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
|
||||
<location
|
||||
file="res/values/colors.xml"
|
||||
line="106"
|
||||
line="108"
|
||||
column="5"/>
|
||||
</issue>
|
||||
|
||||
@@ -1097,7 +1081,7 @@
|
||||
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
|
||||
<location
|
||||
file="res/values/colors.xml"
|
||||
line="111"
|
||||
line="113"
|
||||
column="5"/>
|
||||
</issue>
|
||||
|
||||
@@ -1113,7 +1097,7 @@
|
||||
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
|
||||
<location
|
||||
file="res/values/colors.xml"
|
||||
line="112"
|
||||
line="114"
|
||||
column="5"/>
|
||||
</issue>
|
||||
|
||||
@@ -1129,7 +1113,7 @@
|
||||
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
|
||||
<location
|
||||
file="res/values/colors.xml"
|
||||
line="113"
|
||||
line="115"
|
||||
column="5"/>
|
||||
</issue>
|
||||
|
||||
@@ -1145,7 +1129,7 @@
|
||||
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
|
||||
<location
|
||||
file="res/values/colors.xml"
|
||||
line="114"
|
||||
line="116"
|
||||
column="5"/>
|
||||
</issue>
|
||||
|
||||
@@ -1161,7 +1145,7 @@
|
||||
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
|
||||
<location
|
||||
file="res/values/colors.xml"
|
||||
line="115"
|
||||
line="117"
|
||||
column="5"/>
|
||||
</issue>
|
||||
|
||||
@@ -1177,7 +1161,7 @@
|
||||
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
|
||||
<location
|
||||
file="res/values/colors.xml"
|
||||
line="116"
|
||||
line="118"
|
||||
column="5"/>
|
||||
</issue>
|
||||
|
||||
@@ -1193,7 +1177,7 @@
|
||||
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
|
||||
<location
|
||||
file="res/values/colors.xml"
|
||||
line="119"
|
||||
line="121"
|
||||
column="5"/>
|
||||
</issue>
|
||||
|
||||
@@ -1209,7 +1193,7 @@
|
||||
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
|
||||
<location
|
||||
file="res/values/colors.xml"
|
||||
line="120"
|
||||
line="122"
|
||||
column="5"/>
|
||||
</issue>
|
||||
|
||||
@@ -1225,7 +1209,7 @@
|
||||
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
|
||||
<location
|
||||
file="res/values/colors.xml"
|
||||
line="121"
|
||||
line="123"
|
||||
column="5"/>
|
||||
</issue>
|
||||
|
||||
@@ -1241,7 +1225,7 @@
|
||||
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
|
||||
<location
|
||||
file="res/values/colors.xml"
|
||||
line="122"
|
||||
line="124"
|
||||
column="5"/>
|
||||
</issue>
|
||||
|
||||
@@ -1257,7 +1241,7 @@
|
||||
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
|
||||
<location
|
||||
file="res/values/colors.xml"
|
||||
line="123"
|
||||
line="125"
|
||||
column="5"/>
|
||||
</issue>
|
||||
|
||||
@@ -1273,7 +1257,7 @@
|
||||
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
|
||||
<location
|
||||
file="res/values/colors.xml"
|
||||
line="126"
|
||||
line="128"
|
||||
column="5"/>
|
||||
</issue>
|
||||
|
||||
@@ -1289,7 +1273,7 @@
|
||||
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
|
||||
<location
|
||||
file="res/values/colors.xml"
|
||||
line="127"
|
||||
line="129"
|
||||
column="5"/>
|
||||
</issue>
|
||||
|
||||
@@ -1305,7 +1289,7 @@
|
||||
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
|
||||
<location
|
||||
file="res/values/colors.xml"
|
||||
line="128"
|
||||
line="130"
|
||||
column="5"/>
|
||||
</issue>
|
||||
|
||||
@@ -1321,7 +1305,7 @@
|
||||
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
|
||||
<location
|
||||
file="res/values/colors.xml"
|
||||
line="129"
|
||||
line="131"
|
||||
column="5"/>
|
||||
</issue>
|
||||
|
||||
@@ -1337,7 +1321,7 @@
|
||||
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
|
||||
<location
|
||||
file="res/values/colors.xml"
|
||||
line="130"
|
||||
line="132"
|
||||
column="5"/>
|
||||
</issue>
|
||||
|
||||
@@ -1353,23 +1337,7 @@
|
||||
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
|
||||
<location
|
||||
file="res/values/colors.xml"
|
||||
line="131"
|
||||
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="homepage_status_bar_color">#ccFFFFFF</color>"
|
||||
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
|
||||
<location
|
||||
file="res/values/colors.xml"
|
||||
line="137"
|
||||
line="133"
|
||||
column="5"/>
|
||||
</issue>
|
||||
|
||||
@@ -1385,7 +1353,7 @@
|
||||
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
|
||||
<location
|
||||
file="res/values/colors.xml"
|
||||
line="140"
|
||||
line="139"
|
||||
column="5"/>
|
||||
</issue>
|
||||
|
||||
@@ -1401,7 +1369,7 @@
|
||||
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
|
||||
<location
|
||||
file="res/values/colors.xml"
|
||||
line="141"
|
||||
line="140"
|
||||
column="5"/>
|
||||
</issue>
|
||||
|
||||
@@ -1417,7 +1385,7 @@
|
||||
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
|
||||
<location
|
||||
file="res/values/colors.xml"
|
||||
line="142"
|
||||
line="141"
|
||||
column="5"/>
|
||||
</issue>
|
||||
|
||||
@@ -2617,7 +2585,7 @@
|
||||
errorLine2=" ~~~~~~~~~~~~~~~~~~~">
|
||||
<location
|
||||
file="res/values-en-rXC/strings.xml"
|
||||
line="2629"
|
||||
line="2652"
|
||||
column="169"/>
|
||||
</issue>
|
||||
|
||||
@@ -2633,7 +2601,7 @@
|
||||
errorLine2=" ~~~~~~~~~~~~~~~~~~~">
|
||||
<location
|
||||
file="res/values-en-rAU/strings.xml"
|
||||
line="2632"
|
||||
line="2653"
|
||||
column="64"/>
|
||||
</issue>
|
||||
|
||||
@@ -2649,7 +2617,7 @@
|
||||
errorLine2=" ~~~~~~~~~~~~~~~~~~~">
|
||||
<location
|
||||
file="res/values-en-rCA/strings.xml"
|
||||
line="2632"
|
||||
line="2653"
|
||||
column="64"/>
|
||||
</issue>
|
||||
|
||||
@@ -2665,7 +2633,7 @@
|
||||
errorLine2=" ~~~~~~~~~~~~~~~~~~~">
|
||||
<location
|
||||
file="res/values-en-rGB/strings.xml"
|
||||
line="2632"
|
||||
line="2653"
|
||||
column="64"/>
|
||||
</issue>
|
||||
|
||||
@@ -2681,7 +2649,7 @@
|
||||
errorLine2=" ~~~~~~~~~~~~~~~~~~~">
|
||||
<location
|
||||
file="res/values-en-rIN/strings.xml"
|
||||
line="2632"
|
||||
line="2653"
|
||||
column="64"/>
|
||||
</issue>
|
||||
|
||||
@@ -2697,7 +2665,7 @@
|
||||
errorLine2=" ~~~~~~~~~~~~~~~~~~~">
|
||||
<location
|
||||
file="res/values/strings.xml"
|
||||
line="6134"
|
||||
line="6186"
|
||||
column="36"/>
|
||||
</issue>
|
||||
|
||||
@@ -2793,7 +2761,7 @@
|
||||
errorLine2=" ^">
|
||||
<location
|
||||
file="res/values/themes.xml"
|
||||
line="99"
|
||||
line="103"
|
||||
column="40"/>
|
||||
</issue>
|
||||
|
||||
@@ -2809,7 +2777,7 @@
|
||||
errorLine2=" ^">
|
||||
<location
|
||||
file="res/values/themes.xml"
|
||||
line="99"
|
||||
line="103"
|
||||
column="40"/>
|
||||
</issue>
|
||||
|
||||
@@ -2825,7 +2793,7 @@
|
||||
errorLine2=" ^">
|
||||
<location
|
||||
file="res/values/themes.xml"
|
||||
line="167"
|
||||
line="171"
|
||||
column="45"/>
|
||||
</issue>
|
||||
|
||||
@@ -2841,7 +2809,7 @@
|
||||
errorLine2=" ^">
|
||||
<location
|
||||
file="res/values/themes.xml"
|
||||
line="168"
|
||||
line="172"
|
||||
column="49"/>
|
||||
</issue>
|
||||
|
||||
@@ -2857,7 +2825,7 @@
|
||||
errorLine2=" ^">
|
||||
<location
|
||||
file="res/values/themes.xml"
|
||||
line="176"
|
||||
line="180"
|
||||
column="45"/>
|
||||
</issue>
|
||||
|
||||
@@ -2873,10 +2841,26 @@
|
||||
errorLine2=" ^">
|
||||
<location
|
||||
file="res/values/themes.xml"
|
||||
line="177"
|
||||
line="181"
|
||||
column="49"/>
|
||||
</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=" <item name="android:colorAccent">@color/material_blue_700</item>"
|
||||
errorLine2=" ^">
|
||||
<location
|
||||
file="res/values/themes.xml"
|
||||
line="249"
|
||||
column="42"/>
|
||||
</issue>
|
||||
|
||||
<issue
|
||||
id="HardCodedColor"
|
||||
severity="Error"
|
||||
|
||||
@@ -27,7 +27,9 @@
|
||||
<FrameLayout android:id="@+id/pinned_header"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:visibility="gone" />
|
||||
android:background="?android:attr/windowBackground"
|
||||
android:elevation="1dp"
|
||||
android:visibility="gone"/>
|
||||
|
||||
<FrameLayout
|
||||
android:id="@android:id/list_container"
|
||||
|
||||
@@ -22,23 +22,17 @@
|
||||
android:layout_height="match_parent"
|
||||
android:layout_width="match_parent">
|
||||
|
||||
<LinearLayout
|
||||
android:orientation="vertical"
|
||||
android:layout_height="0px"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_weight="1">
|
||||
<com.android.settings.widget.SwitchBar
|
||||
android:id="@+id/switch_bar"
|
||||
android:layout_height="?android:attr/actionBarSize"
|
||||
android:layout_width="match_parent"
|
||||
android:theme="?attr/switchBarTheme"/>
|
||||
|
||||
<com.android.settings.widget.SwitchBar android:id="@+id/switch_bar"
|
||||
android:layout_height="?android:attr/actionBarSize"
|
||||
android:layout_width="match_parent"
|
||||
android:theme="?attr/switchBarTheme" />
|
||||
|
||||
<FrameLayout
|
||||
android:id="@+id/main_content"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent" />
|
||||
|
||||
</LinearLayout>
|
||||
<FrameLayout
|
||||
android:id="@+id/main_content"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:layout_weight="1"/>
|
||||
|
||||
<RelativeLayout android:id="@+id/button_bar"
|
||||
android:layout_height="wrap_content"
|
||||
@@ -51,7 +45,7 @@
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_margin="5dip"
|
||||
android:layout_alignParentStart="true"
|
||||
android:text="@*android:string/back_button_label" />
|
||||
android:text="@*android:string/back_button_label"/>
|
||||
|
||||
<LinearLayout
|
||||
android:orientation="horizontal"
|
||||
@@ -64,13 +58,13 @@
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_margin="5dip"
|
||||
android:text="@*android:string/skip_button_label"
|
||||
android:visibility="gone" />
|
||||
android:visibility="gone"/>
|
||||
|
||||
<Button android:id="@+id/next_button"
|
||||
android:layout_width="150dip"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_margin="5dip"
|
||||
android:text="@*android:string/next_button_label" />
|
||||
android:text="@*android:string/next_button_label"/>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
@@ -890,10 +890,12 @@
|
||||
<string name="security_settings_face_preference_title">Face authentication</string>
|
||||
<!-- Introduction title shown in face enrollment education screen [CHAR LIMIT=40] -->
|
||||
<string name="security_settings_face_enroll_education_title">How to set up Face unlock</string>
|
||||
<!-- Introduction title shown in face enrollment education screen to show the face authentication feature, when face unlock is disabled by device admin [CHAR LIMIT=40] -->
|
||||
<!-- Introduction title shown in face enrollment education screen to show the face authentication feature, when face unlock is disabled by device admin [CHAR LIMIT=60] -->
|
||||
<string name="security_settings_face_enroll_education_title_unlock_disabled">Use your face to authenticate</string>
|
||||
<!-- Introduction detail message shown in face education [CHAR LIMIT=NONE] -->
|
||||
<string name="security_settings_face_enroll_education_message"></string>
|
||||
<!-- Button that takes the user to the enrollment activity [CHAR LIMIT=20] -->
|
||||
<string name="security_settings_face_enroll_education_start">Start</string>
|
||||
<!-- Button shown which shows accessibility toggles for face enrollment when clicked. [CHAR LIMIT=32] -->
|
||||
<string name="security_settings_face_enroll_introduction_accessibility">Use accessibility setup</string>
|
||||
<!-- Additional details shown when the accessibility toggle is expanded. [CHAR LIMIT=NONE]-->
|
||||
@@ -906,7 +908,7 @@
|
||||
<string name="security_settings_face_enroll_introduction_cancel">Cancel</string>
|
||||
<!-- Introduction title shown in face enrollment to introduce the face unlock feature [CHAR LIMIT=40] -->
|
||||
<string name="security_settings_face_enroll_introduction_title">Unlock with your face</string>
|
||||
<!-- Introduction title shown in face enrollment to introduce the face authentication feature, when face unlock is disabled by device admin [CHAR LIMIT=40] -->
|
||||
<!-- Introduction title shown in face enrollment to introduce the face authentication feature, when face unlock is disabled by device admin [CHAR LIMIT=60] -->
|
||||
<string name="security_settings_face_enroll_introduction_title_unlock_disabled">Use your face to authenticate</string>
|
||||
<!-- Introduction detail message shown in face enrollment dialog [CHAR LIMIT=NONE]-->
|
||||
<string name="security_settings_face_enroll_introduction_message">Use your face to unlock your phone, authorize purchases, or sign in to apps.</string>
|
||||
|
||||
@@ -91,6 +91,7 @@
|
||||
</style>
|
||||
|
||||
<style name="ThemeOverlay.SwitchBar.Settings" parent="@*android:style/ThemeOverlay.DeviceDefault.ActionBar">
|
||||
<item name="android:elevation">1dp</item>
|
||||
<item name="switchBarMarginStart">@dimen/switchbar_subsettings_margin_start</item>
|
||||
<item name="switchBarMarginEnd">@dimen/switchbar_subsettings_margin_end</item>
|
||||
<item name="switchBarBackgroundColor">@color/switchbar_background_color</item>
|
||||
@@ -234,4 +235,17 @@
|
||||
<item name="android:textColorSecondary">@*android:color/secondary_text_light</item>
|
||||
</style>
|
||||
|
||||
<!-- Light theme for those pages inherit SubSettings and launched during setup flow -->
|
||||
<style name="LightTheme.SubSettings.SetupWizard" parent="@android:style/Theme.DeviceDefault.Light">
|
||||
<item name="android:windowLightStatusBar">true</item>
|
||||
<item name="android:statusBarColor">@android:color/white</item>
|
||||
<item name="android:navigationBarColor">@android:color/white</item>
|
||||
<item name="android:windowLightNavigationBar">true</item>
|
||||
<item name="android:windowBackground">@android:color/white</item>
|
||||
<item name="android:navigationBarDividerColor">@*android:color/navigation_bar_divider_device_default_settings</item>
|
||||
|
||||
<item name="android:colorPrimary">@android:color/white</item>
|
||||
<item name="android:colorPrimaryDark">@android:color/white</item>
|
||||
<item name="android:colorAccent">@color/material_blue_700</item>
|
||||
</style>
|
||||
</resources>
|
||||
|
||||
@@ -65,6 +65,8 @@ import com.android.settingslib.core.instrumentation.SharedPreferencesLogger;
|
||||
import com.android.settingslib.development.DevelopmentSettingsEnabler;
|
||||
import com.android.settingslib.drawer.DashboardCategory;
|
||||
|
||||
import com.google.android.setupcompat.util.WizardManagerHelper;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
@@ -239,8 +241,10 @@ public class SettingsActivity extends SettingsBaseActivity
|
||||
intent.getBooleanExtra(EXTRA_SHOW_FRAGMENT_AS_SUBSETTING, false);
|
||||
|
||||
// If this is a sub settings, then apply the SubSettings Theme for the ActionBar content
|
||||
// insets
|
||||
if (isSubSettings) {
|
||||
// insets.
|
||||
// If this is in setup flow, don't apply theme. Because light theme needs to be applied
|
||||
// in SettingsBaseActivity#onCreate().
|
||||
if (isSubSettings && !WizardManagerHelper.isAnySetupWizard(getIntent())) {
|
||||
setTheme(R.style.Theme_SubSettings);
|
||||
}
|
||||
|
||||
|
||||
@@ -16,12 +16,18 @@
|
||||
|
||||
package com.android.settings;
|
||||
|
||||
import static com.google.android.setupcompat.util.WizardManagerHelper.EXTRA_IS_FIRST_RUN;
|
||||
import static com.google.android.setupcompat.util.WizardManagerHelper.EXTRA_IS_SETUP_FLOW;
|
||||
|
||||
import android.content.Intent;
|
||||
import android.os.Bundle;
|
||||
import android.sysprop.SetupWizardProperties;
|
||||
|
||||
import com.google.android.setupcompat.util.WizardManagerHelper;
|
||||
import com.google.android.setupdesign.util.ThemeHelper;
|
||||
|
||||
import java.util.Arrays;
|
||||
|
||||
|
||||
public class SetupWizardUtils {
|
||||
|
||||
@@ -90,4 +96,14 @@ public class SetupWizardUtils {
|
||||
public static void copySetupExtras(Intent fromIntent, Intent toIntent) {
|
||||
WizardManagerHelper.copyWizardManagerExtras(fromIntent, toIntent);
|
||||
}
|
||||
|
||||
public static Bundle copyLifecycleExtra(Bundle srcBundle, Bundle dstBundle) {
|
||||
for (String key :
|
||||
Arrays.asList(
|
||||
EXTRA_IS_FIRST_RUN,
|
||||
EXTRA_IS_SETUP_FLOW)) {
|
||||
dstBundle.putBoolean(key, srcBundle.getBoolean(key, false));
|
||||
}
|
||||
return dstBundle;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -16,23 +16,35 @@
|
||||
|
||||
package com.android.settings.accessibility;
|
||||
|
||||
import android.content.ComponentName;
|
||||
import android.os.Bundle;
|
||||
import android.util.Log;
|
||||
import android.view.Menu;
|
||||
import android.view.accessibility.AccessibilityEvent;
|
||||
|
||||
import androidx.annotation.VisibleForTesting;
|
||||
import androidx.preference.Preference;
|
||||
import androidx.preference.PreferenceFragmentCompat;
|
||||
|
||||
import com.android.settings.SettingsActivity;
|
||||
import com.android.settings.SetupWizardUtils;
|
||||
import com.android.settings.core.SubSettingLauncher;
|
||||
import com.android.settings.display.FontSizePreferenceFragmentForSetupWizard;
|
||||
import com.android.settings.search.actionbar.SearchMenuController;
|
||||
import com.android.settings.support.actionbar.HelpResourceProvider;
|
||||
import com.android.settingslib.core.instrumentation.Instrumentable;
|
||||
|
||||
import com.google.android.setupcompat.util.WizardManagerHelper;
|
||||
|
||||
public class AccessibilitySettingsForSetupWizardActivity extends SettingsActivity {
|
||||
|
||||
private static final String LOG_TAG = "A11ySettingsForSUW";
|
||||
private static final String SAVE_KEY_TITLE = "activity_title";
|
||||
|
||||
@VisibleForTesting
|
||||
static final String CLASS_NAME_FONT_SIZE_SETTINGS_FOR_SUW =
|
||||
"com.android.settings.FontSizeSettingsForSetupWizardActivity";
|
||||
|
||||
@Override
|
||||
protected void onSaveInstanceState(Bundle savedState) {
|
||||
savedState.putCharSequence(SAVE_KEY_TITLE, getTitle());
|
||||
@@ -79,4 +91,33 @@ public class AccessibilitySettingsForSetupWizardActivity extends SettingsActivit
|
||||
.launch();
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onCreate(Bundle savedState) {
|
||||
super.onCreate(savedState);
|
||||
|
||||
tryLaunchFontSizeSettings();
|
||||
}
|
||||
|
||||
@VisibleForTesting
|
||||
void tryLaunchFontSizeSettings() {
|
||||
if (WizardManagerHelper.isAnySetupWizard(getIntent())
|
||||
&& new ComponentName(getPackageName(),
|
||||
CLASS_NAME_FONT_SIZE_SETTINGS_FOR_SUW).equals(
|
||||
getIntent().getComponent())) {
|
||||
final Bundle args = new Bundle();
|
||||
args.putInt(HelpResourceProvider.HELP_URI_RESOURCE_KEY, 0);
|
||||
args.putBoolean(SearchMenuController.NEED_SEARCH_ICON_IN_ACTION_BAR, false);
|
||||
final SubSettingLauncher subSettingLauncher = new SubSettingLauncher(this)
|
||||
.setDestination(FontSizePreferenceFragmentForSetupWizard.class.getName())
|
||||
.setArguments(args)
|
||||
.setSourceMetricsCategory(Instrumentable.METRICS_CATEGORY_UNKNOWN)
|
||||
.setExtras(SetupWizardUtils.copyLifecycleExtra(getIntent().getExtras(),
|
||||
new Bundle()));
|
||||
|
||||
Log.d(LOG_TAG, "Launch font size settings");
|
||||
subSettingLauncher.launch();
|
||||
finish();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -92,7 +92,6 @@ public class AppDataUsagePreferenceController extends AppInfoPreferenceControlle
|
||||
.addUid(mParent.getAppEntry().info.uid)
|
||||
.setRetrieveDetail(false)
|
||||
.setNetworkTemplate(template)
|
||||
.setSubscriberId(template.getSubscriberId())
|
||||
.build();
|
||||
}
|
||||
|
||||
|
||||
@@ -30,6 +30,7 @@ import android.os.UserHandle;
|
||||
import android.provider.Settings;
|
||||
import android.text.TextUtils;
|
||||
import android.view.View;
|
||||
import android.view.accessibility.AccessibilityManager;
|
||||
import android.widget.Button;
|
||||
import android.widget.CompoundButton;
|
||||
|
||||
@@ -99,17 +100,23 @@ public class FaceEnrollEducation extends BiometricEnrollBase {
|
||||
);
|
||||
|
||||
final FooterButton footerButton = new FooterButton.Builder(this)
|
||||
.setText(R.string.wizard_next)
|
||||
.setText(R.string.security_settings_face_enroll_education_start)
|
||||
.setListener(this::onNextButtonClick)
|
||||
.setButtonType(FooterButton.ButtonType.NEXT)
|
||||
.setTheme(R.style.SudGlifButton_Primary)
|
||||
.build();
|
||||
|
||||
boolean accessibilityEnabled = false;
|
||||
final AccessibilityManager accessibilityManager = getApplicationContext().getSystemService(
|
||||
AccessibilityManager.class);
|
||||
if (accessibilityManager != null) {
|
||||
accessibilityEnabled = accessibilityManager.isEnabled();
|
||||
}
|
||||
mFooterBarMixin.setPrimaryButton(footerButton);
|
||||
final Context context = getApplicationContext();
|
||||
final boolean didDisplayEdu = Settings.Secure.getIntForUser(context.getContentResolver(),
|
||||
FACE_UNLOCK_EDUCATION_INFO_DISPLAYED, OFF, mUserId) == ON;
|
||||
if (!didDisplayEdu) {
|
||||
if (!didDisplayEdu && !accessibilityEnabled) {
|
||||
Settings.Secure.putIntForUser(context.getContentResolver(),
|
||||
FACE_UNLOCK_EDUCATION_INFO_DISPLAYED, ON, mUserId);
|
||||
footerButton.setEnabled(false);
|
||||
@@ -128,6 +135,10 @@ public class FaceEnrollEducation extends BiometricEnrollBase {
|
||||
|
||||
mSwitchDiversity = findViewById(R.id.toggle_diversity);
|
||||
mSwitchDiversity.setListener(mSwitchDiversityListener);
|
||||
|
||||
if (accessibilityEnabled) {
|
||||
accessibilityButton.callOnClick();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -37,8 +37,11 @@ import android.widget.Toolbar;
|
||||
import androidx.fragment.app.FragmentActivity;
|
||||
|
||||
import com.android.settings.R;
|
||||
import com.android.settings.SubSettings;
|
||||
import com.android.settings.dashboard.CategoryManager;
|
||||
|
||||
import com.google.android.setupcompat.util.WizardManagerHelper;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
@@ -65,13 +68,12 @@ public class SettingsBaseActivity extends FragmentActivity {
|
||||
if (!theme.getBoolean(android.R.styleable.Theme_windowNoTitle, false)) {
|
||||
requestWindowFeature(Window.FEATURE_NO_TITLE);
|
||||
}
|
||||
// Apply SetupWizard light theme during setup flow. This is for SubSettings pages.
|
||||
if (WizardManagerHelper.isAnySetupWizard(getIntent()) && this instanceof SubSettings) {
|
||||
setTheme(R.style.LightTheme_SubSettings_SetupWizard);
|
||||
}
|
||||
super.setContentView(R.layout.settings_base_layout);
|
||||
final View decorView = getWindow().getDecorView();
|
||||
|
||||
decorView.setSystemUiVisibility(
|
||||
decorView.getSystemUiVisibility()
|
||||
| View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION
|
||||
| View.SYSTEM_UI_FLAG_LAYOUT_STABLE);
|
||||
final Toolbar toolbar = findViewById(R.id.action_bar);
|
||||
if (theme.getBoolean(android.R.styleable.Theme_windowNoTitle, false)) {
|
||||
toolbar.setVisibility(View.GONE);
|
||||
|
||||
@@ -19,6 +19,7 @@ package com.android.settings.core;
|
||||
import android.annotation.StringRes;
|
||||
import android.content.Context;
|
||||
import android.content.Intent;
|
||||
import android.os.Build;
|
||||
import android.os.Bundle;
|
||||
import android.os.UserHandle;
|
||||
import android.text.TextUtils;
|
||||
@@ -89,6 +90,11 @@ public class SubSettingLauncher {
|
||||
return this;
|
||||
}
|
||||
|
||||
public SubSettingLauncher setExtras(Bundle extras) {
|
||||
mLaunchRequest.extras = extras;
|
||||
return this;
|
||||
}
|
||||
|
||||
public SubSettingLauncher setSourceMetricsCategory(int sourceMetricsCategory) {
|
||||
mLaunchRequest.sourceMetricsCategory = sourceMetricsCategory;
|
||||
return this;
|
||||
@@ -136,6 +142,7 @@ public class SubSettingLauncher {
|
||||
|
||||
public Intent toIntent() {
|
||||
final Intent intent = new Intent(Intent.ACTION_MAIN);
|
||||
copyExtras(intent);
|
||||
intent.setClass(mContext, SubSettings.class);
|
||||
if (TextUtils.isEmpty(mLaunchRequest.destinationName)) {
|
||||
throw new IllegalArgumentException("Destination fragment must be set");
|
||||
@@ -180,6 +187,11 @@ public class SubSettingLauncher {
|
||||
listener.startActivityForResult(intent, requestCode);
|
||||
}
|
||||
|
||||
private void copyExtras(Intent intent) {
|
||||
if (mLaunchRequest.extras != null) {
|
||||
intent.replaceExtras(mLaunchRequest.extras);
|
||||
}
|
||||
}
|
||||
/**
|
||||
* Simple container that has information about how to launch a subsetting.
|
||||
*/
|
||||
@@ -194,5 +206,6 @@ public class SubSettingLauncher {
|
||||
int mRequestCode;
|
||||
UserHandle userHandle;
|
||||
Bundle arguments;
|
||||
Bundle extras;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -393,8 +393,7 @@ public class AppDataUsage extends DataUsageBaseFragment implements OnPreferenceC
|
||||
final NetworkCycleDataForUidLoader.Builder builder
|
||||
= NetworkCycleDataForUidLoader.builder(mContext);
|
||||
builder.setRetrieveDetail(true)
|
||||
.setNetworkTemplate(mTemplate)
|
||||
.setSubscriberId(mTemplate.getSubscriberId());
|
||||
.setNetworkTemplate(mTemplate);
|
||||
if (mAppItem.category == AppItem.CATEGORY_USER) {
|
||||
for (int i = 0; i < mAppItem.uids.size(); i++) {
|
||||
builder.addUid(mAppItem.uids.keyAt(i));
|
||||
|
||||
@@ -496,7 +496,6 @@ public class DataUsageList extends DataUsageBaseFragment {
|
||||
public Loader<List<NetworkCycleChartData>> onCreateLoader(int id, Bundle args) {
|
||||
return NetworkCycleChartDataLoader.builder(getContext())
|
||||
.setNetworkTemplate(mTemplate)
|
||||
.setSubscriberId(mTelephonyManager.getSubscriberId(mSubId))
|
||||
.build();
|
||||
}
|
||||
|
||||
@@ -523,8 +522,7 @@ public class DataUsageList extends DataUsageBaseFragment {
|
||||
return new NetworkStatsSummaryLoader.Builder(getContext())
|
||||
.setStartTime(mChart.getInspectStart())
|
||||
.setEndTime(mChart.getInspectEnd())
|
||||
.setNetworkType(mNetworkType)
|
||||
.setSubscriberId(mTelephonyManager.getSubscriberId(mSubId))
|
||||
.setNetworkTemplate(mTemplate)
|
||||
.build();
|
||||
}
|
||||
|
||||
|
||||
@@ -78,9 +78,12 @@ public class ImeiInfoDialogController {
|
||||
final Context context = dialog.getContext();
|
||||
mSubscriptionInfo = context.getSystemService(SubscriptionManager.class)
|
||||
.getActiveSubscriptionInfoForSimSlotIndex(slotId);
|
||||
TelephonyManager tm = context.getSystemService(TelephonyManager.class);
|
||||
if (mSubscriptionInfo != null) {
|
||||
mTelephonyManager = context.getSystemService(TelephonyManager.class)
|
||||
.createForSubscriptionId(mSubscriptionInfo.getSubscriptionId());
|
||||
} else if(isValidSlotIndex(slotId, tm)) {
|
||||
mTelephonyManager = tm;
|
||||
} else {
|
||||
mTelephonyManager = null;
|
||||
}
|
||||
@@ -104,6 +107,7 @@ public class ImeiInfoDialogController {
|
||||
private void updateDialogForCdmaPhone() {
|
||||
final Resources res = mDialog.getContext().getResources();
|
||||
mDialog.setText(ID_MEID_NUMBER_VALUE, getMeid());
|
||||
// MIN needs to read from SIM. So if no SIM, we should not show MIN on UI
|
||||
mDialog.setText(ID_MIN_NUMBER_VALUE, mSubscriptionInfo != null
|
||||
? mTelephonyManager.getCdmaMin(mSubscriptionInfo.getSubscriptionId())
|
||||
: "");
|
||||
@@ -137,7 +141,8 @@ public class ImeiInfoDialogController {
|
||||
|
||||
@VisibleForTesting
|
||||
String getCdmaPrlVersion() {
|
||||
return mTelephonyManager.getCdmaPrlVersion();
|
||||
// PRL needs to read from SIM. So if no SIM, return empty
|
||||
return mSubscriptionInfo != null ? mTelephonyManager.getCdmaPrlVersion() : "";
|
||||
}
|
||||
|
||||
@VisibleForTesting
|
||||
@@ -150,4 +155,9 @@ public class ImeiInfoDialogController {
|
||||
String getMeid() {
|
||||
return mTelephonyManager.getMeid(mSlotId);
|
||||
}
|
||||
|
||||
@VisibleForTesting
|
||||
private boolean isValidSlotIndex(int slotIndex, TelephonyManager telephonyManager) {
|
||||
return slotIndex >= 0 && slotIndex < telephonyManager.getPhoneCount();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -67,7 +67,8 @@ public class PreviewPagerAdapter extends PagerAdapter {
|
||||
mPreviewFrames[p].setLayoutParams(new LinearLayout.LayoutParams(
|
||||
LinearLayout.LayoutParams.MATCH_PARENT,
|
||||
LinearLayout.LayoutParams.MATCH_PARENT));
|
||||
|
||||
mPreviewFrames[p].setClipToPadding(true);
|
||||
mPreviewFrames[p].setClipChildren(true);
|
||||
for (int j = 0; j < configurations.length; ++j) {
|
||||
// Create a new configuration for the specified value. It won't
|
||||
// have any theme set, so manually apply the current theme.
|
||||
|
||||
@@ -582,9 +582,11 @@ public class WifiConfigController implements TextWatcher,
|
||||
}
|
||||
|
||||
/**
|
||||
* Special handling for WPA2/WPA3 in Transition mode: The key SECURITY_PSK_SAE_TRANSITION is
|
||||
* a pseudo key which results by the scan results, but never appears in the saved networks.
|
||||
* A saved network is either WPA3 for supporting devices or WPA2 for non-supporting devices.
|
||||
* Special handling for WPA2/WPA3 and OWE in Transition mode: The key
|
||||
* SECURITY_PSK_SAE_TRANSITION and SECURITY_OWE_TRANSITION are pseudo keys which result by the
|
||||
* scan results, but never appears in the saved networks.
|
||||
* A saved network is either WPA3 for supporting devices or WPA2 for non-supporting devices,
|
||||
* or, OWE for supporting devices or Open for non-supporting devices.
|
||||
*
|
||||
* @param accessPointSecurity Access point current security type
|
||||
* @return Converted security type (if required)
|
||||
@@ -597,6 +599,14 @@ public class WifiConfigController implements TextWatcher,
|
||||
return AccessPoint.SECURITY_PSK;
|
||||
}
|
||||
}
|
||||
if (accessPointSecurity == AccessPoint.SECURITY_OWE_TRANSITION) {
|
||||
if (mWifiManager.isEnhancedOpenSupported()) {
|
||||
return AccessPoint.SECURITY_OWE;
|
||||
} else {
|
||||
return AccessPoint.SECURITY_NONE;
|
||||
}
|
||||
}
|
||||
|
||||
return accessPointSecurity;
|
||||
}
|
||||
|
||||
@@ -948,7 +958,8 @@ public class WifiConfigController implements TextWatcher,
|
||||
|
||||
private void showSecurityFields() {
|
||||
if (mAccessPointSecurity == AccessPoint.SECURITY_NONE ||
|
||||
mAccessPointSecurity == AccessPoint.SECURITY_OWE) {
|
||||
mAccessPointSecurity == AccessPoint.SECURITY_OWE ||
|
||||
mAccessPointSecurity == AccessPoint.SECURITY_OWE_TRANSITION) {
|
||||
mView.findViewById(R.id.security_fields).setVisibility(View.GONE);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -494,7 +494,9 @@ public class WifiSettings extends RestrictedSettingsFragment
|
||||
if (isSavedNetwork) {
|
||||
connect(mSelectedAccessPoint.getConfig(), isSavedNetwork);
|
||||
} else if ((mSelectedAccessPoint.getSecurity() == AccessPoint.SECURITY_NONE) ||
|
||||
(mSelectedAccessPoint.getSecurity() == AccessPoint.SECURITY_OWE)) {
|
||||
(mSelectedAccessPoint.getSecurity() == AccessPoint.SECURITY_OWE) ||
|
||||
(mSelectedAccessPoint.getSecurity()
|
||||
== AccessPoint.SECURITY_OWE_TRANSITION)) {
|
||||
/** Bypass dialog for unsecured networks */
|
||||
mSelectedAccessPoint.generateOpenNetworkConfig();
|
||||
connect(mSelectedAccessPoint.getConfig(), isSavedNetwork);
|
||||
@@ -748,7 +750,8 @@ public class WifiSettings extends RestrictedSettingsFragment
|
||||
preference.setOrder(index);
|
||||
if (mOpenSsid != null && mOpenSsid.equals(accessPoint.getSsidStr())
|
||||
&& (accessPoint.getSecurity() != AccessPoint.SECURITY_NONE &&
|
||||
accessPoint.getSecurity() != AccessPoint.SECURITY_OWE)) {
|
||||
accessPoint.getSecurity() != AccessPoint.SECURITY_OWE &&
|
||||
accessPoint.getSecurity() != AccessPoint.SECURITY_OWE_TRANSITION)) {
|
||||
if (!accessPoint.isSaved() || isDisabledByWrongPassword(accessPoint)) {
|
||||
onPreferenceTreeClick(preference);
|
||||
mOpenSsid = null;
|
||||
|
||||
@@ -268,7 +268,8 @@ public class WifiUtils {
|
||||
if (accessPoint.isOsuProvider()) {
|
||||
return CONNECT_TYPE_OSU_PROVISION;
|
||||
} else if ((accessPoint.getSecurity() == AccessPoint.SECURITY_NONE) ||
|
||||
(accessPoint.getSecurity() == AccessPoint.SECURITY_OWE)) {
|
||||
(accessPoint.getSecurity() == AccessPoint.SECURITY_OWE) ||
|
||||
(accessPoint.getSecurity() == AccessPoint.SECURITY_OWE_TRANSITION)) {
|
||||
return CONNECT_TYPE_OPEN_NETWORK;
|
||||
} else if (accessPoint.isSaved() && config != null
|
||||
&& config.getNetworkSelectionStatus() != null
|
||||
|
||||
@@ -149,7 +149,6 @@ public class WifiSlice implements CustomSliceable {
|
||||
final IconCompat icon = IconCompat.createWithResource(mContext,
|
||||
R.drawable.ic_settings_wireless);
|
||||
final String title = mContext.getString(R.string.wifi_settings);
|
||||
final CharSequence summary = getSummary();
|
||||
final PendingIntent toggleAction = getBroadcastIntent(mContext);
|
||||
final PendingIntent primaryAction = getPrimaryAction();
|
||||
final SliceAction primarySliceAction = SliceAction.createDeeplink(primaryAction, icon,
|
||||
@@ -162,7 +161,6 @@ public class WifiSlice implements CustomSliceable {
|
||||
.setKeywords(getKeywords())
|
||||
.addRow(new ListBuilder.RowBuilder()
|
||||
.setTitle(title)
|
||||
.setSubtitle(summary)
|
||||
.addEndItem(toggleSliceAction)
|
||||
.setPrimaryAction(primarySliceAction));
|
||||
}
|
||||
@@ -338,20 +336,6 @@ public class WifiSlice implements CustomSliceable {
|
||||
}
|
||||
}
|
||||
|
||||
private CharSequence getSummary() {
|
||||
switch (mWifiManager.getWifiState()) {
|
||||
case WifiManager.WIFI_STATE_ENABLED:
|
||||
case WifiManager.WIFI_STATE_ENABLING:
|
||||
return mContext.getText(R.string.switch_on_text);
|
||||
case WifiManager.WIFI_STATE_DISABLED:
|
||||
case WifiManager.WIFI_STATE_DISABLING:
|
||||
return mContext.getText(R.string.switch_off_text);
|
||||
case WifiManager.WIFI_STATE_UNKNOWN:
|
||||
default:
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
private PendingIntent getPrimaryAction() {
|
||||
final Intent intent = getIntent();
|
||||
return PendingIntent.getActivity(mContext, 0 /* requestCode */,
|
||||
|
||||
@@ -19,6 +19,7 @@ package com.android.settings;
|
||||
import static com.google.common.truth.Truth.assertThat;
|
||||
|
||||
import android.content.Intent;
|
||||
import android.os.Bundle;
|
||||
import android.sysprop.SetupWizardProperties;
|
||||
|
||||
import com.google.android.setupcompat.util.WizardManagerHelper;
|
||||
@@ -31,9 +32,6 @@ import org.robolectric.RobolectricTestRunner;
|
||||
@RunWith(RobolectricTestRunner.class)
|
||||
public class SetupWizardUtilsTest {
|
||||
|
||||
private static final String EXTRA_IS_SETUP_FLOW = "isSetupFlow";
|
||||
private static final String EXTRA_IS_FIRST_RUN = "firstRun";
|
||||
|
||||
@Test
|
||||
public void testCopySetupExtras() {
|
||||
Intent fromIntent = new Intent();
|
||||
@@ -46,6 +44,25 @@ public class SetupWizardUtilsTest {
|
||||
assertThat(theme).isEqualTo(toIntent.getStringExtra(WizardManagerHelper.EXTRA_THEME));
|
||||
assertThat(toIntent.getBooleanExtra(WizardManagerHelper.EXTRA_IS_SETUP_FLOW, false))
|
||||
.isTrue();
|
||||
assertThat(toIntent.getBooleanExtra(WizardManagerHelper.EXTRA_IS_FIRST_RUN, true))
|
||||
.isFalse();
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testCopyLifecycleExtra() {
|
||||
Intent fromIntent = new Intent();
|
||||
final String theme = "TEST_THEME";
|
||||
fromIntent.putExtra(WizardManagerHelper.EXTRA_THEME, theme);
|
||||
fromIntent.putExtra(WizardManagerHelper.EXTRA_IS_SETUP_FLOW, true);
|
||||
Bundle dstBundle = new Bundle();
|
||||
dstBundle = SetupWizardUtils.copyLifecycleExtra(fromIntent.getExtras(), dstBundle);
|
||||
|
||||
assertThat(dstBundle).isNotNull();
|
||||
assertThat(dstBundle.getString(WizardManagerHelper.EXTRA_THEME)).isNull();
|
||||
assertThat(dstBundle.getBoolean(WizardManagerHelper.EXTRA_IS_SETUP_FLOW))
|
||||
.isTrue();
|
||||
assertThat(dstBundle.getBoolean(WizardManagerHelper.EXTRA_IS_FIRST_RUN))
|
||||
.isFalse();
|
||||
}
|
||||
|
||||
@Test
|
||||
@@ -87,7 +104,7 @@ public class SetupWizardUtilsTest {
|
||||
|
||||
private Intent createSetupWizardIntent() {
|
||||
return new Intent()
|
||||
.putExtra(EXTRA_IS_SETUP_FLOW, true)
|
||||
.putExtra(EXTRA_IS_FIRST_RUN, true);
|
||||
.putExtra(WizardManagerHelper.EXTRA_IS_SETUP_FLOW, true)
|
||||
.putExtra(WizardManagerHelper.EXTRA_IS_FIRST_RUN, true);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -16,18 +16,27 @@
|
||||
|
||||
package com.android.settings.accessibility;
|
||||
|
||||
import static com.android.settings.accessibility.AccessibilitySettingsForSetupWizardActivity.CLASS_NAME_FONT_SIZE_SETTINGS_FOR_SUW;
|
||||
|
||||
import static com.google.common.truth.Truth.assertThat;
|
||||
|
||||
import android.content.ComponentName;
|
||||
import android.content.Intent;
|
||||
|
||||
import androidx.test.filters.SmallTest;
|
||||
|
||||
import com.android.settings.R;
|
||||
import com.android.settings.SettingsActivity;
|
||||
import com.android.settings.display.FontSizePreferenceFragmentForSetupWizard;
|
||||
|
||||
import com.google.android.setupcompat.util.WizardManagerHelper;
|
||||
|
||||
import org.junit.Test;
|
||||
import org.junit.runner.RunWith;
|
||||
import org.robolectric.Robolectric;
|
||||
import org.robolectric.RobolectricTestRunner;
|
||||
import org.robolectric.RuntimeEnvironment;
|
||||
import org.robolectric.Shadows;
|
||||
|
||||
@RunWith(RobolectricTestRunner.class)
|
||||
@SmallTest
|
||||
@@ -41,4 +50,37 @@ public class AccessibilitySettingsForSetupWizardActivityTest {
|
||||
|
||||
assertThat(activity.getThemeResId()).isEqualTo(R.style.GlifV3Theme_Light);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void onCreate_hasFontSizeComponent_shouldGoToFontSizePreferenceDirectly() {
|
||||
AccessibilitySettingsForSetupWizardActivity activity =
|
||||
Robolectric.buildActivity(AccessibilitySettingsForSetupWizardActivity.class,
|
||||
new Intent(Intent.ACTION_MAIN).setComponent(new ComponentName(
|
||||
RuntimeEnvironment.application, CLASS_NAME_FONT_SIZE_SETTINGS_FOR_SUW)).
|
||||
putExtra(WizardManagerHelper.EXTRA_IS_FIRST_RUN, true).
|
||||
putExtra(WizardManagerHelper.EXTRA_IS_SETUP_FLOW, true)).get();
|
||||
|
||||
activity.tryLaunchFontSizeSettings();
|
||||
|
||||
final Intent launchIntent = Shadows.shadowOf(activity).getNextStartedActivity();
|
||||
assertThat(launchIntent).isNotNull();
|
||||
assertThat(launchIntent.getStringExtra(SettingsActivity.EXTRA_SHOW_FRAGMENT)).isEqualTo(
|
||||
FontSizePreferenceFragmentForSetupWizard.class.getName());
|
||||
assertThat(activity.isFinishing()).isTrue();
|
||||
}
|
||||
|
||||
@Test
|
||||
public void onCreate_noFontSizeComponent_shouldNotFinishCurrentActivity() {
|
||||
AccessibilitySettingsForSetupWizardActivity activity =
|
||||
Robolectric.buildActivity(AccessibilitySettingsForSetupWizardActivity.class,
|
||||
new Intent(Intent.ACTION_MAIN).
|
||||
putExtra(WizardManagerHelper.EXTRA_IS_FIRST_RUN, true).
|
||||
putExtra(WizardManagerHelper.EXTRA_IS_SETUP_FLOW, true)).get();
|
||||
|
||||
activity.tryLaunchFontSizeSettings();
|
||||
|
||||
final Intent launchIntent = Shadows.shadowOf(activity).getNextStartedActivity();
|
||||
assertThat(launchIntent).isNull();
|
||||
assertThat(activity.isFinishing()).isFalse();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -86,8 +86,8 @@ public class ImeiInfoDialogControllerTest {
|
||||
|
||||
mController = spy(new ImeiInfoDialogController(mDialog, SLOT_ID));
|
||||
|
||||
doReturn(PRL_VERSION).when(mController).getCdmaPrlVersion();
|
||||
doReturn(MEID_NUMBER).when(mController).getMeid();
|
||||
when(mTelephonyManager.getCdmaPrlVersion()).thenReturn(PRL_VERSION);
|
||||
when(mTelephonyManager.getMeid(anyInt())).thenReturn(MEID_NUMBER);
|
||||
when(mTelephonyManager.getCdmaMin(anyInt())).thenReturn(MIN_NUMBER);
|
||||
when(mTelephonyManager.getDeviceSoftwareVersion(anyInt())).thenReturn(IMEI_SV_NUMBER);
|
||||
when(mTelephonyManager.getImei(anyInt())).thenReturn(IMEI_NUMBER);
|
||||
@@ -98,6 +98,7 @@ public class ImeiInfoDialogControllerTest {
|
||||
mController = spy(new ImeiInfoDialogController(mDialog, SLOT_ID + 1));
|
||||
|
||||
mController.populateImeiInfo();
|
||||
|
||||
verify(mDialog, never()).setText(anyInt(), any());
|
||||
}
|
||||
|
||||
@@ -129,16 +130,30 @@ public class ImeiInfoDialogControllerTest {
|
||||
}
|
||||
|
||||
@Test
|
||||
public void populateImeiInfo_cdmaSimDisabled_shouldRemoveImeiInfoAndSetMinToEmpty() {
|
||||
public void populateImeiInfo_cdmaSimDisabled_shouldRemoveImeiInfoAndSetMinPrlToEmpty() {
|
||||
ReflectionHelpers.setField(mController, "mSubscriptionInfo", null);
|
||||
when(mTelephonyManager.getPhoneType()).thenReturn(TelephonyManager.PHONE_TYPE_CDMA);
|
||||
|
||||
mController.populateImeiInfo();
|
||||
|
||||
verify(mDialog).setText(ID_MEID_NUMBER_VALUE, MEID_NUMBER);
|
||||
verify(mDialog).setText(ID_MIN_NUMBER_VALUE, "");
|
||||
verify(mDialog).setText(ID_PRL_VERSION_VALUE, "");
|
||||
verify(mDialog).removeViewFromScreen(ID_GSM_SETTINGS);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void populateImeiInfo_gsmSimDisabled_shouldSetImeiAndRemoveCdmaSettings() {
|
||||
ReflectionHelpers.setField(mController, "mSubscriptionInfo", null);
|
||||
when(mTelephonyManager.getPhoneType()).thenReturn(TelephonyManager.PHONE_TYPE_GSM);
|
||||
|
||||
mController.populateImeiInfo();
|
||||
|
||||
verify(mDialog).setText(eq(ID_IMEI_VALUE), any());
|
||||
verify(mDialog).setText(eq(ID_IMEI_SV_VALUE), any());
|
||||
verify(mDialog).removeViewFromScreen(ID_CDMA_SETTINGS);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void populateImeinfo_gsm_shouldSetImeiAndRemoveCdmaSettings() {
|
||||
when(mTelephonyManager.getPhoneType()).thenReturn(TelephonyManager.PHONE_TYPE_GSM);
|
||||
|
||||
@@ -238,20 +238,13 @@ public class WifiSliceTest {
|
||||
setWorkerResults(createAccessPoint(AP1_NAME, true, true));
|
||||
doReturn(makeCaptivePortalNetworkCapabilities()).when(mConnectivityManager)
|
||||
.getNetworkCapabilities(any());
|
||||
final IconCompat expectedIcon = IconCompat.createWithResource(mContext,
|
||||
R.drawable.ic_settings_accent);
|
||||
|
||||
final Slice wifiSlice = mWifiSlice.getSlice();
|
||||
final List<SliceItem> sliceItems = wifiSlice.getItems();
|
||||
|
||||
SliceTester.assertAnySliceItemContainsTitle(sliceItems, AP1_NAME);
|
||||
assertCaptivePortalItems(sliceItems);
|
||||
}
|
||||
|
||||
private void assertCaptivePortalItems(List<SliceItem> sliceItems) {
|
||||
final String expectedSummary = mContext.getString(R.string.switch_on_text);
|
||||
SliceTester.assertAnySliceItemContainsSubtitle(sliceItems, expectedSummary);
|
||||
|
||||
final IconCompat expectedIcon = IconCompat.createWithResource(mContext,
|
||||
R.drawable.ic_settings_accent);
|
||||
SliceTester.assertAnySliceItemContainsIcon(sliceItems, expectedIcon);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user