Merge "Introduce boolean flags to show/hide battery/memory in App info."
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/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/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/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/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/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();