Fix Wifi-Detail page colors
There were some hardcoded colors in this page that should have been using colorControlNormal. This CL just updates it to use those. Test: Visual inspection Fixes: 37628554 Change-Id: I431744e7613eeb0ac751cf1505bcf2ef9e19d95d
This commit is contained in:
@@ -1,6 +1,18 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<issues format="4">
|
||||
|
||||
<issue
|
||||
id="LintError"
|
||||
severity="Error"
|
||||
message="No `.class` files were found in project ".", so none of the classfile based checks could be run. Does the project need to be built first?"
|
||||
category="Lint"
|
||||
priority="10"
|
||||
summary="Lint Failure"
|
||||
explanation="This issue type represents a problem running lint itself. Examples include failure to find bytecode for source files (which means certain detectors could not be run), parsing errors in lint configuration files, etc.
These errors are not errors in your own code, but they are shown to make it clear that some checks were not completed.">
|
||||
<location
|
||||
file="."/>
|
||||
</issue>
|
||||
|
||||
<issue
|
||||
id="HardCodedColor"
|
||||
severity="Error"
|
||||
@@ -985,8 +997,8 @@
|
||||
priority="4"
|
||||
summary="Using hardcoded color"
|
||||
explanation="Hardcoded color values are bad because theme changes cannot be uniformly applied.Instead use the theme specific colors such as `?android:attr/textColorPrimary` in attributes.
This ensures that a theme change from a light to a dark theme can be uniformlyapplied across the app."
|
||||
errorLine1=" <color name="wifi_details_icon_color">#8A000000</color>"
|
||||
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
|
||||
errorLine1=" <color name="fallback_tintColor">#89000000</color>"
|
||||
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
|
||||
<location
|
||||
file="res/values/colors.xml"
|
||||
line="103"
|
||||
@@ -1761,22 +1773,6 @@
|
||||
column="23"/>
|
||||
</issue>
|
||||
|
||||
<issue
|
||||
id="HardCodedColor"
|
||||
severity="Error"
|
||||
message="Avoid using hardcoded color"
|
||||
category="Correctness"
|
||||
priority="4"
|
||||
summary="Using hardcoded color"
|
||||
explanation="Hardcoded color values are bad because theme changes cannot be uniformly applied.Instead use the theme specific colors such as `?android:attr/textColorPrimary` in attributes.
This ensures that a theme change from a light to a dark theme can be uniformlyapplied across the app."
|
||||
errorLine1=" android:tint="@color/wifi_details_icon_color">"
|
||||
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
|
||||
<location
|
||||
file="res/drawable/ic_frequency_antenna.xml"
|
||||
line="22"
|
||||
column="9"/>
|
||||
</issue>
|
||||
|
||||
<issue
|
||||
id="HardCodedColor"
|
||||
severity="Error"
|
||||
@@ -2097,22 +2093,6 @@
|
||||
column="5"/>
|
||||
</issue>
|
||||
|
||||
<issue
|
||||
id="HardCodedColor"
|
||||
severity="Error"
|
||||
message="Avoid using hardcoded color"
|
||||
category="Correctness"
|
||||
priority="4"
|
||||
summary="Using hardcoded color"
|
||||
explanation="Hardcoded color values are bad because theme changes cannot be uniformly applied.Instead use the theme specific colors such as `?android:attr/textColorPrimary` in attributes.
This ensures that a theme change from a light to a dark theme can be uniformlyapplied across the app."
|
||||
errorLine1=" android:tint="@color/wifi_details_icon_color">"
|
||||
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
|
||||
<location
|
||||
file="res/drawable/ic_security_lock_24dp.xml"
|
||||
line="22"
|
||||
column="9"/>
|
||||
</issue>
|
||||
|
||||
<issue
|
||||
id="HardCodedColor"
|
||||
severity="Error"
|
||||
@@ -2669,7 +2649,7 @@
|
||||
errorLine2=" ~~~~~~~~~~~~~~~~~~~">
|
||||
<location
|
||||
file="res/values/strings.xml"
|
||||
line="5907"
|
||||
line="5805"
|
||||
column="36"/>
|
||||
</issue>
|
||||
|
||||
@@ -2701,7 +2681,7 @@
|
||||
errorLine2=" ^">
|
||||
<location
|
||||
file="res/values/styles.xml"
|
||||
line="427"
|
||||
line="422"
|
||||
column="44"/>
|
||||
</issue>
|
||||
|
||||
@@ -2717,7 +2697,7 @@
|
||||
errorLine2=" ^">
|
||||
<location
|
||||
file="res/values/styles.xml"
|
||||
line="433"
|
||||
line="428"
|
||||
column="44"/>
|
||||
</issue>
|
||||
|
||||
@@ -2733,7 +2713,7 @@
|
||||
errorLine2=" ^">
|
||||
<location
|
||||
file="res/values/styles.xml"
|
||||
line="434"
|
||||
line="429"
|
||||
column="44"/>
|
||||
</issue>
|
||||
|
||||
@@ -2749,7 +2729,7 @@
|
||||
errorLine2=" ^">
|
||||
<location
|
||||
file="res/values/styles.xml"
|
||||
line="461"
|
||||
line="464"
|
||||
column="34"/>
|
||||
</issue>
|
||||
|
||||
|
@@ -19,7 +19,7 @@
|
||||
android:viewportHeight="24"
|
||||
android:width="24dp"
|
||||
android:height="24dp"
|
||||
android:tint="@color/wifi_details_icon_color">
|
||||
android:tint="?android:attr/colorControlNormal">
|
||||
<path
|
||||
android:pathData="M12,5c-3.9,0-7,3.1-7,7h2c0-2.8,2.2-5,5-5s5,2.2,5,5h2C19,8.1,15.9,5,12,5z M13,14.3c0.9-0.4,1.5-1.3,1.5-2.3
|
||||
c0-1.4-1.1-2.5-2.5-2.5S9.5,10.6,9.5,12c0,1,0.6,1.9,1.5,2.3v3.3L7.6,21L9,22.4l3-3l3,3l1.4-1.4L13,17.6V14.3z M12,1
|
||||
|
@@ -19,7 +19,7 @@
|
||||
android:viewportHeight="24"
|
||||
android:width="24dp"
|
||||
android:height="24dp"
|
||||
android:tint="@color/wifi_details_icon_color">
|
||||
android:tint="?android:attr/colorControlNormal">
|
||||
<path
|
||||
android:pathData="M18 8h-1V6c0-2.76-2.24-5-5-5S7 3.24 7 6v2H6c-1.1 0-2 .9-2 2v10c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V10c0-1.1-.9-2-2-2zm-6 9c-1.1 0-2-.9-2-2s.9-2 2-2 2 .9 2 2-.9 2-2 2zm3.1-9H8.9V6c0-1.71 1.39-3.1 3.1-3.1 1.71 0 3.1 1.39 3.1 3.1v2z"
|
||||
android:fillColor="#FFFFFFFF" />
|
||||
|
@@ -99,8 +99,8 @@
|
||||
<!-- Color for the background of the shortcut icons.-->
|
||||
<color name="shortcut_background">#fff5f5f5</color>
|
||||
|
||||
<!-- Color for preference icons on the Wifi Network Details page -->
|
||||
<color name="wifi_details_icon_color">#8A000000</color>
|
||||
<!-- The fallback color for tinting icons. Only used when colorControlNormal is unavailable -->
|
||||
<color name="fallback_tintColor">#89000000</color>
|
||||
|
||||
<!-- Suggestion/condition colors -->
|
||||
<color name="suggestion_condition_background">#f2f2f2</color>
|
||||
|
@@ -408,8 +408,7 @@ public class WifiDetailPreferenceController extends AbstractPreferenceController
|
||||
mEntityHeaderController.setIcon(wifiIcon).done(mFragment.getActivity(), true /* rebind */);
|
||||
|
||||
Drawable wifiIconDark = wifiIcon.getConstantState().newDrawable().mutate();
|
||||
wifiIconDark.setTint(mContext.getResources().getColor(
|
||||
R.color.wifi_details_icon_color, mContext.getTheme()));
|
||||
wifiIconDark.setTintList(Utils.getColorAttr(mContext, android.R.attr.colorControlNormal));
|
||||
mSignalStrengthPref.setIcon(wifiIconDark);
|
||||
|
||||
mSignalStrengthPref.setSummary(mSignalStr[mRssiSignalLevel]);
|
||||
|
Reference in New Issue
Block a user