Merge "Add hwbinder library" am: 49e2a9a612
am: 811027ede7
Change-Id: Idec0d080a65d96ff866969f47e9902e40e800fdf
This commit is contained in:
26
Android.mk
26
Android.mk
@@ -610,6 +610,32 @@ $(framework_module): | $(dir $(framework_module))framework-res.apk
|
|||||||
|
|
||||||
framework_built := $(call java-lib-deps,framework)
|
framework_built := $(call java-lib-deps,framework)
|
||||||
|
|
||||||
|
# HwBinder
|
||||||
|
# =======================================================
|
||||||
|
include $(CLEAR_VARS)
|
||||||
|
|
||||||
|
LOCAL_SRC_FILES := \
|
||||||
|
core/java/android/os/HidlSupport.java \
|
||||||
|
core/java/android/annotation/NonNull.java \
|
||||||
|
core/java/android/os/HwBinder.java \
|
||||||
|
core/java/android/os/HwBlob.java \
|
||||||
|
core/java/android/os/HwParcel.java \
|
||||||
|
core/java/android/os/IHwBinder.java \
|
||||||
|
core/java/android/os/IHwInterface.java \
|
||||||
|
core/java/android/os/DeadObjectException.java \
|
||||||
|
core/java/android/os/DeadSystemException.java \
|
||||||
|
core/java/android/os/RemoteException.java \
|
||||||
|
core/java/android/util/AndroidException.java \
|
||||||
|
|
||||||
|
LOCAL_NO_STANDARD_LIBRARIES := true
|
||||||
|
LOCAL_JAVA_LIBRARIES := core-oj core-libart
|
||||||
|
LOCAL_MODULE_TAGS := optional
|
||||||
|
LOCAL_MODULE := hwbinder
|
||||||
|
|
||||||
|
LOCAL_DX_FLAGS := --core-library
|
||||||
|
LOCAL_UNINSTALLABLE_MODULE := true
|
||||||
|
include $(BUILD_JAVA_LIBRARY)
|
||||||
|
|
||||||
# Copy AIDL files to be preprocessed and included in the SDK,
|
# Copy AIDL files to be preprocessed and included in the SDK,
|
||||||
# specified relative to the root of the build tree.
|
# specified relative to the root of the build tree.
|
||||||
# ============================================================
|
# ============================================================
|
||||||
|
|||||||
@@ -71,4 +71,13 @@ public abstract class HwBinder implements IHwBinder {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private long mNativeContext;
|
private long mNativeContext;
|
||||||
|
|
||||||
|
private static native void native_report_sysprop_change();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Notifies listeners that a system property has changed
|
||||||
|
*/
|
||||||
|
public static void reportSyspropChanged() {
|
||||||
|
native_report_sysprop_change();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -36,6 +36,7 @@
|
|||||||
#include <hwbinder/ProcessState.h>
|
#include <hwbinder/ProcessState.h>
|
||||||
#include <nativehelper/ScopedLocalRef.h>
|
#include <nativehelper/ScopedLocalRef.h>
|
||||||
#include <vintf/parse_string.h>
|
#include <vintf/parse_string.h>
|
||||||
|
#include <utils/misc.h>
|
||||||
|
|
||||||
#include "core_jni_helpers.h"
|
#include "core_jni_helpers.h"
|
||||||
|
|
||||||
@@ -405,6 +406,11 @@ void JHwBinder_native_joinRpcThreadpool() {
|
|||||||
IPCThreadState::self()->joinThreadPool();
|
IPCThreadState::self()->joinThreadPool();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void JHwBinder_report_sysprop_change(JNIEnv /**env*/, jobject /*clazz*/)
|
||||||
|
{
|
||||||
|
report_sysprop_change();
|
||||||
|
}
|
||||||
|
|
||||||
static JNINativeMethod gMethods[] = {
|
static JNINativeMethod gMethods[] = {
|
||||||
{ "native_init", "()J", (void *)JHwBinder_native_init },
|
{ "native_init", "()J", (void *)JHwBinder_native_init },
|
||||||
{ "native_setup", "()V", (void *)JHwBinder_native_setup },
|
{ "native_setup", "()V", (void *)JHwBinder_native_setup },
|
||||||
@@ -424,6 +430,9 @@ static JNINativeMethod gMethods[] = {
|
|||||||
|
|
||||||
{ "joinRpcThreadpool", "()V",
|
{ "joinRpcThreadpool", "()V",
|
||||||
(void *)JHwBinder_native_joinRpcThreadpool },
|
(void *)JHwBinder_native_joinRpcThreadpool },
|
||||||
|
|
||||||
|
{ "native_report_sysprop_change", "()V",
|
||||||
|
(void *)JHwBinder_report_sysprop_change },
|
||||||
};
|
};
|
||||||
|
|
||||||
namespace android {
|
namespace android {
|
||||||
|
|||||||
Reference in New Issue
Block a user