android / user-interface-samples

Multiple samples showing the best practices in the user interface on Android.
Apache License 2.0
4.42k stars 1.64k forks source link

WindowManager not work on Huawei Mate Xs #214

Open woohow116 opened 3 years ago

woohow116 commented 3 years ago

I initialized the window manager like this: wm = WindowManager(this, null)

and calledwm.registerDeviceStateChangeCallback, the accept method implemented in DeviceStateChangeCallback was invoked when I changed the screen size of emulator while was not on a real Huawei foldable device.

Can anyone tell me the reason, pls!

pfmaggi commented 2 years ago

Thanks for reporting this issue.

Can you please check if the androidx.window.sidecar (or the newer androidx.window.extension) are present on the device?

You can use the command:

adb shell pm list libraries | grep androidx

to see if it available.

Thanks.
~Pietro