From ecf2dd1c546fe8e44ec55449e69fdf2370daa974 Mon Sep 17 00:00:00 2001 From: Pranav Vashi Date: Sun, 19 Mar 2017 01:48:25 +0530 Subject: [PATCH] Evolver: Add ability to toggle bluetooth battery level [2/2] Signed-off-by: Pranav Vashi Change-Id: Id725cf7ed6c26131baf36e826928d907ef6f46d6 Signed-off-by: AnierinB --- res/values/evolution_strings.xml | 2 ++ res/xml/evolution_settings_status_bar.xml | 7 +++++++ .../fragments/statusbar/StatusBar.java | 20 +++++++++++++++++++ 3 files changed, 29 insertions(+) diff --git a/res/values/evolution_strings.xml b/res/values/evolution_strings.xml index 33dea9e..049af4d 100644 --- a/res/values/evolution_strings.xml +++ b/res/values/evolution_strings.xml @@ -90,6 +90,8 @@ Icons Status bar tuner Choose which system icons can be shown + Bluetooth battery status + Display battery status for the connected Bluetooth device, if available Colored icons Use launcher icons for app notifications Notification count diff --git a/res/xml/evolution_settings_status_bar.xml b/res/xml/evolution_settings_status_bar.xml index 866fe62..4829daa 100644 --- a/res/xml/evolution_settings_status_bar.xml +++ b/res/xml/evolution_settings_status_bar.xml @@ -33,6 +33,13 @@ + + + getNonIndexableKeys(Context context) { List keys = super.getNonIndexableKeys(context); final Resources resources = context.getResources(); + + if (!DeviceUtils.deviceSupportsBluetooth(context)) { + keys.add(KEY_BLUETOOTH_BATTERY_STATUS); + } return keys; } };