Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit e3a5d8b8 authored by Charles Chen's avatar Charles Chen
Browse files

Add SafetyNet log

Bug: 162627132
Test: adb logcat -b events
Change-Id: I21044c16c5e072c5acc46509dd9b888e83544d05
parent fa817ade
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -83,6 +83,7 @@ import android.os.UserHandle;
import android.os.UserManager;
import android.provider.Settings;
import android.text.TextUtils;
import android.util.EventLog;
import android.util.IntArray;
import android.util.Pair;
import android.util.Slog;
@@ -2176,6 +2177,8 @@ public final class DisplayManagerService extends SystemService {

            if (callingUid != Process.SYSTEM_UID && (flags & VIRTUAL_DISPLAY_FLAG_TRUSTED) != 0) {
                if (!checkCallingPermission(ADD_TRUSTED_DISPLAY, "createVirtualDisplay()")) {
                    EventLog.writeEvent(0x534e4554, "162627132", callingUid,
                            "Attempt to create a trusted display without holding permission!");
                    throw new SecurityException("Requires ADD_TRUSTED_DISPLAY permission to "
                            + "create a trusted virtual display.");
                }