From c90361404a1560d60756e4199af04d25ef688e2c Mon Sep 17 00:00:00 2001 From: Neil Fuller Date: Wed, 4 Oct 2017 17:04:38 +0100 Subject: [PATCH] Add newly available version information to dumpsys The tzlookup.xml file now contains a rules version so we can output that from dumpsys timezone now too. That is used in xTS tests to confirm that the correct tzlookup.xml file is being used on device. Bug: 65575839 Test: PTS: run pts -m PtsTimeZoneTestCases Change-Id: Ib8cd3a41c625c6b442c0b9775108e4015ed020e2 --- .../android/server/timezone/RulesManagerService.java | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/services/core/java/com/android/server/timezone/RulesManagerService.java b/services/core/java/com/android/server/timezone/RulesManagerService.java index 6824a597a5f8a..52b49baf10737 100644 --- a/services/core/java/com/android/server/timezone/RulesManagerService.java +++ b/services/core/java/com/android/server/timezone/RulesManagerService.java @@ -47,6 +47,7 @@ import java.util.Arrays; import java.util.concurrent.Executor; import java.util.concurrent.atomic.AtomicBoolean; import libcore.icu.ICU; +import libcore.util.TimeZoneFinder; import libcore.util.ZoneInfoDB; import static android.app.timezone.RulesState.DISTRO_STATUS_INSTALLED; @@ -479,9 +480,10 @@ public final class RulesManagerService extends IRulesManager.Stub { case 'a': { // Report the active rules version (i.e. the rules in use by the current // process). - pw.println("Active rules version (ICU, libcore): " + pw.println("Active rules version (ICU, ZoneInfoDB, TimeZoneFinder): " + ICU.getTZDataVersion() + "," - + ZoneInfoDB.getInstance().getVersion()); + + ZoneInfoDB.getInstance().getVersion() + "," + + TimeZoneFinder.getInstance().getIanaVersion()); break; } default: { @@ -494,8 +496,10 @@ public final class RulesManagerService extends IRulesManager.Stub { } pw.println("RulesManagerService state: " + toString()); - pw.println("Active rules version (ICU, libcore): " + ICU.getTZDataVersion() + "," - + ZoneInfoDB.getInstance().getVersion()); + pw.println("Active rules version (ICU, ZoneInfoDB, TimeZoneFinder): " + + ICU.getTZDataVersion() + "," + + ZoneInfoDB.getInstance().getVersion() + "," + + TimeZoneFinder.getInstance().getIanaVersion()); pw.println("Distro state: " + rulesState.toString()); mPackageTracker.dump(pw); }