Suppress gpsLocationLost() in one place, causes bogus prompt
This commit is contained in:
parent
04179fba54
commit
3807c0f2e4
1 changed files with 292 additions and 294 deletions
|
@ -149,7 +149,7 @@ public class MapActivity extends TrackedActivity implements IMapLocationListener
|
|||
settings = getMyApplication().getSettings();
|
||||
requestWindowFeature(Window.FEATURE_NO_TITLE);
|
||||
// Full screen is not used here
|
||||
// getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN, WindowManager.LayoutParams.FLAG_FULLSCREEN);
|
||||
//getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN, WindowManager.LayoutParams.FLAG_FULLSCREEN);
|
||||
setContentView(R.layout.main);
|
||||
startProgressDialog = new ProgressDialog(this);
|
||||
startProgressDialog.setCancelable(true);
|
||||
|
@ -409,8 +409,6 @@ public class MapActivity extends TrackedActivity implements IMapLocationListener
|
|||
}
|
||||
|
||||
|
||||
|
||||
|
||||
public void backToMainMenu() {
|
||||
final Dialog dlg = new Dialog(this, R.style.Dialog_Fullscreen);
|
||||
final View menuView = (View) getLayoutInflater().inflate(R.layout.menu, null);
|
||||
|
@ -511,7 +509,7 @@ public class MapActivity extends TrackedActivity implements IMapLocationListener
|
|||
//some application/hardware needs that back button reacts on key up, so
|
||||
//that they could do some key combinations with it...
|
||||
// Victor : doing in that way doesn't close dialog properly!
|
||||
// return true;
|
||||
//return true;
|
||||
} else if (keyCode == KeyEvent.KEYCODE_SEARCH && event.getRepeatCount() == 0) {
|
||||
Intent newIntent = new Intent(MapActivity.this, SearchActivity.class);
|
||||
// causes wrong position caching: newIntent.setFlags(Intent.FLAG_ACTIVITY_REORDER_TO_FRONT);
|
||||
|
@ -694,8 +692,7 @@ public class MapActivity extends TrackedActivity implements IMapLocationListener
|
|||
// Check with delay that gps location is not lost
|
||||
if(location != null && routingHelper.getLeftDistance() > 0){
|
||||
Message msg = Message.obtain(uiHandler, new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
@Override public void run() {
|
||||
if (routingHelper.getLeftDistance() > 0 && settings.MAP_ACTIVITY_ENABLED.get()) {
|
||||
routingHelper.getVoiceRouter().gpsLocationLost();
|
||||
}
|
||||
|
@ -857,7 +854,8 @@ public class MapActivity extends TrackedActivity implements IMapLocationListener
|
|||
public void onStatusChanged(String provider, int status, Bundle extras) {
|
||||
if (LocationProvider.TEMPORARILY_UNAVAILABLE == status) {
|
||||
if(routingHelper.isFollowingMode() && routingHelper.getLeftDistance() > 0){
|
||||
routingHelper.getVoiceRouter().gpsLocationLost();
|
||||
// Suppress gpsLocationLost() prompt here for now, as it causes duplicate announcement and then also prompts when signal is found again
|
||||
//routingHelper.getVoiceRouter().gpsLocationLost();
|
||||
}
|
||||
} else if (LocationProvider.OUT_OF_SERVICE == status) {
|
||||
if(routingHelper.isFollowingMode() && routingHelper.getLeftDistance() > 0){
|
||||
|
@ -938,8 +936,8 @@ public class MapActivity extends TrackedActivity implements IMapLocationListener
|
|||
//some application/hardware needs that back button reacts on key up, so
|
||||
//that they could do some key combinations with it...
|
||||
// Android 1.6 doesn't have onBackPressed() method it should be finish instead!
|
||||
// onBackPressed();
|
||||
// return true;
|
||||
//onBackPressed();
|
||||
//return true;
|
||||
} else if (keyCode == KeyEvent.KEYCODE_DPAD_CENTER) {
|
||||
contextMenuPoint(mapView.getLatitude(), mapView.getLongitude());
|
||||
return true;
|
||||
|
|
Loading…
Reference in a new issue