No need to call #updateRollbackLifetimeDurationInMillis (3/n)

No need to call #updateRollbackLifetimeDurationInMillis manually inside
reloadPersistedData. Also fix tests since #reloadPersistedData no longer
pulls DeviceConfig changes.

Bug: 147712943
Test: atest StagedRollbackTest RollbackTest
Change-Id: I7579d6c969117189e01e0767decd1faeaa811eb9
This commit is contained in:
JW Wang
2020-01-15 15:46:39 +08:00
parent c63c1dae52
commit 4ff9d08435
2 changed files with 0 additions and 7 deletions

View File

@@ -408,7 +408,6 @@ class RollbackManagerServiceImpl extends IRollbackManager.Stub {
CountDownLatch latch = new CountDownLatch(1);
getHandler().post(() -> {
updateRollbackLifetimeDurationInMillis();
synchronized (mLock) {
mRollbacks.clear();
mRollbacks.addAll(mRollbackStore.loadRollbacks());

View File

@@ -392,9 +392,6 @@ public class RollbackTest {
RollbackManager.PROPERTY_ROLLBACK_LIFETIME_MILLIS,
Long.toString(expirationTime), false /* makeDefault*/);
// Pull the new expiration time from DeviceConfig
rm.reloadPersistedData();
// Uninstall TestApp.A
Uninstall.packages(TestApp.A);
assertThat(InstallUtils.getInstalledVersion(TestApp.A)).isEqualTo(-1);
@@ -457,9 +454,6 @@ public class RollbackTest {
RollbackManager.PROPERTY_ROLLBACK_LIFETIME_MILLIS,
Long.toString(expirationTime), false /* makeDefault*/);
// Pull the new expiration time from DeviceConfig
rm.reloadPersistedData();
// Install app A with rollback enabled
Uninstall.packages(TestApp.A);
Install.single(TestApp.A1).commit();