Open wangshaolei opened 1 year ago
//PermissionX.init(this) // .permissions(Manifest.permission.SYSTEM_ALERTWINDOW) // .onExplainRequestReason { scope, deniedList -> // scope.showRequestReasonDialog(deniedList, "悬浮窗权限", "确定", "取消") // } // .onForwardToSettings { scope, deniedList -> // scope.showForwardToSettingsDialog(deniedList, "悬浮窗权限,去设置", "确定", "取消") // } // .request { allGranted, , _ -> // binding.swDrawWindow.isChecked = allGranted // checkPermission() // }
使用悬浮窗拦截时: 操作:第1次到设置页面不操作返回-> 第2次到设置 页面操作返回 -> 再点击其它标准权限拦截弹窗时崩溃
//PermissionX.init(this) // .permissions(Manifest.permission.SYSTEM_ALERTWINDOW) // .onExplainRequestReason { scope, deniedList -> // scope.showRequestReasonDialog(deniedList, "悬浮窗权限", "确定", "取消") // } // .onForwardToSettings { scope, deniedList -> // scope.showForwardToSettingsDialog(deniedList, "悬浮窗权限,去设置", "确定", "取消") // } // .request { allGranted, , _ -> // binding.swDrawWindow.isChecked = allGranted // checkPermission() // }
使用悬浮窗拦截时: 操作:第1次到设置页面不操作返回-> 第2次到设置 页面操作返回 -> 再点击其它标准权限拦截弹窗时崩溃