Pass context to ArtManagerLocal.

ART Services needs the context for:

1. Getting PowerManager and AppHibernationManager
2. Getting resource strings such as R.string.config_systemUi

Bug: 236954191
Test: adb shell pm art optimize-package -m speed-profile -f \
  com.google.android.youtube
Change-Id: I80ffebdcf6f19e8ef0384f1df5877a79a7bf7384
This commit is contained in:
Jiakai Zhang
2022-05-24 19:39:35 +01:00
parent 5b09eef209
commit 3abb09c7a5

View File

@@ -2201,7 +2201,7 @@ public final class SystemServer implements Dumpable {
Slog.e(TAG, "Failure starting HardwarePropertiesManagerService", e);
}
t.traceEnd();
if (!isWatch) {
t.traceBegin("StartTwilightService");
mSystemServiceManager.startService(TwilightService.class);
@@ -2709,7 +2709,7 @@ public final class SystemServer implements Dumpable {
t.traceEnd();
t.traceBegin("ArtManagerLocal");
LocalManagerRegistry.addManager(ArtManagerLocal.class, new ArtManagerLocal());
LocalManagerRegistry.addManager(ArtManagerLocal.class, new ArtManagerLocal(context));
t.traceEnd();
if (context.getPackageManager().hasSystemFeature(PackageManager.FEATURE_UWB)) {