aboutsummaryrefslogtreecommitdiffstats
path: root/main/src
diff options
context:
space:
mode:
authorBananeweizen <bananeweizen@gmx.de>2014-05-18 11:11:41 +0200
committerBananeweizen <bananeweizen@gmx.de>2014-05-18 11:11:41 +0200
commit71855d90c5b36795ee75499f8d13e1ab04245b55 (patch)
tree7e9bab58657eb639a0d736bca1cec8fb1fa12796 /main/src
parentbd1f19167c978280432fc21edc82f3e6a2dcacaf (diff)
downloadcgeo-71855d90c5b36795ee75499f8d13e1ab04245b55.zip
cgeo-71855d90c5b36795ee75499f8d13e1ab04245b55.tar.gz
cgeo-71855d90c5b36795ee75499f8d13e1ab04245b55.tar.bz2
avoid application crash when clicking home button
Every activity starts the main activity when clicking the home button. We should avoid that in the main activity itself as it leads to a crash of the app.
Diffstat (limited to 'main/src')
-rw-r--r--main/src/cgeo/geocaching/MainActivity.java3
1 files changed, 3 insertions, 0 deletions
diff --git a/main/src/cgeo/geocaching/MainActivity.java b/main/src/cgeo/geocaching/MainActivity.java
index d8958b4..59a0614 100644
--- a/main/src/cgeo/geocaching/MainActivity.java
+++ b/main/src/cgeo/geocaching/MainActivity.java
@@ -290,6 +290,9 @@ public class MainActivity extends AbstractActionBarActivity {
public boolean onOptionsItemSelected(final MenuItem item) {
final int id = item.getItemId();
switch (id) {
+ case android.R.id.home:
+ // do nothing in case of home button click
+ return true;
case R.id.menu_about:
showAbout(null);
return true;