Android: Add CalledByNative annotation interface
This annotation will be used to annotate Java classes that are
referenced from native code.
Bug: webrtc:8278
Change-Id: Icf020927d377ba04304ddbf92639e6ef174de22c
Reviewed-on: https://webrtc-review.googlesource.com/3300
Reviewed-by: Sami Kalliomäki <sakal@webrtc.org>
Commit-Queue: Magnus Jedvert <magjed@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#19951}
diff --git a/sdk/android/BUILD.gn b/sdk/android/BUILD.gn
index 21359cc..c30f047 100644
--- a/sdk/android/BUILD.gn
+++ b/sdk/android/BUILD.gn
@@ -434,6 +434,7 @@
"src/java/org/webrtc/AndroidVideoTrackSourceObserver.java",
"src/java/org/webrtc/BaseBitrateAdjuster.java",
"src/java/org/webrtc/BitrateAdjuster.java",
+ "src/java/org/webrtc/CalledByNative.java",
"src/java/org/webrtc/Camera1Session.java",
"src/java/org/webrtc/Camera2Session.java",
"src/java/org/webrtc/CameraCapturer.java",
diff --git a/sdk/android/src/java/org/webrtc/CalledByNative.java b/sdk/android/src/java/org/webrtc/CalledByNative.java
new file mode 100644
index 0000000..7e08328
--- /dev/null
+++ b/sdk/android/src/java/org/webrtc/CalledByNative.java
@@ -0,0 +1,24 @@
+/*
+ * Copyright 2017 The WebRTC project authors. All Rights Reserved.
+ *
+ * Use of this source code is governed by a BSD-style license
+ * that can be found in the LICENSE file in the root of the source
+ * tree. An additional intellectual property rights grant can be found
+ * in the file PATENTS. All contributing project authors may
+ * be found in the AUTHORS file in the root of the source tree.
+ */
+
+package org.webrtc;
+
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+
+/**
+ * @CalledByNative is used by the JNI generator to create the necessary JNI
+ * bindings and expose this method to native code.
+ */
+@Target(ElementType.METHOD)
+@Retention(RetentionPolicy.CLASS)
+@interface CalledByNative {}