am 5281b823: Merge change 9208 into donut

Merge commit '5281b823a046b6eb40f12aeb805462f7d58fdebe'

* commit '5281b823a046b6eb40f12aeb805462f7d58fdebe':
  Support packages with no license.
This commit is contained in:
Android (Google) Code Review
2009-07-30 16:06:58 -07:00
committed by Android Git Automerger

View File

@@ -293,10 +293,16 @@ final class UpdateChooserDialog extends Dialog {
// Automatically accept those with an empty license
for (Archive a : mNewToOldArchiveMap.keySet()) {
String license = a.getParentPackage().getLicense().trim();
String license = a.getParentPackage().getLicense();
if (license != null) {
license = license.trim();
if (license.length() == 0) {
mAccepted.add(a);
}
} else {
mAccepted.add(a);
}
}
// Fill the list with the replacement packages
@@ -453,8 +459,11 @@ final class UpdateChooserDialog extends Dialog {
sb.append("\n*** Archive Description:\n");
sb.append(a.getLongDescription()).append("\n");
String license = a.getParentPackage().getLicense();
if (license != null) {
sb.append("\n*** Package License:\n");
sb.append(a.getParentPackage().getLicense()).append("\n");
sb.append(license).append("\n");
}
mPackageText.setText(sb.toString());
}