aboutsummaryrefslogtreecommitdiff
path: root/configpanel/src
diff options
context:
space:
mode:
authorBruno Martins <bgcngm@gmail.com>2019-05-10 21:25:31 +0200
committerDavide Garberi <dade.garberi@gmail.com>2019-05-10 23:26:10 +0200
commitc3d328b6be521feff20f9d10f755716d4d639cc7 (patch)
treee4ff8fa2805d9349181c7cdf976f2ed5f3e01e77 /configpanel/src
parente95cf897590b5ab6b25ac286e8baf6eaec9dd297 (diff)
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
Diffstat (limited to 'configpanel/src')
-rw-r--r--configpanel/src/org/lineageos/settings/device/ButtonSettingsFragment.java5
-rw-r--r--configpanel/src/org/lineageos/settings/device/ConfigPanelSearchIndexablesProvider.java4
2 files changed, 1 insertions, 8 deletions
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;
}