* Keep FakeFeatureFlagsImpl.
* Use EnableFlags and DisableFlags annotation
* Switch back from `assumeTrue` to `assert` when flag is enabled or disabled.
* Remove flag rollback test.
Bug: 342830919
Change-Id: Ic9b3438f3f0e31e64d5405ed81903b352195714a
Settings page to show rotation, resolution,
enable/disable display settings for
external and overlay displays. In case
persist.demo.userrotation.package_name
sysprop is set, then the virtual
display with this will also be shown.
In case there is only one allowed display
available, then this display will be
shown right away. When there are more
than 1 displays available, then the list
of displays will be shown.
Change-Id: I186667aaba94ed6befec3a98f4a87f2b2d1f1859
Test: atest ExternalDisplayUpdaterTest
Test: atest ExternalDisplayPreferenceFragmentTest
Test: atest ResolutionPreferenceFragmentTest
Test: atest ConnectedDeviceGroupControllerTest
Bug: 340218151
Bug: 294015706
Bug: 253296253
Flag: com.android.settings.flags.rotation_connected_display_setting
Flag: com.android.settings.flags.resolution_and_enable_connected_display_setting
Allows a user to disable or enable Thread network / radio from
settings.
In this commit, a toggle is added to Settings > Connected devices >
Connection preferences to control Thread state. See the screenshots
below:
1. Thread is on: https://screenshot.googleplex.com/7FqqbzRX6rGwvSb
2. Thread is off: https://screenshot.googleplex.com/AmfRAhzuukULAAG
3. Thread is disabled by airplane mode: https://screenshot.googleplex.com/7zcesyomrveCqFE
4. Thread is searchable: https://screenshot.googleplex.com/9yFL2jeSuEhJwrS
Requirements:
1. the in-take bug: b/327098435
2. See the screenshot above
3. Test with `atest SettingsUnitTests` and manual tests
4. +2 from Yuwen
5. Flagged by "com.android.net.thread.platform.flags.Flags.thread_enabled_platform"
6. It doesn't need B&R, no preferences are added (the state is in
Android framework (mainline module))
7. Confirmed searchable
8. Code written in Kotlin
Bug: 296990038
Bug: 319077562
Test: atest SettingsUnitTests
Change-Id: Ifa2264b8e59a5112290fd0224cb75ad228732077
This CL is created as a best effort to migrate test targets
to the new android ownership model. If you find incorrect or unnecessary
attribution in this CL, please create a separate CL to fix that.
For more details please refer to the link below,
go/new-android-ownership-model
Bug: 304529413
Test: N/A
Change-Id: I7fbd55a92f4302a6e03bcff0283737fd9295165d
Merged-In: I7fbd55a92f4302a6e03bcff0283737fd9295165d
This CL is created as a best effort to migrate test targets
to the new android ownership model. If you find incorrect or unnecessary
attribution in this CL, please create a separate CL to fix that.
For more details please refer to the link below,
go/new-android-ownership-model
Bug: 304529413
Test: N/A
(cherry picked from https://googleplex-android-review.googlesource.com/q/commit:3f65505208d57fa18be353f815c44fdd6f004f4b)
Merged-In: I7fbd55a92f4302a6e03bcff0283737fd9295165d
Change-Id: I7fbd55a92f4302a6e03bcff0283737fd9295165d
This CL is created as a best effort to migrate test targets
to the new android ownership model. If you find incorrect or unnecessary
attribution in this CL, please create a separate CL to fix that.
For more details please refer to the link below,
go/new-android-ownership-model
Bug: 304529413
Test: N/A
Change-Id: I7fbd55a92f4302a6e03bcff0283737fd9295165d
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