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

Commit 15baf7f6 authored by Nathan Harold's avatar Nathan Harold
Browse files

Invoke Both onDataConnectionStateChanged Methods

PhoneStateListener#onDataConnectionStateChanged is
overloaded to either take 1 or 2 parameters.

When receiving a callback from binder, the same call
should invoke both methods. sequentially.

Bug: 122274960
Test: atest PhoneStateListenerTest
Change-Id: I146f1eafa475969119254339d86b41244a96fb56
parent 609ed338
Loading
Loading
Loading
Loading
+5 −3
Original line number Diff line number Diff line
@@ -805,9 +805,11 @@ public class PhoneStateListener {
            PhoneStateListener psl = mPhoneStateListenerWeakRef.get();
            if (psl == null) return;

            Binder.withCleanCallingIdentity(
                    () -> mExecutor.execute(
                            () -> psl.onDataConnectionStateChanged(state, networkType)));
            Binder.withCleanCallingIdentity(() -> mExecutor.execute(
                    () -> {
                        psl.onDataConnectionStateChanged(state, networkType);
                        psl.onDataConnectionStateChanged(state);
                    }));
        }

        public void onDataActivity(int direction) {