From c3d328b6be521feff20f9d10f755716d4d639cc7 Mon Sep 17 00:00:00 2001 From: Bruno Martins Date: Fri, 10 May 2019 21:25:31 +0200 Subject: msm8996-common: pocketmode: Allow control over PocketMode service * Once the service is running, proximity sensor is constantly active when the display is turned off, resulting into a residual increase in battery consumption. Add a toggle so that users can decide whether they accept that and prefer to prevent accidental wake-ups triggered by the fingerprint sensor. * Keep the receiver that listens for the screen status registered only if the fingerprint wake-up feature is enabled at the same time as the accidental wake-up prevention feature. * Set PocketMode as a required module of ConfigPanel, to make sure it is only shipped on devices building the latter. * The configpanel part is integrated in b07a633bdeda835867aa3dc5a033529d7bd712dc Change-Id: Icfa23d2aef971e368476b6f1f7612493c2b69a20 --- .../src/org/lineageos/settings/device/ButtonSettingsFragment.java | 5 ----- .../settings/device/ConfigPanelSearchIndexablesProvider.java | 4 +--- 2 files changed, 1 insertion(+), 8 deletions(-) (limited to 'configpanel') diff --git a/configpanel/src/org/lineageos/settings/device/ButtonSettingsFragment.java b/configpanel/src/org/lineageos/settings/device/ButtonSettingsFragment.java index f446ef6..cee52c5 100644 --- a/configpanel/src/org/lineageos/settings/device/ButtonSettingsFragment.java +++ b/configpanel/src/org/lineageos/settings/device/ButtonSettingsFragment.java @@ -115,11 +115,6 @@ public class ButtonSettingsFragment extends PreferenceFragment } else { b.setOnPreferenceChangeListener(this); } - - // Hide fingerprint features if the device doesn't support them - if (!FileUtils.fileExists(Constants.FP_WAKEUP_NODE)) { - getPreferenceScreen().removePreference(fingerprintCategory); - } } @Override diff --git a/configpanel/src/org/lineageos/settings/device/ConfigPanelSearchIndexablesProvider.java b/configpanel/src/org/lineageos/settings/device/ConfigPanelSearchIndexablesProvider.java index 7430226..adff870 100644 --- a/configpanel/src/org/lineageos/settings/device/ConfigPanelSearchIndexablesProvider.java +++ b/configpanel/src/org/lineageos/settings/device/ConfigPanelSearchIndexablesProvider.java @@ -83,9 +83,7 @@ public class ConfigPanelSearchIndexablesProvider extends SearchIndexablesProvide if (!PackageManagerUtils.isAppInstalled(context, "org.lineageos.pocketmode")) { keys.add(Constants.FP_POCKETMODE_KEY); } - if (!FileUtils.fileExists(Constants.FP_WAKEUP_NODE)) { - keys.add(Constants.FP_WAKEUP_KEY); - } + keys.add(Constants.FP_WAKEUP_KEY); return keys; } -- cgit v1.2.3