diff options
author | sjtufs <[email protected]> | 2013-08-29 12:34:34 +0800 |
---|---|---|
committer | sjtufs <[email protected]> | 2013-08-29 12:34:34 +0800 |
commit | 757f12574ee1e10a59af5ab25b0dce2ba4bdc1dc (patch) | |
tree | 3deac9f57abff1f2fc7ea5420500a16ac45f7373 /client/Piztor/src/com/macaroon | |
parent | 7ca44546e7fee36b20225c2f725547f400b76751 (diff) |
fixed a bug
Diffstat (limited to 'client/Piztor/src/com/macaroon')
-rw-r--r-- | client/Piztor/src/com/macaroon/piztor/AlertMaker.java | 4 | ||||
-rw-r--r-- | client/Piztor/src/com/macaroon/piztor/Main.java | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/client/Piztor/src/com/macaroon/piztor/AlertMaker.java b/client/Piztor/src/com/macaroon/piztor/AlertMaker.java index 3233beb..cc70e62 100644 --- a/client/Piztor/src/com/macaroon/piztor/AlertMaker.java +++ b/client/Piztor/src/com/macaroon/piztor/AlertMaker.java @@ -70,7 +70,7 @@ public class AlertMaker { context.startActivity(intent); } }); - gpsDialog.setNegativeButton("Cancel", + gpsDialog.setNegativeButton("Go without GPS", new DialogInterface.OnClickListener() { public void onClick(DialogInterface dialog, int which) { dialog.cancel(); @@ -91,7 +91,7 @@ public class AlertMaker { @Override public void onTimeSet(TimePicker view, int hourOfDay, int minute) { ////// at least 2 minutes - if ((hourOfDay >= calendar.get(Calendar.HOUR_OF_DAY) && minute-2 >= calendar.get(Calendar.MINUTE)) + if ((hourOfDay >= calendar.get(Calendar.HOUR_OF_DAY) && minute >= calendar.get(Calendar.MINUTE)) || hourOfDay > calendar.get(Calendar.HOUR_OF_DAY)) mapMaker.DrawMarker(markerPoint); else { diff --git a/client/Piztor/src/com/macaroon/piztor/Main.java b/client/Piztor/src/com/macaroon/piztor/Main.java index 09aa02f..cfa77c5 100644 --- a/client/Piztor/src/com/macaroon/piztor/Main.java +++ b/client/Piztor/src/com/macaroon/piztor/Main.java @@ -332,7 +332,6 @@ public class Main extends PiztorAct { locationManager = (LocationManager)this.getSystemService(LOCATION_SERVICE); isGPSEnabled = locationManager.isProviderEnabled(locationManager.GPS_PROVIDER); - if (isGPSEnabled == false) alertMaker.showSettingsAlert(); mapInfo = AppMgr.mapInfo; ActStatus[] r = new ActStatus[3]; @@ -356,6 +355,7 @@ public class Main extends PiztorAct { mMapView = (MapView) findViewById(R.id.bmapView); mapMaker = new MapMaker(mMapView, getApplicationContext()); alertMaker = new AlertMaker(Main.this, mapMaker); + if (isGPSEnabled == false) alertMaker.showSettingsAlert(); mapMaker.clearOverlay(mMapView); mapMaker.InitMap(); InitTouchListenr(); |