I'm experiencing a "silent" crash when Attempting to open the Developer Options programmatically with
override fun openDevelopmentSettings() {
val intent = Intent(Settings.ACTION_APPLICATION_DEVELOPMENT_SETTINGS) //Silent-crashes the app on my phone, but not emulator. What?
startActivity(intent)
}
Opening the About Phone Settings however works perfectly fine when replacing the above param with Settings.ACTION_DEVICE_INFO_SETTINGS
Setting Android Studio's Logcat panel to Error and No Filters produces the following, where the About Phone Settings produce no errors:
2021-04-12 20:43:03.576 1586-2265/? E/UserRestrictionsUtils: Unknown restriction queried by uid 1000 (com.android.providers.settings et al): null
2021-04-12 20:43:03.577 1586-2265/? E/UserRestrictionsUtils: Unknown restriction queried by uid 1000 (com.android.providers.settings et al): null
2021-04-12 20:43:03.592 15832-15832/? E/ndroid.setting: Can't find memory status under: /sys/block/zram0/
2021-04-12 20:43:03.641 674-9189/? E/libnos_datagram: can't send spi message: Try again
2021-04-12 20:43:03.662 674-9189/? E/libnos_datagram: can't send spi message: Try again
2021-04-12 20:43:03.745 15832-15832/? E/BtHDAudioCtr: Active device is null. To disable HD audio button
2021-04-12 20:43:03.854 15832-15832/? E/BtHDAudioCtr: Active device is null. To disable HD audio button
2021-04-12 20:43:03.864 15832-16203/? E/ndroid.setting: Can't find memory status under: /sys/block/zram0/
Please note that the Developer Options menu does open, just my application's process crashes upon opening. Clicking the back button from the Developer Options relaunches my app instead of resuming as the process is dead.
I have used another app that also programmatically opens the Developer Options and do not experience the crash.
I have tried both debug and release builds.
I have also tried wrapping the code in a try-catch block, but when debugging the catch block isn't hit.
I unfortunately don't have another physical device to test on, but an emulator of the same device and API level doesn't reproduce the crash. What's going on here? Is my Pixel 3 at Android 11 (RQ2A.210305.006) corrupted? Memory error? Any help is greatly appreciated, thanks.