This is a transitional step towards truth 1.0.1, where these APIs have
been completely removed.
Bug: 168765701
Test: m checkbuild
Change-Id: I76f9c37cb699ce6ab8715ffe35d11668ccbceea1
1. androidx lifecycle used rather than settingslib wrapper. This allows
us to handle lifecycle events from junit tests as well.
2. Use Mocks or get/set functions rather than robolectric shadows.
MobileNetworkPreferenceControllerTest Diff:
https://diff.googleplex.com/#key=5P0b2G4iYmcz
Test: atest -c MobileNetworkPreferenceControllerTest
Change-Id: If49fe64e5db89a0cdcac7d26329b8c18626a00de
1. Use AndroidJunit4 instead of RobolectricTestRunner
2. Use ApplicationProvider instead of RuntimeEnvironment to get context
3. Change Copy Right
4. To get the original value and add @After to restore the data
Bug:
Test: atest -c CdmaListPreferenceTest
atest -c CdmaSubscriptionPreferenceControllerTest
atest -c CdmaSystemSelectPreferenceControllerTest
Change-Id: I110727b643a6755ee888708bd1fb2a39cf524a2d
1. Use AndroidJunit4 instead of RobolectricTestRunner
2. Use ApplicationProvider instead of RuntimeEnvironment to get context
3. Change Copy Right
4. Remove the PreferenceViewHolder that not used in test
5. Remove the ProxySubscriptionManager that can get the real object by
context
Bug: 168767478
Test: atest -c CellDataPreferenceTest
Change-Id: I1fa5747c8c6d224d6b13f1a693ff88e57fd150d3
1. Use AndroidJunit4 instead of RobolectricTestRunner
2. Use ApplicationProvider instead of RuntimeEnvironment to get context
3. Change Copy Right
4. Rename the test case for apply the naming rule
Bug: 167948471
Test: atest -c DataUsageInfoControllerTest
Change-Id: Id8591f77d6ab2840223501962ae19eaa2749f326
1. Use AndroidJunit4 instead of RobolectricTestRunner
2. Change the Copy Right
3. Remove the shadowCarrierConfigManager to mock the
CarrierConfigManager
Bug: 168281601
Test: atest -c CarrierSettingsVersionPreferenceControllerTest
Change-Id: Id14d103a82d2d2954721624ed7a16204ee0f25b6
1. Use AndroidJunit4 instead of RobolectricTestRunner
2. Change the Copy Right
3. Remove the ShadowSubscriptionManager
Bug: 168278301
Test: atest -c MmsMessagePreferenceControllerTest
Change-Id: Ie2e9c99f9899d422fde41fcd6cf4a918bc0eaf98
1. Use AndroidJunit4 instead of RobolectricTestRunner
2. Change the Copy Right
Bug: 168277399
Test: atest -c AppPrefLoaderTest
Change-Id: If4c79ae1831bd531c7e4f0a068f06a592418d7fe
1. Rather than mocking the PreferenceScreen, create an instance via
PreferenceManager. Rather than stubbing PreferenceScreen functions to
return the PreferenceCategory mock, the mock is inserted using public
functions.
2. PreferenceCategory active state is checked rather than verifying the
arguments of function calls.
3. mHeaderController test superclass overrides functions which use the
Lifecycle, because doReturn+when on Spy objects has undesired side
effects.
4. Looper message queue prepared for the PreferenceScreen.
Bug: 168130550
Diff: https://diff.googleplex.com/#key=w7a7L3seOowE
Test: atest -c MultiNetworkHeaderControllerTest
Change-Id: Ic66425aca4047d2eacd04509f3bfb315f6dd57fc
1. Use AndroidJunit4 instead of RobolectricTestRunner
2. Add @Before setup() for context
3. Change Copy Right
4. Workaround the resource getString to resolve the resource not found
Bug: 167997296
Test: atest -c MobilePlanPreferenceControllerTest
Change-Id: I5f43b6a4d20108195164038c02810b725abbcd06
1. Use AndroidJunit4 instead of RobolectricTestRunner
2. Use ApplicationProvider instead of RuntimeEnvironment to get context
3. Change Copy Right
4. Run the NetworkDashboardFragment on the Main thread
Bug: 168000627
Test: atest -c NetworkDashboardFragmentTest
Change-Id: I6d10737b9ac8299f2d7c847a9fdb1c3bdc4e390d
1. Use AndroidJunit4 instead of RobolectricTestRunner
2. Use ApplicationProvider instead of RuntimeEnvironment to get context
3. Change Copy Right
4. Workaround the resource getString to resolve the resource not found
Bug:
Test: atest -c AutoSelectPreferenceControllerTest
atest -c OpenNetworkSelectPagePreferenceControllerTest
Change-Id: Ic80da4fcc6a64e7fde55705dda128741c26ce3cf
1. Use AndroidJunit4 instead of RobolectricTestRunner
2. Use ApplicationProvider instead of RuntimeEnvironment to get context
3. Remove the @Ignore tag in isAvailable_dataOnAndDsdsAnd5GSupported_Available
Bug: 167933210
Test: atest -c NrDisabledInDsdsFooterPreferenceControllerTest
Change-Id: I455a543d7a006be21523918e48cc77b403f8b56d
1. Use AndroidJunit4 instead of RobolectricTestRunner
2. Use ApplicationProvider instead of RuntimeEnvironment to get context
3. Change Copy Right
Bug: 167386055
Test: atest -c DataServiceSetupPreferenceControllerTest
Change-Id: I06b4e9a99336e68af954138457b602061c776baa
1. Use AndroidJunit4 instead of RobolectricTestRunner
2. Use ApplicationProvider instead of RuntimeEnvironment to get context
3. Change Copy Right
Bug: 167383385
Test: atest -c DisableSimFooterPreferenceControllerTest
Change-Id: Ic725be35c4ecd44006919a74cfeab3febc6e3532
1. Use AndroidJunit4 instead of RobolectricTestRunner
2. Use ApplicationProvider instead of RuntimeEnvironment to get context
3. Change Copy Right
4. Workaround the resource getString to resolve the resource not found
5. Add @After to reset the content provider data
Bug: 167377501
Test: atest -c PreferredNetworkModePreferenceControllerTest
Change-Id: I8c123747a59eb4cf6c6b8b73109cf00cef4515f0
1. Use AndroidJunit4 instead of RobolectricTestRunner
2. Use ApplicationProvider instead of RuntimeEnvironment to get context
3. Change the Copy Right
Bug: 165232573
Test: atest -c ApnPreferenceControllerTest
Change-Id: Iab7f648061bab9ea33f6a15231be2344be6b3499
1. Use AndroidJunit4 instead of RobolectricTestRunner
2. Use ApplicationProvider instead of RuntimeEnvironment to get context
3. Change the Copy Right
4. Create the real object for PhoneAccountHandle and ComponentName
Bug: 164989754
Test: atest -c MobileNetworkUtilsTest
Change-Id: I1778832b0602062adb24928343c0c1d0e525942d
1. Use AndroidJunit4 instead of RobolectricTestRunner
2. Use ApplicationProvider instead of RuntimeEnvironment to get context
3. Change the Copy Right
Bug: 164986958
Test: atest -c TelephonyTogglePreferenceControllerTest
Change-Id: I3d6c39f45cb1efb1742148f20f03372214eb0cbe
1. Use AndroidJunit4 instead of RobolectricTestRunner
2. Use ApplicationProvider instead of RuntimeEnvironment to get context
3. Change Copy Right
Bug: 164986221
Test: atest -c TelephonyBasePreferenceControllerTest
Change-Id: Iabe24aef0b7a5c3aa9d7be275f0c4ed552cdd2e8