Add SafetyNet logging to Tvprovider

see
go/safetynet-logging
drive/open?id=1TQgBUkUUGYsiujLBn_4uzeUbwYdcguooHSwCzz0beTI

Test: N/A
Bug: 135269669
Change-Id: I73a62fdd33782de87aaf46e5392d186db296f52c
(cherry picked from commit 52ec984f862fcc76ee1a7590b753fb64390f5f3a)
(cherry picked from commit 1479ef8f05778813250a79dc8616f5a5c8652735)
(cherry picked from commit 929b2a554a61c06bc26c4736a95859d21b0062d7)
diff --git a/src/com/android/providers/tv/TvProvider.java b/src/com/android/providers/tv/TvProvider.java
index b324ba3..d57eb8b 100644
--- a/src/com/android/providers/tv/TvProvider.java
+++ b/src/com/android/providers/tv/TvProvider.java
@@ -1667,11 +1667,25 @@
                 // database.
                 value = "NULL AS " + DatabaseUtils.sqlEscapeString(columnName);
                 columnProjectionMap.put(columnName, value);
+
+                if (needEventLog(columnName)) {
+                    android.util.EventLog.writeEvent(0x534e4554, "135269669", -1, "");
+                }
             }
         }
         return columnProjectionMap;
     }
 
+    private boolean needEventLog(String columnName) {
+        for (int i = 0; i < columnName.length(); i++) {
+            char c = columnName.charAt(i);
+            if (!Character.isLetterOrDigit(c) && c != '_') {
+                return true;
+            }
+        }
+        return false;
+    }
+
     private void filterContentValues(ContentValues values, Map<String, String> projectionMap) {
         Iterator<String> iter = values.keySet().iterator();
         while (iter.hasNext()) {