ServiceManager --> StatsFrameworkInitializer

Bug: 149128236
Test: m
Change-Id: I6b506128b4990fa24d745da978608fe3d68a1d8f
This commit is contained in:
Muhammad Qureshi
2020-02-09 12:36:04 -08:00
parent cefc882d9c
commit 133efaa22f

View File

@@ -26,7 +26,7 @@ import android.annotation.SystemApi;
import android.content.Context;
import android.os.IStatsd;
import android.os.RemoteException;
import android.os.ServiceManager;
import android.os.StatsFrameworkInitializer;
import android.util.proto.ProtoOutputStream;
import com.android.internal.util.StatsdStatsLog;
@@ -180,7 +180,10 @@ public final class StatsLog {
if (sService != null) {
return sService;
}
sService = IStatsd.Stub.asInterface(ServiceManager.getService("stats"));
sService = IStatsd.Stub.asInterface(StatsFrameworkInitializer
.getStatsServiceManager()
.getStatsdServiceRegisterer()
.get());
return sService;
}