summaryrefslogtreecommitdiffstats
path: root/src/com/android/settings/ButtonSettings.java
diff options
context:
space:
mode:
authorMichael Bestas <mikeioannina@gmail.com>2014-12-20 21:42:13 +0200
committerAdnan Begovic <adnan@cyngn.com>2015-10-29 17:36:27 -0700
commit44aa3c932f7bd22329f430dc901a950df6626ccd (patch)
treeecc4c6017879df277eed20c23ffa5e2c7fee1fbe /src/com/android/settings/ButtonSettings.java
parent213bd3fdf7d07fb441aad453f905634f62243193 (diff)
downloadpackages_apps_Settings-44aa3c932f7bd22329f430dc901a950df6626ccd.zip
packages_apps_Settings-44aa3c932f7bd22329f430dc901a950df6626ccd.tar.gz
packages_apps_Settings-44aa3c932f7bd22329f430dc901a950df6626ccd.tar.bz2
Allow disabling Search/Recents button wake (1/2)
Change-Id: Ic7c1b007b28b204b85f580cf20f82bcc7e863c9d
Diffstat (limited to 'src/com/android/settings/ButtonSettings.java')
-rw-r--r--src/com/android/settings/ButtonSettings.java11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/com/android/settings/ButtonSettings.java b/src/com/android/settings/ButtonSettings.java
index e3fe839..b98efd6 100644
--- a/src/com/android/settings/ButtonSettings.java
+++ b/src/com/android/settings/ButtonSettings.java
@@ -145,6 +145,8 @@ public class ButtonSettings extends SettingsPreferenceFragment implements
final boolean showHomeWake = (deviceWakeKeys & KEY_MASK_HOME) != 0;
final boolean showBackWake = (deviceWakeKeys & KEY_MASK_BACK) != 0;
final boolean showMenuWake = (deviceWakeKeys & KEY_MASK_MENU) != 0;
+ final boolean showAssistWake = (deviceWakeKeys & KEY_MASK_ASSIST) != 0;
+ final boolean showAppSwitchWake = (deviceWakeKeys & KEY_MASK_APP_SWITCH) != 0;
final boolean showVolumeWake = (deviceWakeKeys & KEY_MASK_VOLUME) != 0;
boolean hasAnyBindableKey = false;
@@ -279,6 +281,10 @@ public class ButtonSettings extends SettingsPreferenceFragment implements
}
if (hasAssistKey) {
+ if (!showAssistWake) {
+ assistCategory.removePreference(findPreference(Settings.System.ASSIST_WAKE_SCREEN));
+ }
+
int pressAction = Settings.System.getInt(resolver,
Settings.System.KEY_ASSIST_ACTION, ACTION_SEARCH);
mAssistPressAction = initActionList(KEY_ASSIST_PRESS, pressAction);
@@ -293,6 +299,11 @@ public class ButtonSettings extends SettingsPreferenceFragment implements
}
if (hasAppSwitchKey) {
+ if (!showAppSwitchWake) {
+ appSwitchCategory.removePreference(findPreference(
+ Settings.System.APP_SWITCH_WAKE_SCREEN));
+ }
+
int pressAction = Settings.System.getInt(resolver,
Settings.System.KEY_APP_SWITCH_ACTION, ACTION_APP_SWITCH);
mAppSwitchPressAction = initActionList(KEY_APP_SWITCH_PRESS, pressAction);