标签:class roi manifest ext oar grant sdk color pac
void checkPermission() { final List<String> permissionsList = new ArrayList<>(); if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) { if ((checkSelfPermission(Manifest.permission.READ_PHONE_STATE) != PackageManager.PERMISSION_GRANTED)) permissionsList.add(Manifest.permission.READ_PHONE_STATE); if ((checkSelfPermission(Manifest.permission.WRITE_EXTERNAL_STORAGE) != PackageManager.PERMISSION_GRANTED)) permissionsList.add(Manifest.permission.WRITE_EXTERNAL_STORAGE); if (permissionsList.size() != 0) { requestPermissions(permissionsList.toArray(new String[permissionsList.size()]), REQUEST_PHONE_PERMISSIONS); } } }
标签:class roi manifest ext oar grant sdk color pac
原文地址:http://www.cnblogs.com/newcaoguo/p/6212419.html