Statsd broadcasts when it is alive 2

Continuation of ag/3508513.

Test: manually made sure the broadcast was sent
Bug: 70389379
Bug: 72450885

Change-Id: Ib49c5e967d3c8e31ef127347afa450ce8c5e170b
This commit is contained in:
Bookatz
2018-01-25 15:49:26 -08:00
parent a70703175c
commit 0eb58ae39d
2 changed files with 3 additions and 1 deletions

View File

@@ -580,6 +580,7 @@
<protected-broadcast android:name="android.app.action.TRANSFER_OWNERSHIP_COMPLETE" />
<protected-broadcast android:name="android.app.action.AFFILIATED_PROFILE_TRANSFER_OWNERSHIP_COMPLETE" />
<protected-broadcast android:name="android.app.action.DATA_SHARING_RESTRICTION_CHANGED" />
<protected-broadcast android:name="android.app.action.STATSD_STARTED" />
<!-- ====================================================================== -->
<!-- RUNTIME PERMISSIONS -->

View File

@@ -706,7 +706,8 @@ 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.sendBroadcast(new Intent(StatsManager.ACTION_STATSD_STARTED),
mContext.sendBroadcastAsUser(new Intent(StatsManager.ACTION_STATSD_STARTED),
UserHandle.SYSTEM,
android.Manifest.permission.DUMP);
}