summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Matt Casey <mrcasey@google.com> 2021-06-08 19:02:06 +0000
committer Android (Google) Code Review <android-gerrit@google.com> 2021-06-08 19:02:06 +0000
commitb0fe4cad4beec55ff36a04f15f28777bf566a422 (patch)
tree4f7c03fd37fcfeb4537ef374369e2eb7dc14f6f3
parent9a7763499c6703bb1cf3cfb75774f4fbfd474167 (diff)
parentea1aac80cdebc93c89a3c05a0421a1840ae89046 (diff)
Merge "Add device default values for long press power and touch gesture" into sc-dev
-rw-r--r--core/res/res/values/config.xml5
-rw-r--r--core/res/res/values/symbols.xml3
-rw-r--r--packages/SystemUI/src/com/android/systemui/navigationbar/NavigationBar.java8
3 files changed, 14 insertions, 2 deletions
diff --git a/core/res/res/values/config.xml b/core/res/res/values/config.xml
index bf59f4d7e756..5ac23365eaee 100644
--- a/core/res/res/values/config.xml
+++ b/core/res/res/values/config.xml
@@ -4980,6 +4980,11 @@
<!-- List containing the allowed install sources for accessibility service. -->
<string-array name="config_accessibility_allowed_install_source" translatable="false"/>
+ <!-- Default value for Settings.ASSIST_LONG_PRESS_HOME_ENABLED -->
+ <bool name="config_assistLongPressHomeEnabledDefault">true</bool>
+ <!-- Default value for Settings.ASSIST_TOUCH_GESTURE_ENABLED -->
+ <bool name="config_assistTouchGestureEnabledDefault">true</bool>
+
<!-- The amount of dimming to apply to wallpapers with mid range luminance. 0 displays
the wallpaper at full brightness. 1 displays the wallpaper as fully black. -->
<item name="config_wallpaperDimAmount" format="float" type="dimen">0.05</item>
diff --git a/core/res/res/values/symbols.xml b/core/res/res/values/symbols.xml
index 7006d930995f..b574415c0a08 100644
--- a/core/res/res/values/symbols.xml
+++ b/core/res/res/values/symbols.xml
@@ -4394,5 +4394,8 @@
<java-symbol type="dimen" name="starting_surface_icon_size" />
<java-symbol type="dimen" name="starting_surface_default_icon_size" />
+ <java-symbol type="bool" name="config_assistLongPressHomeEnabledDefault" />
+ <java-symbol type="bool" name="config_assistTouchGestureEnabledDefault" />
+
<java-symbol type="dimen" name="config_wallpaperDimAmount" />
</resources>
diff --git a/packages/SystemUI/src/com/android/systemui/navigationbar/NavigationBar.java b/packages/SystemUI/src/com/android/systemui/navigationbar/NavigationBar.java
index d8b342a6a8d8..3e5e14095929 100644
--- a/packages/SystemUI/src/com/android/systemui/navigationbar/NavigationBar.java
+++ b/packages/SystemUI/src/com/android/systemui/navigationbar/NavigationBar.java
@@ -1447,10 +1447,14 @@ public class NavigationBar implements View.OnAttachStateChangeListener,
private void updateAssistantEntrypoints() {
mAssistantAvailable = mAssistManagerLazy.get()
.getAssistInfoForUser(UserHandle.USER_CURRENT) != null;
+ boolean longPressDefault = mContext.getResources().getBoolean(
+ com.android.internal.R.bool.config_assistLongPressHomeEnabledDefault);
mLongPressHomeEnabled = Settings.Secure.getInt(mContentResolver,
- Settings.Secure.ASSIST_LONG_PRESS_HOME_ENABLED, 1) != 0;
+ Settings.Secure.ASSIST_LONG_PRESS_HOME_ENABLED, longPressDefault ? 1 : 0) != 0;
+ boolean gestureDefault = mContext.getResources().getBoolean(
+ com.android.internal.R.bool.config_assistTouchGestureEnabledDefault);
mAssistantTouchGestureEnabled = Settings.Secure.getInt(mContentResolver,
- Settings.Secure.ASSIST_TOUCH_GESTURE_ENABLED, 1) != 0;
+ Settings.Secure.ASSIST_TOUCH_GESTURE_ENABLED, gestureDefault ? 1 : 0) != 0;
if (mOverviewProxyService.getProxy() != null) {
try {
mOverviewProxyService.getProxy().onAssistantAvailable(mAssistantAvailable