Make battery info configurable and enable it by default
Change-Id: If38db229e420e9f7c0ac26abb42a2a309b2f87c2
diff --git a/res/values/lineage_config.xml b/res/values/lineage_config.xml
index 083a3d6..f349475 100644
--- a/res/values/lineage_config.xml
+++ b/res/values/lineage_config.xml
@@ -18,4 +18,7 @@
<string-array name="config_ignored_backup_transports" translatable="false">
<item>com.android.localtransport/.LocalTransport</item>
</string-array>
+
+ <!-- Show battery information -->
+ <bool name="config_show_battery_info" translatable="false">true</bool>
</resources>
diff --git a/src/com/android/settings/fuelgauge/BatterySettingsFeatureProviderImpl.java b/src/com/android/settings/fuelgauge/BatterySettingsFeatureProviderImpl.java
index badab69..9df75fa 100644
--- a/src/com/android/settings/fuelgauge/BatterySettingsFeatureProviderImpl.java
+++ b/src/com/android/settings/fuelgauge/BatterySettingsFeatureProviderImpl.java
@@ -18,6 +18,7 @@
import android.content.Context;
+import com.android.settings.R;
import com.android.settings.fuelgauge.batterytip.tips.BatteryTip;
import java.util.List;
@@ -37,7 +38,7 @@
@Override
public boolean isBatteryInfoEnabled(Context context) {
- return false;
+ return context.getResources().getBoolean(R.bool.config_show_battery_info);
}
@Override