// 需要验证的权限 int hasWriteContactsPermission = checkSelfPermission(Manifest.permission.CALL_PHONE); if (hasWriteContactsPermission != PackageManager.PERMISSION_GRANTED) { // 弹窗询问 ,让用户自己判断 requestPermissions(new String[]{Manifest.permission.CALL_PHONE}, REQUEST_CODE_ASK_PERMISSIONS); return; }