Merge "Fix NPE when instantiating SettingsPreferenceFragment"
diff --git a/color-check-baseline.xml b/color-check-baseline.xml
index f3050c4..21b9a09 100644
--- a/color-check-baseline.xml
+++ b/color-check-baseline.xml
@@ -265,43 +265,11 @@
priority="4"
summary="Using hardcoded color"
explanation="Hardcoded color values are bad because theme changes cannot be uniformly applied.Instead use the theme specific colors such as `?android:attr/textColorPrimary` in attributes.
This ensures that a theme change from a light to a dark theme can be uniformlyapplied across the app."
- errorLine1=" <color name="setup_divider_color_dark">#33ffffff</color>"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="res/values/colors.xml"
- line="33"
- 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="setup_divider_color_light">#33000000</color>"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="res/values/colors.xml"
- line="34"
- 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="setup_lock_pattern_view_regular_color_dark">#ffbdbdbd</color>"
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
file="res/values/colors.xml"
- line="35"
+ line="33"
column="5"/>
</issue>
@@ -317,7 +285,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
file="res/values/colors.xml"
- line="37"
+ line="35"
column="5"/>
</issue>
@@ -333,7 +301,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
file="res/values/colors.xml"
- line="39"
+ line="37"
column="5"/>
</issue>
@@ -349,7 +317,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
file="res/values/colors.xml"
- line="40"
+ line="38"
column="5"/>
</issue>
@@ -365,7 +333,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
file="res/values/colors.xml"
- line="41"
+ line="39"
column="5"/>
</issue>
@@ -381,7 +349,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
file="res/values/colors.xml"
- line="43"
+ line="41"
column="5"/>
</issue>
@@ -397,7 +365,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
file="res/values/colors.xml"
- line="44"
+ line="42"
column="5"/>
</issue>
@@ -413,7 +381,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
file="res/values/colors.xml"
- line="46"
+ line="44"
column="5"/>
</issue>
@@ -429,7 +397,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
file="res/values/colors.xml"
- line="51"
+ line="49"
column="5"/>
</issue>
@@ -445,7 +413,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
file="res/values/colors.xml"
- line="52"
+ line="50"
column="5"/>
</issue>
@@ -461,7 +429,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
file="res/values/colors.xml"
- line="53"
+ line="51"
column="5"/>
</issue>
@@ -477,7 +445,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
file="res/values/colors.xml"
- line="55"
+ line="53"
column="5"/>
</issue>
@@ -493,7 +461,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
file="res/values/colors.xml"
- line="56"
+ line="54"
column="5"/>
</issue>
@@ -509,7 +477,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
file="res/values/colors.xml"
- line="58"
+ line="56"
column="5"/>
</issue>
@@ -525,7 +493,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
file="res/values/colors.xml"
- line="61"
+ line="59"
column="5"/>
</issue>
@@ -541,7 +509,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
file="res/values/colors.xml"
- line="62"
+ line="60"
column="5"/>
</issue>
@@ -557,7 +525,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
file="res/values/colors.xml"
- line="66"
+ line="64"
column="5"/>
</issue>
@@ -573,7 +541,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
file="res/values/colors.xml"
- line="67"
+ line="65"
column="5"/>
</issue>
@@ -589,7 +557,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
file="res/values/colors.xml"
- line="68"
+ line="66"
column="5"/>
</issue>
@@ -605,7 +573,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
file="res/values/colors.xml"
- line="69"
+ line="67"
column="5"/>
</issue>
@@ -621,7 +589,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
file="res/values/colors.xml"
- line="71"
+ line="69"
column="5"/>
</issue>
@@ -637,7 +605,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
file="res/values/colors.xml"
- line="74"
+ line="72"
column="5"/>
</issue>
@@ -653,7 +621,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
file="res/values/colors.xml"
- line="76"
+ line="74"
column="5"/>
</issue>
@@ -669,7 +637,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
file="res/values/colors.xml"
- line="77"
+ line="75"
column="5"/>
</issue>
@@ -685,7 +653,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
file="res/values/colors.xml"
- line="80"
+ line="78"
column="5"/>
</issue>
@@ -701,7 +669,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
file="res/values/colors.xml"
- line="81"
+ line="79"
column="5"/>
</issue>
@@ -717,7 +685,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
file="res/values/colors.xml"
- line="82"
+ line="80"
column="5"/>
</issue>
@@ -733,7 +701,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
file="res/values/colors.xml"
- line="83"
+ line="81"
column="5"/>
</issue>
@@ -749,7 +717,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
file="res/values/colors.xml"
- line="84"
+ line="82"
column="5"/>
</issue>
@@ -765,7 +733,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
file="res/values/colors.xml"
- line="87"
+ line="85"
column="5"/>
</issue>
@@ -781,7 +749,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
file="res/values/colors.xml"
- line="88"
+ line="86"
column="5"/>
</issue>
@@ -797,7 +765,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
file="res/values/colors.xml"
- line="89"
+ line="87"
column="5"/>
</issue>
@@ -813,7 +781,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
file="res/values/colors.xml"
- line="90"
+ line="88"
column="5"/>
</issue>
@@ -829,7 +797,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
file="res/values/colors.xml"
- line="91"
+ line="89"
column="5"/>
</issue>
@@ -845,7 +813,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
file="res/values/colors.xml"
- line="92"
+ line="90"
column="5"/>
</issue>
@@ -861,7 +829,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
file="res/values/colors.xml"
- line="93"
+ line="91"
column="5"/>
</issue>
@@ -877,7 +845,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
file="res/values/colors.xml"
- line="94"
+ line="92"
column="5"/>
</issue>
@@ -893,7 +861,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
file="res/values/colors.xml"
- line="95"
+ line="93"
column="5"/>
</issue>
@@ -909,7 +877,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
file="res/values/colors.xml"
- line="96"
+ line="94"
column="5"/>
</issue>
@@ -925,7 +893,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
file="res/values/colors.xml"
- line="97"
+ line="95"
column="5"/>
</issue>
@@ -941,7 +909,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
file="res/values/colors.xml"
- line="100"
+ line="98"
column="5"/>
</issue>
@@ -957,7 +925,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
file="res/values/colors.xml"
- line="102"
+ line="100"
column="5"/>
</issue>
@@ -973,7 +941,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
file="res/values/colors.xml"
- line="105"
+ line="103"
column="5"/>
</issue>
@@ -989,7 +957,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
file="res/values/colors.xml"
- line="107"
+ line="105"
column="5"/>
</issue>
@@ -1005,7 +973,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
file="res/values/colors.xml"
- line="110"
+ line="108"
column="5"/>
</issue>
@@ -1021,7 +989,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
file="res/values/colors.xml"
- line="113"
+ line="111"
column="5"/>
</issue>
@@ -1037,7 +1005,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
file="res/values/colors.xml"
- line="116"
+ line="114"
column="5"/>
</issue>
@@ -1053,7 +1021,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
file="res/values/colors.xml"
- line="119"
+ line="117"
column="5"/>
</issue>
@@ -1069,7 +1037,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
file="res/values/colors.xml"
- line="120"
+ line="118"
column="5"/>
</issue>
@@ -1085,7 +1053,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
file="res/values/colors.xml"
- line="123"
+ line="121"
column="5"/>
</issue>
@@ -1101,7 +1069,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
file="res/values/colors.xml"
- line="124"
+ line="122"
column="5"/>
</issue>
@@ -1117,7 +1085,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
file="res/values/colors.xml"
- line="125"
+ line="123"
column="5"/>
</issue>
@@ -1133,7 +1101,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
file="res/values/colors.xml"
- line="126"
+ line="124"
column="5"/>
</issue>
@@ -1149,7 +1117,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
file="res/values/colors.xml"
- line="127"
+ line="125"
column="5"/>
</issue>
@@ -1165,7 +1133,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
file="res/values/colors.xml"
- line="128"
+ line="126"
column="5"/>
</issue>
@@ -1181,7 +1149,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
file="res/values/colors.xml"
- line="129"
+ line="127"
column="5"/>
</issue>
@@ -1197,7 +1165,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
file="res/values/colors.xml"
- line="130"
+ line="128"
column="5"/>
</issue>
@@ -1213,7 +1181,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
file="res/values/colors.xml"
- line="131"
+ line="129"
column="5"/>
</issue>
@@ -1229,7 +1197,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
file="res/values/colors.xml"
- line="132"
+ line="130"
column="5"/>
</issue>
@@ -1245,7 +1213,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
file="res/values/colors.xml"
- line="133"
+ line="131"
column="5"/>
</issue>
@@ -1261,7 +1229,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
file="res/values/colors.xml"
- line="134"
+ line="132"
column="5"/>
</issue>
@@ -1277,7 +1245,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
file="res/values/colors.xml"
- line="135"
+ line="133"
column="5"/>
</issue>
@@ -2493,7 +2461,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~~~~">
<location
file="res/values-en-rAU/strings.xml"
- line="2354"
+ line="2395"
column="64"/>
</issue>
@@ -2509,7 +2477,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~~~~">
<location
file="res/values-en-rCA/strings.xml"
- line="2354"
+ line="2395"
column="64"/>
</issue>
@@ -2525,7 +2493,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~~~~">
<location
file="res/values-en-rGB/strings.xml"
- line="2354"
+ line="2395"
column="64"/>
</issue>
@@ -2541,7 +2509,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~~~~">
<location
file="res/values-en-rIN/strings.xml"
- line="2354"
+ line="2395"
column="64"/>
</issue>
@@ -2573,7 +2541,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~~~~">
<location
file="res/values/strings.xml"
- line="5651"
+ line="5638"
column="36"/>
</issue>
@@ -2665,27 +2633,11 @@
priority="4"
summary="Using hardcoded color"
explanation="Hardcoded color values are bad because theme changes cannot be uniformly applied.Instead use the theme specific colors such as `?android:attr/textColorPrimary` in attributes.
This ensures that a theme change from a light to a dark theme can be uniformlyapplied across the app."
- errorLine1=" <item name="setup_divider_color">@color/setup_divider_color_dark</item>"
- errorLine2=" ^">
+ errorLine1=" <item name="wifi_signal_color">@color/setup_wizard_wifi_color_dark</item>"
+ errorLine2=" ^">
<location
file="res/values/themes.xml"
line="33"
- column="42"/>
- </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="wifi_signal_color">@color/setup_wizard_wifi_color_dark</item>"
- errorLine2=" ^">
- <location
- file="res/values/themes.xml"
- line="35"
column="40"/>
</issue>
@@ -2697,27 +2649,11 @@
priority="4"
summary="Using hardcoded color"
explanation="Hardcoded color values are bad because theme changes cannot be uniformly applied.Instead use the theme specific colors such as `?android:attr/textColorPrimary` in attributes.
This ensures that a theme change from a light to a dark theme can be uniformlyapplied across the app."
- errorLine1=" <item name="setup_divider_color">@color/setup_divider_color_light</item>"
- errorLine2=" ^">
- <location
- file="res/values/themes.xml"
- line="53"
- column="42"/>
- </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="wifi_signal_color">@color/setup_wizard_wifi_color_light</item>"
errorLine2=" ^">
<location
file="res/values/themes.xml"
- line="55"
+ line="52"
column="40"/>
</issue>
@@ -2729,27 +2665,11 @@
priority="4"
summary="Using hardcoded color"
explanation="Hardcoded color values are bad because theme changes cannot be uniformly applied.Instead use the theme specific colors such as `?android:attr/textColorPrimary` in attributes.
This ensures that a theme change from a light to a dark theme can be uniformlyapplied across the app."
- errorLine1=" <item name="setup_divider_color">@color/setup_divider_color_dark</item>"
- errorLine2=" ^">
- <location
- file="res/values/themes.xml"
- line="72"
- column="42"/>
- </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="wifi_signal_color">@color/setup_wizard_wifi_color_dark</item>"
errorLine2=" ^">
<location
file="res/values/themes.xml"
- line="74"
+ line="70"
column="40"/>
</issue>
@@ -2761,27 +2681,43 @@
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="setup_divider_color">@color/setup_divider_color_light</item>"
- errorLine2=" ^">
- <location
- file="res/values/themes.xml"
- line="92"
- column="42"/>
- </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="wifi_signal_color">@color/setup_wizard_wifi_color_light</item>"
errorLine2=" ^">
<location
file="res/values/themes.xml"
- line="94"
+ line="89"
+ column="40"/>
+ </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="wifi_signal_color">@color/setup_wizard_wifi_color_dark</item>"
+ errorLine2=" ^">
+ <location
+ file="res/values/themes.xml"
+ line="107"
+ column="40"/>
+ </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="wifi_signal_color">@color/setup_wizard_wifi_color_light</item>"
+ errorLine2=" ^">
+ <location
+ file="res/values/themes.xml"
+ line="126"
column="40"/>
</issue>
@@ -2797,7 +2733,7 @@
errorLine2=" ^">
<location
file="res/values/themes.xml"
- line="154"
+ line="200"
column="43"/>
</issue>
@@ -2813,7 +2749,7 @@
errorLine2=" ^">
<location
file="res/values/themes.xml"
- line="155"
+ line="201"
column="42"/>
</issue>
@@ -2829,7 +2765,7 @@
errorLine2=" ^">
<location
file="res/values/themes.xml"
- line="156"
+ line="202"
column="45"/>
</issue>
@@ -2845,7 +2781,7 @@
errorLine2=" ^">
<location
file="res/values/themes.xml"
- line="233"
+ line="279"
column="47"/>
</issue>
@@ -2861,7 +2797,7 @@
errorLine2=" ^">
<location
file="res/values/themes.xml"
- line="308"
+ line="347"
column="45"/>
</issue>
@@ -2877,7 +2813,7 @@
errorLine2=" ^">
<location
file="res/values/themes.xml"
- line="309"
+ line="348"
column="49"/>
</issue>
@@ -2893,7 +2829,7 @@
errorLine2=" ^">
<location
file="res/values/themes.xml"
- line="317"
+ line="356"
column="45"/>
</issue>
@@ -2909,7 +2845,7 @@
errorLine2=" ^">
<location
file="res/values/themes.xml"
- line="318"
+ line="357"
column="49"/>
</issue>
diff --git a/res/layout/suggestion_container.xml b/res/layout/suggestion_container.xml
index 640a91f..409f39e 100644
--- a/res/layout/suggestion_container.xml
+++ b/res/layout/suggestion_container.xml
@@ -20,7 +20,7 @@
style="@style/SuggestionConditionStyle"
android:layout_width="match_parent"
android:layout_height="wrap_content"
- android:paddingTop="12dp"
+ android:paddingTop="10dp"
android:orientation="vertical">
<LinearLayout
@@ -55,8 +55,8 @@
android:id="@+id/suggestion_list"
android:layout_width="match_parent"
android:layout_height="wrap_content"
- android:paddingTop="14dp"
- android:paddingBottom="16dp"
+ android:paddingTop="12dp"
+ android:paddingBottom="13dp"
android:scrollbars="none"/>
</LinearLayout>
diff --git a/res/layout/suggestion_tile.xml b/res/layout/suggestion_tile.xml
index 79f6dca..fa3f3af 100644
--- a/res/layout/suggestion_tile.xml
+++ b/res/layout/suggestion_tile.xml
@@ -64,7 +64,7 @@
android:layout_marginStart="12dp"
android:layout_marginEnd="12dp"
android:singleLine="true"
- android:textAppearance="@style/TextAppearance.SuggestionTitleV2"
+ android:textAppearance="@style/TextAppearance.SuggestionTitle"
android:ellipsize="end"
android:fadingEdge="horizontal" />
diff --git a/res/layout/suggestion_tile_with_button.xml b/res/layout/suggestion_tile_with_button.xml
index a674bcb..de3494a 100644
--- a/res/layout/suggestion_tile_with_button.xml
+++ b/res/layout/suggestion_tile_with_button.xml
@@ -64,7 +64,7 @@
android:layout_marginStart="12dp"
android:layout_marginEnd="12dp"
android:singleLine="true"
- android:textAppearance="@style/TextAppearance.SuggestionTitleV2"
+ android:textAppearance="@style/TextAppearance.SuggestionTitle"
android:ellipsize="end"
android:fadingEdge="horizontal" />
@@ -84,6 +84,7 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="12dp"
+ android:layout_marginBottom="18dp"
android:text="@string/suggestion_button_text" />
</LinearLayout>
diff --git a/res/values/bools.xml b/res/values/bools.xml
index ab8a6fd..0cf085f 100644
--- a/res/values/bools.xml
+++ b/res/values/bools.xml
@@ -57,6 +57,12 @@
<!-- Whether toggle_airplane is available or not. -->
<bool name="config_show_toggle_airplane">true</bool>
+ <!-- Whether memory from app_info_settings is available or not. -->
+ <bool name="config_show_app_info_settings_memory">true</bool>
+
+ <!-- Whether battery from app_info_settings is available or not. -->
+ <bool name="config_show_app_info_settings_battery">true</bool>
+
<!-- Whether location mode is available or not. -->
<bool name="config_location_mode_available">true</bool>
@@ -158,4 +164,13 @@
<!-- Whether system_update_settings should be shown or not. -->
<bool name="config_show_system_update_settings">true</bool>
+
+ <!-- Whether device_model should be shown or not. -->
+ <bool name="config_show_device_model">true</bool>
+
+ <!-- Whether wifi_ip_address should be shown or not. -->
+ <bool name="config_show_wifi_ip_address">true</bool>
+
+ <!-- Whether wifi_mac_address should be shown or not. -->
+ <bool name="config_show_wifi_mac_address">true</bool>
</resources>
diff --git a/res/values/colors.xml b/res/values/colors.xml
index e10b4cb..3d86208 100644
--- a/res/values/colors.xml
+++ b/res/values/colors.xml
@@ -30,8 +30,6 @@
<color name="divider_color">#20ffffff</color>
<color name="title_color">@android:color/holo_blue_light</color>
- <color name="setup_divider_color_dark">#33ffffff</color>
- <color name="setup_divider_color_light">#33000000</color>
<color name="setup_lock_pattern_view_regular_color_dark">#ffbdbdbd</color>
<color name="setup_lock_pattern_view_regular_color_light">@color/lock_pattern_view_regular_color</color>
<color name="setup_lock_pattern_view_success_color_dark">#ff84ffff</color>
diff --git a/res/values/dimens.xml b/res/values/dimens.xml
index 12193c4..98afa5a 100755
--- a/res/values/dimens.xml
+++ b/res/values/dimens.xml
@@ -307,7 +307,7 @@
<dimen name="suggestion_card_width_one_card">332dp</dimen>
<dimen name="suggestion_card_width_two_cards">162dp</dimen>
<dimen name="suggestion_card_width_multiple_cards">156dp</dimen>
- <dimen name="suggestion_card_outer_margin">16dp</dimen>
+ <dimen name="suggestion_card_outer_margin">14dp</dimen>
<dimen name="suggestion_card_inner_margin">12dp</dimen>
<dimen name="suggestion_card_padding_bottom_one_card">16dp</dimen>
<dimen name="suggestion_card_corner_radius">2dp</dimen>
diff --git a/res/values/styles.xml b/res/values/styles.xml
index b672247..b436355 100644
--- a/res/values/styles.xml
+++ b/res/values/styles.xml
@@ -318,7 +318,6 @@
<style name="TextAppearance.SuggestionHeader"
parent="@android:style/TextAppearance.Material.Subhead">
- <item name="android:fontFamily">@config/config_headlineFontFamilyMedium</item>
<item name="android:textSize">14sp</item>
<item name="android:textColor">?android:attr/colorAccent</item>
</style>
@@ -334,12 +333,7 @@
<style name="TextAppearance.SuggestionTitle"
parent="@android:style/TextAppearance.Material.Subhead">
- <item name="android:fontFamily">sans-serif-medium</item>
- </style>
-
- <style name="TextAppearance.SuggestionTitleV2"
- parent="@android:style/TextAppearance.Material.Subhead">
- <item name="android:fontFamily">@config/config_headlineFontFamily</item>
+ <item name="android:textSize">16sp</item>
</style>
<style name="TextAppearance.SuggestionSummary" parent="TextAppearance.Small">
@@ -474,7 +468,6 @@
<style name="TextAppearance.SearchBar" parent="@android:style/TextAppearance.Material.Widget.Toolbar.Subtitle">
<item name="android:textSize">@dimen/search_bar_text_size</item>
- <item name="android:fontFamily">@config/config_headlineFontFamily</item>
</style>
<style name="device_info_dialog_label">
diff --git a/res/values/themes.xml b/res/values/themes.xml
index d4ccdde..e0f3989 100644
--- a/res/values/themes.xml
+++ b/res/values/themes.xml
@@ -18,7 +18,6 @@
<attr name="fingerprint_layout_theme" format="reference" />
<attr name="ic_menu_moreoverflow" format="reference" />
<attr name="ic_wps" format="reference" />
- <attr name="setup_divider_color" format="reference" />
<attr name="side_margin" format="reference|dimension" />
<attr name="wifi_signal_color" format="reference" />
@@ -30,7 +29,6 @@
<item name="fingerprint_layout_theme">@style/FingerprintLayoutTheme</item>
<item name="ic_menu_moreoverflow">@*android:drawable/ic_menu_moreoverflow_material</item>
<item name="ic_wps">@drawable/ic_wps_dark</item>
- <item name="setup_divider_color">@color/setup_divider_color_dark</item>
<item name="side_margin">0dip</item>
<item name="wifi_signal_color">@color/setup_wizard_wifi_color_dark</item>
<item name="wifi_signal">@drawable/wifi_signal</item>
@@ -50,7 +48,6 @@
<item name="fingerprint_layout_theme">@style/FingerprintLayoutTheme</item>
<item name="ic_menu_moreoverflow">@*android:drawable/ic_menu_moreoverflow_material</item>
<item name="ic_wps">@drawable/ic_wps_light</item>
- <item name="setup_divider_color">@color/setup_divider_color_light</item>
<item name="side_margin">0dip</item>
<item name="wifi_signal_color">@color/setup_wizard_wifi_color_light</item>
<item name="wifi_signal">@drawable/wifi_signal</item>
@@ -69,7 +66,6 @@
<item name="fingerprint_layout_theme">@style/FingerprintLayoutTheme</item>
<item name="ic_menu_moreoverflow">@*android:drawable/ic_menu_moreoverflow_material</item>
<item name="ic_wps">@drawable/ic_wps_dark</item>
- <item name="setup_divider_color">@color/setup_divider_color_dark</item>
<item name="side_margin">0dip</item>
<item name="wifi_signal_color">@color/setup_wizard_wifi_color_dark</item>
<item name="wifi_signal">@drawable/wifi_signal</item>
@@ -89,7 +85,43 @@
<item name="fingerprint_layout_theme">@style/FingerprintLayoutTheme</item>
<item name="ic_menu_moreoverflow">@*android:drawable/ic_menu_moreoverflow_material</item>
<item name="ic_wps">@drawable/ic_wps_light</item>
- <item name="setup_divider_color">@color/setup_divider_color_light</item>
+ <item name="side_margin">0dip</item>
+ <item name="wifi_signal_color">@color/setup_wizard_wifi_color_light</item>
+ <item name="wifi_signal">@drawable/wifi_signal</item>
+ <item name="wifi_friction">@drawable/wifi_friction</item>
+ <item name="preferenceBackgroundColor">?android:attr/colorBackground</item>
+ <item name="preferenceTheme">@style/PreferenceTheme.SetupWizard</item>
+
+ <item name="*android:lockPatternStyle">@style/LockPatternStyle.Setup</item>
+ </style>
+
+ <style name="GlifV3Theme" parent="SuwThemeGlifV3">
+ <!-- For all Alert Dialogs -->
+ <item name="android:alertDialogTheme">@style/GlifV2ThemeAlertDialog</item>
+ <item name="android:windowBackground">?android:attr/colorBackground</item>
+ <item name="*android:preferencePanelStyle">@*android:style/PreferencePanel.Dialog</item>
+ <item name="fingerprint_layout_theme">@style/FingerprintLayoutTheme</item>
+ <item name="ic_menu_moreoverflow">@*android:drawable/ic_menu_moreoverflow_material</item>
+ <item name="ic_wps">@drawable/ic_wps_dark</item>
+ <item name="side_margin">0dip</item>
+ <item name="wifi_signal_color">@color/setup_wizard_wifi_color_dark</item>
+ <item name="wifi_signal">@drawable/wifi_signal</item>
+ <item name="wifi_friction">@drawable/wifi_friction</item>
+ <item name="preferenceBackgroundColor">?android:attr/colorBackground</item>
+ <item name="preferenceTheme">@style/PreferenceTheme.SetupWizard</item>
+
+ <!-- LockPatternView colors -->
+ <item name="*android:lockPatternStyle">@style/LockPatternStyle.Setup</item>
+ </style>
+
+ <style name="GlifV3Theme.Light" parent="SuwThemeGlifV3.Light">
+ <!-- For all Alert Dialogs -->
+ <item name="android:alertDialogTheme">@style/GlifV2ThemeAlertDialog.Light</item>
+ <item name="android:windowBackground">?android:attr/colorBackground</item>
+ <item name="*android:preferencePanelStyle">@*android:style/PreferencePanel.Dialog</item>
+ <item name="fingerprint_layout_theme">@style/FingerprintLayoutTheme</item>
+ <item name="ic_menu_moreoverflow">@*android:drawable/ic_menu_moreoverflow_material</item>
+ <item name="ic_wps">@drawable/ic_wps_light</item>
<item name="side_margin">0dip</item>
<item name="wifi_signal_color">@color/setup_wizard_wifi_color_light</item>
<item name="wifi_signal">@drawable/wifi_signal</item>
@@ -128,6 +160,20 @@
<item name="android:windowAnimationStyle">@null</item>
</style>
+ <style name="GlifV3Theme.Transparent">
+ <item name="android:windowBackground">@android:color/transparent</item>
+ <item name="android:windowNoTitle">true</item>
+ <item name="android:windowIsFloating">true</item>
+ <item name="android:windowAnimationStyle">@null</item>
+ </style>
+
+ <style name="GlifV3Theme.Light.Transparent">
+ <item name="android:windowBackground">@android:color/transparent</item>
+ <item name="android:windowNoTitle">true</item>
+ <item name="android:windowIsFloating">true</item>
+ <item name="android:windowAnimationStyle">@null</item>
+ </style>
+
<style name="SuwSuggestionThemeGlif.Light" parent="SuwThemeGlif.Light">
<item name="android:windowAnimationStyle">@android:style/Animation.Activity</item>
@@ -290,13 +336,6 @@
<item name="android:colorAccent">@*android:color/white</item>
</style>
- <style name="Theme.FingerprintEnroll" parent="SuwThemeGlif.Light">
- <item name="android:textAppearanceListItemSmall">@android:style/TextAppearance.Material.Body1</item>
-
- <item name="suwDividerCondition">both</item>
- <item name="suwListItemIconColor">?android:attr/colorAccent</item>
- </style>
-
<style name="FallbackHome" parent="@android:style/Theme.DeviceDefault.NoActionBar">
<item name="android:windowBackground">@android:color/transparent</item>
<item name="android:colorBackgroundCacheHint">@null</item>
diff --git a/src/com/android/settings/SetupWizardUtils.java b/src/com/android/settings/SetupWizardUtils.java
index e3e49eb..85acc8a 100644
--- a/src/com/android/settings/SetupWizardUtils.java
+++ b/src/com/android/settings/SetupWizardUtils.java
@@ -34,6 +34,10 @@
}
if (theme != null) {
switch (theme) {
+ case WizardManagerHelper.THEME_GLIF_V3_LIGHT:
+ return R.style.GlifV3Theme_Light;
+ case WizardManagerHelper.THEME_GLIF_V3:
+ return R.style.GlifV3Theme;
case WizardManagerHelper.THEME_GLIF_V2_LIGHT:
return R.style.GlifV2Theme_Light;
case WizardManagerHelper.THEME_GLIF_V2:
@@ -50,7 +54,11 @@
public static int getTransparentTheme(Intent intent) {
final int suwTheme = getTheme(intent);
int wifiDialogTheme = R.style.GlifV2Theme_Light_Transparent;
- if (suwTheme == R.style.GlifV2Theme) {
+ if (suwTheme == R.style.GlifV3Theme) {
+ wifiDialogTheme = R.style.GlifV3Theme_Transparent;
+ } else if (suwTheme == R.style.GlifV3Theme_Light) {
+ wifiDialogTheme = R.style.GlifV3Theme_Light_Transparent;
+ } else if (suwTheme == R.style.GlifV2Theme) {
wifiDialogTheme = R.style.GlifV2Theme_Transparent;
} else if (suwTheme == R.style.GlifTheme_Light) {
wifiDialogTheme = R.style.SetupWizardTheme_Light_Transparent;
diff --git a/src/com/android/settings/applications/AppStateAppOpsBridge.java b/src/com/android/settings/applications/AppStateAppOpsBridge.java
index 6ec32a3..e0c19ff 100755
--- a/src/com/android/settings/applications/AppStateAppOpsBridge.java
+++ b/src/com/android/settings/applications/AppStateAppOpsBridge.java
@@ -61,7 +61,7 @@
new IPackageManagerWrapper(AppGlobals.getPackageManager()));
}
- @VisibleForTesting(otherwise = VisibleForTesting.NONE)
+ @VisibleForTesting
AppStateAppOpsBridge(Context context, ApplicationsState appState, Callback callback,
int appOpsOpCode, String[] permissions, IPackageManagerWrapper packageManager) {
super(appState, callback);
diff --git a/src/com/android/settings/applications/appinfo/AppBatteryPreferenceController.java b/src/com/android/settings/applications/appinfo/AppBatteryPreferenceController.java
index ffe2bf3..afcf760 100644
--- a/src/com/android/settings/applications/appinfo/AppBatteryPreferenceController.java
+++ b/src/com/android/settings/applications/appinfo/AppBatteryPreferenceController.java
@@ -76,7 +76,9 @@
@Override
public int getAvailabilityStatus() {
- return AVAILABLE;
+ return mContext.getResources().getBoolean(R.bool.config_show_app_info_settings_battery)
+ ? AVAILABLE
+ : DISABLED_UNSUPPORTED;
}
@Override
diff --git a/src/com/android/settings/applications/appinfo/AppMemoryPreferenceController.java b/src/com/android/settings/applications/appinfo/AppMemoryPreferenceController.java
index 7b497a9..265754c 100644
--- a/src/com/android/settings/applications/appinfo/AppMemoryPreferenceController.java
+++ b/src/com/android/settings/applications/appinfo/AppMemoryPreferenceController.java
@@ -104,6 +104,10 @@
@Override
public int getAvailabilityStatus() {
+ if (!mContext.getResources().getBoolean(R.bool.config_show_app_info_settings_memory)) {
+ return DISABLED_UNSUPPORTED;
+ }
+
return DevelopmentSettingsEnabler.isDevelopmentSettingsEnabled(mContext)
? AVAILABLE : DISABLED_DEPENDENT_SETTING;
}
diff --git a/src/com/android/settings/dashboard/DashboardAdapter.java b/src/com/android/settings/dashboard/DashboardAdapter.java
index 8646683..007b66b 100644
--- a/src/com/android/settings/dashboard/DashboardAdapter.java
+++ b/src/com/android/settings/dashboard/DashboardAdapter.java
@@ -17,6 +17,7 @@
import android.app.Activity;
import android.content.Context;
+import android.graphics.Typeface;
import android.graphics.drawable.Drawable;
import android.graphics.drawable.Icon;
import android.os.Bundle;
@@ -303,8 +304,13 @@
final List<Suggestion> suggestions =
(List<Suggestion>) mDashboardData.getItemEntityByPosition(position);
final int suggestionCount = suggestions.size();
+ final Typeface fontMedium = Typeface.create(
+ mContext.getString(com.android.internal.R.string.config_headlineFontFamilyMedium),
+ Typeface.NORMAL);
+ holder.title.setTypeface(fontMedium);
if (suggestions != null && suggestionCount > 0) {
holder.summary.setText("" + suggestionCount);
+ holder.summary.setTypeface(fontMedium);
mSuggestionAdapter.setSuggestions(suggestions);
holder.data.setAdapter(mSuggestionAdapter);
}
diff --git a/src/com/android/settings/dashboard/suggestions/SuggestionAdapter.java b/src/com/android/settings/dashboard/suggestions/SuggestionAdapter.java
index 9bcf2a2..62bc148 100644
--- a/src/com/android/settings/dashboard/suggestions/SuggestionAdapter.java
+++ b/src/com/android/settings/dashboard/suggestions/SuggestionAdapter.java
@@ -18,6 +18,7 @@
import android.app.PendingIntent;
import android.content.Context;
import android.content.res.Resources;
+import android.graphics.Typeface;
import android.graphics.drawable.Drawable;
import android.graphics.drawable.Icon;
import android.os.Bundle;
@@ -122,6 +123,9 @@
holder.icon.setImageDrawable(drawable);
holder.title.setText(suggestion.getTitle());
holder.title.setSingleLine(suggestionCount == 1);
+ holder.title.setTypeface(Typeface.create(
+ mContext.getString(com.android.internal.R.string.config_headlineFontFamilyMedium),
+ Typeface.NORMAL));
if (suggestionCount == 1) {
final CharSequence summary = suggestion.getSummary();
diff --git a/src/com/android/settings/deviceinfo/DeviceModelPreferenceController.java b/src/com/android/settings/deviceinfo/DeviceModelPreferenceController.java
index ee069da..831c630 100644
--- a/src/com/android/settings/deviceinfo/DeviceModelPreferenceController.java
+++ b/src/com/android/settings/deviceinfo/DeviceModelPreferenceController.java
@@ -41,7 +41,7 @@
@Override
public boolean isAvailable() {
- return true;
+ return mContext.getResources().getBoolean(R.bool.config_show_device_model);
}
@Override
diff --git a/src/com/android/settings/deviceinfo/IpAddressPreferenceController.java b/src/com/android/settings/deviceinfo/IpAddressPreferenceController.java
index f4e2f8c..1af6397 100644
--- a/src/com/android/settings/deviceinfo/IpAddressPreferenceController.java
+++ b/src/com/android/settings/deviceinfo/IpAddressPreferenceController.java
@@ -19,6 +19,8 @@
import android.content.Context;
import com.android.settings.core.PreferenceControllerMixin;
+import com.android.settings.R;
+
import com.android.settingslib.core.lifecycle.Lifecycle;
import com.android.settingslib.deviceinfo.AbstractIpAddressPreferenceController;
@@ -31,5 +33,10 @@
super(context, lifecycle);
}
+ @Override
+ public boolean isAvailable() {
+ return mContext.getResources().getBoolean(R.bool.config_show_wifi_ip_address);
+ }
+
// This space intentionally left blank
}
diff --git a/src/com/android/settings/deviceinfo/WifiMacAddressPreferenceController.java b/src/com/android/settings/deviceinfo/WifiMacAddressPreferenceController.java
index 92390d7..8375310 100644
--- a/src/com/android/settings/deviceinfo/WifiMacAddressPreferenceController.java
+++ b/src/com/android/settings/deviceinfo/WifiMacAddressPreferenceController.java
@@ -19,6 +19,7 @@
import android.content.Context;
import com.android.settings.core.PreferenceControllerMixin;
+import com.android.settings.R;
import com.android.settingslib.core.lifecycle.Lifecycle;
import com.android.settingslib.deviceinfo.AbstractWifiMacAddressPreferenceController;
@@ -31,5 +32,10 @@
super(context, lifecycle);
}
+ @Override
+ public boolean isAvailable() {
+ return mContext.getResources().getBoolean(R.bool.config_show_wifi_mac_address);
+ }
+
// This space intentionally left blank
}
diff --git a/src/com/android/settings/fingerprint/FingerprintEnrollBase.java b/src/com/android/settings/fingerprint/FingerprintEnrollBase.java
index 7c34f2d..5a148d3 100644
--- a/src/com/android/settings/fingerprint/FingerprintEnrollBase.java
+++ b/src/com/android/settings/fingerprint/FingerprintEnrollBase.java
@@ -48,7 +48,6 @@
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
- setTheme(R.style.Theme_FingerprintEnroll);
mToken = getIntent().getByteArrayExtra(
ChooseLockSettingsHelper.EXTRA_KEY_CHALLENGE_TOKEN);
if (savedInstanceState != null && mToken == null) {
diff --git a/src/com/android/settings/location/LocationEnabler.java b/src/com/android/settings/location/LocationEnabler.java
index 30ecf2e..fd557a3 100644
--- a/src/com/android/settings/location/LocationEnabler.java
+++ b/src/com/android/settings/location/LocationEnabler.java
@@ -169,7 +169,7 @@
if (admin == null) {
admin = RestrictedLockUtils.checkIfRestrictionEnforced(
- mContext, UserManager.DISALLOW_CONFIG_LOCATION_MODE, userId);
+ mContext, UserManager.DISALLOW_CONFIG_LOCATION, userId);
}
return admin;
}
diff --git a/src/com/android/settings/wifi/ConfigureWifiSettings.java b/src/com/android/settings/wifi/ConfigureWifiSettings.java
index 3cd925e..b359bf3 100644
--- a/src/com/android/settings/wifi/ConfigureWifiSettings.java
+++ b/src/com/android/settings/wifi/ConfigureWifiSettings.java
@@ -63,10 +63,7 @@
@Override
public void onCreate(Bundle icicle) {
super.onCreate(icicle);
- int tileLimit = 1;
- if (mWifiWakeupPreferenceController.isAvailable()) {
- tileLimit++;
- }
+ int tileLimit = 2;
if (mUseOpenWifiPreferenceController.isAvailable()) {
tileLimit++;
}
@@ -82,8 +79,7 @@
protected List<AbstractPreferenceController> getPreferenceControllers(Context context) {
final NetworkScoreManagerWrapper networkScoreManagerWrapper =
new NetworkScoreManagerWrapper(context.getSystemService(NetworkScoreManager.class));
- mWifiWakeupPreferenceController = new WifiWakeupPreferenceController(
- context, getLifecycle());
+ mWifiWakeupPreferenceController = new WifiWakeupPreferenceController(context);
mUseOpenWifiPreferenceController = new UseOpenWifiPreferenceController(context, this,
networkScoreManagerWrapper, getLifecycle());
final WifiManager wifiManager = (WifiManager) getSystemService(WIFI_SERVICE);
diff --git a/src/com/android/settings/wifi/WifiSettings.java b/src/com/android/settings/wifi/WifiSettings.java
index e32bef4..22f8c43 100644
--- a/src/com/android/settings/wifi/WifiSettings.java
+++ b/src/com/android/settings/wifi/WifiSettings.java
@@ -911,17 +911,10 @@
private void setAdditionalSettingsSummaries() {
mAdditionalSettingsPreferenceCategory.addPreference(mConfigureWifiSettingsPreference);
- final int defaultWakeupAvailable = getResources().getInteger(
- com.android.internal.R.integer.config_wifi_wakeup_available);
- boolean wifiWakeupAvailable = Settings.Global.getInt(
- getContentResolver(), Settings.Global.WIFI_WAKEUP_AVAILABLE, defaultWakeupAvailable)
- == 1;
- if (wifiWakeupAvailable) {
- mConfigureWifiSettingsPreference.setSummary(getString(
- isWifiWakeupEnabled()
- ? R.string.wifi_configure_settings_preference_summary_wakeup_on
- : R.string.wifi_configure_settings_preference_summary_wakeup_off));
- }
+ mConfigureWifiSettingsPreference.setSummary(getString(
+ isWifiWakeupEnabled()
+ ? R.string.wifi_configure_settings_preference_summary_wakeup_on
+ : R.string.wifi_configure_settings_preference_summary_wakeup_off));
int numSavedNetworks = mWifiTracker.getNumSavedNetworks();
if (numSavedNetworks > 0) {
mAdditionalSettingsPreferenceCategory.addPreference(mSavedNetworksPreference);
@@ -942,8 +935,6 @@
Settings.Global.WIFI_SCAN_ALWAYS_AVAILABLE, 0) == 1
&& Settings.Global.getInt(contentResolver,
Settings.Global.AIRPLANE_MODE_ON, 0) == 0
- && Settings.Global.getInt(contentResolver,
- Settings.Global.NETWORK_RECOMMENDATIONS_ENABLED, 0) == 1
&& !powerManager.isPowerSaveMode();
}
diff --git a/src/com/android/settings/wifi/WifiWakeupPreferenceController.java b/src/com/android/settings/wifi/WifiWakeupPreferenceController.java
index a3170c0..bc9f2a0 100644
--- a/src/com/android/settings/wifi/WifiWakeupPreferenceController.java
+++ b/src/com/android/settings/wifi/WifiWakeupPreferenceController.java
@@ -31,52 +31,28 @@
import com.android.settings.core.PreferenceControllerMixin;
import com.android.settings.wrapper.NetworkScoreManagerWrapper;
import com.android.settingslib.core.AbstractPreferenceController;
-import com.android.settingslib.core.lifecycle.Lifecycle;
-import com.android.settingslib.core.lifecycle.LifecycleObserver;
-import com.android.settingslib.core.lifecycle.events.OnPause;
-import com.android.settingslib.core.lifecycle.events.OnResume;
/**
* {@link PreferenceControllerMixin} that controls whether the Wi-Fi Wakeup feature should be
* enabled.
*/
public class WifiWakeupPreferenceController extends AbstractPreferenceController
- implements PreferenceControllerMixin, LifecycleObserver, OnResume, OnPause {
+ implements PreferenceControllerMixin {
private static final String KEY_ENABLE_WIFI_WAKEUP = "enable_wifi_wakeup";
- private SettingObserver mSettingObserver;
- public WifiWakeupPreferenceController(Context context, Lifecycle lifecycle) {
+ public WifiWakeupPreferenceController(Context context) {
super(context);
- lifecycle.addObserver(this);
}
@Override
public void displayPreference(PreferenceScreen screen) {
super.displayPreference(screen);
- mSettingObserver = new SettingObserver(screen.findPreference(KEY_ENABLE_WIFI_WAKEUP));
- }
-
- @Override
- public void onResume() {
- if (mSettingObserver != null) {
- mSettingObserver.register(mContext.getContentResolver(), true /* register */);
- }
- }
-
- @Override
- public void onPause() {
- if (mSettingObserver != null) {
- mSettingObserver.register(mContext.getContentResolver(), false /* register */);
- }
}
@Override
public boolean isAvailable() {
- final int defaultValue = mContext.getResources().getInteger(
- com.android.internal.R.integer.config_wifi_wakeup_available);
- return Settings.Global.getInt(mContext.getContentResolver(),
- Settings.Global.WIFI_WAKEUP_AVAILABLE, defaultValue) == 1;
+ return true;
}
@Override
@@ -110,45 +86,12 @@
boolean wifiScanningEnabled = Settings.Global.getInt(mContext.getContentResolver(),
Settings.Global.WIFI_SCAN_ALWAYS_AVAILABLE, 0) == 1;
- boolean networkRecommendationsEnabled = Settings.Global.getInt(
- mContext.getContentResolver(),
- Settings.Global.NETWORK_RECOMMENDATIONS_ENABLED, 0) == 1;
- enableWifiWakeup.setEnabled(networkRecommendationsEnabled && wifiScanningEnabled);
+ enableWifiWakeup.setEnabled(wifiScanningEnabled);
- if (!networkRecommendationsEnabled) {
- enableWifiWakeup.setSummary(R.string.wifi_wakeup_summary_scoring_disabled);
- } else if (!wifiScanningEnabled) {
- enableWifiWakeup.setSummary(R.string.wifi_wakeup_summary_scanning_disabled);
- } else {
+ if (wifiScanningEnabled) {
enableWifiWakeup.setSummary(R.string.wifi_wakeup_summary);
- }
- }
-
- class SettingObserver extends ContentObserver {
- private final Uri NETWORK_RECOMMENDATIONS_ENABLED_URI =
- Settings.Global.getUriFor(Settings.Global.NETWORK_RECOMMENDATIONS_ENABLED);
-
- private final Preference mPreference;
-
- public SettingObserver(Preference preference) {
- super(new Handler());
- mPreference = preference;
- }
-
- public void register(ContentResolver cr, boolean register) {
- if (register) {
- cr.registerContentObserver(NETWORK_RECOMMENDATIONS_ENABLED_URI, false, this);
- } else {
- cr.unregisterContentObserver(this);
- }
- }
-
- @Override
- public void onChange(boolean selfChange, Uri uri) {
- super.onChange(selfChange, uri);
- if (NETWORK_RECOMMENDATIONS_ENABLED_URI.equals(uri)) {
- updateState(mPreference);
- }
+ } else {
+ enableWifiWakeup.setSummary(R.string.wifi_wakeup_summary_scanning_disabled);
}
}
}
diff --git a/tests/robotests/res/values-mcc999/config.xml b/tests/robotests/res/values-mcc999/config.xml
index e755f27..f43e39c 100644
--- a/tests/robotests/res/values-mcc999/config.xml
+++ b/tests/robotests/res/values-mcc999/config.xml
@@ -23,6 +23,8 @@
<bool name="config_additional_system_update_setting_enable">true</bool>
<bool name="config_show_wifi_settings">false</bool>
<bool name="config_show_toggle_airplane">false</bool>
+ <bool name="config_show_app_info_settings_memory">false</bool>
+ <bool name="config_show_app_info_settings_battery">false</bool>
<bool name="config_show_high_power_apps">false</bool>
<bool name="config_show_alarm_volume">false</bool>
<bool name="config_show_charging_sounds">false</bool>
@@ -57,4 +59,7 @@
<bool name="config_show_color_inversion_preference">false</bool>
<bool name="config_show_system_update_settings">false</bool>
<bool name="config_wifi_support_connected_mac_randomization">false</bool>
+ <bool name="config_show_device_model">false</bool>
+ <bool name="config_show_wifi_ip_address">false</bool>
+ <bool name="config_show_wifi_mac_address">false</bool>
</resources>
diff --git a/tests/robotests/src/com/android/settings/SetupWizardUtilsTest.java b/tests/robotests/src/com/android/settings/SetupWizardUtilsTest.java
index 21061c1..1b3e9ca 100644
--- a/tests/robotests/src/com/android/settings/SetupWizardUtilsTest.java
+++ b/tests/robotests/src/com/android/settings/SetupWizardUtilsTest.java
@@ -78,4 +78,14 @@
assertResId(SetupWizardUtils.getTheme(intent)).isEqualTo(R.style.GlifV2Theme_Light);
}
+ @Test
+ public void testGetTheme_glifV3Light_shouldReturnThemeResource() {
+ SettingsShadowSystemProperties.set(SetupWizardUtils.SYSTEM_PROP_SETUPWIZARD_THEME,
+ WizardManagerHelper.THEME_GLIF_V3_LIGHT);
+ Intent intent = new Intent();
+
+ assertResId(SetupWizardUtils.getTheme(intent)).isEqualTo(R.style.GlifV3Theme_Light);
+ assertResId(SetupWizardUtils.getTransparentTheme(intent))
+ .isEqualTo(R.style.GlifV3Theme_Light_Transparent);
+ }
}
diff --git a/tests/robotests/src/com/android/settings/applications/appinfo/AppBatteryPreferenceControllerTest.java b/tests/robotests/src/com/android/settings/applications/appinfo/AppBatteryPreferenceControllerTest.java
index 91833f5..970b2ec 100644
--- a/tests/robotests/src/com/android/settings/applications/appinfo/AppBatteryPreferenceControllerTest.java
+++ b/tests/robotests/src/com/android/settings/applications/appinfo/AppBatteryPreferenceControllerTest.java
@@ -109,8 +109,14 @@
}
@Test
- public void getAvailabilityStatus_shouldAlwaysReturnAvailable() {
- assertThat(mController.getAvailabilityStatus()).isEqualTo(mController.AVAILABLE);
+ public void testAppBattery_byDefault_shouldBeShown() {
+ assertThat(mController.isAvailable()).isTrue();
+ }
+
+ @Test
+ @Config(qualifiers = "mcc999")
+ public void testAppBattery_ifDisabled_shouldNotBeShown() {
+ assertThat(mController.isAvailable()).isFalse();
}
@Test
diff --git a/tests/robotests/src/com/android/settings/applications/appinfo/AppMemoryPreferenceControllerTest.java b/tests/robotests/src/com/android/settings/applications/appinfo/AppMemoryPreferenceControllerTest.java
index 47844c5..fd136c1 100644
--- a/tests/robotests/src/com/android/settings/applications/appinfo/AppMemoryPreferenceControllerTest.java
+++ b/tests/robotests/src/com/android/settings/applications/appinfo/AppMemoryPreferenceControllerTest.java
@@ -84,6 +84,24 @@
}
@Test
+ @Config(qualifiers = "mcc999")
+ public void getAvailabilityStatus_devSettingsEnabled_butNotVisible_shouldReturnUnsupported() {
+ Settings.Global.putInt(mContext.getContentResolver(),
+ Settings.Global.DEVELOPMENT_SETTINGS_ENABLED, 1);
+
+ assertThat(mController.getAvailabilityStatus()).isEqualTo(mController.DISABLED_UNSUPPORTED);
+ }
+
+ @Test
+ @Config(qualifiers = "mcc999")
+ public void getAvailabilityStatus_devSettingsDisabled_butNotVisible_shouldReturnUnsupported() {
+ Settings.Global.putInt(mContext.getContentResolver(),
+ Settings.Global.DEVELOPMENT_SETTINGS_ENABLED, 0);
+
+ assertThat(mController.getAvailabilityStatus()).isEqualTo(mController.DISABLED_UNSUPPORTED);
+ }
+
+ @Test
public void getAvailabilityStatus_developmentSettingsDisabled_shouldReturnDisabled() {
Settings.Global.putInt(mContext.getContentResolver(),
Settings.Global.DEVELOPMENT_SETTINGS_ENABLED, 0);
diff --git a/tests/robotests/src/com/android/settings/dashboard/DashboardAdapterTest.java b/tests/robotests/src/com/android/settings/dashboard/DashboardAdapterTest.java
index 2d22e04..d25969e 100644
--- a/tests/robotests/src/com/android/settings/dashboard/DashboardAdapterTest.java
+++ b/tests/robotests/src/com/android/settings/dashboard/DashboardAdapterTest.java
@@ -115,6 +115,7 @@
final View itemView = mock(View.class);
when(itemView.findViewById(R.id.suggestion_list)).thenReturn(data);
when(itemView.findViewById(android.R.id.summary)).thenReturn(mock(TextView.class));
+ when(itemView.findViewById(android.R.id.title)).thenReturn(mock(TextView.class));
final DashboardAdapter.SuggestionContainerHolder holder =
new DashboardAdapter.SuggestionContainerHolder(itemView);
@@ -138,6 +139,7 @@
final View itemView = mock(View.class);
when(itemView.findViewById(R.id.suggestion_list)).thenReturn(data);
when(itemView.findViewById(android.R.id.summary)).thenReturn(mock(TextView.class));
+ when(itemView.findViewById(android.R.id.title)).thenReturn(mock(TextView.class));
final DashboardAdapter.SuggestionContainerHolder holder =
new DashboardAdapter.SuggestionContainerHolder(itemView);
final List<Suggestion> suggestions = makeSuggestionsV2("pkg1", "pkg2", "pkg3", "pkg4");
@@ -188,6 +190,7 @@
final View itemView = mock(View.class);
when(itemView.findViewById(R.id.suggestion_list)).thenReturn(data);
when(itemView.findViewById(android.R.id.summary)).thenReturn(mock(TextView.class));
+ when(itemView.findViewById(android.R.id.title)).thenReturn(mock(TextView.class));
final DashboardAdapter.SuggestionContainerHolder holder =
new DashboardAdapter.SuggestionContainerHolder(itemView);
@@ -213,6 +216,7 @@
when(itemView.findViewById(R.id.suggestion_list)).thenReturn(data);
final TextView summary = mock(TextView.class);
when(itemView.findViewById(android.R.id.summary)).thenReturn(summary);
+ when(itemView.findViewById(android.R.id.title)).thenReturn(mock(TextView.class));
final DashboardAdapter.SuggestionContainerHolder holder =
new DashboardAdapter.SuggestionContainerHolder(itemView);
diff --git a/tests/robotests/src/com/android/settings/dashboard/suggestions/SuggestionAdapterTest.java b/tests/robotests/src/com/android/settings/dashboard/suggestions/SuggestionAdapterTest.java
index 825aee9..fc773a7 100644
--- a/tests/robotests/src/com/android/settings/dashboard/suggestions/SuggestionAdapterTest.java
+++ b/tests/robotests/src/com/android/settings/dashboard/suggestions/SuggestionAdapterTest.java
@@ -19,6 +19,7 @@
import static org.mockito.ArgumentMatchers.any;
import static org.mockito.ArgumentMatchers.anyInt;
+import static org.mockito.Mockito.doReturn;
import static org.mockito.Mockito.mock;
import static org.mockito.Mockito.never;
import static org.mockito.Mockito.spy;
@@ -76,7 +77,7 @@
@Before
public void setUp() {
MockitoAnnotations.initMocks(this);
- mContext = RuntimeEnvironment.application;
+ mContext = spy(RuntimeEnvironment.application);
mFeatureFactory = FakeFeatureFactory.setupForTest();
final Suggestion suggestion1 = new Suggestion.Builder("id1")
@@ -136,6 +137,7 @@
mSuggestionAdapter = new SuggestionAdapter(mContext, mSuggestionControllerMixin,
null /* savedInstanceState */, null /* callback */, null /* lifecycle */);
mSuggestionAdapter.setSuggestions(mOneSuggestion);
+ doReturn("sans").when(mContext).getString(anyInt());
// Bind twice
mSuggestionAdapter.onBindViewHolder(mSuggestionHolder, 0);
@@ -177,6 +179,7 @@
mSuggestionHolder = mSuggestionAdapter.onCreateViewHolder(
new FrameLayout(RuntimeEnvironment.application),
mSuggestionAdapter.getItemViewType(0));
+ doReturn("sans").when(mContext).getString(anyInt());
mSuggestionAdapter.onBindViewHolder(mSuggestionHolder, 0);
mSuggestionHolder.itemView.findViewById(android.R.id.primary).performClick();
diff --git a/tests/robotests/src/com/android/settings/deviceinfo/DeviceModelPreferenceControllerTest.java b/tests/robotests/src/com/android/settings/deviceinfo/DeviceModelPreferenceControllerTest.java
index 6a5c7fa..47bcf1c 100644
--- a/tests/robotests/src/com/android/settings/deviceinfo/DeviceModelPreferenceControllerTest.java
+++ b/tests/robotests/src/com/android/settings/deviceinfo/DeviceModelPreferenceControllerTest.java
@@ -69,11 +69,17 @@
}
@Test
- public void isAlwaysAvailable() {
+ public void isAvailable_returnTrueIfVisible() {
assertThat(mController.isAvailable()).isTrue();
}
@Test
+ @Config(qualifiers = "mcc999")
+ public void isAvailable_returnFalseIfNotVisible() {
+ assertThat(mController.isAvailable()).isFalse();
+ }
+
+ @Test
public void displayPref_shouldSetSummary() {
mController.displayPreference(mPreferenceScreen);
diff --git a/tests/robotests/src/com/android/settings/location/LocationEnablerTest.java b/tests/robotests/src/com/android/settings/location/LocationEnablerTest.java
index 1bae729..ca42b3a 100644
--- a/tests/robotests/src/com/android/settings/location/LocationEnablerTest.java
+++ b/tests/robotests/src/com/android/settings/location/LocationEnablerTest.java
@@ -252,7 +252,7 @@
enforcingUsers.add(new UserManager.EnforcingUser(userId,
UserManager.RESTRICTION_SOURCE_PROFILE_OWNER));
when(mUserManager.getUserRestrictionSources(
- UserManager.DISALLOW_CONFIG_LOCATION_MODE, UserHandle.of(userId)))
+ UserManager.DISALLOW_CONFIG_LOCATION, UserHandle.of(userId)))
.thenReturn(enforcingUsers);
assertThat(mEnabler.getShareLocationEnforcedAdmin(userId) != null).isTrue();
diff --git a/tests/robotests/src/com/android/settings/wifi/WifiWakeupPreferenceControllerTest.java b/tests/robotests/src/com/android/settings/wifi/WifiWakeupPreferenceControllerTest.java
index 29df539..28ab166 100644
--- a/tests/robotests/src/com/android/settings/wifi/WifiWakeupPreferenceControllerTest.java
+++ b/tests/robotests/src/com/android/settings/wifi/WifiWakeupPreferenceControllerTest.java
@@ -16,9 +16,7 @@
package com.android.settings.wifi;
-import static android.provider.Settings.Global.NETWORK_RECOMMENDATIONS_ENABLED;
import static android.provider.Settings.Global.WIFI_SCAN_ALWAYS_AVAILABLE;
-import static android.provider.Settings.Global.WIFI_WAKEUP_AVAILABLE;
import static android.provider.Settings.Global.WIFI_WAKEUP_ENABLED;
import static com.google.common.truth.Truth.assertThat;
import static org.mockito.Mockito.mock;
@@ -33,7 +31,6 @@
import com.android.settings.testutils.SettingsRobolectricTestRunner;
import com.android.settings.TestConfig;
import com.android.settings.testutils.shadow.SettingsShadowResources;
-import com.android.settingslib.core.lifecycle.Lifecycle;
import org.junit.After;
import org.junit.Before;
@@ -59,12 +56,8 @@
public void setUp() {
MockitoAnnotations.initMocks(this);
mContext = RuntimeEnvironment.application;
- mController = new WifiWakeupPreferenceController(
- mContext, mock(Lifecycle.class));
+ mController = new WifiWakeupPreferenceController(mContext);
Settings.System.putInt(mContext.getContentResolver(), WIFI_SCAN_ALWAYS_AVAILABLE, 1);
- Settings.System.putInt(mContext.getContentResolver(), NETWORK_RECOMMENDATIONS_ENABLED, 1);
- SettingsShadowResources.overrideResource(
- com.android.internal.R.integer.config_wifi_wakeup_available, 0);
}
@After
@@ -73,18 +66,6 @@
}
@Test
- public void testIsAvailable_returnsFalseWhenSettingIsNotAvailable() {
- Settings.System.putInt(mContext.getContentResolver(), WIFI_WAKEUP_AVAILABLE, 0);
- assertThat(mController.isAvailable()).isFalse();
- }
-
- @Test
- public void testIsAvailable_returnsTrueWhenSettingIsAvailable() {
- Settings.System.putInt(mContext.getContentResolver(), WIFI_WAKEUP_AVAILABLE, 1);
- assertThat(mController.isAvailable()).isTrue();
- }
-
- @Test
public void handlePreferenceTreeClick_nonMatchingKey_shouldDoNothing() {
final SwitchPreference pref = new SwitchPreference(mContext);
@@ -146,17 +127,4 @@
verify(preference).setEnabled(false);
verify(preference).setSummary(R.string.wifi_wakeup_summary_scanning_disabled);
}
-
- @Test
- public void updateState_preferenceSetUncheckedAndSetDisabledWhenScoringDisabled() {
- final SwitchPreference preference = mock(SwitchPreference.class);
- Settings.System.putInt(mContext.getContentResolver(), WIFI_WAKEUP_ENABLED, 1);
- Settings.System.putInt(mContext.getContentResolver(), NETWORK_RECOMMENDATIONS_ENABLED, 0);
-
- mController.updateState(preference);
-
- verify(preference).setChecked(true);
- verify(preference).setEnabled(false);
- verify(preference).setSummary(R.string.wifi_wakeup_summary_scoring_disabled);
- }
}