Add SATELLITE_COMMUNICATION to Settings app and fix checkcolor_hook
SATELLITE_COMMUNICATION is a signature|privileged permission. Used to get satellite status.
Bug: 330585109
Test: presubmit
Change-Id: I35b226eeaa7fd018c658148c7496d9638fe8ecb7
Merged-In: I117dab50b8157e2f81de7b1ff6998c45fb84c734
diff --git a/AndroidManifest.xml b/AndroidManifest.xml
index 5ffbbf8..36dc7d8 100644
--- a/AndroidManifest.xml
+++ b/AndroidManifest.xml
@@ -143,6 +143,7 @@
<uses-permission android:name="android.permission.MANAGE_GAME_MODE" />
<uses-permission android:name="android.permission.RESTART_PHONE_PROCESS" />
<uses-permission android:name="android.permission.MANAGE_ENHANCED_CONFIRMATION_STATES" />
+ <uses-permission android:name="android.permission.SATELLITE_COMMUNICATION" />
<application
android:name=".SettingsApplication"
diff --git a/color-check-baseline.xml b/color-check-baseline.xml
index 5a0e98e..ecc795e 100644
--- a/color-check-baseline.xml
+++ b/color-check-baseline.xml
@@ -653,7 +653,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
file="res/layout/battery_tips_card.xml"
- line="57"
+ line="58"
column="13"/>
</issue>
@@ -669,7 +669,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
file="res/layout/battery_tips_card.xml"
- line="57"
+ line="58"
column="13"/>
</issue>
@@ -1577,11 +1577,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="screen_flash_color_button_outer_circle_stroke_color">#FFFFFF</color>"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
+ errorLine1=" <color name="battery_good_color_light">#43a047</color> <!-- Material Green 600 -->"
+ errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
- file="res/values-night/colors.xml"
- line="74"
+ file="res/values/colors.xml"
+ line="75"
column="5"/>
</issue>
@@ -1593,11 +1593,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="battery_good_color_light">#43a047</color> <!-- Material Green 600 -->"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
+ errorLine1=" <color name="screen_flash_color_button_outer_circle_stroke_color">#FFFFFF</color>"
+ errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
- file="res/values/colors.xml"
- line="75"
+ file="res/values-night/colors.xml"
+ line="76"
column="5"/>
</issue>
@@ -1629,7 +1629,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
file="res/values-night/colors.xml"
- line="77"
+ line="79"
column="5"/>
</issue>
@@ -2269,7 +2269,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
file="res/values/colors.xml"
- line="141"
+ line="143"
column="5"/>
</issue>
@@ -2285,7 +2285,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
file="res/values/colors.xml"
- line="142"
+ line="144"
column="5"/>
</issue>
@@ -2301,7 +2301,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
file="res/values/colors.xml"
- line="143"
+ line="145"
column="5"/>
</issue>
@@ -2317,7 +2317,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
file="res/values/colors.xml"
- line="144"
+ line="146"
column="5"/>
</issue>
@@ -2333,7 +2333,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
file="res/values/colors.xml"
- line="146"
+ line="148"
column="5"/>
</issue>
@@ -2349,7 +2349,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
file="res/values/colors.xml"
- line="148"
+ line="150"
column="5"/>
</issue>
@@ -2365,7 +2365,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
file="res/values/colors.xml"
- line="151"
+ line="153"
column="5"/>
</issue>
@@ -2381,7 +2381,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
file="res/values/colors.xml"
- line="154"
+ line="156"
column="5"/>
</issue>
@@ -2397,7 +2397,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
file="res/values/colors.xml"
- line="155"
+ line="157"
column="5"/>
</issue>
@@ -2413,7 +2413,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
file="res/values/colors.xml"
- line="156"
+ line="158"
column="5"/>
</issue>
@@ -2429,7 +2429,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
file="res/values/colors.xml"
- line="157"
+ line="159"
column="5"/>
</issue>
@@ -2445,7 +2445,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
file="res/values/colors.xml"
- line="158"
+ line="160"
column="5"/>
</issue>
@@ -2461,7 +2461,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
file="res/values/colors.xml"
- line="173"
+ line="175"
column="5"/>
</issue>
@@ -2477,7 +2477,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
file="res/values/colors.xml"
- line="174"
+ line="176"
column="5"/>
</issue>
@@ -2493,7 +2493,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
file="res/values/colors.xml"
- line="177"
+ line="179"
column="5"/>
</issue>
@@ -2509,7 +2509,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
file="res/values/colors.xml"
- line="178"
+ line="180"
column="5"/>
</issue>
@@ -2525,7 +2525,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
file="res/values/colors.xml"
- line="180"
+ line="182"
column="5"/>
</issue>
@@ -2541,7 +2541,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
file="res/values/colors.xml"
- line="181"
+ line="183"
column="5"/>
</issue>
@@ -2557,7 +2557,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
file="res/values/colors.xml"
- line="182"
+ line="184"
column="5"/>
</issue>
@@ -2573,7 +2573,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
file="res/values/colors.xml"
- line="183"
+ line="185"
column="5"/>
</issue>
@@ -2589,7 +2589,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
file="res/values/colors.xml"
- line="187"
+ line="189"
column="5"/>
</issue>
@@ -2605,7 +2605,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
file="res/values/colors.xml"
- line="188"
+ line="190"
column="5"/>
</issue>
@@ -2621,7 +2621,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
file="res/values/colors.xml"
- line="191"
+ line="193"
column="5"/>
</issue>
@@ -2637,7 +2637,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
file="res/values/colors.xml"
- line="192"
+ line="194"
column="5"/>
</issue>
@@ -2653,7 +2653,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
file="res/values/colors.xml"
- line="193"
+ line="195"
column="5"/>
</issue>
@@ -2669,7 +2669,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
file="res/values/colors.xml"
- line="194"
+ line="196"
column="5"/>
</issue>
@@ -2685,7 +2685,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
file="res/values/colors.xml"
- line="195"
+ line="197"
column="5"/>
</issue>
@@ -2701,7 +2701,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
file="res/values/colors.xml"
- line="196"
+ line="198"
column="5"/>
</issue>
@@ -2717,7 +2717,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
file="res/values/colors.xml"
- line="197"
+ line="199"
column="5"/>
</issue>
@@ -2733,7 +2733,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
file="res/values/colors.xml"
- line="198"
+ line="200"
column="5"/>
</issue>
@@ -2749,7 +2749,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
file="res/values/colors.xml"
- line="199"
+ line="201"
column="5"/>
</issue>
@@ -2765,7 +2765,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
file="res/values/colors.xml"
- line="200"
+ line="202"
column="5"/>
</issue>
@@ -2781,7 +2781,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
file="res/values/colors.xml"
- line="201"
+ line="203"
column="5"/>
</issue>
@@ -2797,7 +2797,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
file="res/values/colors.xml"
- line="202"
+ line="204"
column="5"/>
</issue>
@@ -2813,7 +2813,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
file="res/values/colors.xml"
- line="205"
+ line="207"
column="5"/>
</issue>
@@ -2829,7 +2829,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
file="res/values/colors.xml"
- line="206"
+ line="208"
column="5"/>
</issue>
@@ -2845,7 +2845,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
file="res/values/colors.xml"
- line="207"
+ line="209"
column="5"/>
</issue>
@@ -2861,7 +2861,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
file="res/values/colors.xml"
- line="208"
+ line="210"
column="5"/>
</issue>
@@ -2877,7 +2877,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
file="res/values/colors.xml"
- line="209"
+ line="211"
column="5"/>
</issue>
@@ -2893,7 +2893,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
file="res/values/colors.xml"
- line="210"
+ line="212"
column="5"/>
</issue>
@@ -2909,7 +2909,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
file="res/values/colors.xml"
- line="211"
+ line="213"
column="5"/>
</issue>
@@ -2925,7 +2925,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
file="res/values/colors.xml"
- line="212"
+ line="214"
column="5"/>
</issue>
@@ -2941,7 +2941,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
file="res/values/colors.xml"
- line="213"
+ line="215"
column="5"/>
</issue>
@@ -2957,7 +2957,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
file="res/values/colors.xml"
- line="214"
+ line="216"
column="5"/>
</issue>
@@ -2973,7 +2973,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
file="res/values/colors.xml"
- line="215"
+ line="217"
column="5"/>
</issue>
@@ -2989,7 +2989,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
file="res/values/colors.xml"
- line="216"
+ line="218"
column="5"/>
</issue>
@@ -3005,7 +3005,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
file="res/values/colors.xml"
- line="219"
+ line="221"
column="5"/>
</issue>
@@ -3945,6 +3945,22 @@
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:color="@color/accessibility_feature_background"/>"
+ errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
+ <location
+ file="res/drawable/ic_color_contrast.xml"
+ line="22"
+ column="13"/>
+ </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:color="@color/accessibility_color_inversion_background"/>"
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
@@ -6125,7 +6141,7 @@
errorLine2=" ^">
<location
file="res/values/styles.xml"
- line="944"
+ line="943"
column="43"/>
</issue>
@@ -6141,7 +6157,7 @@
errorLine2=" ^">
<location
file="res/values/styles.xml"
- line="944"
+ line="943"
column="43"/>
</issue>
@@ -6157,7 +6173,7 @@
errorLine2=" ^">
<location
file="res/values/styles.xml"
- line="945"
+ line="944"
column="49"/>
</issue>
@@ -6173,7 +6189,7 @@
errorLine2=" ^">
<location
file="res/values/styles.xml"
- line="945"
+ line="944"
column="49"/>
</issue>
@@ -6189,7 +6205,7 @@
errorLine2=" ^">
<location
file="res/values/styles.xml"
- line="946"
+ line="945"
column="54"/>
</issue>
@@ -6205,7 +6221,7 @@
errorLine2=" ^">
<location
file="res/values/styles.xml"
- line="946"
+ line="945"
column="54"/>
</issue>
@@ -6221,7 +6237,7 @@
errorLine2=" ^">
<location
file="res/values/styles.xml"
- line="947"
+ line="946"
column="47"/>
</issue>
@@ -6237,7 +6253,7 @@
errorLine2=" ^">
<location
file="res/values/styles.xml"
- line="947"
+ line="946"
column="47"/>
</issue>
@@ -6253,7 +6269,7 @@
errorLine2=" ^">
<location
file="res/values/styles.xml"
- line="948"
+ line="947"
column="51"/>
</issue>
@@ -6269,7 +6285,7 @@
errorLine2=" ^">
<location
file="res/values/styles.xml"
- line="948"
+ line="947"
column="51"/>
</issue>
@@ -6285,7 +6301,7 @@
errorLine2=" ^">
<location
file="res/values/styles.xml"
- line="949"
+ line="948"
column="63"/>
</issue>
@@ -6301,7 +6317,7 @@
errorLine2=" ^">
<location
file="res/values/styles.xml"
- line="949"
+ line="948"
column="63"/>
</issue>