Merge "[pm] fix loading progress race condition during incremental app migration" into main
This commit is contained in:
committed by
Android (Google) Code Review
commit
a5cb102c26
@@ -1195,8 +1195,11 @@ public class PackageSetting extends SettingBase implements PackageStateInternal
|
||||
}
|
||||
|
||||
public PackageSetting setLoadingProgress(float progress) {
|
||||
mLoadingProgress = progress;
|
||||
onChanged();
|
||||
// To prevent race conditions, we don't allow progress to ever go down
|
||||
if (mLoadingProgress < progress) {
|
||||
mLoadingProgress = progress;
|
||||
onChanged();
|
||||
}
|
||||
return this;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user