Loading services/core/java/com/android/server/pm/PackageInstallerSession.java +5 −4 Original line number Original line Diff line number Diff line Loading @@ -1265,12 +1265,13 @@ public class PackageInstallerSession extends IPackageInstallerSession.Stub { @GuardedBy("mProgressLock") @GuardedBy("mProgressLock") private void computeProgressLocked(boolean forcePublish) { private void computeProgressLocked(boolean forcePublish) { if (!mCommitted) { if (!isIncrementalInstallation() || !mCommitted) { mProgress = MathUtils.constrain(mClientProgress * 0.8f, 0f, 0.8f) mProgress = MathUtils.constrain(mClientProgress * 0.8f, 0f, 0.8f) + MathUtils.constrain(mInternalProgress * 0.2f, 0f, 0.2f); + MathUtils.constrain(mInternalProgress * 0.2f, 0f, 0.2f); } else { } else { // For incremental install, continue to publish incremental progress during committing. // For incremental, publish regular install progress before the session is committed, if (isIncrementalInstallation() && (mIncrementalProgress - mProgress) >= 0.01) { // but publish incremental progress afterwards. if (mIncrementalProgress - mProgress >= 0.01) { // It takes some time for data loader to write to incremental file system, so at the // It takes some time for data loader to write to incremental file system, so at the // beginning of the commit, the incremental progress might be very small. // beginning of the commit, the incremental progress might be very small. // Wait till the incremental progress is larger than what's already displayed. // Wait till the incremental progress is larger than what's already displayed. Loading @@ -1279,7 +1280,7 @@ public class PackageInstallerSession extends IPackageInstallerSession.Stub { } } } } // Only publish when meaningful change // Only publish meaningful progress changes. if (forcePublish || (mProgress - mReportedProgress) >= 0.01) { if (forcePublish || (mProgress - mReportedProgress) >= 0.01) { mReportedProgress = mProgress; mReportedProgress = mProgress; mCallback.onSessionProgressChanged(this, mProgress); mCallback.onSessionProgressChanged(this, mProgress); Loading Loading
services/core/java/com/android/server/pm/PackageInstallerSession.java +5 −4 Original line number Original line Diff line number Diff line Loading @@ -1265,12 +1265,13 @@ public class PackageInstallerSession extends IPackageInstallerSession.Stub { @GuardedBy("mProgressLock") @GuardedBy("mProgressLock") private void computeProgressLocked(boolean forcePublish) { private void computeProgressLocked(boolean forcePublish) { if (!mCommitted) { if (!isIncrementalInstallation() || !mCommitted) { mProgress = MathUtils.constrain(mClientProgress * 0.8f, 0f, 0.8f) mProgress = MathUtils.constrain(mClientProgress * 0.8f, 0f, 0.8f) + MathUtils.constrain(mInternalProgress * 0.2f, 0f, 0.2f); + MathUtils.constrain(mInternalProgress * 0.2f, 0f, 0.2f); } else { } else { // For incremental install, continue to publish incremental progress during committing. // For incremental, publish regular install progress before the session is committed, if (isIncrementalInstallation() && (mIncrementalProgress - mProgress) >= 0.01) { // but publish incremental progress afterwards. if (mIncrementalProgress - mProgress >= 0.01) { // It takes some time for data loader to write to incremental file system, so at the // It takes some time for data loader to write to incremental file system, so at the // beginning of the commit, the incremental progress might be very small. // beginning of the commit, the incremental progress might be very small. // Wait till the incremental progress is larger than what's already displayed. // Wait till the incremental progress is larger than what's already displayed. Loading @@ -1279,7 +1280,7 @@ public class PackageInstallerSession extends IPackageInstallerSession.Stub { } } } } // Only publish when meaningful change // Only publish meaningful progress changes. if (forcePublish || (mProgress - mReportedProgress) >= 0.01) { if (forcePublish || (mProgress - mReportedProgress) >= 0.01) { mReportedProgress = mProgress; mReportedProgress = mProgress; mCallback.onSessionProgressChanged(this, mProgress); mCallback.onSessionProgressChanged(this, mProgress); Loading