diff options
author | SongFerngWang <songferngwang@google.com> | 2020-12-21 16:24:25 +0800 |
---|---|---|
committer | SongFerngWang <songferngwang@google.com> | 2021-03-04 14:58:54 +0800 |
commit | e206456a1612a95ee31848c506d0d71326ee8858 (patch) | |
tree | 58a920a9e4fdb290402ad3ecaad42f1c2a95b4c0 /core/java/com | |
parent | ddd2a13c38a9534c64cf1351f5622f0f1cdbe971 (diff) |
Improve AllowedNetworkTypesForReason and refactor PreferredNetworkType
- Add more reasons of allowed network type
- ALLOWED_NETWORK_TYPES_REASON_USER
- ALLOWED_NETWORK_TYPES_REASON_CARRIER
- Add @systemApi for below
- ALLOWED_NETWORK_TYPES_REASON_USER
- ALLOWED_NETWORK_TYPES_REASON_POWER
- ALLOWED_NETWORK_TYPES_REASON_CARRIER
- setAllowedNetworkTypesForReason API
- getAllowedNetworkTypesForReason API
- getAllowedNetworkTypesBitmask API
- Add Public for below
- CARRIER_NR_AVAILABILITY_NONE
- CARRIER_NR_AVAILABILITY_NSA
- CARRIER_NR_AVAILABILITY_SA
- KEY_CARRIER_NR_AVAILABILITY_INT
- @Deprecated API
- setPreferredNetworkTypeBitmask
- getPreferredNetworkTypeBitmask
- setAllowedNetworkType
- getAllowedNetworkType
- Add a new way to notify allowedNetworkType at PhoneStateListener
- Replace KEY_NR_ENABLED_BOOL with KEY_CARRIER_NR_AVAILABILITY_INT
Bug: 161434786
Test: atest TelephonyManagerTest#testSetAllowedNetworkTypesForReason
(PASS)
atest TelephonyManagerTest#\
testSetAllowedNetworkTypesForReason_moreReason
(PASS)
atest PhoneStateListenerTest#\
testOnAllowedNetworkTypesChangedByRegisterPhoneStateListener
(PASS)
Change-Id: I3d0c119a0c2a30c56b0c127ba6525f8992b4e9dd
Merged-In: I3d0c119a0c2a30c56b0c127ba6525f8992b4e9dd
Diffstat (limited to 'core/java/com')
-rw-r--r-- | core/java/com/android/internal/telephony/IPhoneStateListener.aidl | 1 | ||||
-rw-r--r-- | core/java/com/android/internal/telephony/ITelephonyRegistry.aidl | 1 |
2 files changed, 2 insertions, 0 deletions
diff --git a/core/java/com/android/internal/telephony/IPhoneStateListener.aidl b/core/java/com/android/internal/telephony/IPhoneStateListener.aidl index 854fb17e692b..ee94ef8ddda3 100644 --- a/core/java/com/android/internal/telephony/IPhoneStateListener.aidl +++ b/core/java/com/android/internal/telephony/IPhoneStateListener.aidl @@ -71,4 +71,5 @@ oneway interface IPhoneStateListener { void onBarringInfoChanged(in BarringInfo barringInfo); void onPhysicalChannelConfigChanged(in List<PhysicalChannelConfig> configs); void onDataEnabledChanged(boolean enabled, int reason); + void onAllowedNetworkTypesChanged(in Map allowedNetworkTypeList); } diff --git a/core/java/com/android/internal/telephony/ITelephonyRegistry.aidl b/core/java/com/android/internal/telephony/ITelephonyRegistry.aidl index 47e696a86334..8d691586dfb1 100644 --- a/core/java/com/android/internal/telephony/ITelephonyRegistry.aidl +++ b/core/java/com/android/internal/telephony/ITelephonyRegistry.aidl @@ -94,4 +94,5 @@ interface ITelephonyRegistry { void notifyPhysicalChannelConfigForSubscriber(in int subId, in List<PhysicalChannelConfig> configs); void notifyDataEnabled(in int phoneId, int subId, boolean enabled, int reason); + void notifyAllowedNetworkTypesChanged(in int phoneId, in int subId, in Map allowedNetworkTypeList); } |