diff options
author | Bruno Martins <bgcngm@gmail.com> | 2020-12-17 19:31:36 +0000 |
---|---|---|
committer | Davide Garberi <dade.garberi@gmail.com> | 2021-10-19 15:09:38 +0200 |
commit | d85c13c0836c61150891210db45b4ca1ea5cff79 (patch) | |
tree | 120d5136fdee9baa8166fab6471941b7b385d086 /configpanel | |
parent | a6eaffdcda037bba0505ddb1ed58459a8a039677 (diff) |
msm8996-common: Check if PocketMode is enabled rather than installed
This is more effective, because the package may still be installed
and at the same time disabled by the user.
Change-Id: I95ccf5c4cdb05bac6cd91b96d7da6461dc8f6c44
Diffstat (limited to 'configpanel')
-rw-r--r-- | configpanel/src/org/lineageos/settings/device/ButtonSettingsFragment.java | 4 | ||||
-rw-r--r-- | configpanel/src/org/lineageos/settings/device/ConfigPanelSearchIndexablesProvider.java | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/configpanel/src/org/lineageos/settings/device/ButtonSettingsFragment.java b/configpanel/src/org/lineageos/settings/device/ButtonSettingsFragment.java index cee52c5..d23e939 100644 --- a/configpanel/src/org/lineageos/settings/device/ButtonSettingsFragment.java +++ b/configpanel/src/org/lineageos/settings/device/ButtonSettingsFragment.java @@ -1,6 +1,6 @@ /* * Copyright (C) 2016 The CyanogenMod Project - * (C) 2017 The LineageOS Project + * (C) 2017,2020-2021 The LineageOS Project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -110,7 +110,7 @@ public class ButtonSettingsFragment extends PreferenceFragment (PreferenceCategory) getPreferenceScreen().findPreference(Constants.CATEGORY_FP); SwitchPreference b = (SwitchPreference) findPreference(Constants.FP_POCKETMODE_KEY); - if (!PackageManagerUtils.isAppInstalled(getContext(), "org.lineageos.pocketmode")) { + if (!PackageManagerUtils.isAppEnabled(getContext(), "org.lineageos.pocketmode")) { fingerprintCategory.removePreference(b); } else { b.setOnPreferenceChangeListener(this); diff --git a/configpanel/src/org/lineageos/settings/device/ConfigPanelSearchIndexablesProvider.java b/configpanel/src/org/lineageos/settings/device/ConfigPanelSearchIndexablesProvider.java index ebb9557..24539e6 100644 --- a/configpanel/src/org/lineageos/settings/device/ConfigPanelSearchIndexablesProvider.java +++ b/configpanel/src/org/lineageos/settings/device/ConfigPanelSearchIndexablesProvider.java @@ -1,6 +1,6 @@ /* * Copyright (C) 2016 The CyanogenMod Project - * (C) 2017-2018 The LineageOS Project + * (C) 2017-2018,2020 The LineageOS Project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -80,7 +80,7 @@ public class ConfigPanelSearchIndexablesProvider extends SearchIndexablesProvide private List<String> getNonIndexableKeys(Context context) { List<String> keys = new ArrayList<>(); - if (!PackageManagerUtils.isAppInstalled(context, "org.lineageos.pocketmode")) { + if (!PackageManagerUtils.isAppEnabled(context, "org.lineageos.pocketmode")) { keys.add(Constants.FP_POCKETMODE_KEY); } keys.add(Constants.FP_WAKEUP_KEY); |