diff --git a/src/main/java/org/cobaltians/cobalt/Cobalt.java b/src/main/java/org/cobaltians/cobalt/Cobalt.java index 8936a33..aef0e86 100644 --- a/src/main/java/org/cobaltians/cobalt/Cobalt.java +++ b/src/main/java/org/cobaltians/cobalt/Cobalt.java @@ -86,7 +86,7 @@ public class Cobalt { * CONFIGURATION FILE **********************************************************************************************/ - private final static String CONF_FILE = "cobalt.conf"; + public final static String CONF_FILE = "cobalt.json"; private final static String kControllers = "controllers"; private final static String kPlugins = "plugins"; private final static String kAndroid = "android"; @@ -422,7 +422,7 @@ public Bundle getConfigurationForController(String controller) { return bundle; } catch (JSONException exception) { - if (Cobalt.DEBUG) Log.e(Cobalt.TAG, TAG + " - getConfigurationForController: check cobalt.conf. Known issues: \n " + if (Cobalt.DEBUG) Log.e(Cobalt.TAG, TAG + " - getConfigurationForController: check cobalt.json. Known issues: \n " + "\t - controllers field not found or not a JSONObject \n " + "\t - " + controller + " controller not found and no " + kDefaultController + " controller defined \n " + "\t - " + controller + " or " + kDefaultController + "controller found but no " + kAndroid + "defined \n "); @@ -474,7 +474,7 @@ public HashMap> getPlugins() { } catch (JSONException exception) { if (Cobalt.DEBUG) { - Log.w(Cobalt.TAG, TAG + " - getPlugins: plugins field of cobalt.conf not found or not a JSONObject."); + Log.w(Cobalt.TAG, TAG + " - getPlugins: plugins field of cobalt.json not found or not a JSONObject."); exception.printStackTrace(); } } @@ -524,7 +524,7 @@ private JSONObject getConfiguration() { sCobaltConfiguration = new JSONObject(configuration); } catch (JSONException exception) { - if (Cobalt.DEBUG) Log.e(Cobalt.TAG, TAG + " - getConfiguration: check cobalt.conf. File is missing or not at " + ASSETS_PATH + mResourcePath + CONF_FILE); + if (Cobalt.DEBUG) Log.e(Cobalt.TAG, TAG + " - getConfiguration: check cobalt.json. File is missing or not at " + ASSETS_PATH + mResourcePath + CONF_FILE); exception.printStackTrace(); return new JSONObject(); } diff --git a/src/main/java/org/cobaltians/cobalt/font/CobaltFontManager.java b/src/main/java/org/cobaltians/cobalt/font/CobaltFontManager.java index ac62265..4393dfa 100644 --- a/src/main/java/org/cobaltians/cobalt/font/CobaltFontManager.java +++ b/src/main/java/org/cobaltians/cobalt/font/CobaltFontManager.java @@ -54,11 +54,10 @@ public class CobaltFontManager { /** - * the fonts key in cobalt.conf + * the fonts key in cobalt.json */ private static final String kFonts = "fonts"; private static final String kAndroid = "android"; - private static final String CONF_FILE = "cobalt.conf"; private static Context mContext; // TAG public static final String TAG = CobaltFontManager.class.getSimpleName(); @@ -152,7 +151,7 @@ private static HashMap> getF } catch (JSONException e) { if (Cobalt.DEBUG) { - Log.w(TAG, TAG + " - getFonts: fonts field of cobalt.conf not found or not a JSONObject."); + Log.w(TAG, TAG + " - getFonts: fonts field of cobalt.json not found or not a JSONObject."); e.printStackTrace(); } } @@ -166,13 +165,13 @@ private static HashMap> getF // TODO: remove private static JSONObject getConfiguration() { String mResourcePath = Cobalt.getInstance(mContext).getResourcePathFromAsset(); - String configuration = readFileFromAssets( mResourcePath + CONF_FILE); + String configuration = readFileFromAssets( mResourcePath + Cobalt.CONF_FILE); try { return new JSONObject(configuration); } catch (JSONException exception) { - if (Cobalt.DEBUG) Log.e(TAG, TAG + " - getConfiguration: check cobalt.conf. File is missing or not at " + mResourcePath + CONF_FILE); + if (Cobalt.DEBUG) Log.e(TAG, TAG + " - getConfiguration: check cobalt.json. File is missing or not at " + mResourcePath + Cobalt.CONF_FILE); exception.printStackTrace(); }