Loading tests/telephonytests/src/com/android/internal/telephony/TelephonyRegistryTest.java +13 −8 Original line number Diff line number Diff line Loading @@ -98,14 +98,9 @@ public class TelephonyRegistryTest extends TelephonyTest { private static final Set<Integer> READ_PHONE_STATE_EVENTS; static { READ_PHONE_STATE_EVENTS = new HashSet<>(); READ_PHONE_STATE_EVENTS.add( TelephonyCallback.EVENT_CALL_FORWARDING_INDICATOR_CHANGED); READ_PHONE_STATE_EVENTS.add( TelephonyCallback.EVENT_MESSAGE_WAITING_INDICATOR_CHANGED); READ_PHONE_STATE_EVENTS.add( TelephonyCallback.EVENT_EMERGENCY_NUMBER_LIST_CHANGED); READ_PHONE_STATE_EVENTS.add( TelephonyCallback.EVENT_ACTIVE_DATA_SUBSCRIPTION_ID_CHANGED); READ_PHONE_STATE_EVENTS.add(TelephonyCallback.EVENT_CALL_FORWARDING_INDICATOR_CHANGED); READ_PHONE_STATE_EVENTS.add(TelephonyCallback.EVENT_MESSAGE_WAITING_INDICATOR_CHANGED); READ_PHONE_STATE_EVENTS.add(TelephonyCallback.EVENT_EMERGENCY_NUMBER_LIST_CHANGED); } // All events contribute to TelephonyRegistry#isPrecisePhoneStatePermissionRequired Loading Loading @@ -139,6 +134,8 @@ public class TelephonyRegistryTest extends TelephonyTest { READ_PRIVILEGED_PHONE_STATE_EVENTS.add( TelephonyCallback.EVENT_RADIO_POWER_STATE_CHANGED); READ_PRIVILEGED_PHONE_STATE_EVENTS.add( TelephonyCallback.EVENT_VOICE_ACTIVATION_STATE_CHANGED); READ_PRIVILEGED_PHONE_STATE_EVENTS.add( TelephonyCallback.EVENT_ALLOWED_NETWORK_TYPE_LIST_CHANGED); } // All events contribute to TelephonyRegistry#isActiveEmergencySessionPermissionRequired Loading Loading @@ -233,6 +230,14 @@ public class TelephonyRegistryTest extends TelephonyTest { .thenReturn(false); when(mMockConfigurationProvider.isCallStateReadPhoneStateEnforcedInPlatformCompat( anyString(), any())).thenReturn(false); when(mMockConfigurationProvider.isActiveDataSubIdReadPhoneStateEnforcedInPlatformCompat( anyString(), any())).thenReturn(false); when(mMockConfigurationProvider.isCellInfoReadPhoneStateEnforcedInPlatformCompat( anyString(), any())).thenReturn(false); when(mMockConfigurationProvider.isDisplayInfoReadPhoneStateEnforcedInPlatformCompat( anyString(), any())).thenReturn(false); when(mMockConfigurationProvider.isDisplayInfoNrAdvancedSupported( anyString(), any())).thenReturn(false); mTelephonyRegistry = new TelephonyRegistry(mContext, mMockConfigurationProvider); addTelephonyRegistryService(); mTelephonyCallback = new TelephonyCallbackWrapper(); Loading Loading
tests/telephonytests/src/com/android/internal/telephony/TelephonyRegistryTest.java +13 −8 Original line number Diff line number Diff line Loading @@ -98,14 +98,9 @@ public class TelephonyRegistryTest extends TelephonyTest { private static final Set<Integer> READ_PHONE_STATE_EVENTS; static { READ_PHONE_STATE_EVENTS = new HashSet<>(); READ_PHONE_STATE_EVENTS.add( TelephonyCallback.EVENT_CALL_FORWARDING_INDICATOR_CHANGED); READ_PHONE_STATE_EVENTS.add( TelephonyCallback.EVENT_MESSAGE_WAITING_INDICATOR_CHANGED); READ_PHONE_STATE_EVENTS.add( TelephonyCallback.EVENT_EMERGENCY_NUMBER_LIST_CHANGED); READ_PHONE_STATE_EVENTS.add( TelephonyCallback.EVENT_ACTIVE_DATA_SUBSCRIPTION_ID_CHANGED); READ_PHONE_STATE_EVENTS.add(TelephonyCallback.EVENT_CALL_FORWARDING_INDICATOR_CHANGED); READ_PHONE_STATE_EVENTS.add(TelephonyCallback.EVENT_MESSAGE_WAITING_INDICATOR_CHANGED); READ_PHONE_STATE_EVENTS.add(TelephonyCallback.EVENT_EMERGENCY_NUMBER_LIST_CHANGED); } // All events contribute to TelephonyRegistry#isPrecisePhoneStatePermissionRequired Loading Loading @@ -139,6 +134,8 @@ public class TelephonyRegistryTest extends TelephonyTest { READ_PRIVILEGED_PHONE_STATE_EVENTS.add( TelephonyCallback.EVENT_RADIO_POWER_STATE_CHANGED); READ_PRIVILEGED_PHONE_STATE_EVENTS.add( TelephonyCallback.EVENT_VOICE_ACTIVATION_STATE_CHANGED); READ_PRIVILEGED_PHONE_STATE_EVENTS.add( TelephonyCallback.EVENT_ALLOWED_NETWORK_TYPE_LIST_CHANGED); } // All events contribute to TelephonyRegistry#isActiveEmergencySessionPermissionRequired Loading Loading @@ -233,6 +230,14 @@ public class TelephonyRegistryTest extends TelephonyTest { .thenReturn(false); when(mMockConfigurationProvider.isCallStateReadPhoneStateEnforcedInPlatformCompat( anyString(), any())).thenReturn(false); when(mMockConfigurationProvider.isActiveDataSubIdReadPhoneStateEnforcedInPlatformCompat( anyString(), any())).thenReturn(false); when(mMockConfigurationProvider.isCellInfoReadPhoneStateEnforcedInPlatformCompat( anyString(), any())).thenReturn(false); when(mMockConfigurationProvider.isDisplayInfoReadPhoneStateEnforcedInPlatformCompat( anyString(), any())).thenReturn(false); when(mMockConfigurationProvider.isDisplayInfoNrAdvancedSupported( anyString(), any())).thenReturn(false); mTelephonyRegistry = new TelephonyRegistry(mContext, mMockConfigurationProvider); addTelephonyRegistryService(); mTelephonyCallback = new TelephonyCallbackWrapper(); Loading