From f64b4f2b24e57a565ed62c684a7bc9a99d4264d4 Mon Sep 17 00:00:00 2001 From: SongFerngWang Date: Tue, 3 Mar 2020 21:21:32 +0800 Subject: [PATCH] Framework did not notifyDisplayInfoChanged Bug: 150648297 Test: adb shell am broadcast -a com.android.internal.telephony.TestServiceState \ --ei data_rat 14 --ei nr_state 3 --ei nr_frequency_range 4 Change-Id: I151833df7652b58d4bd599938e84b88e112cc0d7 --- .../com/android/server/TelephonyRegistry.java | 20 +++++++++---------- 1 file changed, 9 insertions(+), 11 deletions(-) diff --git a/services/core/java/com/android/server/TelephonyRegistry.java b/services/core/java/com/android/server/TelephonyRegistry.java index f85fc284330c0..14154339ac4a6 100644 --- a/services/core/java/com/android/server/TelephonyRegistry.java +++ b/services/core/java/com/android/server/TelephonyRegistry.java @@ -1538,17 +1538,15 @@ public class TelephonyRegistry extends ITelephonyRegistry.Stub { } synchronized (mRecords) { if (validatePhoneId(phoneId)) { - if (mDisplayInfos[phoneId] != null) { - mDisplayInfos[phoneId] = displayInfo; - for (Record r : mRecords) { - if (r.matchPhoneStateListenerEvent( - PhoneStateListener.LISTEN_DISPLAY_INFO_CHANGED) - && idMatch(r.subId, subId, phoneId)) { - try { - r.callback.onDisplayInfoChanged(displayInfo); - } catch (RemoteException ex) { - mRemoveList.add(r.binder); - } + mDisplayInfos[phoneId] = displayInfo; + for (Record r : mRecords) { + if (r.matchPhoneStateListenerEvent( + PhoneStateListener.LISTEN_DISPLAY_INFO_CHANGED) + && idMatch(r.subId, subId, phoneId)) { + try { + r.callback.onDisplayInfoChanged(displayInfo); + } catch (RemoteException ex) { + mRemoveList.add(r.binder); } } }