Settings.System.canWrite 总是 returns 错误

Settings.System.canWrite always returns false

我使用下面的代码来获取系统权限...即使允许权限也会发生什么;还在显示..

@Override
    protected void onResume() {
        super.onResume();
        if (Build.VERSION.SDK_INT >= 23 && !Settings.System.canWrite(ChooseSender_Receiver.this)){
            Intent intent = new Intent(Settings.ACTION_MANAGE_WRITE_SETTINGS);
            intent.setData(Uri.parse("package:" + ChooseSender_Receiver.this.getPackageName()));
            intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
            startActivityForResult(intent, REQUEST_WRITE_SETTINGS);
        }

注意:我的问题是即使权限已经允许它仍然显示弹出窗口..当拒绝并允许权限对话框被关闭时。

我的设备是Moto e2 & Redmi mbls版本M

终于无解了

Its based on device hardware issues..i check share it application even it's asking two time permission.