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

Commit 97d852d3 authored by Yash Garg's avatar Yash Garg 💬
Browse files

Merge branch '3674-q-fix_split_screen' into 'v1-q'

Set app switch action to nothing if it's set to split screen (Q)

See merge request !31
parents 39236d13 9714423f
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -40,6 +40,7 @@ public class BootReceiver extends BroadcastReceiver {
            setRestoredTunable(ctx);
        }

        ButtonSettings.setLongPressActionToNothing(ctx);
        TouchscreenGestureSettings.restoreTouchscreenGestureStates(ctx);

        // Extract the contributors database
+12 −0
Original line number Diff line number Diff line
@@ -695,6 +695,18 @@ public class ButtonSettings extends SettingsPreferenceFragment
    }


    public static void setLongPressActionToNothing(Context context) {
        final int action = LineageSettings.System.getIntForUser(context.getContentResolver(),
                LineageSettings.System.KEY_APP_SWITCH_LONG_PRESS_ACTION, context.getResources().getInteger(
                org.lineageos.platform.internal.R.integer.config_longPressOnAppSwitchBehavior),
                UserHandle.USER_CURRENT);

        if (action == Action.SPLIT_SCREEN.ordinal()) {
            LineageSettings.System.putInt(context.getContentResolver(),
                LineageSettings.System.KEY_APP_SWITCH_LONG_PRESS_ACTION, Action.NOTHING.ordinal());
        }
    }

    @Override
    public boolean onPreferenceTreeClick(Preference preference) {
        if (preference == mSwapVolumeButtons) {