/[zanavi_public1]/navit/navit/android/src/com/zoffcc/applications/zanavi/Navit.java
ZANavi

Diff of /navit/navit/android/src/com/zoffcc/applications/zanavi/Navit.java

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

Revision 49 Revision 50
47import java.io.InputStreamReader; 47import java.io.InputStreamReader;
48import java.io.ObjectInputStream; 48import java.io.ObjectInputStream;
49import java.io.ObjectOutputStream; 49import java.io.ObjectOutputStream;
50import java.io.OutputStream; 50import java.io.OutputStream;
51import java.io.OutputStreamWriter; 51import java.io.OutputStreamWriter;
52import java.io.PrintWriter;
52import java.io.Reader; 53import java.io.Reader;
53import java.io.Serializable; 54import java.io.Serializable;
55import java.io.StringWriter;
54import java.net.URL; 56import java.net.URL;
55import java.net.URLDecoder; 57import java.net.URLDecoder;
56import java.nio.channels.FileChannel; 58import java.nio.channels.FileChannel;
57import java.text.DecimalFormat; 59import java.text.DecimalFormat;
58import java.text.SimpleDateFormat; 60import java.text.SimpleDateFormat;
185 187
186import de.oberoner.gpx2navit_txt.MainFrame; 188import de.oberoner.gpx2navit_txt.MainFrame;
187 189
188public class Navit extends ActionBarActivity implements Handler.Callback, SensorEventListener 190public class Navit extends ActionBarActivity implements Handler.Callback, SensorEventListener
189{ 191{
190 public static final String VERSION_TEXT_LONG_INC_REV = "3698"; 192 public static final String VERSION_TEXT_LONG_INC_REV = "3891";
191 public static String NavitAppVersion = "0"; 193 public static String NavitAppVersion = "0";
192 public static String NavitAppVersion_prev = "-1"; 194 public static String NavitAppVersion_prev = "-1";
193 public static String NavitAppVersion_string = "0"; 195 public static String NavitAppVersion_string = "0";
194 public final Boolean NAVIT_IS_EMULATOR = false; // when running on emulator set to true!! 196 public final Boolean NAVIT_IS_EMULATOR = false; // when running on emulator set to true!!
195 public static boolean has_hw_menu_button = false; 197 public static boolean has_hw_menu_button = false;
232 // ----------------- DEBUG ---------------- 234 // ----------------- DEBUG ----------------
233 235
234 // ---------------------------------------- 236 // ----------------------------------------
235 // ---------------------------------------- 237 // ----------------------------------------
236 static final boolean FDBL = false; 238 static final boolean FDBL = false;
239 static final int CIDEBUG = 0;
240 static boolean CIRUN = false;
237 // ---------------------------------------- 241 // ----------------------------------------
238 // ---------------------------------------- 242 // ----------------------------------------
239 243
240 static final float OVERSPILL_FACTOR = 1.4f; // 20% percent on each side 244 static final float OVERSPILL_FACTOR = 1.4f; // 20% percent on each side
241 245
254 static final int PLUGIN_MSG_CAT_3d_mode = 3; 258 static final int PLUGIN_MSG_CAT_3d_mode = 3;
255 259
256 static ZANaviPrefs p = new ZANaviPrefs(); 260 static ZANaviPrefs p = new ZANaviPrefs();
257 static ZANaviPrefs p_old = new ZANaviPrefs(); 261 static ZANaviPrefs p_old = new ZANaviPrefs();
258 static final int STREET_SEARCH_STRINGS_SAVE_COUNT = 10; 262 static final int STREET_SEARCH_STRINGS_SAVE_COUNT = 10;
263 static boolean search_ready = false;
264 static boolean search_list_ready = false;
259 265
260 // static AnimationDrawable mFrameAnimation; 266 // static AnimationDrawable mFrameAnimation;
261 static Menu cur_menu = null; 267 static Menu cur_menu = null;
262 268
263 static long NAVIT_START_INTENT_DRIVE_HOME = 1L; 269 static long NAVIT_START_INTENT_DRIVE_HOME = 1L;
2128 Button b_i1 = (Button) dialog_info_popup.findViewById(R.id.dialogButtonOK_i1); 2134 Button b_i1 = (Button) dialog_info_popup.findViewById(R.id.dialogButtonOK_i1);
2129 2135
2130 TextView tv_i1 = (TextView) dialog_info_popup.findViewById(R.id.text_i1); 2136 TextView tv_i1 = (TextView) dialog_info_popup.findViewById(R.id.text_i1);
2131 final String ZANAVI_MSG_PLUGIN_MARKET_LINK = "https://play.google.com/store/apps/details?id=com.zoffcc.applications.zanavi_msg"; 2137 final String ZANAVI_MSG_PLUGIN_MARKET_LINK = "https://play.google.com/store/apps/details?id=com.zoffcc.applications.zanavi_msg";
2132 final String ZANAVI_UDONATE_LINK = "http://more.zanavi.cc/donate/"; 2138 final String ZANAVI_UDONATE_LINK = "http://more.zanavi.cc/donate/";
2139 final String ZANAVI_HOWTO_DEBUG_LINK = "http://static.zanavi.cc/be-a-testdriver/be-a-testdriver.html";
2140 final String ZANAVI_HOWTO_UDONTATE_FREE_LINK = "http://static.zanavi.cc/activate-udonate/activate-udonate.html";
2133 2141
2134 if (FDBL) 2142 if (FDBL)
2135 { 2143 {
2136 tv_i1.setText(Html.fromHtml("\n<br>Try the Donate Version and help us keep the mapservers running.<br>\nyou will activate the super fast index search.\n" + "<br><a href=\"" + ZANAVI_UDONATE_LINK + "\">get the donate version</a>\n<br>\n<br>")); 2144 tv_i1.setText(Html.fromHtml("\n<br>Help us to improve ZANavi, be a Testdriver and send in your route debug information.<br>\n<a href=\"" + ZANAVI_HOWTO_DEBUG_LINK + "\">HowTo be a Testdriver</a><br>\n<br>\n" + "And get the uDonate Version for free.<br>\n<a href=\"" + ZANAVI_HOWTO_UDONTATE_FREE_LINK + "\">get free uDonate version</a>\n" + "\n<br>\n<br>"));
2137 } 2145 }
2138 else 2146 else
2139 { 2147 {
2148 tv_i1.setText(Html.fromHtml("\n<br>Help us to improve ZANavi, be a Testdriver and send in your route debug information.<br>\n<a href=\"" + ZANAVI_HOWTO_DEBUG_LINK + "\">HowTo be a Testdriver</a><br>\n<br>\n" + "And get the uDonate Version for free.<br>\n<a href=\"" + ZANAVI_HOWTO_UDONTATE_FREE_LINK + "\">get free uDonate version</a>\n" + "\n<br>\n<br>"));
2140 tv_i1.setText(Html.fromHtml("\n<br>Try the Donate Version and help us keep the mapservers running.<br>\nyou will activate the super fast index search.\n" + "<br><a href=\"" + ZANAVI_UDONATE_LINK + "\">get the donate version</a>\n<br>\n<br>")); 2149 // tv_i1.setText(Html.fromHtml("\n<br>Try the Donate Version and help us keep the mapservers running.<br>\nyou will activate the super fast index search.\n" + "<br><a href=\"" + ZANAVI_UDONATE_LINK + "\">get the donate version</a>\n<br>\n<br>"));
2141 // tv_i1.setText(Html.fromHtml("\n<br>Try the new Plugin to be notified when there are updates to your downloaded maps.\n" + "<br><a href=\"" + ZANAVI_MSG_PLUGIN_MARKET_LINK + "\">install Plugin</a>\n<br>\n<br>" + "Probier das neue Plugin damit du immer benachrichtigt wirst wenn es Kartenupdates gibt.\n<br>" + "<a href=\"" + ZANAVI_MSG_PLUGIN_MARKET_LINK + "\">Plugin installieren</a>\n<br>")); 2150 // tv_i1.setText(Html.fromHtml("\n<br>Try the new Plugin to be notified when there are updates to your downloaded maps.\n" + "<br><a href=\"" + ZANAVI_MSG_PLUGIN_MARKET_LINK + "\">install Plugin</a>\n<br>\n<br>" + "Probier das neue Plugin damit du immer benachrichtigt wirst wenn es Kartenupdates gibt.\n<br>" + "<a href=\"" + ZANAVI_MSG_PLUGIN_MARKET_LINK + "\">Plugin installieren</a>\n<br>"));
2142 } 2151 }
2143 2152
2144 try 2153 try
2145 { 2154 {
2195 { 2204 {
2196 dialog_info_popup.setTitle(" Support us"); 2205 dialog_info_popup.setTitle(" Support us");
2197 } 2206 }
2198 else 2207 else
2199 { 2208 {
2200 dialog_info_popup.setTitle(" Try the new Plugin"); 2209 // dialog_info_popup.setTitle(" Try the new Plugin");
2210 dialog_info_popup.setTitle(" Support us");
2201 } 2211 }
2202 } 2212 }
2203 catch (Exception e) 2213 catch (Exception e)
2204 { 2214 {
2205 e.printStackTrace(); 2215 e.printStackTrace();
2496 // //Button theButton = dialog.getButton(DialogInterface.BUTTON_POSITIVE); 2506 // //Button theButton = dialog.getButton(DialogInterface.BUTTON_POSITIVE);
2497 // //theButton.setOnClickListener(new CustomListener(dialog)); 2507 // //theButton.setOnClickListener(new CustomListener(dialog));
2498 // } 2508 // }
2499 2509
2500 int have_dpi = Navit.metrics.densityDpi; 2510 int have_dpi = Navit.metrics.densityDpi;
2511
2512 System.out.println("Global_want_dpi[001]=" + NavitGraphics.Global_want_dpi + ":" + Navit.metrics.densityDpi + ":" + NavitGraphics.Global_dpi_factor + ":" + NavitGraphics.Global_dpi_factor_better);
2513
2501 if (NavitGraphics.Global_want_dpi == have_dpi) 2514 if (NavitGraphics.Global_want_dpi == have_dpi)
2502 { 2515 {
2503 NavitGraphics.Global_dpi_factor = 1; 2516 NavitGraphics.Global_dpi_factor = 1;
2517 NavitGraphics.preview_coord_factor = 1;
2504 } 2518 }
2519 else
2520 // this was missing??????!!!!!!!!!??????!!!!!!
2505 { 2521 {
2506 NavitGraphics.Global_dpi_factor = ((float) NavitGraphics.Global_want_dpi / (float) have_dpi); 2522 NavitGraphics.Global_dpi_factor = ((float) NavitGraphics.Global_want_dpi / (float) have_dpi);
2523 NavitGraphics.preview_coord_factor = ((float) have_dpi / (float) NavitGraphics.Global_want_dpi);
2507 } 2524 }
2525
2526 System.out.println("Global_want_dpi[002]=" + NavitGraphics.Global_dpi_factor + ":" + NavitGraphics.preview_coord_factor);
2508 2527
2509 // gggggggggggggggggggggggggg new !!!!!!!!!!!!!!!!!!!! 2528 // gggggggggggggggggggggggggg new !!!!!!!!!!!!!!!!!!!!
2510 2529
2511 // --> dont use!! NavitMain(this, langu, android.os.Build.VERSION.SDK_INT); 2530 // --> dont use!! NavitMain(this, langu, android.os.Build.VERSION.SDK_INT);
2512 Log.e("Navit", "android.os.Build.VERSION.SDK_INT=" + Integer.valueOf(android.os.Build.VERSION.SDK)); 2531 Log.e("Navit", "android.os.Build.VERSION.SDK_INT=" + Integer.valueOf(android.os.Build.VERSION.SDK));
4350 // ---- DEBUG ---- 4369 // ---- DEBUG ----
4351 4370
4352 // glSurfaceView.onResume(); 4371 // glSurfaceView.onResume();
4353 4372
4354 // if (Navit.METHOD_DEBUG) Navit.my_func_name(1); 4373 // if (Navit.METHOD_DEBUG) Navit.my_func_name(1);
4374
4375 if (Navit.CIDEBUG == 1)
4376 {
4377 new Thread()
4378 {
4379 public void run()
4380 {
4381 try
4382 {
4383 System.out.println("DR_run_all_yaml_tests --> want");
4384
4385 if (CIRUN == false)
4386 {
4387 System.out.println("DR_run_all_yaml_tests --> do");
4388 CIRUN = true;
4389 Thread.sleep(20000); // 20 secs.
4390 ZANaviDebugReceiver.DR_run_all_yaml_tests();
4391 }
4392 }
4393 catch (Exception e)
4394 {
4395 }
4396 }
4397 }.start();
4398 }
4355 } 4399 }
4356 4400
4357 @TargetApi(Build.VERSION_CODES.FROYO) 4401 @TargetApi(Build.VERSION_CODES.FROYO)
4358 @Override 4402 @Override
4359 public void onPause() 4403 public void onPause()
4963 NavitGraphics.callback_handler.sendMessage(msg22); 5007 NavitGraphics.callback_handler.sendMessage(msg22);
4964 // hide duplicates when searching 5008 // hide duplicates when searching
4965 // hide duplicates when searching 5009 // hide duplicates when searching
4966 } 5010 }
4967 5011
5012 System.out.println("dialog -- 11:002");
4968 Message msg = progress_handler.obtainMessage(); 5013 Message msg = progress_handler.obtainMessage();
4969 Bundle b = new Bundle(); 5014 Bundle b = new Bundle();
4970 msg.what = 11; 5015 msg.what = 11;
4971 b.putInt("dialog_num", dialog_num_); 5016 b.putInt("dialog_num", dialog_num_);
4972 msg.setData(b); 5017 msg.setData(b);
6290 } 6335 }
6291 } 6336 }
6292 catch (Exception e) 6337 catch (Exception e)
6293 { 6338 {
6294 } 6339 }
6340
6341 if (Navit.CIDEBUG == 0)
6342 {
6295 Navit.use_index_search = Navit.allow_use_index_search(); 6343 Navit.use_index_search = Navit.allow_use_index_search();
6344 }
6296 } 6345 }
6297 else 6346 else
6298 { 6347 {
6299 Navit.use_index_search = false; 6348 Navit.use_index_search = false;
6300 } 6349 }
6360 catch (Exception e) 6409 catch (Exception e)
6361 { 6410 {
6362 e.printStackTrace(); 6411 e.printStackTrace();
6363 } 6412 }
6364 6413
6414 System.out.println("dialog -- 11:003");
6365 System.out.println("online googlemaps search"); 6415 System.out.println("online googlemaps search");
6366 Message msg = progress_handler.obtainMessage(); 6416 Message msg = progress_handler.obtainMessage();
6367 Bundle b = new Bundle(); 6417 Bundle b = new Bundle();
6368 msg.what = 11; 6418 msg.what = 11;
6369 b.putInt("dialog_num", Navit.SEARCHRESULTS_WAIT_DIALOG); 6419 b.putInt("dialog_num", Navit.SEARCHRESULTS_WAIT_DIALOG);
6371 progress_handler.sendMessage(msg); 6421 progress_handler.sendMessage(msg);
6372 } 6422 }
6373 else if (requestCode == NavitAddressSearch_id_offline) 6423 else if (requestCode == NavitAddressSearch_id_offline)
6374 { 6424 {
6375 // offline binfile search 6425 // offline binfile search
6376 try 6426
6427 if (!Navit.use_index_search)
6377 { 6428 {
6429 try
6430 {
6378 Log.e("Navit", "call-11: (2)num " + Navit.SEARCHRESULTS_WAIT_DIALOG_OFFLINE); 6431 Log.e("Navit", "call-11: (2)num " + Navit.SEARCHRESULTS_WAIT_DIALOG_OFFLINE);
6432 }
6433 catch (Exception e)
6434 {
6435 e.printStackTrace();
6436 }
6437
6438 // show dialog, and start search for the results
6439 // make it indirect, to give our activity a chance to startup
6440 // (remember we come straight from another activity and ours is still paused!)
6441 System.out.println("dialog -- 11:004");
6442 Message msg = progress_handler.obtainMessage();
6443 Bundle b = new Bundle();
6444 msg.what = 11;
6445 b.putInt("dialog_num", Navit.SEARCHRESULTS_WAIT_DIALOG_OFFLINE);
6446 msg.setData(b);
6447 progress_handler.sendMessage(msg);
6379 } 6448 }
6380 catch (Exception e)
6381 {
6382 e.printStackTrace();
6383 }
6384
6385 // show dialog, and start search for the results
6386 // make it indirect, to give our activity a chance to startup
6387 // (remember we come straight from another activity and ours is still paused!)
6388 Message msg = progress_handler.obtainMessage();
6389 Bundle b = new Bundle();
6390 msg.what = 11;
6391 b.putInt("dialog_num", Navit.SEARCHRESULTS_WAIT_DIALOG_OFFLINE);
6392 msg.setData(b);
6393 progress_handler.sendMessage(msg);
6394 } 6449 }
6395 } 6450 }
6396 } 6451 }
6397 catch (NumberFormatException e) 6452 catch (NumberFormatException e)
6398 { 6453 {
7023 int a; 7078 int a;
7024 float b; 7079 float b;
7025 float c; 7080 float c;
7026 } 7081 }
7027 7082
7083 public class LowQ_Object
7084 {
7085 String latlonzoom;
7086 int w;
7087 int h;
7088 int fontsize;
7089 int scale;
7090 int selection_range;
7091 }
7092
7028 public class CWorkerThread extends Thread 7093 public class CWorkerThread extends Thread
7029 { 7094 {
7030 private Boolean running; 7095 private Boolean running;
7031 Boolean startmain = false; 7096 Boolean startmain = false;
7032 private CMC_object l2; 7097 private CMC_object l2;
7034 private MCB_object l4; 7099 private MCB_object l4;
7035 private TCB_object l5; 7100 private TCB_object l5;
7036 private SCCB_object l6; 7101 private SCCB_object l6;
7037 private Location l7; 7102 private Location l7;
7038 private GeCB_Object l8; 7103 private GeCB_Object l8;
7104 private LowQ_Object l9;
7039 7105
7040 Navit x; 7106 Navit x;
7041 String lang; 7107 String lang;
7042 int version; 7108 int version;
7043 String display_density_string; 7109 String display_density_string;
7050 private final LinkedBlockingQueue<MCB_object> queue3 = new LinkedBlockingQueue<MCB_object>(); 7116 private final LinkedBlockingQueue<MCB_object> queue3 = new LinkedBlockingQueue<MCB_object>();
7051 private final LinkedBlockingQueue<TCB_object> queue4 = new LinkedBlockingQueue<TCB_object>(); 7117 private final LinkedBlockingQueue<TCB_object> queue4 = new LinkedBlockingQueue<TCB_object>();
7052 private final LinkedBlockingQueue<SCCB_object> queue5 = new LinkedBlockingQueue<SCCB_object>(); 7118 private final LinkedBlockingQueue<SCCB_object> queue5 = new LinkedBlockingQueue<SCCB_object>();
7053 private final LinkedBlockingQueue<Location> queue6 = new LinkedBlockingQueue<Location>(); 7119 private final LinkedBlockingQueue<Location> queue6 = new LinkedBlockingQueue<Location>();
7054 private final LinkedBlockingQueue<GeCB_Object> queue7 = new LinkedBlockingQueue<GeCB_Object>(); 7120 private final LinkedBlockingQueue<GeCB_Object> queue7 = new LinkedBlockingQueue<GeCB_Object>();
7121 private final LinkedBlockingQueue<LowQ_Object> queue8 = new LinkedBlockingQueue<LowQ_Object>();
7055 7122
7056 CWorkerThread() 7123 CWorkerThread()
7057 { 7124 {
7058 this.running = true; 7125 this.running = true;
7126 }
7127
7128 public void DrawLowqualMap_wrapper(String latlonzoom, int w, int h, int fontsize, int scale, int selection_range)
7129 {
7130 // if (Navit.METHOD_DEBUG) Navit.my_func_name(0);
7131
7132 LowQ_Object o = new LowQ_Object();
7133 o.latlonzoom = latlonzoom;
7134 o.w = w;
7135 o.h = h;
7136 o.fontsize = fontsize;
7137 o.scale = scale;
7138 o.selection_range = selection_range;
7139 queue8.offer(o);
7140 this.interrupt();
7141
7142 // if (Navit.METHOD_DEBUG) Navit.my_func_name(1);
7059 } 7143 }
7060 7144
7061 public void SizeChangedCallback(int w, int h, Bitmap main_map_bitmap) 7145 public void SizeChangedCallback(int w, int h, Bitmap main_map_bitmap)
7062 { 7146 {
7063 // if (Navit.METHOD_DEBUG) Navit.my_func_name(0); 7147 // if (Navit.METHOD_DEBUG) Navit.my_func_name(0);
7442 //**activatePrefs(); 7526 //**activatePrefs();
7443 7527
7444 System.out.println("CWorkerThread -- calling:ready --"); 7528 System.out.println("CWorkerThread -- calling:ready --");
7445 } 7529 }
7446 7530
7531 try
7532 {
7533 while (queue8.size() > 0)
7534 {
7535 l9 = queue8.poll();
7536 if (l9 != null)
7537 {
7538 // System.out.println("DrawLowqualMap");
7539 NavitGraphics.DrawLowqualMap(l9.latlonzoom, l9.w, l9.h, l9.fontsize, l9.scale, l9.selection_range);
7540 }
7541 }
7542 }
7543 catch (Exception e)
7544 {
7545 }
7546
7447 while (queue6.size() > 0) 7547 while (queue6.size() > 0)
7448 { 7548 {
7449 try 7549 try
7450 { 7550 {
7451 // blocking call 7551 // blocking call
7452 // l2 = queue6.take(); 7552 // l2 = queue6.take();
7453 // non-blocking call 7553 // non-blocking call
7454 l7 = queue6.poll(); 7554 l7 = queue6.poll();
7455 if (l2 != null) 7555 if (l7 != null)
7456 { 7556 {
7457 NavitVehicle.VehicleCallback(l7.getLatitude(), l7.getLongitude(), (l7.getSpeed() * 3.6f), l7.getBearing(), l7.getAltitude(), l7.getAccuracy(), (l7.getTime() / 1000L)); 7557 NavitVehicle.VehicleCallback(l7.getLatitude(), l7.getLongitude(), (l7.getSpeed() * 3.6f), l7.getBearing(), l7.getAltitude(), l7.getAccuracy(), (l7.getTime() / 1000L));
7458 } 7558 }
7459 } 7559 }
7460 7560
7492 { 7592 {
7493 // blocking call 7593 // blocking call
7494 // l2 = queue6.take(); 7594 // l2 = queue6.take();
7495 // non-blocking call 7595 // non-blocking call
7496 l7 = queue6.poll(); 7596 l7 = queue6.poll();
7497 if (l2 != null) 7597 if (l7 != null)
7498 { 7598 {
7499 NavitVehicle.VehicleCallback(l7.getLatitude(), l7.getLongitude(), (l7.getSpeed() * 3.6f), l7.getBearing(), l7.getAltitude(), l7.getAccuracy(), (l7.getTime() / 1000L)); 7599 NavitVehicle.VehicleCallback(l7.getLatitude(), l7.getLongitude(), (l7.getSpeed() * 3.6f), l7.getBearing(), l7.getAltitude(), l7.getAccuracy(), (l7.getTime() / 1000L));
7500 } 7600 }
7501 } 7601 }
7502 catch (Exception e) 7602 catch (Exception e)
7562 { 7662 {
7563 // blocking call 7663 // blocking call
7564 // l2 = queue6.take(); 7664 // l2 = queue6.take();
7565 // non-blocking call 7665 // non-blocking call
7566 l7 = queue6.poll(); 7666 l7 = queue6.poll();
7567 if (l2 != null) 7667 if (l7 != null)
7568 { 7668 {
7569 NavitVehicle.VehicleCallback(l7.getLatitude(), l7.getLongitude(), (l7.getSpeed() * 3.6f), l7.getBearing(), l7.getAltitude(), l7.getAccuracy(), (l7.getTime() / 1000L)); 7669 NavitVehicle.VehicleCallback(l7.getLatitude(), l7.getLongitude(), (l7.getSpeed() * 3.6f), l7.getBearing(), l7.getAltitude(), l7.getAccuracy(), (l7.getTime() / 1000L));
7570 } 7670 }
7571 } 7671 }
7572 catch (Exception e) 7672 catch (Exception e)
7618 { 7718 {
7619 // blocking call 7719 // blocking call
7620 // l2 = queue6.take(); 7720 // l2 = queue6.take();
7621 // non-blocking call 7721 // non-blocking call
7622 l7 = queue6.poll(); 7722 l7 = queue6.poll();
7623 if (l2 != null) 7723 if (l7 != null)
7624 { 7724 {
7625 NavitVehicle.VehicleCallback(l7.getLatitude(), l7.getLongitude(), (l7.getSpeed() * 3.6f), l7.getBearing(), l7.getAltitude(), l7.getAccuracy(), (l7.getTime() / 1000L)); 7725 NavitVehicle.VehicleCallback(l7.getLatitude(), l7.getLongitude(), (l7.getSpeed() * 3.6f), l7.getBearing(), l7.getAltitude(), l7.getAccuracy(), (l7.getTime() / 1000L));
7626 } 7726 }
7627 } 7727 }
7628 catch (Exception e) 7728 catch (Exception e)
8052 partial_match_i = 1; 8152 partial_match_i = 1;
8053 } 8153 }
8054 8154
8055 if (this.my_dialog_num == Navit.SEARCHRESULTS_WAIT_DIALOG_OFFLINE) 8155 if (this.my_dialog_num == Navit.SEARCHRESULTS_WAIT_DIALOG_OFFLINE)
8056 { 8156 {
8157 Navit.search_ready = false;
8158
8057 // start the search, this could take a long time!! 8159 // start the search, this could take a long time!!
8058 Log.e("Navit", "SearchResultsThread run1"); 8160 Log.e("Navit", "SearchResultsThread run1");
8059 // need lowercase to find stuff !! 8161 // need lowercase to find stuff !!
8060 Navit_last_address_search_string = filter_bad_chars(Navit_last_address_search_string).toLowerCase(); 8162 Navit_last_address_search_string = filter_bad_chars(Navit_last_address_search_string).toLowerCase();
8061 if ((Navit_last_address_hn_string != null) && (Navit_last_address_hn_string.equals(""))) 8163 if ((Navit_last_address_hn_string != null) && (!Navit_last_address_hn_string.equals("")))
8062 { 8164 {
8063 Navit_last_address_hn_string = filter_bad_chars(Navit_last_address_hn_string).toLowerCase(); 8165 Navit_last_address_hn_string = filter_bad_chars(Navit_last_address_hn_string).toLowerCase();
8064 } 8166 }
8065 8167
8066 if (Navit_last_address_full_file_search) 8168 if (Navit_last_address_full_file_search)
8093 else 8195 else
8094 { 8196 {
8095 street_ = Navit_last_address_search_string; 8197 street_ = Navit_last_address_search_string;
8096 town_ = ""; 8198 town_ = "";
8097 } 8199 }
8200
8201 System.out.println("search params1=" + street_ + ":" + town_ + ":" + hn_);
8098 N_NavitGraphics.SearchResultList(2, partial_match_i, street_, town_, hn_, Navit_last_address_search_country_flags, Navit_last_address_search_country_iso2_string, "0#0", 0); 8202 N_NavitGraphics.SearchResultList(2, partial_match_i, street_, town_, hn_, Navit_last_address_search_country_flags, Navit_last_address_search_country_iso2_string, "0#0", 0);
8099 8203
8100 // sort result list 8204 // sort result list
8101 Collections.sort(Navit.NavitAddressResultList_foundItems); 8205 Collections.sort(Navit.NavitAddressResultList_foundItems);
8102 } 8206 }
8105 // old method search 8209 // old method search
8106 // ----------------- 8210 // -----------------
8107 // flags --> 3: search all countries 8211 // flags --> 3: search all countries
8108 // 2: search <iso2 string> country 8212 // 2: search <iso2 string> country
8109 // 1: search default country (what you have set as language in prefs) 8213 // 1: search default country (what you have set as language in prefs)
8214 System.out.println("searching ... 001");
8215
8216 System.out.println("search params2a=" + Navit_last_address_hn_string);
8217
8218 String old_s = Navit_last_address_search_string;
8219 String new_s = Navit_last_address_search_string;
8220 if ((Navit_last_address_hn_string != null) && (!Navit_last_address_hn_string.equals("")))
8221 {
8222 new_s = Navit_last_address_search_string + " " + Navit_last_address_hn_string;
8223 }
8224
8225 System.out.println("search params2=" + new_s + ":" + Navit_last_address_search_country_flags + ":" + Navit_last_address_search_country_iso2_string);
8226
8110 N_NavitGraphics.SearchResultList(29, partial_match_i, Navit_last_address_search_string, "", "", Navit_last_address_search_country_flags, Navit_last_address_search_country_iso2_string, "0#0", 0); 8227 N_NavitGraphics.SearchResultList(29, partial_match_i, new_s, "", "", Navit_last_address_search_country_flags, Navit_last_address_search_country_iso2_string, "0#0", 0);
8228 System.out.println("searching ... 002");
8111 8229
8112 // sort result list 8230 // sort result list
8113 Collections.sort(Navit.NavitAddressResultList_foundItems); 8231 Collections.sort(Navit.NavitAddressResultList_foundItems);
8232
8233 System.out.println("searching ... 099");
8234 Navit.search_ready = true;
8114 } 8235 }
8115 } 8236 }
8116 Log.e("Navit", "SearchResultsThread run2"); 8237 Log.e("Navit", "SearchResultsThread run2");
8117 } 8238 }
8118 else if (this.my_dialog_num == Navit.SEARCHRESULTS_WAIT_DIALOG) 8239 else if (this.my_dialog_num == Navit.SEARCHRESULTS_WAIT_DIALOG)
8212 msg.setData(b); 8333 msg.setData(b);
8213 mHandler.sendMessage(msg); 8334 mHandler.sendMessage(msg);
8214 } 8335 }
8215 8336
8216 // ok, remove dialog 8337 // ok, remove dialog
8338 Log.e("Navit", "SearchResultsThread:remove dialog (99)");
8217 msg = mHandler.obtainMessage(); 8339 msg = mHandler.obtainMessage();
8218 b = new Bundle(); 8340 b = new Bundle();
8219 msg.what = 99; 8341 msg.what = 99;
8220 b.putInt("dialog_num", this.my_dialog_num); 8342 b.putInt("dialog_num", this.my_dialog_num);
8221 msg.setData(b); 8343 msg.setData(b);
8896 { 9018 {
8897 // generic int option CallBack [<option name>:<option value "int">] 9019 // generic int option CallBack [<option name>:<option value "int">]
8898 String s = msg.getData().getString("s"); 9020 String s = msg.getData().getString("s");
8899 NavitGraphics.CallbackMessageChannel(110, s); 9021 NavitGraphics.CallbackMessageChannel(110, s);
8900 } 9022 }
9023 else if (msg.getData().getInt("Callback") == 111)
9024 {
9025 // show real gps position on map
9026 String s = msg.getData().getString("s");
9027 NavitGraphics.CallbackMessageChannel(111, s);
9028 }
8901 else if (msg.getData().getInt("Callback") == 112) 9029 else if (msg.getData().getInt("Callback") == 112)
8902 { 9030 {
8903 // show maps debug view 9031 // show maps debug view
8904 String s = msg.getData().getString("s"); 9032 String s = msg.getData().getString("s");
8905 NavitGraphics.CallbackMessageChannel(112, s); 9033 NavitGraphics.CallbackMessageChannel(112, s);
8906 } 9034 }
8907 else if (msg.getData().getInt("Callback") == 111) 9035 else if (msg.getData().getInt("Callback") == 113)
8908 { 9036 {
8909 // show real gps position on map 9037 // cancel preview map drawing
8910 String s = msg.getData().getString("s");
8911 NavitGraphics.CallbackMessageChannel(111, s); 9038 NavitGraphics.CallbackMessageChannel(113, "x");
8912 } 9039 }
8913 else if (msg.getData().getInt("Callback") == 9901) 9040 else if (msg.getData().getInt("Callback") == 9901)
8914 { 9041 {
8915 // if follow mode is on, then dont show freeview streetname 9042 // if follow mode is on, then dont show freeview streetname
8916 //if (!Navit.PREF_follow_gps) 9043 //if (!Navit.PREF_follow_gps)
8942 public Handler progress_handler = new Handler() 9069 public Handler progress_handler = new Handler()
8943 { 9070 {
8944 @SuppressLint("NewApi") 9071 @SuppressLint("NewApi")
8945 public void handleMessage(Message msg) 9072 public void handleMessage(Message msg)
8946 { 9073 {
9074
9075 // System.out.println("progress_handler:msg:" + msg.what + "::" + msg.getData().toString());
9076
8947 switch (msg.what) 9077 switch (msg.what)
8948 { 9078 {
8949 case 0: 9079 case 0:
8950 // dismiss dialog, remove dialog 9080 // dismiss dialog, remove dialog
8951 try 9081 try
9040 9170
9041 zoom_out_full(); 9171 zoom_out_full();
9042 9172
9043 /* 9173 /*
9044 * Intent intent = getIntent(); 9174 * Intent intent = getIntent();
9045 * System.out.println("ÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜ**********************"); 9175 * System.out.println("ÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜ**********************");
9046 * startActivity(intent); 9176 * startActivity(intent);
9047 * System.out.println("FFFFFFFFFFFFFFFFFFF**********************"); 9177 * System.out.println("FFFFFFFFFFFFFFFFFFF**********************");
9048 * Log.d("Navit", "instance count=" + Navit.getInstanceCount()); 9178 * Log.d("Navit", "instance count=" + Navit.getInstanceCount());
9049 * onStop(); 9179 * onStop();
9050 * System.out.println("HHHHHHHHHHHHHHHHHHH**********************"); 9180 * System.out.println("HHHHHHHHHHHHHHHHHHH**********************");
9192 } 9322 }
9193 catch (Exception e) 9323 catch (Exception e)
9194 { 9324 {
9195 // System.out.println("Ex D1: " + e.toString()); 9325 // System.out.println("Ex D1: " + e.toString());
9196 } 9326 }
9327 System.out.println("showDialog 001 dialog_num=" + msg.getData().getInt("dialog_num"));
9197 showDialog(msg.getData().getInt("dialog_num")); 9328 showDialog(msg.getData().getInt("dialog_num"));
9198 break; 9329 break;
9199 case 12: 9330 case 12:
9200 // turn on compass 9331 // turn on compass
9201 turn_on_compass(); 9332 turn_on_compass();
9673 }; 9804 };
9674 9805
9675 @TargetApi(Build.VERSION_CODES.FROYO) 9806 @TargetApi(Build.VERSION_CODES.FROYO)
9676 protected Dialog onCreateDialog(int id) 9807 protected Dialog onCreateDialog(int id)
9677 { 9808 {
9809
9810 System.out.println("onCreateDialog id=" + id);
9811
9678 switch (id) 9812 switch (id)
9679 { 9813 {
9814 // ==============---------- real search offline (old style) here ----------==============
9815 // ==============---------- real search offline (old style) here ----------==============
9816 // ==============---------- real search offline (old style) here ----------==============
9680 case Navit.SEARCHRESULTS_WAIT_DIALOG_OFFLINE: 9817 case Navit.SEARCHRESULTS_WAIT_DIALOG_OFFLINE:
9681 search_results_wait_offline = new ProgressDialog(this); 9818 search_results_wait_offline = new ProgressDialog(this);
9682 search_results_wait_offline.setProgressStyle(ProgressDialog.STYLE_HORIZONTAL); 9819 search_results_wait_offline.setProgressStyle(ProgressDialog.STYLE_HORIZONTAL);
9683 search_results_wait_offline.setTitle("--"); 9820 search_results_wait_offline.setTitle("--");
9684 search_results_wait_offline.setMessage("--"); 9821 search_results_wait_offline.setMessage("--");
9725 dialog.cancel(); 9862 dialog.cancel();
9726 searchresultsThread_offline.stop_me(); 9863 searchresultsThread_offline.stop_me();
9727 } 9864 }
9728 }; 9865 };
9729 search_results_wait_offline.setOnDismissListener(mOnDismissListener4); 9866 search_results_wait_offline.setOnDismissListener(mOnDismissListener4);
9867 System.out.println("new SearchResultsThread 001");
9730 searchresultsThread_offline = new SearchResultsThread(progress_handler, Navit.SEARCHRESULTS_WAIT_DIALOG_OFFLINE); 9868 searchresultsThread_offline = new SearchResultsThread(progress_handler, Navit.SEARCHRESULTS_WAIT_DIALOG_OFFLINE);
9731 searchresultsThread_offline.start(); 9869 searchresultsThread_offline.start();
9732 9870
9733 NavitAddressSearchSpinnerActive = true; 9871 NavitAddressSearchSpinnerActive = true;
9734 spinner_thread_offline = new SearchResultsThreadSpinnerThread(progress_handler, Navit.SEARCHRESULTS_WAIT_DIALOG_OFFLINE); 9872 spinner_thread_offline = new SearchResultsThreadSpinnerThread(progress_handler, Navit.SEARCHRESULTS_WAIT_DIALOG_OFFLINE);
9753 dialog.cancel(); 9891 dialog.cancel();
9754 searchresultsThread.stop_me(); 9892 searchresultsThread.stop_me();
9755 } 9893 }
9756 }; 9894 };
9757 search_results_wait.setOnDismissListener(mOnDismissListener3); 9895 search_results_wait.setOnDismissListener(mOnDismissListener3);
9896 System.out.println("new SearchResultsThread 002");
9758 searchresultsThread = new SearchResultsThread(progress_handler, Navit.SEARCHRESULTS_WAIT_DIALOG); 9897 searchresultsThread = new SearchResultsThread(progress_handler, Navit.SEARCHRESULTS_WAIT_DIALOG);
9759 searchresultsThread.start(); 9898 searchresultsThread.start();
9760 9899
9761 NavitAddressSearchSpinnerActive = true; 9900 NavitAddressSearchSpinnerActive = true;
9762 spinner_thread = new SearchResultsThreadSpinnerThread(progress_handler, Navit.SEARCHRESULTS_WAIT_DIALOG); 9901 spinner_thread = new SearchResultsThreadSpinnerThread(progress_handler, Navit.SEARCHRESULTS_WAIT_DIALOG);
10268 10407
10269 public static void setPrefs_zoomlevel() 10408 public static void setPrefs_zoomlevel()
10270 { 10409 {
10271 // if (Navit.METHOD_DEBUG) Navit.my_func_name(0); 10410 // if (Navit.METHOD_DEBUG) Navit.my_func_name(0);
10272 10411
10273 //System.out.println("1 save zoom level: " + Navit.GlobalScaleLevel); 10412 System.out.println("1 save zoom level: " + Navit.GlobalScaleLevel);
10274 SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(Navit.getBaseContext_); 10413 SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(Navit.getBaseContext_);
10275 SharedPreferences.Editor editor = prefs.edit(); 10414 SharedPreferences.Editor editor = prefs.edit();
10276 editor.putInt("zoomlevel_num", Navit.GlobalScaleLevel); 10415 editor.putInt("zoomlevel_num", Navit.GlobalScaleLevel);
10277 editor.commit(); 10416 editor.commit();
10278 //System.out.println("2 save zoom level: " + Navit.GlobalScaleLevel); 10417 //System.out.println("2 save zoom level: " + Navit.GlobalScaleLevel);
13279 } 13418 }
13280 catch (Exception e) 13419 catch (Exception e)
13281 { 13420 {
13282 } 13421 }
13283 return ("" + df.format(allocated) + "/" + df.format(sum_size) + "(" + df.format(free) + ")" + ":" + df.format(Double.valueOf(Runtime.getRuntime().totalMemory() / 1048576)) + "/" + df.format(Double.valueOf(Runtime.getRuntime().maxMemory() / 1048576)) + "(" + df.format(Double.valueOf(Runtime.getRuntime().freeMemory() / 1048576)) + ") " + mem_type); 13422 return ("" + df.format(allocated) + "/" + df.format(sum_size) + "(" + df.format(free) + ")" + ":" + df.format(Double.valueOf(Runtime.getRuntime().totalMemory() / 1048576)) + "/" + df.format(Double.valueOf(Runtime.getRuntime().maxMemory() / 1048576)) + "(" + df.format(Double.valueOf(Runtime.getRuntime().freeMemory() / 1048576)) + ") " + mem_type);
13423 }
13424
13425 public static String logHeap_for_batch(Class clazz)
13426 {
13427 try
13428 {
13429 Double allocated = Double.valueOf(Debug.getNativeHeapAllocatedSize()) / Double.valueOf((1048576));
13430 Double sum_size = Double.valueOf(Debug.getNativeHeapSize() / Double.valueOf(1048576.0));
13431 Double free = Double.valueOf(Debug.getNativeHeapFreeSize() / Double.valueOf(1048576.0));
13432 DecimalFormat df = new DecimalFormat();
13433 df.setMaximumFractionDigits(2);
13434 df.setMinimumFractionDigits(2);
13435
13436 // Log.d("Navit", "MemMem:DEBUG: =================================");
13437 Log.d("Navit", "MemMem:DEBUG:heap native: allc " + df.format(allocated) + "MB sum=" + df.format(sum_size) + "MB (" + df.format(free) + "MB free) in [" + clazz.getName().replaceAll("com.zoffcc.applications.zanavi.", "") + "]");
13438 Log.d("Navit", "MemMem:DEBUG:java memory: allc: " + df.format(Double.valueOf(Runtime.getRuntime().totalMemory() / 1048576)) + "MB sum=" + df.format(Double.valueOf(Runtime.getRuntime().maxMemory() / 1048576)) + "MB (" + df.format(Double.valueOf(Runtime.getRuntime().freeMemory() / 1048576)) + "MB free)");
13439
13440 // calcAvailableMemory();
13441
13442 String mem_type = "NATIVE";
13443 try
13444 {
13445 if (android.os.Build.VERSION.SDK_INT >= 11)
13446 {
13447 mem_type = "JAVA";
13448 }
13449 }
13450 catch (Exception e)
13451 {
13452 }
13453 // return ("" + df.format(allocated) + "/" + df.format(sum_size) + "(" + df.format(free) + ")" + ":" + df.format(Double.valueOf(Runtime.getRuntime().totalMemory() / 1048576)) + "/" + df.format(Double.valueOf(Runtime.getRuntime().maxMemory() / 1048576)) + "(" + df.format(Double.valueOf(Runtime.getRuntime().freeMemory() / 1048576)) + ") " + mem_type);
13454 return ("==MEM==:" + "J:" + (Double.valueOf(Runtime.getRuntime().totalMemory() / 1048576)) + ":" + (Double.valueOf(Runtime.getRuntime().maxMemory() / 1048576)) + ",N:" + allocated + ":" + sum_size);
13455 }
13456 catch (Exception e2)
13457 {
13458 return ("==MEM==:ERROR");
13459 }
13284 } 13460 }
13285 13461
13286 private static long calcAvailableMemory() 13462 private static long calcAvailableMemory()
13287 { 13463 {
13288 try 13464 try
15616 } 15792 }
15617 catch (Exception e4) 15793 catch (Exception e4)
15618 { 15794 {
15619 } 15795 }
15620 } 15796 }
15797
15798 static void take_phone_screenshot(Activity a, String dir_name, String name_base)
15799 {
15800 try
15801 {
15802 View v1 = a.getWindow().getDecorView().getRootView();
15803 v1.setDrawingCacheQuality(View.DRAWING_CACHE_QUALITY_HIGH);
15804 v1.setDrawingCacheEnabled(true);
15805 Bitmap bm = v1.getDrawingCache();
15806
15807 FileOutputStream out = null;
15808 try
15809 {
15810 out = new FileOutputStream(dir_name + "/" + name_base + ".png");
15811 bm.compress(Bitmap.CompressFormat.PNG, 100, out);
15812 }
15813 catch (Exception e)
15814 {
15815 e.printStackTrace();
15816 System.out.println("TSCR:004 " + e.getMessage());
15817 }
15818 finally
15819 {
15820 v1.setDrawingCacheEnabled(false);
15821
15822 try
15823 {
15824 if (out != null)
15825 {
15826 out.close();
15827 }
15828 }
15829 catch (IOException e)
15830 {
15831 e.printStackTrace();
15832 }
15833 }
15834 }
15835 catch (Exception e4)
15836 {
15837 }
15838 }
15839
15840 static String stacktrace_to_string(Exception e)
15841 {
15842 try
15843 {
15844 StringWriter errors = new StringWriter();
15845 e.printStackTrace(new PrintWriter(errors));
15846 return errors.toString();
15847 }
15848 catch (Exception e2)
15849 {
15850 try
15851 {
15852 return e.getMessage();
15853 }
15854 catch (Exception e3)
15855 {
15856 return "xxx";
15857 }
15858 }
15859 }
15860
15861 static void static_show_route_graph(int v)
15862 {
15863 // DEBUG: toggle Routgraph on/off
15864 try
15865 {
15866 if (v == 1)
15867 {
15868 Navit.Routgraph_enabled = 1;
15869
15870 Message msg = new Message();
15871 Bundle b = new Bundle();
15872 b.putInt("Callback", 71);
15873 b.putString("s", "" + Navit.Routgraph_enabled);
15874 msg.setData(b);
15875 NavitGraphics.callback_handler.sendMessage(msg);
15876 }
15877 else if (v == 0)
15878 {
15879 Navit.Routgraph_enabled = 0;
15880
15881 Message msg = new Message();
15882 Bundle b = new Bundle();
15883 b.putInt("Callback", 71);
15884 b.putString("s", "" + Navit.Routgraph_enabled);
15885 msg.setData(b);
15886 NavitGraphics.callback_handler.sendMessage(msg);
15887 }
15888 else
15889 {
15890 Navit.Routgraph_enabled = 0;
15891
15892 Message msg = new Message();
15893 Bundle b = new Bundle();
15894 b.putInt("Callback", 71);
15895 b.putString("s", "" + Navit.Routgraph_enabled);
15896 msg.setData(b);
15897 NavitGraphics.callback_handler.sendMessage(msg);
15898
15899 Thread.sleep(350);
15900
15901 System.out.println("static_show_route_graph:v=" + v);
15902
15903 msg = new Message();
15904 b = new Bundle();
15905 b.putInt("Callback", 71);
15906 b.putString("s", "" + v);
15907 msg.setData(b);
15908 NavitGraphics.callback_handler.sendMessage(msg);
15909 }
15910 }
15911 catch (Exception e)
15912 {
15913 }
15914
15915 }
15916
15917 /*
15918 * start a search with given values
15919 */
15920 static void executeSearch_with_values(String street, String town, String hn, boolean offline, boolean index, boolean partialmatch, boolean hide_dupl)
15921 {
15922 Intent search_intent = new Intent(Global_Navit_Object, NavitAddressSearchActivity.class);
15923 search_intent.putExtra("title", Navit.get_text("Enter: City and Street")); //TRANS
15924 String addr1 = "";
15925 String addr2 = "";
15926
15927 if ((town != null) && (street != null))
15928 {
15929 if (index)
15930 {
15931 search_intent.putExtra("address_string", street + " " + town);
15932 addr1 = street + " " + town;
15933 addr2 = street + " " + town;
15934 }
15935 else
15936 {
15937 search_intent.putExtra("address_string", town + " " + street);
15938 addr1 = town + " " + street;
15939 addr2 = town + " " + street;
15940 }
15941 }
15942 else if (town != null)
15943 {
15944 search_intent.putExtra("address_string", town);
15945 addr1 = town;
15946 addr2 = town;
15947 }
15948 else if (street != null)
15949 {
15950 search_intent.putExtra("address_string", street);
15951 addr1 = street;
15952 addr2 = street;
15953 }
15954
15955 if (hn != null)
15956 {
15957 search_intent.putExtra("hn_string", hn);
15958 }
15959
15960 if (offline)
15961 {
15962 search_intent.putExtra("type", "offline");
15963 }
15964 else
15965 {
15966 search_intent.putExtra("type", "online");
15967 }
15968
15969 String pm_temp = "0";
15970 if (partialmatch)
15971 {
15972 pm_temp = "1";
15973 }
15974 search_intent.putExtra("partial_match", pm_temp);
15975
15976 if (index)
15977 {
15978 Navit_last_address_partial_match = partialmatch;
15979 Navit_last_address_search_string = addr2;
15980 Navit_last_address_hn_string = hn;
15981 Navit_last_address_full_file_search = false;
15982 search_hide_duplicates = hide_dupl;
15983 Global_Navit_Object.startActivityForResult(search_intent, NavitAddressSearch_id_offline);
15984 }
15985 else
15986 {
15987 Navit_last_address_partial_match = partialmatch;
15988 Navit_last_address_search_string = addr1;
15989 Navit_last_address_hn_string = hn;
15990 Navit_last_address_full_file_search = false;
15991 search_hide_duplicates = hide_dupl;
15992
15993 // only from offline mask!
15994 // { "*A", "*AA", "*ALL*" }
15995 Navit_last_address_search_country_iso2_string = "*A";
15996 Navit_last_address_search_country_flags = 3;
15997 Navit_last_address_search_country_id = 1; // default=*ALL*
15998 p.PREF_search_country = Navit_last_address_search_country_id;
15999 setPrefs_search_country();
16000
16001 // show duplicates in search ------------
16002 Message msg2 = new Message();
16003 Bundle b2 = new Bundle();
16004 b2.putInt("Callback", 44);
16005 msg2.setData(b2);
16006 NavitGraphics.callback_handler.sendMessage(msg2);
16007 // show duplicates in search ------------
16008
16009 if (hide_dupl)
16010 {
16011 search_hide_duplicates = true;
16012 // hide duplicates when searching
16013 // hide duplicates when searching
16014 Message msg22 = new Message();
16015 Bundle b22 = new Bundle();
16016 b22.putInt("Callback", 45);
16017 msg22.setData(b22);
16018 NavitGraphics.callback_handler.sendMessage(msg22);
16019 // hide duplicates when searching
16020 // hide duplicates when searching
16021 }
16022
16023 System.out.println("dialog -- 11:001");
16024 Message msg = Navit_progress_h.obtainMessage();
16025 Bundle b = new Bundle();
16026 msg.what = 11;
16027 b.putInt("dialog_num", Navit.SEARCHRESULTS_WAIT_DIALOG_OFFLINE);
16028 msg.setData(b);
16029 Navit_progress_h.sendMessage(msg);
16030 }
16031 }
16032
15621} 16033}

Legend:
Removed from v.49  
changed lines
  Added in v.50

   
Visit the ZANavi Wiki