aboutsummaryrefslogtreecommitdiffstats
path: root/main/src/cgeo/geocaching/CgeoApplication.java
diff options
context:
space:
mode:
Diffstat (limited to 'main/src/cgeo/geocaching/CgeoApplication.java')
-rw-r--r--main/src/cgeo/geocaching/CgeoApplication.java25
1 files changed, 2 insertions, 23 deletions
diff --git a/main/src/cgeo/geocaching/CgeoApplication.java b/main/src/cgeo/geocaching/CgeoApplication.java
index 78f3a23..d59101d 100644
--- a/main/src/cgeo/geocaching/CgeoApplication.java
+++ b/main/src/cgeo/geocaching/CgeoApplication.java
@@ -3,7 +3,6 @@ package cgeo.geocaching;
import cgeo.geocaching.sensors.DirectionProvider;
import cgeo.geocaching.sensors.GeoDataProvider;
import cgeo.geocaching.sensors.IGeoData;
-import cgeo.geocaching.settings.Settings;
import cgeo.geocaching.utils.Log;
import rx.Observable;
@@ -12,11 +11,9 @@ import rx.observables.ConnectableObservable;
import android.app.Application;
import android.os.Environment;
-import android.view.ViewConfiguration;
import java.io.IOException;
import java.lang.Thread.UncaughtExceptionHandler;
-import java.lang.reflect.Field;
public class CgeoApplication extends Application {
@@ -35,7 +32,7 @@ public class CgeoApplication extends Application {
Thread.setDefaultUncaughtExceptionHandler(new UncaughtExceptionHandler() {
@Override
- public void uncaughtException(Thread thread, Throwable ex) {
+ public void uncaughtException(final Thread thread, final Throwable ex) {
Log.e("UncaughtException", ex);
Throwable exx = ex;
while (exx.getCause() != null) {
@@ -45,7 +42,7 @@ public class CgeoApplication extends Application {
try {
Log.e("OutOfMemory");
android.os.Debug.dumpHprofData(Environment.getExternalStorageDirectory().getPath() + "/dump.hprof");
- } catch (IOException e) {
+ } catch (final IOException e) {
Log.e("Error writing dump", e);
}
}
@@ -67,24 +64,6 @@ public class CgeoApplication extends Application {
}
@Override
- public void onCreate() {
- if (Settings.isAlwaysShowOverlfowMenu()) {
- try {
- ViewConfiguration config = ViewConfiguration.get(this);
- Field menuKeyField = ViewConfiguration.class.getDeclaredField("sHasPermanentMenuKey");
-
- if (menuKeyField != null) {
- menuKeyField.setAccessible(true);
- menuKeyField.setBoolean(config, false);
- }
- } catch (Exception ex) {
- // Ignore
- }
- }
- }
-
-
- @Override
public void onLowMemory() {
Log.i("Cleaning applications cache.");
DataStore.removeAllFromCache();