diff options
author | Xavier Ducrohet <xav@android.com> | 2009-07-30 12:28:17 -0700 |
---|---|---|
committer | Xavier Ducrohet <xav@android.com> | 2009-07-30 12:28:17 -0700 |
commit | 50d8d3d56e2f83fc3d14cfd07abb22bdf780534b (patch) | |
tree | 0b8bc50be1f62c89963bd0cd8d92decbb4f64088 /sdkmanager | |
parent | f4454c2bde20cc3e2fc9a8e2beae2d2ae515e13c (diff) | |
download | sdk-50d8d3d56e2f83fc3d14cfd07abb22bdf780534b.zip sdk-50d8d3d56e2f83fc3d14cfd07abb22bdf780534b.tar.gz sdk-50d8d3d56e2f83fc3d14cfd07abb22bdf780534b.tar.bz2 |
Support packages with no license.
Diffstat (limited to 'sdkmanager')
-rwxr-xr-x | sdkmanager/libs/sdkuilib/src/com/android/sdkuilib/internal/repository/UpdateChooserDialog.java | 17 |
1 files changed, 13 insertions, 4 deletions
diff --git a/sdkmanager/libs/sdkuilib/src/com/android/sdkuilib/internal/repository/UpdateChooserDialog.java b/sdkmanager/libs/sdkuilib/src/com/android/sdkuilib/internal/repository/UpdateChooserDialog.java index c940e0d..94f68fb 100755 --- a/sdkmanager/libs/sdkuilib/src/com/android/sdkuilib/internal/repository/UpdateChooserDialog.java +++ b/sdkmanager/libs/sdkuilib/src/com/android/sdkuilib/internal/repository/UpdateChooserDialog.java @@ -293,8 +293,14 @@ final class UpdateChooserDialog extends Dialog { // Automatically accept those with an empty license
for (Archive a : mNewToOldArchiveMap.keySet()) {
- String license = a.getParentPackage().getLicense().trim();
- if (license.length() == 0) {
+
+ String license = a.getParentPackage().getLicense();
+ if (license != null) {
+ license = license.trim();
+ if (license.length() == 0) {
+ mAccepted.add(a);
+ }
+ } else {
mAccepted.add(a);
}
}
@@ -453,8 +459,11 @@ final class UpdateChooserDialog extends Dialog { sb.append("\n*** Archive Description:\n");
sb.append(a.getLongDescription()).append("\n");
- sb.append("\n*** Package License:\n");
- sb.append(a.getParentPackage().getLicense()).append("\n");
+ String license = a.getParentPackage().getLicense();
+ if (license != null) {
+ sb.append("\n*** Package License:\n");
+ sb.append(license).append("\n");
+ }
mPackageText.setText(sb.toString());
}
|