diff options
author | Scott Lobdell <slobdell@google.com> | 2021-04-23 22:36:54 +0000 |
---|---|---|
committer | Scott Lobdell <slobdell@google.com> | 2021-04-23 22:36:54 +0000 |
commit | 81abbc1d7858f29d3344ff6f1702ece80eab8341 (patch) | |
tree | b06d90c8277a04e4f8156d9b20d1611a974156e0 /services/java/com/android | |
parent | 857ef130fbeed8d0eb46cc1bfc9f75138f11c4e6 (diff) | |
parent | bd33c1d7942f5aad3e313cbd447056b720d1149b (diff) |
Merge SP1A.210412.001
Change-Id: I0e1c2f5679d5f721cd605b7da785959763311698
Diffstat (limited to 'services/java/com/android')
-rw-r--r-- | services/java/com/android/server/SystemServer.java | 28 |
1 files changed, 24 insertions, 4 deletions
diff --git a/services/java/com/android/server/SystemServer.java b/services/java/com/android/server/SystemServer.java index 0543f89834ea..1c3f77cea1c0 100644 --- a/services/java/com/android/server/SystemServer.java +++ b/services/java/com/android/server/SystemServer.java @@ -171,6 +171,7 @@ import com.android.server.policy.role.RoleServicePlatformHelperImpl; import com.android.server.power.PowerManagerService; import com.android.server.power.ShutdownThread; import com.android.server.power.ThermalManagerService; +import com.android.server.power.hint.HintManagerService; import com.android.server.powerstats.PowerStatsService; import com.android.server.profcollect.ProfcollectForwardingService; import com.android.server.recoverysystem.RecoverySystemService; @@ -446,16 +447,21 @@ public final class SystemServer implements Dumpable { private final SystemServerDumper mDumper = new SystemServerDumper(); - /** * The pending WTF to be logged into dropbox. */ private static LinkedList<Pair<String, ApplicationErrorReport.CrashInfo>> sPendingWtfs; + /** Start the IStats services. This is a blocking call and can take time. */ + private static native void startIStatsService(); + + /** Start the sensor service. This is a blocking call and can take time. */ + private static native void startSensorService(); + /** - * Start the sensor service. This is a blocking call and can take time. + * Start the memtrack proxy service. */ - private static native void startSensorService(); + private static native void startMemtrackProxyService(); /** * Start all HIDL services that are run inside the system server. This may take some time. @@ -1028,6 +1034,16 @@ public final class SystemServer implements Dumpable { mSystemServiceManager.startService(PowerStatsService.class); t.traceEnd(); + t.traceBegin("StartIStatsService"); + startIStatsService(); + t.traceEnd(); + + // Start MemtrackProxyService before ActivityManager, so that early calls + // to Memtrack::getMemory() don't fail. + t.traceBegin("MemtrackProxyService"); + startMemtrackProxyService(); + t.traceEnd(); + // Activity manager runs the show. t.traceBegin("StartActivityManager"); // TODO: Might need to move after migration to WM. @@ -1063,6 +1079,10 @@ public final class SystemServer implements Dumpable { mSystemServiceManager.startService(ThermalManagerService.class); t.traceEnd(); + t.traceBegin("StartHintManager"); + mSystemServiceManager.startService(HintManagerService.class); + t.traceEnd(); + // Now that the power manager has been started, let the activity manager // initialize power management features. t.traceBegin("InitPowerManagement"); @@ -2723,7 +2743,7 @@ public final class SystemServer implements Dumpable { t.traceBegin("RegisterAppOpsPolicy"); try { - mActivityManagerService.setAppOpsPolicy(new AppOpsPolicy()); + mActivityManagerService.setAppOpsPolicy(new AppOpsPolicy(mSystemContext)); } catch (Throwable e) { reportWtf("registering app ops policy", e); } |