STATSD_STARTED broadcast include background

Allow statsd to tell even receivers in the background
that it is running.

Test: manual
Change-Id: I4fe9620eaf846275ee995b90849bf789e78130fd
This commit is contained in:
Bookatz
2018-02-09 14:26:42 -08:00
parent 4f07fa4e74
commit 8178408358

View File

@@ -783,7 +783,9 @@ public class StatsCompanionService extends IStatsCompanionService.Stub {
enforceCallingPermission();
if (DEBUG) Slog.d(TAG, "learned that statsdReady");
sayHiToStatsd(); // tell statsd that we're ready too and link to it
mContext.sendBroadcastAsUser(new Intent(StatsManager.ACTION_STATSD_STARTED),
mContext.sendBroadcastAsUser(
new Intent(StatsManager.ACTION_STATSD_STARTED)
.addFlags(Intent.FLAG_RECEIVER_INCLUDE_BACKGROUND),
UserHandle.SYSTEM,
android.Manifest.permission.DUMP);
}