RK3399 Android7.1去掉设置-电池中的使用时间和剩余时间图表显示

去掉设置-电池中的显示剩余时间时间的那个图表显示,以及屏幕顶端状态栏里的电池图标点击后的图表显示。如下:

 

 


diff --git a/frameworks/base/packages/SystemUI/res/layout/battery_detail.xml b/frameworks/base/packages/SystemUI/res/layout/battery_detail.xml
old mode 100644
new mode 100755
index 8abfcf6..06a2833
--- a/frameworks/base/packages/SystemUI/res/layout/battery_detail.xml
+++ b/frameworks/base/packages/SystemUI/res/layout/battery_detail.xml
@@ -29,7 +29,7 @@
         android:textAppearance="?android:attr/textAppearanceSmall"
         android:textColor="?android:attr/colorAccent" />
 
-    <com.android.systemui.ResizingSpace
+    <!--<com.android.systemui.ResizingSpace
         android:layout_width="match_parent"
         android:layout_height="@dimen/battery_detail_graph_space_top" />
 
@@ -45,7 +45,7 @@
 
     <com.android.systemui.ResizingSpace
         android:layout_width="match_parent"
-        android:layout_height="@dimen/battery_detail_graph_space_bottom" />
+        android:layout_height="@dimen/battery_detail_graph_space_bottom" />-->
 
     <View
         android:layout_width="match_parent"
diff --git a/frameworks/base/packages/SystemUI/src/com/android/systemui/qs/tiles/BatteryTile.java b/frameworks/base/packages/SystemUI/src/com/android/systemu
old mode 100644
new mode 100755
index 985bc9f..fc7156c
--- a/frameworks/base/packages/SystemUI/src/com/android/systemui/qs/tiles/BatteryTile.java
+++ b/frameworks/base/packages/SystemUI/src/com/android/systemui/qs/tiles/BatteryTile.java
@@ -242,17 +242,17 @@ public class BatteryTile extends QSTile<QSTile.State> implements BatteryControll
             SpannableStringBuilder builder = new SpannableStringBuilder();
             builder.append(info.batteryPercentString, new RelativeSizeSpan(2.6f),
                     Spanned.SPAN_INCLUSIVE_EXCLUSIVE);
-            if (info.remainingLabel != null) {
+            /*if (info.remainingLabel != null) {
                 if (mContext.getResources().getBoolean(R.bool.quick_settings_wide)) {
                     builder.append(' ');
                 } else {
                     builder.append('\n');
                 }
                 builder.append(info.remainingLabel);
-            }
+            }*/
             ((TextView) mCurrentView.findViewById(R.id.charge_and_estimation)).setText(builder);
 
-            info.bindHistory((UsageView) mCurrentView.findViewById(R.id.battery_usage));
+            //info.bindHistory((UsageView) mCurrentView.findViewById(R.id.battery_usage));
         }
 
         @Override
diff --git a/packages/apps/Settings/res/xml/power_usage_summary.xml b/packages/apps/Settings/res/xml/power_usage_summary.xml
old mode 100644
new mode 100755
index 1ae0a44..02f3b1c
--- a/packages/apps/Settings/res/xml/power_usage_summary.xml
+++ b/packages/apps/Settings/res/xml/power_usage_summary.xml
@@ -23,8 +23,8 @@
             android:title="@string/battery_saver"
             android:fragment="com.android.settings.fuelgauge.BatterySaverSettings" />
 
-        <com.android.settings.fuelgauge.BatteryHistoryPreference
-            android:key="battery_history" />
+        <!--<com.android.settings.fuelgauge.BatteryHistoryPreference
+            android:key="battery_history" />-->
 
         <PreferenceCategory
             android:key="app_list"
diff --git a/packages/apps/Settings/src/com/android/settings/fuelgauge/PowerUsageSummary.java b/packages/apps/Settings/src/com/android/settings/fuelgauge/Pow
old mode 100644
new mode 100755
index be0a7cc..70d801a
--- a/packages/apps/Settings/src/com/android/settings/fuelgauge/PowerUsageSummary.java
+++ b/packages/apps/Settings/src/com/android/settings/fuelgauge/PowerUsageSummary.java
@@ -89,7 +89,7 @@ public class PowerUsageSummary extends PowerUsageBase {
         setAnimationAllowed(true);
 
         addPreferencesFromResource(R.xml.power_usage_summary);
-        mHistPref = (BatteryHistoryPreference) findPreference(KEY_BATTERY_HISTORY);
+       // mHistPref = (BatteryHistoryPreference) findPreference(KEY_BATTERY_HISTORY);
         mAppListGroup = (PreferenceGroup) findPreference(KEY_APP_LIST);
     }
 
@@ -296,7 +296,7 @@ public class PowerUsageSummary extends PowerUsageBase {
 
     protected void refreshStats() {
         super.refreshStats();
-        updatePreference(mHistPref);
+        //updatePreference(mHistPref);
         cacheRemoveAllPrefs(mAppListGroup);
         mAppListGroup.setOrderingAsAdded(false);
         boolean addedSome = false;

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值