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

Commit 1cea2214 authored by Jack Yu's avatar Jack Yu Committed by Automerger Merge Worker
Browse files

Fixed link bandwidth not updated am: 6a335890

Original change: https://android-review.googlesource.com/c/platform/frameworks/opt/telephony/+/2021736

Change-Id: Ib781d25c53bec76004488ba229526bd9c30f2f24
parents 9cd773b5 6a335890
Loading
Loading
Loading
Loading
+4 −2
Original line number Diff line number Diff line
@@ -1082,9 +1082,11 @@ public class DataNetwork extends StateMachine {
    private void registerForBandwidthUpdate() {
        int bandwidthEstimateSource = mDataConfigManager.getBandwidthEstimateSource();
        if (bandwidthEstimateSource == BANDWIDTH_SOURCE_MODEM) {
            mPhone.mCi.unregisterForLceInfo(getHandler());
            mPhone.mCi.registerForLceInfo(
                    getHandler(), EVENT_BANDWIDTH_ESTIMATE_FROM_MODEM_CHANGED, null);
        } else if (bandwidthEstimateSource == BANDWIDTH_SOURCE_BANDWIDTH_ESTIMATOR) {
            mPhone.getLinkBandwidthEstimator().unregisterForBandwidthChanged(getHandler());
            mPhone.getLinkBandwidthEstimator().registerForBandwidthChanged(
                    getHandler(), EVENT_BANDWIDTH_ESTIMATE_FROM_BANDWIDTH_ESTIMATOR_CHANGED, null);
        } else {
            loge("Invalid bandwidth source configuration: " + bandwidthEstimateSource);
        }