From 16de12a3ba3c0ed8cfa15e9c9d7d68d384d178bb Mon Sep 17 00:00:00 2001 From: Andrew Grieve Date: Tue, 15 Oct 2013 12:17:14 -0400 Subject: [PATCH] CB-5080 Find resources in a way that works with aapt's --rename-manifest-package --- framework/src/org/apache/cordova/Config.java | 4 ++-- framework/src/org/apache/cordova/PluginManager.java | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/framework/src/org/apache/cordova/Config.java b/framework/src/org/apache/cordova/Config.java index 716b7952..32958a85 100644 --- a/framework/src/org/apache/cordova/Config.java +++ b/framework/src/org/apache/cordova/Config.java @@ -68,7 +68,7 @@ public class Config { return; } - int id = action.getResources().getIdentifier("config", "xml", action.getPackageName()); + int id = action.getResources().getIdentifier("config", "xml", action.getClass().getPackage().getName()); if (id == 0) { id = action.getResources().getIdentifier("cordova", "xml", action.getPackageName()); LOG.i("CordovaLog", "config.xml missing, reverting to cordova.xml"); @@ -124,7 +124,7 @@ public class Config { { value = "splash"; } - resource = action.getResources().getIdentifier(value, "drawable", action.getPackageName()); + resource = action.getResources().getIdentifier(value, "drawable", action.getClass().getPackage().getName()); action.getIntent().putExtra(name, resource); } diff --git a/framework/src/org/apache/cordova/PluginManager.java b/framework/src/org/apache/cordova/PluginManager.java index 33a6f22f..514fa58e 100755 --- a/framework/src/org/apache/cordova/PluginManager.java +++ b/framework/src/org/apache/cordova/PluginManager.java @@ -109,7 +109,7 @@ public class PluginManager { * Load plugins from res/xml/config.xml */ public void loadPlugins() { - int id = this.ctx.getActivity().getResources().getIdentifier("config", "xml", this.ctx.getActivity().getPackageName()); + int id = this.ctx.getActivity().getResources().getIdentifier("config", "xml", this.ctx.getActivity().getClass().getPackage().getName()); if (id == 0) { this.pluginConfigurationMissing(); //We have the error, we need to exit without crashing!