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

Commit 1c4ce37f authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Fixed link bandwidth not updated"

parents 51694343 553abb54
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);
        }