Android AOSP removes the screen recording permission pop-up box a second time. How to show the below dialog always?
mDialog = new AlertDialog.Builder(this, R.style.Theme_SystemUI_Dialog)
.setTitle(dialogTitle)
.setIcon(R.drawable.ic_media_projection_permission)
.setMessage(dialogText)
.setPositiveButton(R.string.media_projection_action_text, this)
.setNeutralButton(android.R.string.cancel, this)
.setOnCancelListener(this)
.create();
【以下回答由 GPT 生成】
要在Android AOSP中始终显示屏幕录制权限弹窗,可以以下两种方法来实现:
PhoneWindowManager.java
文件。interceptKeyBeforeDispatching()
方法中,找到以下代码行: java // 屏幕录制权限的检查,如果已经授权则不显示弹窗 // ...
保存修改并重新编译AOSP。
使用Xposed框架:
以上方法都涉及到修改系统源码或使用第三方工具,如果你只是普通用户或不熟悉Android开发,可能无法轻松实现。
There is nothing like screenrecordercontrol. Please share AOSP official code