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

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

Fixed link bandwidth not updated am: 6a335890 am: 1cea2214

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

Change-Id: I922e6eb0ecaffe0fa2a0eda004e2fbf5fe8f1d2c
parents 78bf34dc 1cea2214
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);
        }