From b377f0146cae5f6eab86b9fbc4f67233b0e09001 Mon Sep 17 00:00:00 2001 From: Josephine Lim Date: Mon, 15 May 2017 12:10:19 +0200 Subject: [PATCH 1/2] Add string resource --- .../main/java/fr/free/nrw/commons/nearby/NearbyActivity.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/src/main/java/fr/free/nrw/commons/nearby/NearbyActivity.java b/app/src/main/java/fr/free/nrw/commons/nearby/NearbyActivity.java index 34715183f..49e1c0de7 100644 --- a/app/src/main/java/fr/free/nrw/commons/nearby/NearbyActivity.java +++ b/app/src/main/java/fr/free/nrw/commons/nearby/NearbyActivity.java @@ -110,7 +110,7 @@ public class NearbyActivity extends BaseActivity { startActivityForResult(callGPSSettingIntent, 1); } }); - alertDialogBuilder.setNegativeButton("Cancel", + alertDialogBuilder.setNegativeButton(R.string.menu_cancel_upload, new DialogInterface.OnClickListener() { public void onClick(DialogInterface dialog, int id) { dialog.cancel(); From aa4d2daf48a9445703ece2601da7d2a1038d967a Mon Sep 17 00:00:00 2001 From: Josephine Lim Date: Mon, 15 May 2017 12:11:06 +0200 Subject: [PATCH 2/2] Move checkGps() to onResume --- .../main/java/fr/free/nrw/commons/nearby/NearbyActivity.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/src/main/java/fr/free/nrw/commons/nearby/NearbyActivity.java b/app/src/main/java/fr/free/nrw/commons/nearby/NearbyActivity.java index 49e1c0de7..0782fc07b 100644 --- a/app/src/main/java/fr/free/nrw/commons/nearby/NearbyActivity.java +++ b/app/src/main/java/fr/free/nrw/commons/nearby/NearbyActivity.java @@ -57,7 +57,7 @@ public class NearbyActivity extends BaseActivity { if (getSupportActionBar() != null) { getSupportActionBar().setDisplayHomeAsUpEnabled(true); } - checkGps(); + bundle = new Bundle(); locationManager = new LocationServiceManager(this); locationManager.registerLocationManager(); @@ -150,6 +150,7 @@ public class NearbyActivity extends BaseActivity { @Override protected void onResume() { super.onResume(); + checkGps(); } protected void refreshView() {