RESTRICT AUTOMERGE: Add SkAndroidFrameworkUtils::SafetyNetLog

Cherry-picked from upstream (minus SkPngCodec-specific
code):
https://skia-review.googlesource.com/c/skia/+/170354

Bug: 117838472
Test: Iae4d7f393c892111b12282c5eae31d79912721f9
Change-Id: I463f8b2c11c07098e9ec24448f66fcafcf6cd76b
(cherry picked from commit b9305bf7754242a7a709133fdfbef6528c8e4797)
diff --git a/Android.bp b/Android.bp
index f06be4b..5d15cf5 100644
--- a/Android.bp
+++ b/Android.bp
@@ -70,6 +70,7 @@
     ],
 
     srcs: [
+        "src/android/SkAndroidFrameworkUtils.cpp",
         "src/android/SkBitmapRegionCodec.cpp",
         "src/android/SkBitmapRegionDecoder.cpp",
         "src/c/sk_effects.cpp",
diff --git a/include/android/SkAndroidFrameworkUtils.h b/include/android/SkAndroidFrameworkUtils.h
new file mode 100644
index 0000000..abe9599
--- /dev/null
+++ b/include/android/SkAndroidFrameworkUtils.h
@@ -0,0 +1,25 @@
+/*
+ * Copyright 2017 Google Inc.
+ *
+ * Use of this source code is governed by a BSD-style license that can be
+ * found in the LICENSE file.
+ */
+
+#ifndef SkAndroidFrameworkUtils_DEFINED
+#define SkAndroidFrameworkUtils_DEFINED
+
+#include "SkTypes.h"
+
+#ifdef SK_BUILD_FOR_ANDROID_FRAMEWORK
+
+/**
+ *  SkAndroidFrameworkUtils expose private APIs used only by Android framework.
+ */
+class SkAndroidFrameworkUtils {
+public:
+    static void SafetyNetLog(const char*);
+};
+
+#endif // SK_BUILD_FOR_ANDROID_FRAMEWORK
+
+#endif // SkAndroidFrameworkUtils_DEFINED
diff --git a/src/android/SkAndroidFrameworkUtils.cpp b/src/android/SkAndroidFrameworkUtils.cpp
new file mode 100644
index 0000000..968b7b7
--- /dev/null
+++ b/src/android/SkAndroidFrameworkUtils.cpp
@@ -0,0 +1,19 @@
+/*
+ * Copyright 2017 Google Inc.
+ *
+ * Use of this source code is governed by a BSD-style license that can be
+ * found in the LICENSE file.
+ */
+
+#include "SkAndroidFrameworkUtils.h"
+
+#ifdef SK_BUILD_FOR_ANDROID_FRAMEWORK
+
+#include <log/log.h>
+
+void SkAndroidFrameworkUtils::SafetyNetLog(const char* bugNumber) {
+    android_errorWriteLog(0x534e4554, bugNumber);
+}
+
+#endif // SK_BUILD_FOR_ANDROID_FRAMEWORK
+