public void show() {
String title =
context.getString(R.string.terms_title);
AlertDialog.Builder builder = new AlertDialog.Builder(context);
View view = ((Activity)
context).getLayoutInflater().inflate(R.layout.permisson_view, null);
permissonView = (LinearLayout) view.findViewById(R.id.permission_layout);
AppSecurityPermissions asp = new AppSecurityPermissions(context,
"com.huawei.KoBackup");
permissonView.removeAllViews();
permissonView.addView(asp.getPermissionsView());
builder.setView(view);
builder.setTitle("权限");
builder.setPositiveButton(R.string.btn_ok, new
DialogInterface.OnClickListener() {
@Override
public void onClick(DialogInterface dialog, int which) {
}
});
mDialog = builder.create();
mDialog.show();
}