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

Commit 1f627416 authored by Stephen Bird's avatar Stephen Bird
Browse files

[1/2] Roaming Notification: restrict to provider selected values

Change-Id: I3b349fc23151a54cbdf148fe489f26e674293deb
Ticket: CD-636
(cherry picked from commit 5a701ac8)
parent 500ed2ce
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -245,6 +245,8 @@ public class DiscoveryEventHandler {
            count = preferences.getInt(CallMethodUtils.PREF_INTERNATIONAL_CALLS, 1);
        } else if (key.equals(NudgeKey.NOTIFICATION_WIFI_CALL)) {
            count = preferences.getInt(CallMethodUtils.PREF_WIFI_CALL, 1);
        } else if (key.equals(NudgeKey.NOTIFICATION_ROAMING)) {
            count = preferences.getInt(CallMethodUtils.PREF_ROAMING_CALLS, 1);
        }

        checkCount = (count == b.getInt(NudgeKey.NOTIFICATION_PARAM_EVENTS_FIRST_NUDGE, 0)) ||
+6 −0
Original line number Diff line number Diff line
@@ -65,6 +65,12 @@ public class DiscoverySignalReceiver extends BroadcastReceiver {
                        (TelephonyManager) context.getSystemService(Context.TELEPHONY_SERVICE);

                if ((mWifi.isConnected() && tm.isNetworkRoaming()) || DEBUG_CONNECTIVITY) {
                    SharedPreferences preferences = context
                            .getSharedPreferences(DialtactsActivity.SHARED_PREFS_NAME,
                                    Context.MODE_PRIVATE);
                    int currentCount = preferences.getInt(CallMethodUtils.PREF_ROAMING_CALLS, 0);
                    preferences.edit().putInt(CallMethodUtils.PREF_ROAMING_CALLS,
                            ++currentCount).apply();
                    startServiceForConnectivityChanged(context);
                }
                break;