Skip to content

Commit

Permalink
1、修复了申请manifest时,6.0以下的版本会有遮挡框的问题
Browse files Browse the repository at this point in the history
  • Loading branch information
zincPower committed Jun 12, 2018
1 parent 5f9b256 commit ba8945a
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
2 changes: 2 additions & 0 deletions app/src/main/java/com/zinc/jpermission/MainActivity.java
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,8 @@ protected void onCreate(Bundle savedInstanceState) {
findViewById(R.id.btn_request_200).setOnClickListener(this);
findViewById(R.id.btn_service).setOnClickListener(this);

JPermissionUtil.requestAllPermission(this);

//设置各自品牌的系统权限页
// JPermissionUtil.setManuFacturer("genymotion", MyTestGenymotionMenu.class);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,12 @@ public static void goToMenu(Context context) {
* @version
*/
public static void requestAllPermission(Context context, IPermission iPermission) {

//如果小于 6.0 不进行逻辑处理
if (Build.VERSION.SDK_INT < Build.VERSION_CODES.M) {
return;
}

String[] manifestPermission = JPermissionHelper.getManifestPermission(context);
JPermissionActivity.permissionRequest(context, manifestPermission, JPermissionHelper.DEFAULT_REQUEST_CODE, iPermission);
}
Expand Down Expand Up @@ -154,7 +160,7 @@ public void canceled(int requestCode) {
public static void requestAllPermission(Context context, List<String> excluedPermission, IPermission iPermission) {

//如果小于 6.0 不进行逻辑处理
if(Build.VERSION.SDK_INT <= Build.VERSION_CODES.M){
if (Build.VERSION.SDK_INT < Build.VERSION_CODES.M) {
return;
}

Expand Down

0 comments on commit ba8945a

Please sign in to comment.