Skip to content

Commit

Permalink
1、增加一个内存释放
Browse files Browse the repository at this point in the history
  • Loading branch information
zincPower committed Jun 21, 2019
1 parent b1c8c1d commit 9cfb1c5
Show file tree
Hide file tree
Showing 5 changed files with 23 additions and 7 deletions.
Binary file modified .idea/caches/build_file_checksums.ser
Binary file not shown.
8 changes: 6 additions & 2 deletions .idea/misc.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion .idea/vcs.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,10 @@ public class JPermissionActivity extends Activity {
private int mRequestCode;
private static IPermission permissionListener;

public static void permissionRequest(Context context, String[] permissions, int requestCode, IPermission iPermission) {
public static void permissionRequest(Context context,
String[] permissions,
int requestCode,
IPermission iPermission) {

permissionListener = iPermission;

Expand Down Expand Up @@ -129,5 +132,7 @@ public void onRequestPermissionsResult(int requestCode, @NonNull String permissi
public void finish() {
super.finish();
overridePendingTransition(0, 0);
permissionListener = null;
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
import com.zinc.libpermission.menu.VIVO;
import com.zinc.libpermission.menu.base.IMenu;

import java.lang.reflect.Array;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
Expand Down Expand Up @@ -98,7 +97,11 @@ public static void requestAllPermission(Context context, IPermission iPermission
}

String[] manifestPermission = JPermissionHelper.getManifestPermission(context);
JPermissionActivity.permissionRequest(context, manifestPermission, JPermissionHelper.DEFAULT_REQUEST_CODE, iPermission);
JPermissionActivity
.permissionRequest(context,
manifestPermission,
JPermissionHelper.DEFAULT_REQUEST_CODE,
iPermission);
}

/**
Expand Down Expand Up @@ -181,7 +184,11 @@ public static void requestAllPermission(Context context, List<String> excluedPer
return;
}

JPermissionActivity.permissionRequest(context, tempPer.toArray(new String[tempPer.size()]), JPermissionHelper.DEFAULT_REQUEST_CODE, iPermission);
JPermissionActivity
.permissionRequest(context,
tempPer.toArray(new String[tempPer.size()]),
JPermissionHelper.DEFAULT_REQUEST_CODE,
iPermission);
}

}

0 comments on commit 9cfb1c5

Please sign in to comment.