mirror of
https://github.com/apache/cordova-android.git
synced 2025-03-28 18:02:44 +08:00
CB-5080 Find resources in a way that works with aapt's --rename-manifest-package
This commit is contained in:
parent
1316578ba3
commit
16de12a3ba
@ -68,7 +68,7 @@ public class Config {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
int id = action.getResources().getIdentifier("config", "xml", action.getPackageName());
|
int id = action.getResources().getIdentifier("config", "xml", action.getClass().getPackage().getName());
|
||||||
if (id == 0) {
|
if (id == 0) {
|
||||||
id = action.getResources().getIdentifier("cordova", "xml", action.getPackageName());
|
id = action.getResources().getIdentifier("cordova", "xml", action.getPackageName());
|
||||||
LOG.i("CordovaLog", "config.xml missing, reverting to cordova.xml");
|
LOG.i("CordovaLog", "config.xml missing, reverting to cordova.xml");
|
||||||
@ -124,7 +124,7 @@ public class Config {
|
|||||||
{
|
{
|
||||||
value = "splash";
|
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);
|
action.getIntent().putExtra(name, resource);
|
||||||
}
|
}
|
||||||
|
@ -109,7 +109,7 @@ public class PluginManager {
|
|||||||
* Load plugins from res/xml/config.xml
|
* Load plugins from res/xml/config.xml
|
||||||
*/
|
*/
|
||||||
public void loadPlugins() {
|
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) {
|
if (id == 0) {
|
||||||
this.pluginConfigurationMissing();
|
this.pluginConfigurationMissing();
|
||||||
//We have the error, we need to exit without crashing!
|
//We have the error, we need to exit without crashing!
|
||||||
|
Loading…
x
Reference in New Issue
Block a user