From 5e9cca3afd5f925e84941b7ebdd110ea8141835e Mon Sep 17 00:00:00 2001 From: SongFerngWang Date: Thu, 9 Sep 2021 01:29:41 +0800 Subject: [PATCH] The telephonyDisplayInfo is wrong after doing compatibility. If one of the callers is do compatibility, then other caller get wrong telephonyDisplayInfo. Bug: 197521539 Test: Manually test at local and test the compatibility part and verify the 5G+ icon. Test: atest com.android.internal.telephony.TelephonyRegistryTest Change-Id: Ic938f7623c802d04edc67678391cadc80c7dd084 --- .../core/java/com/android/server/TelephonyRegistry.java | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/services/core/java/com/android/server/TelephonyRegistry.java b/services/core/java/com/android/server/TelephonyRegistry.java index edf832f0fc22f..b4413a4447b75 100644 --- a/services/core/java/com/android/server/TelephonyRegistry.java +++ b/services/core/java/com/android/server/TelephonyRegistry.java @@ -1889,11 +1889,12 @@ public class TelephonyRegistry extends ITelephonyRegistry.Stub { try { if (!mConfigurationProvider.isDisplayInfoNrAdvancedSupported( r.callingPackage, Binder.getCallingUserHandle())) { - telephonyDisplayInfo = + r.callback.onDisplayInfoChanged( getBackwardCompatibleTelephonyDisplayInfo( - telephonyDisplayInfo); + telephonyDisplayInfo)); + } else { + r.callback.onDisplayInfoChanged(telephonyDisplayInfo); } - r.callback.onDisplayInfoChanged(telephonyDisplayInfo); } catch (RemoteException ex) { mRemoveList.add(r.binder); }