Skip to content

Commit e1de3f3

Browse files
Jean-Baptiste QueruAndroid Code Review
authored andcommitted
Merge "Fix crash by "adb shell pm list permissions -f|-s""
2 parents 6cbca10 + 1c3274c commit e1de3f3

File tree

1 file changed

+5
-3
lines changed
  • cmds/pm/src/com/android/commands/pm

1 file changed

+5
-3
lines changed

cmds/pm/src/com/android/commands/pm/Pm.java

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -341,9 +341,11 @@ private String loadText(PackageItemInfo pii, int res, CharSequence nonLocalized)
341341
if (nonLocalized != null) {
342342
return nonLocalized.toString();
343343
}
344-
Resources r = getResources(pii);
345-
if (r != null) {
346-
return r.getString(res);
344+
if (res != 0) {
345+
Resources r = getResources(pii);
346+
if (r != null) {
347+
return r.getString(res);
348+
}
347349
}
348350
return null;
349351
}

0 commit comments

Comments
 (0)