To log Settings metrics, the MainSwitch extends MainSwitchBar and
replace the SwitchBar in SettingsActivity.
Bug: 175181773
Test: Run robotest and apply the widget in Settings and see the ui
Change-Id: I3add3702e9058ad9192b5172c7cf0e2ccfb55a70
Fallback 1: if display names are the same, use the last 4 digits of a
phone number
Fallback 2: if the phone number cannot be displayed or the last 4 digits
are identical, fallback to use the subscription id
This function depends on DeviceInfoUtils for the phone number
formatting. Because DeviceInfoUtils is within SettingsLib, this function
(at least for now) is located within the Settings codebase itself.
go/unique-sub-display-names
Bug: 148303118
Bug: 150370656
Test: atest -c SubscriptionUtilTest
Change-Id: Id3e26254d4b193c13506df52fb59e97643df7a32
- Replace the android.settings.panel.action.WIFI panel
- Provider Model Disable: Wifi panel
- Provider Model Enabled: Internet panel
Bug: 172707942
Test: manual test
- adb shell am start -a android.settings.panel.action.WIFI
- atest PanelFeatureProviderImplTest
Change-Id: I9f111e96385452b586971d4c28988b564d4e25f4
This make the WifiTrackerLib can be customized.
Bug: 149540986
Test: manual test wifi picker, and atest com.android.settings
Change-Id: I1418ae39c895ce2ff87f18005a226a4835f9e083
- Add mobile internet preference with default data subscription.
- Make prefrence to show dynamically when data subscription changed.
Video exhibition
- http://rcll/gcmsphfhJ1UzfPSvjWOuXK/c1B2CtaFz27rlIQ2LSTJmo
Code difference
- SubscriptionsPreferenceControllerTest.java between robolectric and junit.
- https://diff.googleplex.com/#key=1Zm7JGPhoZwY
Bug: 172229552
Test: atest SubscriptionsPreferenceControllerTest
Change-Id: Ib50c2c51159f60f19631d1a02081eafde3436e94
Implement a slice which can show/update carrier networks.
Before and after: go/b173971144screenshot
Bug: 173971144
Test: atest NetworkProviderWorkerTest (PASS)
atest ProviderModelSliceTest (PASS)
Change-Id: I3f0dab364c88723ef3185a2ff040b1fbd1b099f4
Rather than mocking the PreferenceScreen's getPreference function,
a PreferenceManager has been created, which instantiates the Screen.
The desired Preference is added to the Screen with the testing key.
Rather than using a shadow XML, contexts' resources are mocked.
A mock WifiManager is used instead of a shadow
Duplicate test case removed, and test which succeeds locally but
not on cuttlefish marked as ignored for now.
Bug: 175389659
Test: atest -c DeviceNamePreferenceControllerTest
Change-Id: I643b22993a1d102614fed1883af7f4925947be20
There are couple of newly explored concepts in this CL, which will
hopefully be useful for migrating other tests in the future as well. In
broad strokes, the changes to this file cover:
Android build file species the preferences library, in order to access
PreferenceViewHolder.createInstanceForTests.
Resource ids in JUnit tests differ from the Settings apk. This is true
not only of strings but also views and layouts. Helper functions added
to main class to access the layouts needed by the test.
Shadow activities are not needed to view layouts, the context can be
used.
Context startActivity can be mocked and verified in order to capture and
examine the intent created by the library under test.
Bug: 175389659
Test: atest -c DataUsageSummaryPreferenceTest
Change-Id: Ib8cb87f0299c47a32c3f5d3af7edb20592b727ec
The superclass ContentProvider's "getContext" method is final and
cannot be mocked, so a helper method visible for testing was added
to allow for context injection.
Bug: 175389659
Test: atest -c ModuleLicenseProviderTest
Change-Id: I9e20171340ae0a48d74fae44c7b356ea67dba43b
Connection through new CDS APIs to come once that CL is merged.
Bug: 168065315
Test: atest SettingsUnitTests:com.android.settings.accessibility.ReduceBrightColorsIntensityPreferenceControllerTest
Change-Id: I9cc6a20ea5ea8a11c5fb3ef8a36e372d9c12b4bc
Add goldmanj to tests/unit for junit migration and
utility library creation
Add connectivity settings eng to settings/datausage.
Test: N/A, just owners update
Change-Id: I182ad6093677dc151b171d9e5aaa15cdd353c474
This change do the 2 things:
1. Add new junit tests files which replace robolectric
RobolectricTestRunner & RuntimeEnvironment with
AndroidX objects without problem.
2. Remove the robolectric test files which have it's new junit files.
This change migrate 103 files, there are still 1209
files to go.
Bug: 174728471
Test: atest
make RunSettingsRoboTests
Change-Id: I15ed3f4745b85862f720aabbf710ce1475aced93