Android application "frozen" after unplugging usb-cable in debug mode. Tested on Android Studio 4.0, 4.1.1, 4.1.2 on Windows 10 and Ubuntu 18
How to reproduce:
- Run app from Android Studio on the physical device using USB-cable
- Open any Activity of the app
- Unplug USB-cable
- Open some other activities of application, in 80% cases after opening 2-3 activities application "frozen". App doesn't respond on any touch events, "back" button doesn't work, "home" button work correct. There isn't ANR or some crash, application screen just doesn't respond on touches or any other actions. Also, I don't see any informative log messages, exept maybe
E/InputDispatcher: Window handle drag has no registered input channel I/InputDispatcher: Dropping event because there is no touchable window or gesture monitor at (753, 1474) in display 0
I got this behavior on 3 different apps and on 2 different devices (Samsung and Xiaomi). Also, I can't reproduce it on one of my applications. The big difference between these applications in using DB (Room), bug reproduced only in apps with DB, but I am doesn't sure is this only one significant difference.