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

Commit 606c8f32 authored by Matthew Xie's avatar Matthew Xie Committed by Gerrit Code Review
Browse files

Merge "Fix signal strength indicator."

parents c3b95a66 aa3608d2
Loading
Loading
Loading
Loading
+6 −2
Original line number Diff line number Diff line
@@ -161,13 +161,17 @@ class HeadsetPhoneState {

    void sendDeviceStateChanged()
    {
        // When out of service, send signal strength as 0. Some devices don't
        // use the service indicator, but only the signal indicator
        int signal = mService == HeadsetHalConstants.NETWORK_STATE_AVAILABLE ? mSignal : 0;

        Log.d(TAG, "sendDeviceStateChanged. mService="+ mService +
                   " mSignal="+mSignal +" mRoam="+mRoam +
                   " mSignal=" + signal +" mRoam="+ mRoam +
                   " mBatteryCharge=" + mBatteryCharge);
        HeadsetStateMachine sm = mStateMachine;
        if (sm != null) {
            sm.sendMessage(HeadsetStateMachine.DEVICE_STATE_CHANGED,
                new HeadsetDeviceState(mService, mRoam, mSignal, mBatteryCharge));
                new HeadsetDeviceState(mService, mRoam, signal, mBatteryCharge));
        }
    }