Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 562df0e0 authored by Neil Fuller's avatar Neil Fuller
Browse files

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
Merged-In: Ib8cd3a41c625c6b442c0b9775108e4015ed020e2
(cherry picked from commit c9036140)
parent b755291e
Loading
Loading
Loading
Loading
+8 −4
Original line number Original line Diff line number Diff line
@@ -47,6 +47,7 @@ import java.util.Arrays;
import java.util.concurrent.Executor;
import java.util.concurrent.Executor;
import java.util.concurrent.atomic.AtomicBoolean;
import java.util.concurrent.atomic.AtomicBoolean;
import libcore.icu.ICU;
import libcore.icu.ICU;
import libcore.util.TimeZoneFinder;
import libcore.util.ZoneInfoDB;
import libcore.util.ZoneInfoDB;


import static android.app.timezone.RulesState.DISTRO_STATUS_INSTALLED;
import static android.app.timezone.RulesState.DISTRO_STATUS_INSTALLED;
@@ -479,9 +480,10 @@ public final class RulesManagerService extends IRulesManager.Stub {
                        case 'a': {
                        case 'a': {
                            // Report the active rules version (i.e. the rules in use by the current
                            // Report the active rules version (i.e. the rules in use by the current
                            // process).
                            // process).
                            pw.println("Active rules version (ICU, libcore): "
                            pw.println("Active rules version (ICU, ZoneInfoDB, TimeZoneFinder): "
                                    + ICU.getTZDataVersion() + ","
                                    + ICU.getTZDataVersion() + ","
                                    + ZoneInfoDB.getInstance().getVersion());
                                    + ZoneInfoDB.getInstance().getVersion() + ","
                                    + TimeZoneFinder.getInstance().getIanaVersion());
                            break;
                            break;
                        }
                        }
                        default: {
                        default: {
@@ -494,8 +496,10 @@ public final class RulesManagerService extends IRulesManager.Stub {
        }
        }


        pw.println("RulesManagerService state: " + toString());
        pw.println("RulesManagerService state: " + toString());
        pw.println("Active rules version (ICU, libcore): " + ICU.getTZDataVersion() + ","
        pw.println("Active rules version (ICU, ZoneInfoDB, TimeZoneFinder): "
                + ZoneInfoDB.getInstance().getVersion());
                + ICU.getTZDataVersion() + ","
                + ZoneInfoDB.getInstance().getVersion() + ","
                + TimeZoneFinder.getInstance().getIanaVersion());
        pw.println("Distro state: " + rulesState.toString());
        pw.println("Distro state: " + rulesState.toString());
        mPackageTracker.dump(pw);
        mPackageTracker.dump(pw);
    }
    }