Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit ea1aac80 authored by Matt Casey's avatar Matt Casey
Browse files

Add device default values for long press power and touch gesture

They're on by default but we can vary that per-device.

Bug: 190186067
Test: Manual evaluation
Test: adb shell dumpsys activity service com.android.systemui | grep mLongPressHomeEnabled

Change-Id: Idaa763b9b5fd12d83549aaa3fddcbb84882056bd
parent 79f5d3f4
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -4973,6 +4973,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>
+3 −0
Original line number Diff line number Diff line
@@ -4393,5 +4393,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>
+6 −2
Original line number Diff line number Diff line
@@ -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