Android JNI generation: Set JNI namespace in build files

This CL removes the use of the @JNINamespace annotation and instead
sets the correct JNI namespace in the build file.

Bug: webrtc:8278
Change-Id: Ia4490399e45a97d56b02c260fd80df4edfa092bf
Reviewed-on: https://webrtc-review.googlesource.com/76440
Commit-Queue: Magnus Jedvert <magjed@webrtc.org>
Reviewed-by: Sami Kalliomäki <sakal@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23299}
This commit is contained in:
Magnus Jedvert
2018-05-18 12:13:56 +02:00
committed by Commit Bot
parent 7e6fcea7de
commit c7da266cb8
72 changed files with 131 additions and 240 deletions

View File

@ -50,7 +50,7 @@ using ::testing::Return;
namespace webrtc {
namespace android_adm {
namespace jni {
// Number of callbacks (input or output) the tests waits for before we set
// an event indicating that the test was OK.
@ -1135,6 +1135,6 @@ TEST_F(AudioDeviceTest, DISABLED_MeasureLoopbackLatency) {
latency_audio_stream->PrintResults();
}
} // namespace android_adm
} // namespace jni
} // namespace webrtc

View File

@ -21,7 +21,7 @@ namespace {
TEST(JavaTypesTest, TestJavaToNativeStringMap) {
JNIEnv* env = AttachCurrentThreadIfNeeded();
ScopedJavaLocalRef<jobject> j_map =
Java_JavaTypesTestHelper_createTestStringMap(env);
jni::Java_JavaTypesTestHelper_createTestStringMap(env);
std::map<std::string, std::string> output = JavaToNativeStringMap(env, j_map);

View File

@ -61,7 +61,8 @@ TEST(PeerConnectionFactoryTest, NativeToJavaPeerConnectionFactory) {
JNIEnv* jni = AttachCurrentThreadIfNeeded();
RTC_LOG(INFO) << "Initializing java peer connection factory.";
Java_PeerConnectionFactoryInitializationHelper_initializeFactoryForTests(jni);
jni::Java_PeerConnectionFactoryInitializationHelper_initializeFactoryForTests(
jni);
RTC_LOG(INFO) << "Java peer connection factory initialized.";
// Create threads.

View File

@ -62,10 +62,10 @@ TEST(JavaVideoSourceTest, OnFrameCapturedFrameIsDeliveredToSink) {
false /* is_screencast */);
video_track_source->AddOrUpdateSink(&test_video_sink, rtc::VideoSinkWants());
Java_JavaVideoSourceTestHelper_startCapture(
jni::Java_JavaVideoSourceTestHelper_startCapture(
env, video_track_source->GetJavaVideoCapturerObserver(env),
true /* success */);
Java_JavaVideoSourceTestHelper_deliverFrame(
jni::Java_JavaVideoSourceTestHelper_deliverFrame(
env, video_track_source->GetJavaVideoCapturerObserver(env));
std::vector<VideoFrame> frames = test_video_sink.GetFrames();
@ -86,7 +86,7 @@ TEST(JavaVideoSourceTest, CapturerStartedSuccessStateBecomesLive) {
rtc::ThreadManager::Instance()->CurrentThread(),
false /* is_screencast */);
Java_JavaVideoSourceTestHelper_startCapture(
jni::Java_JavaVideoSourceTestHelper_startCapture(
env, video_track_source->GetJavaVideoCapturerObserver(env),
true /* success */);
@ -104,7 +104,7 @@ TEST(JavaVideoSourceTest, CapturerStartedFailureStateBecomesEnded) {
rtc::ThreadManager::Instance()->CurrentThread(),
false /* is_screencast */);
Java_JavaVideoSourceTestHelper_startCapture(
jni::Java_JavaVideoSourceTestHelper_startCapture(
env, video_track_source->GetJavaVideoCapturerObserver(env),
false /* success */);
@ -122,10 +122,10 @@ TEST(JavaVideoSourceTest, CapturerStoppedStateBecomesEnded) {
rtc::ThreadManager::Instance()->CurrentThread(),
false /* is_screencast */);
Java_JavaVideoSourceTestHelper_startCapture(
jni::Java_JavaVideoSourceTestHelper_startCapture(
env, video_track_source->GetJavaVideoCapturerObserver(env),
true /* success */);
Java_JavaVideoSourceTestHelper_stopCapture(
jni::Java_JavaVideoSourceTestHelper_stopCapture(
env, video_track_source->GetJavaVideoCapturerObserver(env));
EXPECT_EQ(VideoTrackSourceInterface::SourceState::kEnded,