Add SafetyNet logging if a certain broadcast is received by apps.

In case the broadcast intents "com.android.server.net.action.SNOOZE_WARNING"
or "com.android.server.net.action.SNOOZE_RAPID" are dispatched to apps,
then add a SafetyNet log.

Bug: 177931370
Test: manual
Change-Id: I65b2e96ff1230b2051dd1e5bd9c21e5ba3e1146a
Merged-In: I65b2e96ff1230b2051dd1e5bd9c21e5ba3e1146a
(cherry picked from commit a22e341ac2)
This commit is contained in:
Sudheer Shanka
2021-06-27 21:23:44 -07:00
parent 2e440eb0a8
commit ad79043436

View File

@@ -21010,6 +21010,15 @@ public class ActivityManagerService extends IActivityManager.Stub
return sticky;
}
// SafetyNet logging for b/177931370. If any process other than system_server tries to
// listen to this broadcast action, then log it.
if (callingPid != Process.myPid()) {
if (filter.hasAction("com.android.server.net.action.SNOOZE_WARNING")
|| filter.hasAction("com.android.server.net.action.SNOOZE_RAPID")) {
EventLog.writeEvent(0x534e4554, "177931370", callingUid, "");
}
}
synchronized (this) {
if (callerApp != null && (callerApp.thread == null
|| callerApp.thread.asBinder() != caller.asBinder())) {