Bug 1240711 - (Part 3) GeckoAppShell: Do not prompt for permission if we are disabling the location service. r=nalexander
authorSebastian Kaspari <s.kaspari@gmail.com>
Thu, 21 Jan 2016 15:49:13 +0100
changeset 281371 5ce83db83109db5d75efd22d5c8ff3d65af24183
parent 281370 ebcfad9074a9ce0aa54d0059a39fa9f18287a36c
child 281372 c9c1ab17319919e8d1bce53492f6ebd0f41cf196
push id29935
push userphilringnalda@gmail.com
push dateSun, 24 Jan 2016 02:12:02 +0000
treeherdermozilla-central@a2e81822194a [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersnalexander
bugs1240711
milestone46.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1240711 - (Part 3) GeckoAppShell: Do not prompt for permission if we are disabling the location service. r=nalexander
mobile/android/base/java/org/mozilla/gecko/GeckoAppShell.java
--- a/mobile/android/base/java/org/mozilla/gecko/GeckoAppShell.java
+++ b/mobile/android/base/java/org/mozilla/gecko/GeckoAppShell.java
@@ -503,16 +503,17 @@ public class GeckoAppShell
     }
 
     @WrapForJNI
     public static void enableLocation(final boolean enable) {
         Permissions
                 .from((Activity) getContext())
                 .withPermissions(Manifest.permission.ACCESS_FINE_LOCATION)
                 .onUIThread()
+                .doNotPromptIf(!enable)
                 .run(new Runnable() {
                     @Override
                     public void run() {
                         LocationManager lm = getLocationManager(getApplicationContext());
                         if (lm == null) {
                             return;
                         }