From c8fd146744f4fa514a4bc1daf240ade845ac8329 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 Merged-In: I151833df7652b58d4bd599938e84b88e112cc0d7 Change-Id: Ie881d8bc86fa4b6c64ec34b5a9bef29cc686b5bb --- .../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 45868932be2b6..d54bacc6cf27d 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); } } }