Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 7ef27fbe authored by Chaohui Wang's avatar Chaohui Wang
Browse files

Clean up some UnusedResources detected by lint 4

Bug: 234570979
Test: Manual with Settings App
Change-Id: Icc21ef3bedc7a39e7841271f51b77e9b543f6f0f
parent 186eb66c
Loading
Loading
Loading
Loading
+0 −32
Original line number Diff line number Diff line
@@ -3741,38 +3741,6 @@
            column="15"/>
    </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.&#xA;This ensures that a theme change from a light to a dark theme can be uniformlyapplied across the app."
        errorLine1="          &lt;item android:offset=&quot;0&quot; android:color=&quot;#FF4285F4&quot;/>"
        errorLine2="                                   ~~~~~~~~~~~~~~~~~~~~~~~~~">
        <location
            file="res/drawable/one_handed_guideline.xml"
            line="34"
            column="36"/>
    </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.&#xA;This ensures that a theme change from a light to a dark theme can be uniformlyapplied across the app."
        errorLine1="          &lt;item android:offset=&quot;1&quot; android:color=&quot;#004385F5&quot;/>"
        errorLine2="                                   ~~~~~~~~~~~~~~~~~~~~~~~~~">
        <location
            file="res/drawable/one_handed_guideline.xml"
            line="35"
            column="36"/>
    </issue>

    <issue
        id="HardCodedColor"
        severity="Error"
+0 −22
Original line number Diff line number Diff line
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (C) 2015 The Android Open Source Project

     Licensed under the Apache License, Version 2.0 (the "License");
     you may not use this file except in compliance with the License.
     You may obtain a copy of the License at

          http://www.apache.org/licenses/LICENSE-2.0

     Unless required by applicable law or agreed to in writing, software
     distributed under the License is distributed on an "AS IS" BASIS,
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-->

<selector xmlns:android="http://schemas.android.com/apk/res/android">
    <item android:state_enabled="false"
          android:alpha="?android:attr/disabledAlpha"
          android:color="?android:attr/colorAccent" />
    <item android:color="?android:attr/colorAccent" />
</selector>
+0 −45
Original line number Diff line number Diff line
<vector xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:aapt="http://schemas.android.com/aapt"
    android:width="412dp"
    android:height="264dp"
    android:viewportWidth="412"
    android:viewportHeight="264">
  <group>
    <clip-path
        android:pathData="M0,0h412v264h-412z"/>
    <path
        android:pathData="M126,-246C109.431,-246 96,-232.569 96,-216V195C96,211.569 109.431,225 126,225H284.5C301.069,225 314.5,211.569 314.5,195V-216C314.5,-232.569 301.069,-246 284.5,-246H126ZM122,-235C110.954,-235 102,-226.046 102,-215V189.5C102,200.546 110.954,209.5 122,209.5H288C299.046,209.5 308,200.546 308,189.5V-215C308,-226.046 299.046,-235 288,-235H122Z"
        android:fillColor="#000000"
        android:fillType="evenOdd"/>
    <path
        android:pathData="M122.12,-233L288.12,-233A20,20 0,0 1,308.12 -213L308.12,191.5A20,20 0,0 1,288.12 211.5L122.12,211.5A20,20 0,0 1,102.12 191.5L102.12,-213A20,20 0,0 1,122.12 -233z"
        android:fillColor="#EAF1FF"/>
    <path
        android:pathData="M102.16,193.12H308.08C308.08,203.326 299.806,211.6 289.6,211.6H120.64C110.434,211.6 102.16,203.326 102.16,193.12Z"
        android:fillColor="#B5CFFC"/>
    <path
        android:pathData="M187.5,202.72L222.5,202.72A0.5,0.5 0,0 1,223 203.22L223,203.22A0.5,0.5 0,0 1,222.5 203.72L187.5,203.72A0.5,0.5 0,0 1,187 203.22L187,203.22A0.5,0.5 0,0 1,187.5 202.72z"
        android:fillColor="#666666"/>
    <path
        android:pathData="M197,115h36v94.684h-36z"
        android:strokeAlpha="0.8"
        android:fillAlpha="0.8">
      <aapt:attr name="android:fillColor">
        <gradient 
            android:startY="189.19"
            android:startX="212.951"
            android:endY="168.637"
            android:endX="212.447"
            android:type="linear">
          <item android:offset="0" android:color="#FF4285F4"/>
          <item android:offset="1" android:color="#004385F5"/>
        </gradient>
      </aapt:attr>
    </path>
    <path
        android:pathData="M197,206.899a18,18.101 0,1 0,36 0a18,18.101 0,1 0,-36 0z"
        android:strokeAlpha="0.8"
        android:fillColor="#3B7BE4"
        android:fillAlpha="0.8"/>
  </group>
</vector>

res/drawable/selectable_card.xml

deleted100644 → 0
+0 −22
Original line number Diff line number Diff line
<?xml version="1.0" encoding="utf-8"?>
<!--
     Copyright (C) 2016 The Android Open Source Project

     Licensed under the Apache License, Version 2.0 (the "License");
     you may not use this file except in compliance with the License.
     You may obtain a copy of the License at

          http://www.apache.org/licenses/LICENSE-2.0

     Unless required by applicable law or agreed to in writing, software
     distributed under the License is distributed on an "AS IS" BASIS,
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-->

<ripple
    xmlns:android="http://schemas.android.com/apk/res/android"
    android:color="?android:attr/colorControlHighlight">
    <item android:drawable="?android:attr/colorBackground"/>
</ripple>
+0 −24
Original line number Diff line number Diff line
<?xml version="1.0" encoding="utf-8"?>
<!--
     Copyright (C) 2021 The Android Open Source Project

     Licensed under the Apache License, Version 2.0 (the "License");
     you may not use this file except in compliance with the License.
     You may obtain a copy of the License at

          http://www.apache.org/licenses/LICENSE-2.0

     Unless required by applicable law or agreed to in writing, software
     distributed under the License is distributed on an "AS IS" BASIS,
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-->
<shape
    xmlns:android="http://schemas.android.com/apk/res/android"
    android:shape="rectangle">

    <solid android:color="?android:attr/textColorSecondaryInverse"/>
    <corners android:radius="8dp"/>
    <size android:height="4dp"/>
</shape>
Loading