Commit ee0dfb65 authored by Zoltan Kuscsik's avatar Zoltan Kuscsik Committed by Uze Choi

Android RC: jar bundles correctly loaded

Fixing the issue when jar bundles are never gets loaded.

Change-Id: I0e068f39b95434a21c1481244a79a444659aa430
Signed-off-by: default avatarZoltan Kuscsik <kuscsik@gmail.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/17773Tested-by: default avatarjenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: default avatarPhil Coval <philippe.coval@osg.samsung.com>
Reviewed-by: default avatarUze Choi <uzchoi@samsung.com>
parent 55d77edd
......@@ -313,18 +313,27 @@ public class RcsResourceContainer implements RcsResourceContainerBundleAPI {
List<RcsBundleInfo> bundles = listBundles();
for(RcsBundleInfo bundleInfo : bundles){
if(bundleInfo.getID().equals(bundleId) && bundleInfo.getPath().endsWith(".apk")){
Log.d(TAG, "Have to start android bundle");
Log.d(TAG, "bundle-id: " + bundleInfo.getID() + ", " + bundleInfo.getPath());
if(bundleInfo.getPath().endsWith(".apk")){
startBundleFromStandaloneApp(bundleInfo);
}else if(bundleInfo.getID().equals(bundleId) &&
bundleInfo.getPath().endsWith(".jar")){ // load classes from library
startBundleFromJar(bundleInfo);
}
}else{
String fileName = bundleInfo.getPath();
String extension = fileName.substring(fileName.lastIndexOf(".") + 1, fileName.length());
//* Unknown bundle handle it on native level
if(!bundleInfo.getID().equals(bundleId)) {
nativeStartBundle(bundleId);
}
else
switch(extension) {
case "apk":
Log.d(TAG, "Starting android bundle from APK");
startBundleFromStandaloneApp(bundleInfo);
break;
case "jar":
Log.d(TAG, "Starting android bundle from jar file");
startBundleFromJar(bundleInfo);
break;
default:
nativeStartBundle(bundleId);
break;
}
}
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment