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
Renamed panic to "emergency" or "emergency gesture" to
avoid speculation once source code is accessible to
parties without full context.
The settings string and file names still use the word "panic". This
will be updated in a follow-up CL
Bug: 169946710
Test: rebuild
Change-Id: Ic1a3181145ca2b64ab6ef2a2989224395fa9a6f8
This change is to update the related UI in the battery page if the
battery is not present. This includes the following updates:
1. Update the summary of battery tile in the Settings homepage
2. Replace the battery level with "Unknown"
3. Replace the summary with help message in the battery page
4. Remove the battery meter icon
Bug: 171368508
Test: verify on an issue device
Change-Id: I892e0d137143160a0bce0c11ce9265120ebb8fd4
This change adds a new entry for geolocation-based time zone detection
(shorthand: "geotz") to the location settings.
The UI code uses information retrieved via the TimeManager API to keep
the conditional logic in one place, i.e. to avoid the UI needing to know
too much about the various conditions that affect the availability /
applicability of the toggle.
Screen variations / conditions / other info:
Location settings screen:
1) The entry only shows up on a device at all if geotz detection is
enabled for the device (currently a compile time setting, off by
default).
2) The new entry is hidden on the screen when the user first opens it.
To see it, the user has to expand "Advanced". The setting is in the
shared (non-GMS) section of the screen.
3) When visible, the entry has a summary that shows the current status:
either a reason why the setting is not applicable, or the user's current
setting value.
4) Selecting the entry opens a sub-screen.
The code included here distinguishes between different cases with the
summary message (i.e. the text underneath the entry). See strings.xml
for the placeholder text. Some strings will not show up currently, but
are included in case the rules change as they are valid possibilities
from the TimeManager API.
The same changes have been made for the "personal" tab when a work
profile is enabled.
Location Time Zone Detection settings screen:
1) The toggle is always enabled and always shows the user's current
configuration setting.
All manual tests run with the geotz feature enabled with:
adb shell setprop \
persist.sys.location_time_zone_detection_feature_enabled 1
Bug: 152746236
Test: Manual: build / boot / toggle switch in SettingsUI / inspect output of adb shell dumpsys time_zone_detector
Test: Manual: build / boot / install TestDPC / toggle switch in work profile in SettingsUI / inspect output of adb shell dumpsys time_zone_detector
Test: m -j30 RunSettingsRoboTests ROBOTEST_FILTER="com.android.settings.location.TimeZoneDetectionPreferenceControllerTest"
Test: m -j30 RunSettingsRoboTests ROBOTEST_FILTER="com.android.settings.location.LocationTimeZoneDetectionPreferenceControllerTest"
Test: m -j30 RunSettingsRoboTests ROBOTEST_FILTER="com.android.settings.location.TimeZoneDetectionSettingsTest"
Change-Id: Ia853d30bc54a113000b30f48776418f262d98358
Second attempt to proactively fix a search test.
SearchIndexableResourcesTest uses the FakeIndexProvider, which
implicitly assumes that the
robotests/res/xml-mcc999/location_settings.xml xml is in use. Without
it, the test is accessing the real location_settings.xml / real
preference controllers. This was working until now, but by luck and
probably not intent.
There is an upcoming change which will break the test, so this fixes the
test ahead of time.
This change updates the test to use the "mcc999" config, and improves
the docs around FakeIndexProvider to try to make the requirements for
use clearer.
Bug: 171371424
Test: m RunSettingsRoboTests
Change-Id: I868d191281a2030fa49134893bcd6720f757ea91
TelephonyManager had a minor refactor of some of the methods revolving
around mobile data. Change code in Settings to use the new ones instead.
Exempt-From-Owner-Approval: Cherry-picked from internal
Bug: 169367013
Test: existing unit tests, manual
Change-Id: I7ebae37373d53fb2c59b6b546232dbddf77398d4
Merged-In: I7ebae37373d53fb2c59b6b546232dbddf77398d4
This is essentially a copy page of ToggleDaltonizerPreferenceFragment.
We extend ToggleFeaturePreferenceFragment to maintain consistency with
other shortcut assignable a11y feature.
UI is a draft
This CL:
1) allows users to enabled/disable RBC with the a11y shortcut (button,
gestures, volume keys), if assigned
2) adds a slider and persist switch to the template
ToggleFeaturePreferenceFragment page (which already contains a feature
switch, shortcut preference, and footer description)
3) enables/disables the intensity slider when RBC is on/off
4) sets placeholders for calling into ColorDisplayService in
controllers and tests
5) follows convention set by other color transformations settings and
places feature under Experimental section in A11y settings page if
transformations can't be efficiently performed by hardware
Test: A11y setting and page appears, tested activation with shortcut,
preference controller tests
Bug: b/128465252
Change-Id: I291bb86ce3d855ce052ca70dc7a941a888e2c723
- The WifiEntry info might not be ready in early stage. (ex:
WifiEntry#canSetPrivacy())
- The Wi-Fi detailed setting listens to the WifiEntry callback to
refresh the preferences, it should first update the preference status to
be editable or not, and then display preferences to the UI.
- The privicy preference should be able to set back to selectable when
WifiEntry#canSetPrivicy() change from false to true.
Bug: 170148009
Test:
make RunSettingsRoboTests
ROBOTEST_FILTER=WifiNetworkDetailsFragment2Test
make RunSettingsRoboTests
ROBOTEST_FILTER=WifiPrivacyPreferenceController2Test
Change-Id: I48ca060e6b468232f19c82e9de0ce4fce39cba7f
Merged-In: I567b2b80163631a01d165c0ac5c0aba392e014ef
Stop robolectric search tests using location_settings, use
sound_settings instead.
The choice of location_settings.xml seems arbitrary, and there's a
commit coming which means one of the controllers doesn't just use
settings to check availability. When the unconfigured mock returns null
from a method, that causes the test to fail in a non-obvious way.
Bug: 171371424
Test: m RunSettingsRoboTests
Change-Id: I4d3386e3c62fb4151e4a4e27625edccec89316d9
Some carrier(s) expand their service through providing eSIM in companion
with pSIM. Group UUID is designed to group them together as an single
SIM.
Bug: 165363542
Test: make RunSettingsRoboTests ROBOTEST_FILTER=SubscriptionsPreferenceControllerTest
Change-Id: I0934a45a2917ab106627c733162efbee9a13f216
- The WifiEntry info might not be ready in early stage. (ex:
WifiEntry#canSetPrivacy())
- The Wi-Fi detailed setting listens to the WifiEntry callback to
refresh the preferences, it should first update the preference status to
be editable or not, and then display preferences to the UI.
- The privicy preference should be able to set back to selectable when
WifiEntry#canSetPrivicy() change from false to true.
Bug: 170148009
Test:
make RunSettingsRoboTests
ROBOTEST_FILTER=WifiNetworkDetailsFragment2Test
make RunSettingsRoboTests
ROBOTEST_FILTER=WifiPrivacyPreferenceController2Test
Change-Id: I567b2b80163631a01d165c0ac5c0aba392e014ef
Remove the summary of the homepage IA if silky home enabled.
Fixes: 170933968
Test: robotest & visual with turning on/off silky home
Change-Id: I502b6590cece9b80e9923109fe0582cc4d9a1c56
The carrier config nr_enabled_bool is false, preferred network mode
should hide 5G UI. This bug is that the summary show 5G item when
nr_enabled_bool is false.
Solution: if nr_enabled_bool is false, it checks capability and then
removes 5G capability of network mode.
Bug: 170460943
Test: make RunSettingsRoboTests ROBOTEST_FILTER=\
EnabledNetworkModePreferenceControllerTest (PASS)
Change-Id: I3f7d41c196569c0cb61e89cfc270b957e2f0add5
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