基于RK3568 官方SDK验证

  1. 移除首页状态栏电池图标
    frameworks/base/packages/SystemUI/res/values/config.xml
    diff --git a/packages/SystemUI/res/values/config.xml b/packages/SystemUI/res/values/config.xml
    index 83e09ec2ceec..1d34b8319a84 100644
    --- a/packages/SystemUI/res/values/config.xml
    +++ b/packages/SystemUI/res/values/config.xml
    @@ -537,6 +537,7 @@
         <string-array name="config_statusBarIconBlackList" translatable="false">
             <item>@*android:string/status_bar_rotate</item>
             <item>@*android:string/status_bar_headset</item>
    +        <item>@*android:string/status_bar_battery</item>
         </string-array>
  2. 移除下拉菜单电池图标(带电量百分比的图标)
    frameworks/base/packages/SystemUI/res/layout/quick_qs_status_icons.xml
    diff --git a/packages/SystemUI/res/layout/quick_qs_status_icons.xml b/packages/SystemUI/res/layout/quick_qs_status_icons.xml
    index 44f52efd175e..cb21ad680772 100644
    --- a/packages/SystemUI/res/layout/quick_qs_status_icons.xml
    +++ b/packages/SystemUI/res/layout/quick_qs_status_icons.xml
    @@ -49,6 +51,7 @@
    <com.android.systemui.BatteryMeterView
             android:id="@+id/batteryRemainingIcon"
             android:layout_height="match_parent"
             android:layout_width="wrap_content"
             systemui:textAppearance="@style/TextAppearance.QS.Status"
    +        android:visibility="gone"
             android:paddingEnd="2dp" />
  3. 移除快捷菜单省电模式图标
    frameworks/base/packages/SystemUI/res/values/config.xml
    diff --git a/packages/SystemUI/res/values/config.xml b/packages/SystemUI/res/values/config.xml
    index 83e09ec2ceec..1d34b8319a84 100644
    --- a/packages/SystemUI/res/values/config.xml
    +++ b/packages/SystemUI/res/values/config.xml
    @@ -106,7 +106,7 @@
     
         <!-- The default tiles to display in QuickSettings -->
         <string name="quick_settings_tiles_default" translatable="false">
    -        wifi,bt,dnd,flashlight,rotation,battery,cell,airplane,cast,screenrecord
    +        wifi,bt,dnd,flashlight,rotation,cell,airplane,cast,screenrecord
         </string>
     
         <!-- The minimum number of tiles to display in QuickSettings -->
    @@ -114,7 +114,7 @@
     
         <!-- Tiles native to System UI. Order should match "quick_settings_tiles_default" -->
         <string name="quick_settings_tiles_stock" translatable="false">
    -        wifi,cell,battery,dnd,flashlight,rotation,bt,airplane,location,hotspot,inversion,saver,dark,work,cast,night,screenrecord,reverse
    +        wifi,cell,dnd,flashlight,rotation,bt,airplane,location,hotspot,inversion,saver,dark,work,cast,night,screenrecord,reverse
         </string>
  4. 移除设置—电池
    packages/apps/Settings/res/values/config.xml
    
    diff --git a/res/values/config.xml b/res/values/config.xml
    index de0dcfbcb6..b928d4ae5e 100755
    --- a/res/values/config.xml
    +++ b/res/values/config.xml
    @@ -403,7 +403,7 @@
         <bool name="config_show_top_level_accessibility">true</bool>
     
         <!-- Whether top_level_battery should be shown or not. -->
    -    <bool name="config_show_top_level_battery">true</bool>
    +    <bool name="config_show_top_level_battery">false</bool>
     
         <!-- Whether top_level_connected_devices should be shown or not. -->
         <bool name="config_show_top_level_connected_devices">true</bool>

    参考:

    Android系统移除电池电量监测管理功能_特立独行的博客-CSDN博客

         Android Q 移除电池电量图标及设置项等_老农民娃哈哈的博客-CSDN博客

         Android 10去除电池图标以及设置_【水能凝冰,冰自坚】的专栏-CSDN博客

Logo

华为开发者空间,是为全球开发者打造的专属开发空间,汇聚了华为优质开发资源及工具,致力于让每一位开发者拥有一台云主机,基于华为根生态开发、创新。

更多推荐