lawnchair icon indicating copy to clipboard operation
lawnchair copied to clipboard

[BUG] Crash with QuickSwitch on Android 14 QPR2

Open ammargitham opened this issue 10 months ago • 2 comments

Describe the bug

The launcher crashes when set as default launcher and also set as recents provider using QuickSwitch

Steps to reproduce

Steps to reproduce the behavior:

  1. Install Launcher
  2. Set as Home app
  3. Set as recent provider
  4. Reboot
  5. See error

Expected behavior

No crash expected

Screenshots

No response

Device information

  • Device: Google Pixel 8 Pro
  • OS: Android 14 QPR2
  • App version: 7516813d8c2d9507691408b479e19b4ac66b03c9

Additional context

FATAL EXCEPTION: main
  Process: app.lawnchair.debug, PID: 24269
  java.lang.NoSuchMethodError: No interface method destroyInputConsumer(Ljava/lang/String;I)Z in class Landroid/view/IWindowManager; or its super classes (declaration of 'android.view.IWindowManager' appears in /system/framework/framework.jar!classes4.dex)
  	at com.android.systemui.shared.system.InputConsumerController.registerInputConsumer(InputConsumerController.java:142)
  	at com.android.quickstep.TouchInteractionService.onUserUnlocked(TouchInteractionService.java:567)
  	at com.android.quickstep.TouchInteractionService$$ExternalSyntheticLambda0.run(D8$$SyntheticClass:0)
  	at com.android.launcher3.util.RunnableList.add(RunnableList.java:36)
  	at com.android.launcher3.util.LockedUserState.runOnUserUnlocked(LockedUserState.kt:72)
  	at com.android.quickstep.TouchInteractionService.onCreate(TouchInteractionService.java:504)
  	at android.app.ActivityThread.handleCreateService(ActivityThread.java:4865)
  	at android.app.ActivityThread.-$$Nest$mhandleCreateService(Unknown Source:0)
  	at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2365)
  	at android.os.Handler.dispatchMessage(Handler.java:107)
  	at android.os.Looper.loopOnce(Looper.java:232)
  	at android.os.Looper.loop(Looper.java:317)
  	at android.app.ActivityThread.main(ActivityThread.java:8501)
  	at java.lang.reflect.Method.invoke(Native Method)
  	at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:552)
  	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:878)

I suspect there has been an api change in recent framework and an updated framework.jar is required. Seems the method now takes an IBinder instead of a String: https://android.googlesource.com/platform/frameworks/base/+/master/core/java/android/view/IWindowManager.aidl#532

ammargitham avatar Apr 10 '24 11:04 ammargitham

I suspect there has been an api change in recent framework and an updated framework.jar is required. Seems the method now takes an IBinder instead of a String: https://android.googlesource.com/platform/frameworks/base/+/master/core/java/android/view/IWindowManager.aidl#532

Thanks for the extra homework on this. I reported it over a month ago, but it's only just recently been acknowledged as a Lawnchair bug, vs. Quickswitch. Hopefully your details will help expedite the required fix.

https://github.com/LawnchairLauncher/lawnchair/issues/4114#issue-2175302138

Bennett-69 avatar Apr 11 '24 06:04 Bennett-69

https://github.com/LawnchairLauncher/lawnchair/issues/4114#issue-2175302138

Oh, I didn't search for previous ticket for this as I thought no one else may have got QuickSwitch working on QPR2. As it requires some changes with the latest version to work. But yeah. hopefully this gets fixed soon.

ammargitham avatar Apr 11 '24 06:04 ammargitham

The issue still exists in latest nightly.

CoelacanthusHex avatar May 15 '24 21:05 CoelacanthusHex

Is https://github.com/LawnchairLauncher/lawnchair/pull/4112 related?

CoelacanthusHex avatar May 15 '24 21:05 CoelacanthusHex

@MrSluffy, I see you updated framework-14.jar before. Could you update framework-14.jar again?

CoelacanthusHex avatar May 16 '24 05:05 CoelacanthusHex

I can confirm it works again with two patches from @nishant6342. https://github.com/LawnchairLauncher/lawnchair/commit/a02144012971816e96785de70521098c74bbc3bc https://github.com/LawnchairLauncher/lawnchair/commit/293d0f4068d797328711dc3e70195aa48e51385a @nishant6342, are you interested in opening a Pull Request?

CoelacanthusHex avatar May 16 '24 16:05 CoelacanthusHex

I can confirm it works again with two patches from @nishant6342. a021440 293d0f4 @nishant6342, are you interested in opening a Pull Request?

Umm nope, feel free to use it and open pull request

nishant6342 avatar May 16 '24 17:05 nishant6342