diff --git a/packages/DynamicSystemInstallationService/src/com/android/dynsystem/DynamicSystemInstallationService.java b/packages/DynamicSystemInstallationService/src/com/android/dynsystem/DynamicSystemInstallationService.java index ac27580118168..a4896cb2d8dce 100644 --- a/packages/DynamicSystemInstallationService/src/com/android/dynsystem/DynamicSystemInstallationService.java +++ b/packages/DynamicSystemInstallationService/src/com/android/dynsystem/DynamicSystemInstallationService.java @@ -211,10 +211,10 @@ public class DynamicSystemInstallationService extends Service @Override public void onProgressUpdate(InstallationAsyncTask.Progress progress) { - mCurrentPartitionName = progress.mPartitionName; - mCurrentPartitionSize = progress.mPartitionSize; - mCurrentPartitionInstalledSize = progress.mInstalledSize; - mNumInstalledPartitions = progress.mNumInstalledPartitions; + mCurrentPartitionName = progress.partitionName; + mCurrentPartitionSize = progress.partitionSize; + mCurrentPartitionInstalledSize = progress.installedSize; + mNumInstalledPartitions = progress.numInstalledPartitions; postStatus(STATUS_IN_PROGRESS, CAUSE_NOT_SPECIFIED, null); } diff --git a/packages/DynamicSystemInstallationService/src/com/android/dynsystem/InstallationAsyncTask.java b/packages/DynamicSystemInstallationService/src/com/android/dynsystem/InstallationAsyncTask.java index 4d31ce97e8b7d..ac73f35517d63 100644 --- a/packages/DynamicSystemInstallationService/src/com/android/dynsystem/InstallationAsyncTask.java +++ b/packages/DynamicSystemInstallationService/src/com/android/dynsystem/InstallationAsyncTask.java @@ -102,20 +102,16 @@ class InstallationAsyncTask extends AsyncTask progress.mInstalledSize + MIN_PROGRESS_TO_PUBLISH) { - progress.mInstalledSize = installedSize; + if (installedSize > progress.installedSize + MIN_PROGRESS_TO_PUBLISH) { + progress.installedSize = installedSize; publishProgress(progress); } @@ -357,7 +354,7 @@ class InstallationAsyncTask extends AsyncTask entries = mZipFile.entries(); - int numInstalledPartitions = 1; while (entries.hasMoreElements()) { ZipEntry entry = entries.nextElement(); - if (installImageFromAnEntry( - entry, mZipFile.getInputStream(entry), numInstalledPartitions)) { - numInstalledPartitions++; - } + installImageFromAnEntry(entry, mZipFile.getInputStream(entry)); if (isCancelled()) { break; @@ -400,8 +389,7 @@ class InstallationAsyncTask extends AsyncTask progress.mInstalledSize + MIN_PROGRESS_TO_PUBLISH) { - progress.mInstalledSize = installedSize; + if (installedSize > progress.installedSize + MIN_PROGRESS_TO_PUBLISH) { + progress.installedSize = installedSize; publishProgress(progress); } }