Merge "Add SafetyNet logging if a certain broadcast is received by apps." into qt-dev am: e8426090a6

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15301703

Change-Id: I56e45bdc455fe62f0f26a4e49b35deaab56206b0
This commit is contained in:
Sudheer Shanka
2021-08-11 02:56:07 +00:00
committed by Automerger Merge Worker

View File

@@ -14484,6 +14484,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())) {