Bug 1086693 - Part 2: Generate and build Android SDK JNI wrappers. r=gps

This commit is contained in:
Nick Alexander 2014-11-11 14:46:07 -06:00
parent c7d806f9fd
commit 268f13370d
7 changed files with 61 additions and 1 deletions

View File

@ -9,4 +9,4 @@ JAVA_CLASSPATH := $(ANDROID_SDK)/android.jar
# Include Android specific java flags, instead of what's in rules.mk. # Include Android specific java flags, instead of what's in rules.mk.
include $(topsrcdir)/config/android-common.mk include $(topsrcdir)/config/android-common.mk
libs:: annotationProcessors.jar export:: annotationProcessors.jar

View File

@ -141,6 +141,7 @@ ifeq (.,$(DEPTH))
# Interdependencies for parallel export. # Interdependencies for parallel export.
js/xpconnect/src/export: dom/bindings/export xpcom/xpidl/export js/xpconnect/src/export: dom/bindings/export xpcom/xpidl/export
accessible/xpcom/export: xpcom/xpidl/export accessible/xpcom/export: xpcom/xpidl/export
widget/android/bindings/export: build/annotationProcessors/export
ifdef ENABLE_CLANG_PLUGIN ifdef ENABLE_CLANG_PLUGIN
$(filter-out build/clang-plugin/%,$(compile_targets)): build/clang-plugin/target build/clang-plugin/tests/target $(filter-out build/clang-plugin/%,$(compile_targets)): build/clang-plugin/target build/clang-plugin/tests/target
build/clang-plugin/tests/target: build/clang-plugin/target build/clang-plugin/tests/target: build/clang-plugin/target

View File

@ -0,0 +1,26 @@
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
ANNOTATION_PROCESSOR_JAR_FILES := $(DEPTH)/build/annotationProcessors/annotationProcessors.jar
MediaCodec.cpp: $(ANDROID_SDK)/android.jar mediacodec-classes.txt
$(JAVA) -classpath $(ANNOTATION_PROCESSOR_JAR_FILES) org.mozilla.gecko.annotationProcessors.SDKProcessor $(ANDROID_SDK)/android.jar $(srcdir)/mediacodec-classes.txt $(CURDIR) MediaCodec
MediaCodec.h: MediaCodec.cpp ;
SurfaceTexture.cpp: $(ANDROID_SDK)/android.jar surfacetexture-classes.txt
$(JAVA) -classpath $(ANNOTATION_PROCESSOR_JAR_FILES) org.mozilla.gecko.annotationProcessors.SDKProcessor $(ANDROID_SDK)/android.jar $(srcdir)/surfacetexture-classes.txt $(CURDIR) SurfaceTexture
SurfaceTexture.h: SurfaceTexture.cpp ;
# We'd like these to be defined in a future GENERATED_EXPORTS list.
bindings_exports := \
MediaCodec.h \
SurfaceTexture.h \
$(NULL)
INSTALL_TARGETS += bindings_exports
bindings_exports_FILES := $(bindings_exports)
bindings_exports_DEST = $(DIST)/include
bindings_exports_TARGET := export

View File

@ -0,0 +1,3 @@
android.media.MediaCodec
android.media.MediaCodec$BufferInfo
android.media.MediaFormat

View File

@ -0,0 +1,24 @@
# -*- Mode: python; c-basic-offset: 4; indent-tabs-mode: nil; tab-width: 40 -*-
# vim: set filetype=python:
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
GENERATED_SOURCES += [
'MediaCodec.cpp',
'SurfaceTexture.cpp',
]
# We'd like to add these to a future GENERATED_EXPORTS list, but for now we mark
# them as generated here and manually install them in Makefile.in.
GENERATED_INCLUDES += [
'MediaCodec.h',
'SurfaceTexture.h',
]
FAIL_ON_WARNINGS = True
FINAL_LIBRARY = 'xul'
LOCAL_INCLUDES += [
'/widget/android',
]

View File

@ -0,0 +1,2 @@
android.graphics.SurfaceTexture
android.view.Surface

View File

@ -4,6 +4,10 @@
# License, v. 2.0. If a copy of the MPL was not distributed with this # License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/. # file, You can obtain one at http://mozilla.org/MPL/2.0/.
DIRS += [
'bindings',
]
XPIDL_SOURCES += [ XPIDL_SOURCES += [
'nsIAndroidBridge.idl', 'nsIAndroidBridge.idl',
] ]