拒绝 Android 应用程序时发生了什么?系统设置中的s权限
步骤1:打开我的应用
步骤2:打开系统设置(我的应用程序还活着,未杀死)
步骤3:选择我的应用程序的许可(例如,相机或位置),哪个状态为允许和将其转到 deny
步骤4:打开我的应用程序
我的应用程序在步骤3中死亡,在步骤4中,它启动了一个新线程。它也发生在其他应用程序上。我在Android 10和Android 12模拟器上尝试这些。
我尝试使用模拟器的其他应用程序:微信,Google Photos,Chrome。对于大多数允许,他们都死了,对于某些许可,他们仍然活着。 (当我拒绝相机许可时,我的微信死了,但是对于“绘制其他应用程序”许可,它没有)
线程为什么死亡?死线没有有用的日志。新线程说:重新定义固有方法java.lang.thread java.lang.thread.currentthread()。这可能会导致在已经编译的方法中的Java.lang.thread Java.lang.thread.currentthread()的原始定义的意外使用。
。
Step 1: Open my app
Step 2: Open system settings(My app is still alive, not killed)
Step 3: Choose a permission of my app(e.g. camera or location), which state is allow and turn it to deny
Step 4: Open my app
My app dead in Step3, and in Step4 it start a new thread. It also happened on other apps. I try these on android 10 and android 12 emulator.
Other apps I' ve tried on emulator: WeChat, Google Photos, Chrome. For most kinds of permission they dead, and for some permissions they still alive. (My WeChat dead when denied camera permission, but for "Draw over other apps" permission, it did not)
Why did the thread die? There is no useful log in the dead thread. The new thread says: Redefining intrinsic method java.lang.Thread java.lang.Thread.currentThread(). This may cause the unexpected use of the original definition of java.lang.Thread java.lang.Thread.currentThread()in methods that have already been compiled.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
当您的应用还活着时。如果您从“设置”页面撤销权限。将重新创建应用程序过程。它将在应用程序被杀死之前进入确切的屏幕。但是ViewModel和所有对象此时将无效。
参考:
然后回到应用程序
When your app is alive. if you revoke permission from the settings page. The app process will be recreated. it will go to the exact screen where you are before the app gets killed. but viewmodel and all objects would be null at this point.
Refer:
Crash when disable permission and go back to the app