Allowing Gestures in Android Apps

I found a way to do it - I added this in another thread too so copy and pasting it here.

First I went and modified compositor.qml:962

peekFilter {
                enabled: appLayerItem.active
                            || cameraLayerItem.active
                            || launcherLayerItem.active
                            || alarmLayerItem.active
                            || topMenuLayerItem.active
                            || (homeLayerItem.active && root.deviceIsLocked)
                leftEnabled: false
                rightEnabled: !Desktop.startupWizardRunning

This might not be the canonical place to modify this, but it does work to disable the left swipe in an application window.

Next, I wanted to remove the back button from android. I did so by adding the following to the props:

echo 'qemu.hw.mainkeys=1' >> "build.prop"

which makes the android container believe that there are physical hardware buttons, hiding the navbar.

I added this to the img at /opt/appsupport/system.img - This might not have been necessary, there might have been a better way to do this. I was messing around with system.img to try to add some other things too.

Next, it should have been just a case of …

appsupport-attach
cmd overlay enable  com.android.internal.systemui.navbar.gestural

annnd.. oh

Exception occurred while executing 'enable':
java.lang.SecurityException: commit failed
	at com.android.server.om.OverlayManagerService$1.commit(OverlayManagerService.java:913)
	at com.android.server.om.OverlayManagerShellCommand.runEnableDisable(OverlayManagerShellCommand.java:251)
	at com.android.server.om.OverlayManagerShellCommand.onCommand(OverlayManagerShellCommand.java:89)
	at com.android.modules.utils.BasicShellCommandHandler.exec(BasicShellCommandHandler.java:97)
	at android.os.ShellCommand.exec(ShellCommand.java:38)
	at com.android.server.om.OverlayManagerService$1.onShellCommand(OverlayManagerService.java:1030)
	at android.os.Binder.shellCommand(Binder.java:1230)
	at android.os.Binder.onTransact(Binder.java:1043)
	at android.content.om.IOverlayManager$Stub.onTransact(IOverlayManager.java:510)
	at android.os.Binder.execTransactInternal(Binder.java:1505)
	at android.os.Binder.execTransact(Binder.java:1444)

So it seems like actually this was removed from the image in appsupport. Unfortunate.
I spent an inordinate amount of time trying to restore it, grapping some AOSP images to try to extract it.
Then I got tired. So I just grabbed an apk that adds gestures. Fluid Navigation Gestures

And voila.

Swiping right retains it’s existing functionality of minimizing apps. Swiping left goes back in Android apps (with a little animation).