KEY_HIDE_ENABLE_2G is soft removed in Android API level 35
because it hides a security feature. This patch
introduces simplified logic that ignores the
carrier config value. The new behavior is behind a feature flag.
This patch also includes some cleanup.
1. It removes an unneeded check for null carrier config
2. It removes test logic that set the value of KEY_HIDE_ENABLE_2G
in places where it had no impact on the test.
Bug: 300248708
Test: atest Enable2gPreferenceControllerTest
Change-Id: I892d115d1ae173d2f3cd69e8f8b97bc5bfa7c67b
Tabelts and foldables now have different aspect ratio values in their
config, so we need to test the devices separately as we shouldnt test for
values that are not in the config of the device the test is run on.
Fixes: 302155585
Test: atest SettingsUnitTests:UserAspectRatioManagerTest
Change-Id: I78fa3020501a4be992bb90fea16a6fec4f37594b
This change is the first of many, it will
1. Change java -> kotlin
2. Use the MVVM architecture
3. Be feature flagged
This change in particular is focused on transitions to and from various activities.
Enable feature via
adb shell setprop sys.fflag.override.settings_biometrics2_fingerprint true
Bug: 280862076
Test: atest FingerprintSettingsViewModelTest
Change-Id: I8eb5c30e6f2e92c256ae7c257a9d560439ba418f
Merged-In: I8eb5c30e6f2e92c256ae7c257a9d560439ba418f
This change is the first of many, it will
1. Change java -> kotlin
2. Use the MVVM architecture
3. Be feature flagged
This change in particular is focused on transitions to and from various activities.
Enable feature via
adb shell setprop sys.fflag.override.settings_biometrics2_fingerprint true
Bug: 280862076
Test: atest FingerprintSettingsViewModelTest
Change-Id: I8eb5c30e6f2e92c256ae7c257a9d560439ba418f
This change is the first of many, it will
1. Change java -> kotlin
2. Use the MVVM architecture
3. Be feature flagged
This change in particular is focused on transitions to and from various activities.
Enable feature via
adb shell setprop sys.fflag.override.settings_biometrics2_fingerprint true
Bug: 280862076
Test: atest FingerprintSettingsViewModelTest
Change-Id: I8eb5c30e6f2e92c256ae7c257a9d560439ba418f
Merged-In: I8eb5c30e6f2e92c256ae7c257a9d560439ba418f
CredentialManagerPreferenceControllerTest now differs between the
current development branch and internal main, and the
CheckReturnValue errorprone is failing in the branches that use
the code from the development branch. Modifying
CredentialManagerPreferenceControllerTest does not resolve this
because it results in merge conflicts, but making this check a
warning in the development branch will allow the fix to reach all
affected branches.
Fixes: 273833063
Test: m RUN_ERROR_PRONE=true SettingsUnitTests
Change-Id: Ia923f0d988b1428cbb7378f33b4703ed19113dcd
Adding them results in duplicate classes and causes conflict for the R
classes and resource loading.
Meanwhile, correctly removing the SettingsLibSettingsSpinner resulted
in the test failing to find the getSelectedItem() method which is
unused inside Settings app. This is an inherent issue when unit
testing an optimized (and shrunk) app, and since there's no other way
for the test to get the current selected item, this change simply
changes the Settings code to invoke getSelectedItem() as well. This
has exactly the same effect because SettingsSpinnerPreference updates
its mPosition right before calling the OnItemSelectedListener in its
implementation.
Bug: 183340630
Bug: 177638625
Bug: 183342958
Test: atest SettingsSliderPreferenceControllerTest
Test: atest PrivateVolumeForgetTest
Change-Id: Ia26ca923369b41291614fb9bd50dfbd2aac2f0fa
Somehow Resource IDs are inconsistent between SettingsLib and
SettingsUnitTests. Import SettingsLibMainSwitchPreference to fix.
Bug: 183342958
Test: atest com.android.settings.deviceinfo.PrivateVolumeForgetTest
Change-Id: Id8dfccd520577fc1a8e5177e20e99b52bb57a66a
Somehow Resource IDs are inconsistent between Settings and
SettingsUnitTests. Import SettingsLibTwoTargetPreference to fix.
Bug: 183340630
Test: atest SettingsSliderPreferenceControllerTest
Change-Id: Icc404d8ebefe1399806775272a37c56845406bc7
1. Add new object StorageEntry to encapsulate VolumeInfo and
unsupported DiskInfo and missing VolumeRecord.
2. Replaces StorageSummaryDonutPreference with UsageProgressBarPreference.
3. Add storage select spinner.
4. Add a "Free up storage" preference to replace "Manage storage" button.
Bug: 174964885
Test: atest com.android.settings.deviceinfo.storage
atest com.android.settings.deviceinfo
manual
Insert an USB drive, select the drive in StorageDashboardFragment
and observe UI.
Change-Id: I83877f76869414de4fb2788b6b18fe507aa5cfcf
Merged-In: I83877f76869414de4fb2788b6b18fe507aa5cfcf
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
1. Use AndroidJunit4 instead of RobolectricTestRunner
2. Use ApplicationProvider instead of RuntimeEnvironment to get context
Bug: 162048313
Test: atest -c MobileDataEnabledListenerTest
Change-Id: I81b3d6ac075666a45649c8d811832a40bdb1b41b
See build/soong/README.md for more information.
Test: m checkbuild
Test: m RunSettingsRoboTests-jacoco
Change-Id: I267534c095c30833f77273dbdb1893b7830ed45d