Loading core/java/android/content/pm/IncrementalStatesInfo.java +10 −1 Original line number Diff line number Diff line Loading @@ -27,14 +27,18 @@ public class IncrementalStatesInfo implements Parcelable { private boolean mIsLoading; private float mProgress; public IncrementalStatesInfo(boolean isLoading, float progress) { private long mLoadingCompletedTime; public IncrementalStatesInfo(boolean isLoading, float progress, long loadingCompletedTime) { mIsLoading = isLoading; mProgress = progress; mLoadingCompletedTime = loadingCompletedTime; } private IncrementalStatesInfo(Parcel source) { mIsLoading = source.readBoolean(); mProgress = source.readFloat(); mLoadingCompletedTime = source.readLong(); } public boolean isLoading() { Loading @@ -45,6 +49,10 @@ public class IncrementalStatesInfo implements Parcelable { return mProgress; } public long getLoadingCompletedTime() { return mLoadingCompletedTime; } @Override public int describeContents() { return 0; Loading @@ -54,6 +62,7 @@ public class IncrementalStatesInfo implements Parcelable { public void writeToParcel(Parcel dest, int flags) { dest.writeBoolean(mIsLoading); dest.writeFloat(mProgress); dest.writeLong(mLoadingCompletedTime); } public static final @android.annotation.NonNull Creator<IncrementalStatesInfo> CREATOR = Loading services/core/java/com/android/server/pm/IncrementalProgressListener.java +2 −0 Original line number Diff line number Diff line Loading @@ -47,6 +47,8 @@ final class IncrementalProgressListener extends IPackageLoadingProgressCallback. state -> state.setLoadingProgress(progress)); // Only report the state change when loading state changes from loading to not if (Math.abs(1.0f - progress) < 0.00000001f) { mPm.commitPackageStateMutation(null, mPackageName, state -> state.setLoadingCompletedTime(System.currentTimeMillis())); // Unregister progress listener mPm.mIncrementalManager .unregisterLoadingProgressCallbacks(packageState.getPathString()); Loading services/core/java/com/android/server/pm/PackageManagerService.java +2 −1 Original line number Diff line number Diff line Loading @@ -6811,7 +6811,8 @@ public class PackageManagerService implements PackageSender, TestUtilityService if (ps == null) { return null; } return new IncrementalStatesInfo(ps.isLoading(), ps.getLoadingProgress()); return new IncrementalStatesInfo(ps.isLoading(), ps.getLoadingProgress(), ps.getLoadingCompletedTime()); } @Override Loading services/core/java/com/android/server/pm/PackageSetting.java +19 −2 File changed.Preview size limit exceeded, changes collapsed. Show changes services/core/java/com/android/server/pm/Settings.java +10 −5 Original line number Diff line number Diff line Loading @@ -2902,6 +2902,8 @@ public final class Settings implements Watchable, Snappable, ResilientAtomicFile serializer.attributeInt(null, "sharedUserId", pkg.getAppId()); } serializer.attributeFloat(null, "loadingProgress", pkg.getLoadingProgress()); serializer.attributeLongHex(null, "loadingCompletedTime", pkg.getLoadingCompletedTime()); writeUsesSdkLibLPw(serializer, pkg.getUsesSdkLibraries(), pkg.getUsesSdkLibrariesVersionsMajor()); Loading Loading @@ -2988,6 +2990,7 @@ public final class Settings implements Watchable, Snappable, ResilientAtomicFile serializer.attributeBoolean(null, "isLoading", true); } serializer.attributeFloat(null, "loadingProgress", pkg.getLoadingProgress()); serializer.attributeLongHex(null, "loadingCompletedTime", pkg.getLoadingCompletedTime()); serializer.attribute(null, "domainSetId", pkg.getDomainSetId().toString()); Loading Loading @@ -3687,9 +3690,6 @@ public final class Settings implements Watchable, Snappable, ResilientAtomicFile ps.setAppId(sharedUserAppId); ps.setSharedUserAppId(sharedUserAppId); } final float loadingProgress = parser.getAttributeFloat(null, "loadingProgress", 0); ps.setLoadingProgress(loadingProgress); int outerDepth = parser.getDepth(); int type; Loading Loading @@ -3760,6 +3760,7 @@ public final class Settings implements Watchable, Snappable, ResilientAtomicFile long versionCode = 0; boolean installedForceQueryable = false; float loadingProgress = 0; long loadingCompletedTime = 0; UUID domainSetId; try { name = parser.getAttributeValue(null, ATTR_NAME); Loading @@ -3777,6 +3778,7 @@ public final class Settings implements Watchable, Snappable, ResilientAtomicFile updateAvailable = parser.getAttributeBoolean(null, "updateAvailable", false); installedForceQueryable = parser.getAttributeBoolean(null, "forceQueryable", false); loadingProgress = parser.getAttributeFloat(null, "loadingProgress", 0); loadingCompletedTime = parser.getAttributeLongHex(null, "loadingCompletedTime", 0); if (primaryCpuAbiString == null && legacyCpuAbiString != null) { primaryCpuAbiString = legacyCpuAbiString; Loading Loading @@ -3939,7 +3941,8 @@ public final class Settings implements Watchable, Snappable, ResilientAtomicFile .setSecondaryCpuAbi(secondaryCpuAbiString) .setUpdateAvailable(updateAvailable) .setForceQueryableOverride(installedForceQueryable) .setLoadingProgress(loadingProgress); .setLoadingProgress(loadingProgress) .setLoadingCompletedTime(loadingCompletedTime); // Handle legacy string here for single-user mode final String enabledStr = parser.getAttributeValue(null, ATTR_ENABLED); if (enabledStr != null) { Loading Loading @@ -4900,9 +4903,11 @@ public final class Settings implements Watchable, Snappable, ResilientAtomicFile } pw.print(prefix); pw.print(" packageSource="); pw.println(ps.getInstallSource().mPackageSource); if (ps.isLoading()) { if (ps.isIncremental()) { pw.print(prefix); pw.println(" loadingProgress=" + (int) (ps.getLoadingProgress() * 100) + "%"); date.setTime(ps.getLoadingCompletedTime()); pw.print(prefix); pw.println(" loadingCompletedTime=" + sdf.format(date)); } if (ps.getVolumeUuid() != null) { pw.print(prefix); pw.print(" volumeUuid="); Loading Loading
core/java/android/content/pm/IncrementalStatesInfo.java +10 −1 Original line number Diff line number Diff line Loading @@ -27,14 +27,18 @@ public class IncrementalStatesInfo implements Parcelable { private boolean mIsLoading; private float mProgress; public IncrementalStatesInfo(boolean isLoading, float progress) { private long mLoadingCompletedTime; public IncrementalStatesInfo(boolean isLoading, float progress, long loadingCompletedTime) { mIsLoading = isLoading; mProgress = progress; mLoadingCompletedTime = loadingCompletedTime; } private IncrementalStatesInfo(Parcel source) { mIsLoading = source.readBoolean(); mProgress = source.readFloat(); mLoadingCompletedTime = source.readLong(); } public boolean isLoading() { Loading @@ -45,6 +49,10 @@ public class IncrementalStatesInfo implements Parcelable { return mProgress; } public long getLoadingCompletedTime() { return mLoadingCompletedTime; } @Override public int describeContents() { return 0; Loading @@ -54,6 +62,7 @@ public class IncrementalStatesInfo implements Parcelable { public void writeToParcel(Parcel dest, int flags) { dest.writeBoolean(mIsLoading); dest.writeFloat(mProgress); dest.writeLong(mLoadingCompletedTime); } public static final @android.annotation.NonNull Creator<IncrementalStatesInfo> CREATOR = Loading
services/core/java/com/android/server/pm/IncrementalProgressListener.java +2 −0 Original line number Diff line number Diff line Loading @@ -47,6 +47,8 @@ final class IncrementalProgressListener extends IPackageLoadingProgressCallback. state -> state.setLoadingProgress(progress)); // Only report the state change when loading state changes from loading to not if (Math.abs(1.0f - progress) < 0.00000001f) { mPm.commitPackageStateMutation(null, mPackageName, state -> state.setLoadingCompletedTime(System.currentTimeMillis())); // Unregister progress listener mPm.mIncrementalManager .unregisterLoadingProgressCallbacks(packageState.getPathString()); Loading
services/core/java/com/android/server/pm/PackageManagerService.java +2 −1 Original line number Diff line number Diff line Loading @@ -6811,7 +6811,8 @@ public class PackageManagerService implements PackageSender, TestUtilityService if (ps == null) { return null; } return new IncrementalStatesInfo(ps.isLoading(), ps.getLoadingProgress()); return new IncrementalStatesInfo(ps.isLoading(), ps.getLoadingProgress(), ps.getLoadingCompletedTime()); } @Override Loading
services/core/java/com/android/server/pm/PackageSetting.java +19 −2 File changed.Preview size limit exceeded, changes collapsed. Show changes
services/core/java/com/android/server/pm/Settings.java +10 −5 Original line number Diff line number Diff line Loading @@ -2902,6 +2902,8 @@ public final class Settings implements Watchable, Snappable, ResilientAtomicFile serializer.attributeInt(null, "sharedUserId", pkg.getAppId()); } serializer.attributeFloat(null, "loadingProgress", pkg.getLoadingProgress()); serializer.attributeLongHex(null, "loadingCompletedTime", pkg.getLoadingCompletedTime()); writeUsesSdkLibLPw(serializer, pkg.getUsesSdkLibraries(), pkg.getUsesSdkLibrariesVersionsMajor()); Loading Loading @@ -2988,6 +2990,7 @@ public final class Settings implements Watchable, Snappable, ResilientAtomicFile serializer.attributeBoolean(null, "isLoading", true); } serializer.attributeFloat(null, "loadingProgress", pkg.getLoadingProgress()); serializer.attributeLongHex(null, "loadingCompletedTime", pkg.getLoadingCompletedTime()); serializer.attribute(null, "domainSetId", pkg.getDomainSetId().toString()); Loading Loading @@ -3687,9 +3690,6 @@ public final class Settings implements Watchable, Snappable, ResilientAtomicFile ps.setAppId(sharedUserAppId); ps.setSharedUserAppId(sharedUserAppId); } final float loadingProgress = parser.getAttributeFloat(null, "loadingProgress", 0); ps.setLoadingProgress(loadingProgress); int outerDepth = parser.getDepth(); int type; Loading Loading @@ -3760,6 +3760,7 @@ public final class Settings implements Watchable, Snappable, ResilientAtomicFile long versionCode = 0; boolean installedForceQueryable = false; float loadingProgress = 0; long loadingCompletedTime = 0; UUID domainSetId; try { name = parser.getAttributeValue(null, ATTR_NAME); Loading @@ -3777,6 +3778,7 @@ public final class Settings implements Watchable, Snappable, ResilientAtomicFile updateAvailable = parser.getAttributeBoolean(null, "updateAvailable", false); installedForceQueryable = parser.getAttributeBoolean(null, "forceQueryable", false); loadingProgress = parser.getAttributeFloat(null, "loadingProgress", 0); loadingCompletedTime = parser.getAttributeLongHex(null, "loadingCompletedTime", 0); if (primaryCpuAbiString == null && legacyCpuAbiString != null) { primaryCpuAbiString = legacyCpuAbiString; Loading Loading @@ -3939,7 +3941,8 @@ public final class Settings implements Watchable, Snappable, ResilientAtomicFile .setSecondaryCpuAbi(secondaryCpuAbiString) .setUpdateAvailable(updateAvailable) .setForceQueryableOverride(installedForceQueryable) .setLoadingProgress(loadingProgress); .setLoadingProgress(loadingProgress) .setLoadingCompletedTime(loadingCompletedTime); // Handle legacy string here for single-user mode final String enabledStr = parser.getAttributeValue(null, ATTR_ENABLED); if (enabledStr != null) { Loading Loading @@ -4900,9 +4903,11 @@ public final class Settings implements Watchable, Snappable, ResilientAtomicFile } pw.print(prefix); pw.print(" packageSource="); pw.println(ps.getInstallSource().mPackageSource); if (ps.isLoading()) { if (ps.isIncremental()) { pw.print(prefix); pw.println(" loadingProgress=" + (int) (ps.getLoadingProgress() * 100) + "%"); date.setTime(ps.getLoadingCompletedTime()); pw.print(prefix); pw.println(" loadingCompletedTime=" + sdf.format(date)); } if (ps.getVolumeUuid() != null) { pw.print(prefix); pw.print(" volumeUuid="); Loading