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
This settings change is required for a framework change that ensures
that apps built for pre-P that rely on reflection to access
ApplicationInfo#versionCode don't crash. The move to long version
code introduces a new field and all modifications of the field are
wrapped in a method that ensures both the new and old fields are set
appropriately.
Bug: 74393568
Test: manual - builds and broken app runs
Change-Id: Idfa5f85d3f91583098ebee88f0e8caecaacff9b4
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
The volume sliders must observe the minimum volume stream
index, not just the maximum.
Bug: 74985293
Test: try to mute alarms through UI and fail
Change-Id: Icc5173898eb951239d02f5822239085f1ec3fc9a
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>