536 } |
536 } |
537 |
537 |
538 /** |
538 /** |
539 * Adds application information to the header. |
539 * Adds application information to the header. |
540 */ |
540 */ |
541 protected void addAppInfo(InstallInfo aInstallInfo, boolean aFull) |
541 protected void addAppInfo(InstallInfo aInstallInfo, boolean aFullInfo, boolean aUpdateInfo) |
542 { |
542 { |
543 if (aInstallInfo == null) |
543 if (aInstallInfo == null) |
544 { |
544 { |
545 // Nothing to add. |
545 // Nothing to add. |
546 return; |
546 return; |
547 } |
547 } |
548 |
548 |
549 // Add suite name and version. |
549 // Add suite name and version. |
550 createAppInfoLabel( |
550 if (aUpdateInfo && aInstallInfo != null && |
551 InstallerUiTexts.get( |
551 aInstallInfo.getOldVersion() != null) |
552 InstallerUiTexts.SUITE_NAME_VERSION, |
552 { |
553 new String[] { aInstallInfo.getName(), |
553 createAppInfoLabel( |
554 aInstallInfo.getVersion() })); |
554 InstallerUiTexts.get( |
555 if (aFull) |
555 InstallerUiTexts.SUITE_NAME_VERSION_UPDATE, |
|
556 new String[] { aInstallInfo.getName(), |
|
557 aInstallInfo.getOldVersion(), |
|
558 aInstallInfo.getVersion()})); |
|
559 } |
|
560 else |
|
561 { |
|
562 createAppInfoLabel( |
|
563 InstallerUiTexts.get( |
|
564 InstallerUiTexts.SUITE_NAME_VERSION, |
|
565 new String[] { aInstallInfo.getName(), |
|
566 aInstallInfo.getVersion() })); |
|
567 } |
|
568 |
|
569 if (aFullInfo) |
556 { |
570 { |
557 // Add vendor. |
571 // Add vendor. |
558 createAppInfoLabel( |
572 createAppInfoLabel( |
559 InstallerUiTexts.get( |
573 InstallerUiTexts.get( |
560 InstallerUiTexts.SUITE_VENDOR, |
574 InstallerUiTexts.SUITE_VENDOR, |
585 InstallerUiTexts.get( |
599 InstallerUiTexts.get( |
586 InstallerUiTexts.SIZE_KB, |
600 InstallerUiTexts.SIZE_KB, |
587 new Object[] { new Integer((int)(1 + size/1024)) })); |
601 new Object[] { new Integer((int)(1 + size/1024)) })); |
588 } |
602 } |
589 } |
603 } |
590 if (aFull) |
604 if (aFullInfo) |
591 { |
605 { |
592 // Add application names. |
606 // Add application names. |
593 ApplicationInfo[] apps = aInstallInfo.getApplications(); |
607 ApplicationInfo[] apps = aInstallInfo.getApplications(); |
594 if (apps != null && apps.length > 0) |
608 if (apps != null && apps.length > 0) |
595 { |
609 { |