- Convert the test to use CodeInspector
- Skip abstract classes when validating contract
- Also check SliderPreferenceController when validating contract
Change-Id: I671c1a622df6d1d7248a12932f144711fbf5a026
Fixes: 77634230
Test: make RunSettingsRoboTests -j40 ROBOTEST_FILTER=CodeIns
This CL updates the WifiScanningRequiredFragment dialog so that the
learn more button is only shown when a help page is available.
Additionally, we add the metrics constant for the dialog.
Test: robotests
Bug: 67070896
Change-Id: I7697c88b5969edaf5c06eb33251f215b776c64ee
Also update the VideoPreference to handle the full screen
illustration by adding attr isFullWidth and aspectRadio.
Change-Id: If2ccba4ce792801c6fd79b7c60af4e3826c091cc
Fixes: 74409022
Test: Screenshot | RunSettingsRoboTests
- earlier changes were made to the intent flags when creating new
settings shortcut to ensure that it is launching a new task. However,
ShortcutManager is actually caching existing shortcut info, and it will
continue to use the existing shortcut info unless we explicitly update
the info.
- when rebooting from build upgrade, we will go through all existing
shortcut to update the launch intent flags to ensure that the shortcut
info is update to date.
Change-Id: Iee2365d9aec64a47b193e3c9be443c252504815b
Fixes: 76395879
Test: make RunSettingsRoboTests
Before this CL, we only show "Battery Saver is on" when users turn it
on in battery tips.
In this CL, we change to constantly show this tip when battery
saver is on.
Change-Id: I9ddefdbd5818725202ddf4469b4a685ba008060a
Fixes: 75251000
Test: RunSettingsRoboTests
- when we adjust the sound volme in Sound settings, we only re-post the
stop sample message when we receive the onSampleStarting callback.
However, if we change the volume while a sample is still playing,
onSampleStarting will not be called as it's already started. This
results in shortened sample duration, which in extreme case, the new
sample will not be played at all if the new volume change is made almost
towards the end of the previous sample period. So, everytime user change
the volume, we should re-post the stop sample message, so that the
sample playing duration would be extended properly.
- also removed the original calls to the onStreamValueChanged() during
init, as the original implementation is empty, and during init, we do
not need any handling to start/stop the sample.
Change-Id: I9f35ddfb6d809eeb83b1a732a09362286ff6ed77
Fixes: 77514234
Test: make RunSettingsRoboTests
When setting a new locale, SettingsActivity restarts to load
everything in the new locale.
Data (containing locale specific title/summary etc) is reloaded
correctly and triggers a callback to UI to redraw.
However we skip the first callback as an optimization for app startup
time. When we restart fragment, we failed to save the state whether we
have already seen the first callback. So when data with new locale text
triggers the callback, it's being skipped and this make UI still render
in old locale.
The fix is to just save the state before fragment gets destroyed before
locale change so the callback can trigger later.
A better fix is: make data (Tile object) not cache text. Then we don't
need to worry about locale cache at all. We should do this fix in the
long term.
Test: localeswitcher
Test: adb shell am broadcast -a com.google.android.testing.i18n.localeswitcher.CHANGE_LOCALE -e LANGUAGE_TAG "zh"
Test: adb shell am broadcast -a com.google.android.testing.i18n.localeswitcher.CHANGE_LOCALE -e LANGUAGE_TAG "ja"
Fixes: 77470788
Bug: 77600770
Change-Id: Ic4223ddbb679db64d0fc3c29d16a5f61a66cc99c
The Accessibility settings for color inversion and color correction are
incompatible with some color modes. When either of these settings is
enabled, disable GUI color mode controls.
Bug: 68856024
Change-Id: I12fad22190283bac38592b94e88d865d3af978ad
Some of the AmbientDisplay preference controllers were
crashing when their isAvailable methods were being called
by their fragment's search index providers, which meant that
the entire collection of non-indexable keys failed. Thus,
all search results were showing up. In the case of a secondary
user, they were able to see developer options which crashed
settings when clicked.
There are two issues addressed in this cl.
1. Fix the crashes so the non-indexable keys collection works
2. Contain each fragment's collection, so that if a fragment does
crash, the damage is minimized.
Part 1 is checking that the config in isAvailable is not null,
and creating one if so.
Part 2 is fixed by surrounding the collection of non-indexable
keys in a try-catch, with an option in the catch to re-throw the
error if a system property is set. Thus, in a new pre-submit
instrumentation test, we can and docheck if any of the fragments crash
when collecting non-indexable keys.
Change-Id: I820bd9cb2649aa6faff7f82fcf575a62e41dc4fc
Fixes: 77486668
Test: atest NonIndexableCrashTest, robotests
When battery page is launched, BatteryTipLoader will start running.
If we rotate the screen before loader is finished, it will store null
to Bundle and will crash when restoring from that Bundle.
In this cl, we add null pointer check for tip list to avoid the crash.
Also remove a TODO since it is obsolete.
Change-Id: Ic59bc20c633f3a7467f7b5e95da062160bcb4e93
Fixes: 77534165
Test: RunSettingsRoboTests
For obvious bootstrapping reasons, DNS settings have always used
IP address string literals in input fields.
However, since we can use the network-assigned nameservers to bootstrap
our way to multiple IP addresses of multiple families (!), hostnames
provide a clear simplicity and future-proofing advantage.
Permitting IP address literals means not only making sure that we can
validate X.509v3 certificates for IP addresses, but coping with the
inevitable broken configurations where users may have configured IPv4
addresses but no IPv6 addresses. This will unnecessarily complicate
life on IPv6-only networks.
=)
Test: as follows
- built
- flashed
- booted
- tried to enter IP string literals
- make -j50 RunSettingsRoboTests ROBOTEST_FILTER=PrivateDnsModeDialogPreferenceTest
Bug: 34953048
Bug: 64133961
Bug: 73641539
Change-Id: I7a58e86ed640ff5600906fb3d8cb9a2c75598831
This is a clean up CL, move the apn settings related class from settings'
root to network's directory.
Bug: 77339683
Test: make ROBOTEST_FILTER=ApnEditorTest -j40 RunSettingsRoboTests
Change-Id: I751a6c2a27c9a1e08d7308407d75ccb355f295aa
- Move preference related logic to Controller
- Add settings:controller in xml file
Bug: 73899467
Test: manual
Test: make RunSettingsRoboTests
Change-Id: I3eaccc617c4408f50110bf1f5df3482f491f7393
Signed-off-by: rafftsai <rafftsai@android.com>
isAvailable will now return true when getAvailabilityStatus
returns DISABLED_DEPENDENT_SETTING. This is because the setting
should be displayed in the Fragment even if it has a dependent setting,
which matches existing behaviour. Slices will still display the warning
slice without inline content, where the main action brings you to the
setting page. For now, we have to assume the user will be able to figure
out how to enable the setting. In Q, we would like to build a more
intelligent flow so that we can prompt or even help the user fix the
dependency (we just ran out of time in P).
The only setting that had previously used DISABLE_DEPENDENT_SETTING
was a developer option.
Change-Id: I1f774a2e09cb60de01388cf6c35785c8b5dea176
Fixes: 77334915
Test: robotests
The mainly changed:
1. Will not insert invalid apn data to database.
2. Clicking back button will save the APN data to database if the data is valid.
Test: make ROBOTEST_FILTER=ApnEditorTest -j40 RunSettingsRoboTests
Bug: 73745458
Bug: 67327863
Merged-In: Ie2c147cae03ad78d43c351e05add761b2dffac0c
Change-Id: Ie2c147cae03ad78d43c351e05add761b2dffac0c
(cherry picked from commit f39ef85653)