[OnePlus 6 ROMs, Kernels, Recoveries, & Other Devel] fred_gaou:
INTRO​

First, I want to thank all the team for building this ROM. I love it.

BUG REPORT​

I know it’s discontinued but if the version 16.1 is still supported on other devices, this bug could concern them too.

BUG 1​

Problem​

The back button programmatically sent by apps (or adb shell or a terminal via input keyevent 4) doesn’t work.

Impact​

It breaks some tasks using back button action you may need in Tasker

It breaks any scripts that may need to send back key

It breaks any apps like the one using gestures to replace the OEM on-screen navigation gestures. They are numerous. Here are some of the one I use or tested :

Edge Gestures

MyGesture

Vivid N.G. (currently in use)

Pie Control (currently in use)

Cause​

AICP extra > Navigation > On-screen navigation enabled ✅

Solution​

Disable : AICP extra > Navigation > On-screen navigation ❌

This will cause bug 2 (more serious) below. So not really a viable solution.

Debugging​

For anyone using tasker, here is a simple task to import using the 3 different methods to send back key to system. (Just disable status bar : collapsed, I forgot.)

In attachement a back button bug.zip containing all tests with screenshots and trimmed logcat for each test.

For Tasker, I used the task above.

For Termux, I used :

su
input keyevent 4

For the logs, I forgot AICP had his own thing to export. Hence I used Logcat Reader. It exports log as simple text file but in a different format (2 lines per event). So it can be tedious to read the log outside the app, no coloring formatting, etc.

Test is considered passed when this message is received in logcat : GoogleInputMethodService.onKeyDown():2513 Received KEYCODE_BACK. isAllViewsInvisible=true. The back action is always performed in the UI when this event is triggered.

Task with On screen navigation OFF : test passed ✅

Task with On screen navigation ON : test failed ❌

Termux with On screen navigation OFF : test passed ✅

Termux with On screen navigation ON : test failed ❌

Default navbar back button tap : test passed ✅ (of course)

In a nutshell, the difference I detected in the logcat between failure and success is about GoogleInputMethodService. Something prevents it from receiving KEYCODE_BACK. I didn’t found out why in the logcat but I’m not a pro.

Tasker failed vs passed

BUG 2 (related to bug 1)​

Problem​

When On screen navigation is OFF

IF audio is playing (no matter the source or the output, speaker or BT)

AND the screen is OFF

THEN user can not turn on the screen in any way (fingerprint or power button) and unlock the device. In the meantime, after having pushed the power button, the lock screen starts flashing on a cycle of approximately 500ms ON/1500ms OFF.

Cause​

AICP extra > Navigation > On-screen navigation is disabled.

Workaround to stop the screen flickering and unlock the device​

The audio needs to be muted.

Either use Bluetooth button to pause the media or use the device volume key down until the audio is muted.

Test to no avail​

Toggle

AOD

Dark mode

Mono/Stereo

Plane mode

​

Debugging​

Pease find the logcat+dmesg (from AICP built-in tool) in attachment. Both

When On-screen navigation is disabled

In logcat from aicp_logs_On-screen navigation OFF.zip  :

Line 1: First powerpress event to lock the device and shutdown the screen

Line 88: First fatal exception

Line 666: new powerpress event to unlock device. The screen starts flickering after that.

Line 772/1372/1850: next fatal exceptions

When On-screen navigation is enabled.

In logcat from aicp_logs_On-screen navigation ON.zip  :

Line 1: First powerpress event to lock the device and shutdown the screen

Line 353: new powerpress event to unlock device. The lock screen display normally.

No fatal exceptions.

CONCLUSION​

BUG FIX​

AICP extra > Navigation > On-screen navigation when enabled prevents user and third party apps from sending back keycode, destroying any third party solutions to automate or navigate.

The solution is to disable it. Unfortunately, it brings a more serious bug with lock screen in some banal circumstances.

I remain at your disposal to help solve this bug. If someone of the team can fix it but have no device to test it, I will install the test build and report.