From 71855d90c5b36795ee75499f8d13e1ab04245b55 Mon Sep 17 00:00:00 2001 From: Bananeweizen Date: Sun, 18 May 2014 11:11:41 +0200 Subject: 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. --- main/src/cgeo/geocaching/MainActivity.java | 3 +++ 1 file changed, 3 insertions(+) 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; -- cgit v1.1