- try {
- Set<String> resourcesList = new HashSet<String>();
- String[] resources = context.getResources().getStringArray(resourcesListResId);
- for (String resource : resources) {
- resourcesList.add(resource);
+ Set<String> resourcesList = new HashSet<String>();
+ if (!context.getPackageName().equals(
+ context.getApplicationContext().getPackageName())) {
+ try {
+ for (String resource : assets.list("")) {
+ resourcesList.add(resource);
+ }
+ } catch (IOException e){}
+ }
+ if (resourcesListResId != 0) {
+ try {
+ String[] resources = context.getResources().getStringArray(resourcesListResId);
+ for (String resource : resources) {
+ resourcesList.add(resource);
+ }
+ } catch (NotFoundException e) {
+ Log.w(TAG, "R.array." + XWALK_RESOURCES_LIST_RES_NAME + " can't be found.");