- The AirplaneSafeNetworksSliceTest should restore Airplane Mode state
after tear down
- Create AirplaneModeRule to backup/restore Airplane Mode state
automaticlly
- Plan to reuse the AirplaneModeRule for other test case
Bug: 173413889
Test: atest -c AirplaneSafeNetworksSliceTest
Change-Id: Id142cf6302a188e6d82b44fcf29a395dc21f6013
note that this class contains a state machine of the subscription
information cache. The mock subscription manager must present
subscriptions in order for an update intent to result in a change
notifcation.
Bug: 175389659
Test: atest -c ActiveSubsciptionsListenerTest
Change-Id: I8cd2bd5d5b7b1539f421822ba77ed3d8e0ac493b
Biggest difference here: the use of a MockContentProvider
Bug: 175389659
Test: atest -c PreferredNetworkModeContentObserverTest
Change-Id: I891620118f7e84aa1c7f9e0ccdaeb21a225dc31a
Test is currently failing due to no methods present. Since we want
the controller to be unavailable for now, I chose to write a method
verifying that state.
Bug: 174566774
Test: atest -c CrossSimCallingPreferenceControllerTest
Change-Id: Iced0ac7bbd3482907312182a632dcf3215c55391
android.test.UiThreadTest has been deprecated.
This is a change migrate it into androidx.test.annotation.UiThreadTest
Bug: 174832214
Change-Id: I38f35e7602a269a018510723c199a7259d704b4e
Test: atest -c MobileNetworkSwitchControllerTest
- Hide slice when Airplane Mode is off
- Show slice when Airplane Mode is on
- Show "View airplane-safe networks" when Wi-Fi is disabled
- Show "Turn off Airplane Mode" when Wi-Fi is enabled
- Tap "View airplane-safe networks" will set Wi-Fi enabled
- Tap "Turn off Airplane Mode" will set airplane Mode off
- Plan to update the slice to Button style in next cl
- Screenshot
https://screenshot.googleplex.com/7wHoqvTjaScHXVm
Bug: 173413889
Test:
- atest -c AirplaneSafeNetworksSliceTest
- adb shell am start -a
android.settings.panel.action.INTERNET_CONNECTIVITY
Change-Id: Idcd70348728db2da91582697aaeb4bbf4da117c6
This reverts commit 329d753a29.
Reason for revert: Broken tests on NetworkProviderSettingsTest
Bug: 174285440
Change-Id: I47e6a9479559cb424bd4b8ac0e967f013f2fba86
New test case: NetworkProviderCallsSmsFragmentTest
Modify the key of preference
Bug: 172053880
Test: manual & atest -c NetworkProviderCallsSmsFragmentTest
Change-Id: I218aaf1194898e70b2118428c1ea5a389d85d036
1. Use AndroidJunit4 instead of RobolectricTestRunner
2. Use ApplicationProvider instead of RuntimeEnvironment
to get context
3. Change Copy Right
Bug: 173385220
Test: atest MobileNetworkSwitchControllerTest
Change-Id: I127ba4123dd8e144dbf7778865a08582657f7195
1. Use AndroidJunit4 instead of RobolectricTestRunner
2. Use ApplicationProvider instead of RuntimeEnvironment
to get context
3. Change Copy Right
4. remove the mock of PreferenceScreen
5. onPreferenceClick_startsIntent test case was changed
Bug: 173332890
Test: atest DeleteSimProfilePreferenceControllerTest
Change-Id: Ia7cde5a1da23fd976d99432faa8526c7aa0bf97f
1. Use AndroidJunit4 instead of RobolectricTestRunner
2. Use ApplicationProvider instead of RuntimeEnvironment
to get context
3. Change Copy Right
4. Remove the mock of PreferenceScreen
Bug: 173340087
Test: atest CarrierPreferenceControllerTest
Change-Id: Ia0dcc9db5e99626ce0f410d62d16089e0f75e123
1. current connection is mobile data
- remove the SubscriptionsPreferenceController#activeNetworkIsCellular() and move into MobileNetworkUtils
2. isProviderModel API
- Add it in Util for Provider Model
3. isWiFiCallingEnabled
- remove WifiCallingPreferenceController#isWifiCallingEnabled() and move into MobileNetworkUtils
4. Add nes test case for MobileNetworkUtils
Bug: 171873895
Test: atest -c MobileNetworkUtilsTest
Change-Id: I4bfdf0537fe07d064d6c0ba4a2c44b4a4f158d91
Copied it from MockWifiCallingQueryImsState which is existed in robotests
Diff: https://diff.googleplex.com/#key=DgvbruCHVQpt
Bug: 172053880
Test: manual
Change-Id: I8255db70fe7916e6ac18b56a646a6761bbda106b
1. Use AndroidJunit4 instead of RobolectricTestRunner
2. Use ApplicationProvider instead of RuntimeEnvironment to get context
3. Change Copy Right
4. Create new class and add a function which loads the Settings Resource.
5. remove getOnPreferenceChangeListener. Becasue the error:
java.lang.NoSuchMethodError: No virtual method getOnPreferenceChangeListener()
Bug: 173004787
Test: atest -c DefaultSubscriptionControllerTest
Change-Id: Iac9834f2a47bd8b50234646197a31058ffacaa4b
1. Use AndroidJunit4 instead of RobolectricTestRunner
2. Use ApplicationProvider instead of RuntimeEnvironment
to get context
3. Change Copy Right
4. remove the mock of PreferenceScreen
Bug: 173003522
Test: atest DisabledSubscriptionControllerTest.java
Change-Id: Ia99a4cf4618fcb32162485e7da5e48e3b313ce67
1. Use AndroidJunit4 instead of RobolectricTestRunner
2. Use ApplicationProvider instead of RuntimeEnvironment to get context
3. Change Copy Right
4. Add a function which loads the Settings Resource.
Diff: https://diff.googleplex.com/#key=81Ufa1AWkLAi
Bug: 172047348
Test: atest -c NetworkScorerPickerPreferenceControllerTest
Change-Id: I9c1a4f957b92ab572eadbd8a0804bdc83608230b