@@ -295,16 +295,9 @@ static Activity getCurrentActivity() {
295
295
296
296
static OSRemoteNotificationReceivedHandler remoteNotificationReceivedHandler ;
297
297
static OSNotificationWillShowInForegroundHandler notificationWillShowInForegroundHandler ;
298
-
299
- // TODO: Start of old mInitBuilder params
300
- // These should be cleaned up and managed else where maybe?
301
- // These have been ripped out of mInitBuilder since it was deleted and placed here for now
302
298
static OSNotificationOpenedHandler notificationOpenedHandler ;
303
299
static OSInAppMessageClickHandler inAppMessageClickHandler ;
304
300
305
- static boolean mAutoPromptLocation ;
306
- // TODO: End of old mInitBuilder params
307
-
308
301
// Is the init() of OneSignal SDK finished yet
309
302
private static boolean initDone ;
310
303
static boolean isInitDone () {
@@ -375,7 +368,7 @@ static OSInAppMessageController getInAppMessageController() {
375
368
376
369
@ NonNull private static OSUtils osUtils = new OSUtils ();
377
370
378
- private static boolean registerForPushFired , locationFired , promptedLocation , getTagsCall , waitingToPostStateSync , androidParamsRequestStarted ;
371
+ private static boolean registerForPushFired , locationFired , getTagsCall , waitingToPostStateSync , androidParamsRequestStarted ;
379
372
380
373
private static LocationController .LocationPoint lastLocationPoint ;
381
374
@@ -516,23 +509,6 @@ private static class IAPUpdateJob {
516
509
}
517
510
private static IAPUpdateJob iapUpdateJob ;
518
511
519
- /**
520
- * Prompts the user for location permissions.
521
- * This allows for geotagging so you can send notifications to users based on location.
522
- * This does not accommodate any rationale-gating that is encouraged before requesting
523
- * permissions from the user.
524
- * <br/><br/>
525
- * See {@link #promptLocation()} for more details on how to manually prompt location permissions.
526
- *
527
- * @param enable If set to {@code false}, OneSignal will not prompt for location.
528
- * If set to {@code true}, OneSignal will prompt users for location permissions
529
- * when your app starts
530
- * @return the builder object you called this method on
531
- */
532
- public static void autoPromptLocation (boolean enable ) {
533
- mAutoPromptLocation = enable ;
534
- }
535
-
536
512
/**
537
513
* If notifications are disabled for your app, unsubscribe the user from OneSignal.
538
514
* This will happen when your users go to <i>Settings</i> > <i>Apps</i> and turn off notifications or
@@ -876,12 +852,10 @@ public void onComplete(LocationController.LocationPoint point) {
876
852
registerUser ();
877
853
}
878
854
};
879
- boolean doPrompt = mAutoPromptLocation && !promptedLocation ;
880
- // Prompted so we don't ask for permissions more than once
881
- promptedLocation = promptedLocation || mAutoPromptLocation ;
882
855
883
- LocationController .getLocation (appContext , doPrompt , false , locationHandler );
856
+ LocationController .getLocation (appContext , false , false , locationHandler );
884
857
}
858
+
885
859
private static PushRegistrator mPushRegistrator ;
886
860
887
861
private static PushRegistrator getPushRegistrator () {
@@ -2424,7 +2398,6 @@ void onAnswered(OneSignal.PromptActionResult result) {
2424
2398
};
2425
2399
2426
2400
LocationController .getLocation (appContext , true , fallbackToSettings , locationHandler );
2427
- promptedLocation = true ;
2428
2401
}
2429
2402
2430
2403
/**
0 commit comments