Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit a468d63d authored by destradaa's avatar destradaa
Browse files

Use private action for SUPL related connectivity changes.

In order to prevent sendind a CONNECTIVITY_CHANGED broadcast for SUPL
connection changes, which can cause many apps to wake up, as a
work-around use a separate action.

Bug: 22729462
Change-Id: I9847603ae56ab90d0f230cdcdc046c710397a553
parent 363c694a
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -444,7 +444,8 @@ public class GpsLocationProvider implements LocationProviderInterface {
                checkSmsSuplInit(intent);
            } else if (action.equals(Intents.WAP_PUSH_RECEIVED_ACTION)) {
                checkWapSuplInit(intent);
            } else if (action.equals(ConnectivityManager.CONNECTIVITY_ACTION)) {
            } else if (action.equals(ConnectivityManager.CONNECTIVITY_ACTION)
                    || action.equals(ConnectivityManager.CONNECTIVITY_ACTION_SUPL)) {
                // retrieve NetworkInfo result for this UID
                NetworkInfo info =
                        intent.getParcelableExtra(ConnectivityManager.EXTRA_NETWORK_INFO);
@@ -2045,6 +2046,7 @@ public class GpsLocationProvider implements LocationProviderInterface {
            intentFilter.addAction(ALARM_WAKEUP);
            intentFilter.addAction(ALARM_TIMEOUT);
            intentFilter.addAction(ConnectivityManager.CONNECTIVITY_ACTION);
            intentFilter.addAction(ConnectivityManager.CONNECTIVITY_ACTION_SUPL);
            intentFilter.addAction(PowerManager.ACTION_POWER_SAVE_MODE_CHANGED);
            intentFilter.addAction(PowerManager.ACTION_DEVICE_IDLE_MODE_CHANGED);
            intentFilter.addAction(Intent.ACTION_SCREEN_OFF);