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

Commit 1e63bd24 authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Automerger Merge Worker
Browse files

Merge "Retry setup data when reset data throttling" into tm-dev am: aac5c55a

parents e4370a0b aac5c55a
Loading
Loading
Loading
Loading
+17 −15
Original line number Diff line number Diff line
@@ -903,7 +903,7 @@ public class DataRetryManager extends Handler {
         *
         * @param throttleStatusList List of throttle status.
         */
        public void onThrottleStatusChanged(List<ThrottleStatus> throttleStatusList) {}
        public void onThrottleStatusChanged(@NonNull List<ThrottleStatus> throttleStatusList) {}
    }

    /**
@@ -1216,7 +1216,12 @@ public class DataRetryManager extends Handler {

        final List<ThrottleStatus> throttleStatusList = new ArrayList<>();
        for (DataThrottlingEntry dataThrottlingEntry : mDataThrottlingEntries) {
            throttleStatusList.addAll(dataThrottlingEntry.dataProfile.getApnSetting().getApnTypes()
            DataProfile dataProfile = dataThrottlingEntry.dataProfile;
            String apn = dataProfile.getApnSetting() != null
                    ? dataProfile.getApnSetting().getApnName() : null;
            onDataProfileUnthrottled(dataProfile, apn, dataThrottlingEntry.transport);
            if (dataProfile.getApnSetting() != null) {
                throttleStatusList.addAll(dataProfile.getApnSetting().getApnTypes()
                        .stream()
                        .map(apnType -> new ThrottleStatus.Builder()
                                .setApnType(apnType)
@@ -1227,9 +1232,6 @@ public class DataRetryManager extends Handler {
                                .build())
                        .collect(Collectors.toList()));
            }
        if (!throttleStatusList.isEmpty()) {
            mDataRetryManagerCallbacks.forEach(callback -> callback.invokeFromExecutor(
                    () -> callback.onThrottleStatusChanged(throttleStatusList)));
        }

        mDataThrottlingEntries.clear();