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
This test sometimes fails in PostSubmits because the background
thread which calls the verified class does not have time to execute
before the class is verified.
This creates a helper function to monitor background thread completion.
Test: atest -c AutoSelectPreferenceControllerTest
Change-Id: I6c320abd70fcb5fe823ec122fb0dac67174ecb4a
In order to enable the junit tests as a blocking presubmit, we want
to ensure that all tests within this directory are being actively
maintained. A number of these tests were migrated to robolectric
sometime in 2017-2018, and because they are no longer maintained this CL
moves them into a separate folder, so that they will not be included in
the presubmit.
Please verify that this is the appropriate action to take for these
tests. In the future, the settings team may decide to delete this legacy
directory entirely.
Note that AutoSelectPreferenceControllerTest.setChecked_isChecked_showProgressDialog
is currently failing, but we can fix it in a separate CL.
Test: make SettingsUnitTests && adb install -r out/target/product/shamu/testcases/SettingsUnitTests/arm64/SettingsUnitTests.apk
Change-Id: Iafc15b9ac69b5ca2fec76d3c0c7e247ea0017d49
TelephonyManager had a minor refactor of some of the methods revolving
around mobile data. Change code in Settings to use the new ones instead.
Bug: 169367013
Test: existing unit tests, manual
Change-Id: I7ebae37373d53fb2c59b6b546232dbddf77398d4
This change removes all the files which have any failure JUnit test case.
Bug: 168429329
Test: atest --test-mapping tests/unit:postsubmit
Change-Id: I1665565760f9dfc185bf9b8dd871ee106eba5dd5