summaryrefslogtreecommitdiffstats
path: root/libnativebridge
diff options
context:
space:
mode:
authorNarayan Kamath <narayan@google.com>2014-10-28 19:28:30 +0000
committerAndroid Git Automerger <android-git-automerger@android.com>2014-10-28 19:28:30 +0000
commit182f33db82641a7e5cc2bda2363204ad74d149e4 (patch)
tree235dfc96725bb8175ec1f25ddc70cead6be68c10 /libnativebridge
parent4de4e6defce30e7693cea04e9553ee3bb1e72f88 (diff)
parent8cf2ce1064847d5fed0ec728ef6e916e238767c0 (diff)
downloadcore-182f33db82641a7e5cc2bda2363204ad74d149e4.tar.gz
core-182f33db82641a7e5cc2bda2363204ad74d149e4.tar.bz2
core-182f33db82641a7e5cc2bda2363204ad74d149e4.zip
am 8cf2ce10: Merge "Don\'t allow SUPPORTED_ABIs to be set by the native bridge."
* commit '8cf2ce1064847d5fed0ec728ef6e916e238767c0': Don't allow SUPPORTED_ABIs to be set by the native bridge.
Diffstat (limited to 'libnativebridge')
-rw-r--r--libnativebridge/native_bridge.cc43
1 files changed, 0 insertions, 43 deletions
diff --git a/libnativebridge/native_bridge.cc b/libnativebridge/native_bridge.cc
index f8e1b330c..eab2de0e1 100644
--- a/libnativebridge/native_bridge.cc
+++ b/libnativebridge/native_bridge.cc
@@ -320,46 +320,6 @@ static void SetCpuAbi(JNIEnv* env, jclass build_class, const char* field, const
}
}
-static void SetSupportedAbis(JNIEnv* env, jclass build_class, const char* field,
- const char* *values, int32_t value_count) {
- if (value_count < 0) {
- return;
- }
- if (values == nullptr && value_count > 0) {
- ALOGW("More than zero values expected: %d.", value_count);
- return;
- }
-
- jfieldID field_id = env->GetStaticFieldID(build_class, field, "[Ljava/lang/String;");
- if (field_id != nullptr) {
- // Create the array.
- jobjectArray array = env->NewObjectArray(value_count, env->FindClass("java/lang/String"),
- nullptr);
- if (array == nullptr) {
- env->ExceptionClear();
- ALOGW("Could not create array.");
- return;
- }
-
- // Fill the array.
- for (int32_t i = 0; i < value_count; i++) {
- jstring str = env->NewStringUTF(values[i]);
- if (str == nullptr) {
- env->ExceptionClear();
- ALOGW("Could not create string %s.", values[i]);
- return;
- }
-
- env->SetObjectArrayElement(array, i, str);
- }
-
- env->SetStaticObjectField(build_class, field_id, array);
- } else {
- env->ExceptionClear();
- ALOGW("Could not find %s field.", field);
- }
-}
-
// Set up the environment for the bridged app.
static void SetupEnvironment(NativeBridgeCallbacks* callbacks, JNIEnv* env, const char* isa) {
// Need a JNIEnv* to do anything.
@@ -390,9 +350,6 @@ static void SetupEnvironment(NativeBridgeCallbacks* callbacks, JNIEnv* env, cons
if (bclass_id != nullptr) {
SetCpuAbi(env, bclass_id, "CPU_ABI", env_values->cpu_abi);
SetCpuAbi(env, bclass_id, "CPU_ABI2", env_values->cpu_abi2);
-
- SetSupportedAbis(env, bclass_id, "SUPPORTED_ABIS", env_values->supported_abis,
- env_values->abi_count);
} else {
// For example in a host test environment.
env->ExceptionClear();