fix history issues

git-svn-id: https://osmand.googlecode.com/svn/trunk@127 e29c36b1-1cfa-d876-8d93-3434fc2bb7b8
This commit is contained in:
Victor Shcherb 2010-06-03 10:00:08 +00:00
parent 20d7b06a39
commit 5bbdccdc98
2 changed files with 6 additions and 6 deletions

View file

@ -103,7 +103,7 @@ public class MainMenuActivity extends Activity {
notification.setLatestEventInfo(MainMenuActivity.this, "OsmAnd",
"OsmAnd is running in background", PendingIntent.getActivity(
this.getBaseContext(), 0, mapIndent,
PendingIntent.FLAG_CANCEL_CURRENT));
PendingIntent.FLAG_UPDATE_CURRENT));
mNotificationManager.notify(APP_NOTIFICATION_ID, notification);
showMap = (Button) findViewById(R.id.MapButton);

View file

@ -38,6 +38,7 @@ import com.osmand.R;
import com.osmand.ResourceManager;
import com.osmand.activities.FavouritesActivity.FavouritePoint;
import com.osmand.activities.FavouritesActivity.FavouritesDbHelper;
import com.osmand.activities.search.SearchActivity;
import com.osmand.data.preparation.MapTileDownloader;
import com.osmand.map.IMapLocationListener;
import com.osmand.osm.LatLon;
@ -150,7 +151,7 @@ public class MapActivity extends Activity implements LocationListener, IMapLocat
@Override
public void onClick(View v) {
Intent newIntent = new Intent(MapActivity.this, MainMenuActivity.class);
newIntent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_CLEAR_TOP);
newIntent.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);
startActivity(newIntent);
}
});
@ -159,11 +160,10 @@ public class MapActivity extends Activity implements LocationListener, IMapLocat
@Override
public boolean onKeyDown(int keyCode, KeyEvent event) {
if (keyCode == KeyEvent.KEYCODE_BACK
if (keyCode == KeyEvent.KEYCODE_SEARCH
&& event.getRepeatCount() == 0) {
// Intent newIntent = new Intent(MapActivity.this, MainMenuActivity.class);
// newIntent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_CLEAR_TOP);
// startActivity(newIntent);
Intent newIntent = new Intent(MapActivity.this, SearchActivity.class);
startActivity(newIntent);
return true;
}
return super.onKeyDown(keyCode, event);