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