Fix checkstyle errors

This commit is contained in:
Dominik Schürmann 2016-05-06 08:43:23 +03:00
parent fad9844d1f
commit 26f8c851ec
2 changed files with 16 additions and 17 deletions

View File

@ -61,11 +61,11 @@ import java.util.Set;
* extended information consisting of all groups and permissions. * extended information consisting of all groups and permissions.
* To use this view define a LinearLayout or any ViewGroup and add this * To use this view define a LinearLayout or any ViewGroup and add this
* view by instantiating AppSecurityPermissions and invoking getPermissionsView. * view by instantiating AppSecurityPermissions and invoking getPermissionsView.
* * <p/>
* NOTES: * NOTES:
* Based on AOSP core/java/android/widget/AppSecurityPermissions * Based on AOSP core/java/android/widget/AppSecurityPermissions
* latest included commit: a3f68ef2f6811cf72f1282214c0883db5a30901d * latest included commit: a3f68ef2f6811cf72f1282214c0883db5a30901d
* * <p/>
* To update this file: * To update this file:
* - Open https://github.com/android/platform_frameworks_base/commits/master/core/java/android/widget/AppSecurityPermissions.java * - Open https://github.com/android/platform_frameworks_base/commits/master/core/java/android/widget/AppSecurityPermissions.java
* - Start from latest included commit and include changes until the newest commit with care * - Start from latest included commit and include changes until the newest commit with care
@ -107,9 +107,8 @@ public class AppSecurityPermissions {
public Drawable loadGroupIcon(Context context, PackageManager pm) { public Drawable loadGroupIcon(Context context, PackageManager pm) {
if (icon != 0) { if (icon != 0) {
return (Build.VERSION.SDK_INT < 22) ? loadIcon(pm) : loadUnbadgedIcon(pm); return (Build.VERSION.SDK_INT < 22) ? loadIcon(pm) : loadUnbadgedIcon(pm);
} else {
return context.getDrawable(R.drawable.ic_perm_device_info);
} }
return context.getDrawable(R.drawable.ic_perm_device_info);
} }
public int flags() { public int flags() {
@ -413,7 +412,7 @@ public class AppSecurityPermissions {
final boolean isNormal = base == PermissionInfo.PROTECTION_NORMAL; final boolean isNormal = base == PermissionInfo.PROTECTION_NORMAL;
// TODO: do we want this in F-Droid? // TODO: do we want this in F-Droid?
// // We do not show normal permissions in the UI. // We do not show normal permissions in the UI.
//if (isNormal) { //if (isNormal) {
// return false; // return false;
//} //}

View File

@ -112,8 +112,8 @@ public class InstallConfirmActivity extends Activity implements OnCancelListener
findViewById(R.id.tabscontainer).setVisibility(View.GONE); findViewById(R.id.tabscontainer).setVisibility(View.GONE);
findViewById(R.id.divider).setVisibility(View.VISIBLE); findViewById(R.id.divider).setVisibility(View.VISIBLE);
} }
final int N = perms.getPermissionCount(AppSecurityPermissions.WHICH_ALL); final int n = perms.getPermissionCount(AppSecurityPermissions.WHICH_ALL);
if (N > 0) { if (n > 0) {
permVisible = true; permVisible = true;
LayoutInflater inflater = (LayoutInflater) getSystemService( LayoutInflater inflater = (LayoutInflater) getSystemService(
Context.LAYOUT_INFLATER_SERVICE); Context.LAYOUT_INFLATER_SERVICE);