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

Commit fcca381b authored by Brad Ebinger's avatar Brad Ebinger
Browse files

Properly release partial wakelock during SRVCC

When an active call was moved from IMS->GsmCdma using
SRVCC, the partial wakelock was not released, causing
the device to stay awake during the call.

This change properly releases the wakelock in this
condition.

Bug: 117747831
Test: atest FrameworksTelephonyTests
Change-Id: I6d8f706afc1adadf4198586c4f39dbe8065df58b
parent 869bf5b0
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -860,6 +860,8 @@ public class GsmCdmaCallTracker extends CallTracker {
                                hoConnection.mPreHandoverState != GsmCdmaCall.State.HOLDING &&
                                dc.state == DriverCall.State.ACTIVE) {
                            mConnections[i].onConnectedInOrOut();
                        } else {
                            mConnections[i].onConnectedConnectionMigrated();
                        }

                        mHandoverConnections.remove(hoConnection);
+10 −0
Original line number Diff line number Diff line
@@ -780,6 +780,16 @@ public class GsmCdmaConnection extends Connection {
        }
    }

    /**
     * We have completed the migration of another connection to this GsmCdmaConnection (for example,
     * in the case of SRVCC) and not still DIALING/ALERTING/INCOMING/WAITING.
     */
    void onConnectedConnectionMigrated() {
        // We can release the wakelock in this case, the migrated call is not still
        // DIALING/ALERTING/INCOMING/WAITING.
        releaseWakeLock();
    }

    private void
    doDisconnect() {
        mIndex = -1;