0
点赞
收藏
分享

微信扫一扫

android11移除电池(已验证)

梦想家们 2022-01-12 阅读 91
  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>

举报

相关推荐

0 条评论