Stats: updated the order of service registration

Stats need to be registered prior sensors service start

Bug: 183916090
Test: build, flash & boot
Change-Id: I4d6eb1adbb0d57e42489ec85829b777e8a27069c
This commit is contained in:
Vova Sharaienko
2021-03-29 23:10:39 +00:00
parent 293c279660
commit e785c01e0a
2 changed files with 16 additions and 9 deletions

View File

@@ -442,15 +442,15 @@ 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 sensor service. This is a blocking call and can take time.
*/
/** 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();
/**
@@ -1029,6 +1029,10 @@ 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");