Add a service for reporting runtime debug info

Add a service for reporting runtime debug info via dumpsys.

With expected OEM customization / module versions in play
it makes sense to have runtime and associated "core library"
information in bug reports. The dumpsys information can also
be used from from host-side tests.

Bug: 119026403
Bug: 118242715
Test: adb shell dumpsys runtimeinfo
Change-Id: I62637a1c8bfd65d5de9b3e47b8700ead4bc314f2
diff --git a/services/java/com/android/server/SystemServer.java b/services/java/com/android/server/SystemServer.java
index 439f313..80b0e6f 100644
--- a/services/java/com/android/server/SystemServer.java
+++ b/services/java/com/android/server/SystemServer.java
@@ -1419,6 +1419,14 @@
             }
             traceEnd();
 
+            traceBeginAndSlog("RuntimeService");
+            try {
+                ServiceManager.addService("runtime", new RuntimeService(context));
+            } catch (Throwable e) {
+                reportWtf("starting RuntimeService", e);
+            }
+            traceEnd();
+
             // timezone.RulesManagerService will prevent a device starting up if the chain of trust
             // required for safe time zone updates might be broken. RuleManagerService cannot do
             // this check when mOnlyCore == true, so we don't enable the service in this case.