diff options
| author | 2019-01-16 17:04:21 -0800 | |
|---|---|---|
| committer | 2019-01-16 17:04:21 -0800 | |
| commit | 15baf7f6da0019f825b086ae0c857bd2c395cb09 (patch) | |
| tree | 1e4ae81c331e13fabc6be2b25edaf95b3fbb0285 | |
| parent | 609ed3380ff62d6e767ca1b1b036adcf3fc89e54 (diff) | |
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
| -rw-r--r-- | telephony/java/android/telephony/PhoneStateListener.java | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/telephony/java/android/telephony/PhoneStateListener.java b/telephony/java/android/telephony/PhoneStateListener.java index c81670139eae..9fee5932dadc 100644 --- a/telephony/java/android/telephony/PhoneStateListener.java +++ b/telephony/java/android/telephony/PhoneStateListener.java @@ -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) { |