// dismiss dialog, remove dialog\r
dismissDialog(msg.getData().getInt("dialog_num"));\r
removeDialog(msg.getData().getInt("dialog_num"));\r
+ // try to use the new downloaded map (works only when there is now map yet!)\r
+ // please fix me in the C-source !!\r
+ // please fix me in the C-source !!\r
+ Message msg2 = new Message();\r
+ Bundle b2 = new Bundle();\r
+ b2.putInt("Callback", 6);\r
+ msg2.setData(b2);\r
+ N_NavitGraphics.callback_handler.sendMessage(msg2);\r
break;\r
case 1 :\r
// change progressbar values\r
File file = new File(PATH);\r
File outputFile = new File(file, fileName);\r
File final_outputFile = new File(file, final_fileName);\r
- //outputFile.delete();\r
+ // tests have shown that deleting the file first is sometimes faster -> so we delete it (who cares)\r
+ outputFile.delete();\r
// seems this command overwrites the output file anyway\r
FileOutputStream fos = new FileOutputStream(outputFile);\r
BufferedOutputStream buf = new BufferedOutputStream(fos, MAP_WRITE_FILE_BUFFER); // buffer\r
int alt = UPDATE_PROGRESS_EVERY_CYCLE; // show progress about every xx cylces\r
int alt_cur = 0;\r
String kbytes_per_second = "";\r
- long last_timestamp = 0;\r
+ //long last_timestamp = 0;\r
long start_timestamp = System.currentTimeMillis();\r
- int last_bytes = 0;\r
+ //int last_bytes = 0;\r
NumberFormat formatter = new DecimalFormat("00000.0");\r
String eta_string = "";\r
float per_second_overall = 0f;\r
// // .currentTimeMillis() - last_timestamp) / 1000f));\r
// //kbytes_per_second = formatter.format(temp);\r
// }\r
- last_timestamp = System.currentTimeMillis();\r
- last_bytes = already_read;\r
+ //last_timestamp = System.currentTimeMillis();\r
+ //last_bytes = already_read;\r
per_second_overall = (float) already_read\r
/ (float) ((System.currentTimeMillis() - start_timestamp) / 1000);\r
kbytes_per_second = formatter.format((per_second_overall / 1024f));\r