Skip to content

Commit 4361c5e

Browse files
Fix java.lang.AbstractMethodError: androidx.window.sidecar.SidecarInterface$SidecarCallback.onDeviceStateChanged
The crash was reported for `Microsoft Surface Duo`, which would affect some samsung and other devices as well, mainly dual screens/foldables. It was caused by androidx:window library that has been used by termux-shared since v0.115 having a typo in its proguard rules which didn't stop the removal of the required method for release builds (not debug) by proguard. The library has been patched and fix should be available on next version but doing an emergency patch now for termux as well. For people who are getting the crash should set `disable-terminal-margin-adjustment=true` in `termux.properties` created as per instructions in the link below and then start termux again and see if it fixes the issue. If you had termux installed before updating, you should be able to directly access the `~/.termux/termux.properties` file with SAF. #1896 (comment) ------ **Crash Message**: ``` abstract method "void androidx.window.sidecar.SidecarInterface$SidecarCallback.onDeviceStateChanged(androidx.window.sidecar.SidecarDeviceState)" ``` ### Stacktrace ``` java.lang.AbstractMethodError: abstract method "void androidx.window.sidecar.SidecarInterface$SidecarCallback.onDeviceStateChanged(androidx.window.sidecar.SidecarDeviceState)" at androidx.window.sidecar.MicrosoftSurfaceSidecar.updateDeviceState(MicrosoftSurfaceSidecar.java:159) at androidx.window.sidecar.MicrosoftSurfaceSidecar$1.deviceStateChanged(MicrosoftSurfaceSidecar.java:192) at android.vendor.screenlayout.service.IWindowExtensionCallbackInterface$Stub.onTransact(IWindowExtensionCallbackInterface.java:94) at android.os.Binder.execTransactInternal(Binder.java:1021) at android.os.Binder.execTransact(Binder.java:994) ``` https://issuetracker.google.com/issues/189001730 https://android-review.googlesource.com/c/platform/frameworks/support/+/1757630
1 parent a53cc88 commit 4361c5e

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

app/proguard-rules.pro

+5
Original file line numberDiff line numberDiff line change
@@ -10,3 +10,8 @@
1010
-dontobfuscate
1111
#-renamesourcefileattribute SourceFile
1212
#-keepattributes SourceFile,LineNumberTable
13+
14+
# Temp fix for androidx.window:window:1.0.0-alpha09 imported by termux-shared
15+
# https://issuetracker.google.com/issues/189001730
16+
# https://android-review.googlesource.com/c/platform/frameworks/support/+/1757630
17+
-keep class androidx.window.** { *; }

0 commit comments

Comments
 (0)