[android] bindings for aggregated cluster properties (#15425)

* [android] bindings for aggregated cluster properties

* [android] change the parameter type for adding clusterProperty

* [android] add changelog

* remove extra emplty line
This commit is contained in:
zmiao
2019-08-22 18:54:31 +03:00
committed by GitHub
parent 4a5475b1c6
commit 2a8359b028
9 changed files with 92 additions and 5 deletions

View File

@@ -63,6 +63,12 @@ namespace android {
return Value(env, jni::Local<jni::Object<>>(env, member));
}
Value Value::keyArray() const{
jni::jobject* set = jni::CallMethod<jni::jobject*>(env, value.get(), *java::Map::keySetMethodId);
jni::jobject* array = jni::CallMethod<jni::jobject*>(env, set, *java::Set::toArrayMethodId);
return Value(env, jni::Local<jni::Object<>>(env, array));
}
int Value::getLength() const {
auto array = (jni::jarray<jni::jobject>*) value.get();
return jni::GetArrayLength(env, *array);