aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLeon Scroggins III <scroggo@google.com>2018-11-27 14:25:28 -0800
committerandroid-build-merger <android-build-merger@google.com>2018-11-27 14:25:28 -0800
commit1601e9b8cf355737798df1bd8d2d975413d64e0d (patch)
tree454f0ce3f22f7d3e798eeac488c1ddc8a71ba39a
parente7f42ed091327139e2f07190113f3ea87dff9f14 (diff)
parent61e27c1a33d67a71b6a58c0f7318810bb48cffc8 (diff)
downloadskia-1601e9b8cf355737798df1bd8d2d975413d64e0d.tar.gz
RESTRICT AUTOMERGE: Add SkAndroidFrameworkUtils::SafetyNetLog am: b9305bf775
am: 61e27c1a33 Change-Id: I2ccdad7e03cfc1b36d5ebbec42975fe6616d1c88
-rw-r--r--Android.bp1
-rw-r--r--include/android/SkAndroidFrameworkUtils.h25
-rw-r--r--src/android/SkAndroidFrameworkUtils.cpp19
3 files changed, 45 insertions, 0 deletions
diff --git a/Android.bp b/Android.bp
index f06be4be0f..5d15cf5fc4 100644
--- a/Android.bp
+++ b/Android.bp
@@ -70,6 +70,7 @@ cc_library {
],
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 0000000000..abe959983b
--- /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 0000000000..968b7b7d08
--- /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
+