Fix hidden API usages to alternative API usages

After moving the code to mainline module, all interactions from
platform should be via APIs or relevant util classes cloned and
jarjar'd within the module.

This change moves such usages to existing APIs or makes a module-utils
copy of such classes to be used independantly in the module.

Flag: build.release_ondevice_intelligence_module
Bug: 376427781
Change-Id: I5bc5fa5b7e2e2ba2899b4cbba536103d66a6aa19
diff --git a/services/proguard.flags b/services/proguard.flags
index 977bd19..0e1f68e 100644
--- a/services/proguard.flags
+++ b/services/proguard.flags
@@ -44,6 +44,9 @@
 -keep,allowoptimization,allowaccessmodification class com.android.server.input.NativeInputManagerService$NativeImpl { *; }
 -keep,allowoptimization,allowaccessmodification class com.android.server.ThreadPriorityBooster { *; }
 
+# allow invoking start-service using class name in both apex and services jar.
+-keep,allowoptimization,allowaccessmodification class com.android.server.ondeviceintelligence.OnDeviceIntelligenceManagerService { *; }
+
 # Keep all aconfig Flag class as they might be statically referenced by other packages
 # An merge or inlining could lead to missing dependencies that cause run time errors
 -keepclassmembernames class android.**.Flags, com.android.**.Flags { public *; }