android11移除电池(已验证)

6 篇文章 1 订阅
4 篇文章 0 订阅

基于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博客

  • 5
    点赞
  • 13
    收藏
    觉得还不错? 一键收藏
  • 1
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值