Track TimeZoneDistroInstaller method changes
The TimeZoneDistroInstaller now takes a TimeZoneDistro object
not bytes, which will help to hide whether the distro is in memory
or in storage. See the associated libcore change for details.
To run tests:
make -j30 FrameworksServicesTests
adb install -r -g
"out/target/product/angler/data/app/FrameworksServicesTests/FrameworksServicesTests.apk"
adb shell am instrument -e package com.android.server.timezone -w
com.android.frameworks.servicestests \
"com.android.frameworks.servicestests/android.support.test.runner.AndroidJUnitRunner"
Test: See above.
Bug: 31008728
Change-Id: Ieead1bb87b9ae196abab93342ba5c5747ca45116
diff --git a/services/core/java/com/android/server/timezone/RulesManagerService.java b/services/core/java/com/android/server/timezone/RulesManagerService.java
index bbb7782..58bdeb9 100644
--- a/services/core/java/com/android/server/timezone/RulesManagerService.java
+++ b/services/core/java/com/android/server/timezone/RulesManagerService.java
@@ -20,6 +20,7 @@
import com.android.server.SystemService;
import com.android.timezone.distro.DistroException;
import com.android.timezone.distro.DistroVersion;
+import com.android.timezone.distro.TimeZoneDistro;
import com.android.timezone.distro.StagedDistroOperation;
import android.app.timezone.Callback;
@@ -224,7 +225,8 @@
try {
byte[] distroBytes =
RulesManagerService.this.mFileDescriptorHelper.readFully(mTimeZoneDistro);
- int installerResult = mInstaller.stageInstallWithErrorCode(distroBytes);
+ TimeZoneDistro distro = new TimeZoneDistro(distroBytes);
+ int installerResult = mInstaller.stageInstallWithErrorCode(distro);
int resultCode = mapInstallerResultToApiCode(installerResult);
sendFinishedStatus(mCallback, resultCode);