Log.e("Navit", "Failed to extract language resource " + langc);\r
}\r
\r
- my_display_density = "mdpi";\r
- // ldpi display (120 dpi)\r
if (Navit.metrics.densityDpi <= 120)\r
{\r
my_display_density = "ldpi";\r
- if (!extractRes("navitldpi", NAVIT_DATA_DIR + "/share/navit.xml"))\r
- {\r
- Log.e("Navit", "Failed to extract navit.xml for ldpi device(s)");\r
- }\r
}\r
- // mdpi display (120 dpi)\r
- else if ((Navit.metrics.densityDpi > 120) && (Navit.metrics.densityDpi <= 160))\r
+ else if (Navit.metrics.densityDpi <= 160)\r
{\r
my_display_density = "mdpi";\r
- if (!extractRes("navitmdpi", NAVIT_DATA_DIR + "/share/navit.xml"))\r
- {\r
- Log.e("Navit", "Failed to extract navit.xml for mdpi device(s)");\r
- }\r
}\r
- // hdpi display (240 dpi)\r
- else if ((Navit.metrics.densityDpi > 160) && (Navit.metrics.densityDpi < 320))\r
- //else if (Navit.metrics.densityDpi == 240)\r
+ else if (Navit.metrics.densityDpi < 320)\r
{\r
my_display_density = "hdpi";\r
- if (!extractRes("navithdpi", NAVIT_DATA_DIR + "/share/navit.xml"))\r
- {\r
- Log.e("Navit", "Failed to extract navit.xml for hdpi device(s)");\r
- }\r
}\r
- // xhdpi display (320 dpi)\r
- else if (Navit.metrics.densityDpi >= 320)\r
+ else\r
{\r
Log.e("Navit", "found xhdpi device, this is not fully supported!!");\r
Log.e("Navit", "using hdpi values");\r
my_display_density = "hdpi";\r
- if (!extractRes("navithdpi", NAVIT_DATA_DIR + "/share/navit.xml"))\r
- {\r
- Log.e("Navit", "Failed to extract navit.xml for xhdpi device(s)");\r
- }\r
}\r
- else\r
+\r
+ if (!extractRes("navit" + my_display_density, NAVIT_DATA_DIR + "/share/navit.xml"))\r
{\r
- /* default, meaning we just dont know what display this is */\r
- if (!extractRes("navit", NAVIT_DATA_DIR + "/share/navit.xml"))\r
- {\r
- Log.e("Navit", "Failed to extract navit.xml (default version)");\r
- }\r
+ Log.e("Navit", "Failed to extract navit.xml for " + my_display_density);\r
}\r
- // Debug.startMethodTracing("calc");\r
\r
// --> dont use!! NavitMain(this, langu, android.os.Build.VERSION.SDK_INT);\r
Log.e("Navit", "android.os.Build.VERSION.SDK_INT="\r