Merge "android.os.VintfObject: update for VNDK version format change."

This commit is contained in:
Treehugger Robot
2018-01-12 22:12:39 +00:00
committed by Gerrit Code Review
2 changed files with 4 additions and 4 deletions

View File

@@ -76,8 +76,8 @@ public class VintfObject {
/** /**
* @return a list of VNDK snapshots supported by the framework, as * @return a list of VNDK snapshots supported by the framework, as
* specified in framework manifest. For example, * specified in framework manifest. For example,
* [("25.0.5", ["libjpeg.so", "libbase.so"]), * [("27", ["libjpeg.so", "libbase.so"]),
* ("25.1.3", ["libjpeg.so", "libbase.so"])] * ("28", ["libjpeg.so", "libbase.so"])]
*/ */
public static native Map<String, String[]> getVndkSnapshots(); public static native Map<String, String[]> getVndkSnapshots();
} }

View File

@@ -146,8 +146,8 @@ static jobject android_os_VintfObject_getVndkSnapshots(JNIEnv* env, jclass) {
return nullptr; return nullptr;
} }
jobject jMap = env->NewObject(gHashMapClazz, gHashMapInit); jobject jMap = env->NewObject(gHashMapClazz, gHashMapInit);
for (const Vndk &vndk : manifest->vndks()) { for (const auto &vndk : manifest->vendorNdks()) {
std::string key = to_string(vndk.versionRange()); std::string key = vndk.version();
env->CallObjectMethod(jMap, gHashMapPut, env->CallObjectMethod(jMap, gHashMapPut,
env->NewStringUTF(key.c_str()), toJavaStringArray(env, vndk.libraries())); env->NewStringUTF(key.c_str()), toJavaStringArray(env, vndk.libraries()));
} }