Permalink
Browse files

拍摄照片 权限处理

  • Loading branch information...
1 parent 133b89a commit 3f35777387c8340133346f60993c550e980109e5 @siwangqishiq committed Oct 23, 2016
Showing with 8 additions and 0 deletions.
  1. +8 −0 demo/src/main/java/com/xinlan/imageeditandroid/MainActivity.java
@@ -182,6 +182,14 @@ public void onRequestPermissionsResult(int requestCode, String[] permissions, in
&& grantResults.length > 0
&& grantResults[0] == PackageManager.PERMISSION_GRANTED) {
openAblum();
+ return;
+ }//end if
+
+ if (requestCode == REQUEST_PERMISSON_CAMERA
+ && grantResults.length > 0
+ && grantResults[0] == PackageManager.PERMISSION_GRANTED) {
+ doTakePhoto();
+ return;
}//end if
}

0 comments on commit 3f35777

Please sign in to comment.