Commit Graph

44981 Commits

Author SHA1 Message Date
Fan Zhang
a91023c9bc Merge "Fix a bug where homepage is using staled locale for tiles" into pi-dev
am: 086dbda475

Change-Id: Idcbd34106c66fe7eaff62495b5edbc2d6233e7b5
2018-04-04 22:04:06 -07:00
TreeHugger Robot
086dbda475 Merge "Fix a bug where homepage is using staled locale for tiles" into pi-dev 2018-04-05 04:57:46 +00:00
Bill Yi
b7bf658e04 [automerger skipped] Merge "Import translations. DO NOT MERGE" into pi-dev am: 295b1dba78 -s ours
am: 5f6178d44e  -s ours

Change-Id: I08fcccca60f4c3272005851cc672ecd42eb0164a
2018-04-04 21:08:42 -07:00
Bill Yi
5f6178d44e [automerger skipped] Merge "Import translations. DO NOT MERGE" into pi-dev
am: 295b1dba78  -s ours

Change-Id: I35d3fa9cd927047f1ea494ba8f1ab11bffcb1ecc
2018-04-04 21:03:08 -07:00
TreeHugger Robot
8d5cb7d85b Merge "Import translations. DO NOT MERGE" 2018-04-05 04:00:54 +00:00
TreeHugger Robot
295b1dba78 Merge "Import translations. DO NOT MERGE" into pi-dev 2018-04-05 03:55:05 +00:00
Lei Yu
559f65a28a Show Battery saver tip when battery saver is on
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
2018-04-04 18:28:57 -07:00
Bill Yi
9905176917 Import translations. DO NOT MERGE
Auto-generated-cl: translation import

Bug: 64712476
Change-Id: Ibf6633b42d66e2c1418c2c3b719533a36c696f6a
2018-04-04 18:18:03 -07:00
Bill Yi
07e2ad469b Import translations. DO NOT MERGE
Change-Id: Iefbd29f92e79a41656a240fb99775fe741e659cc
Auto-generated-cl: translation import
2018-04-04 17:48:49 -07:00
Doris Ling
de08eaf437 Fix issue in ring volume sample not always being played.
- 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
2018-04-04 17:35:41 -07:00
Fan Zhang
f1030e8cdf Fix a bug where homepage is using staled locale for tiles
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
2018-04-04 17:29:45 -07:00
Matthew Fritze
688ad64e00 Merge "Fix crash in non-indexable keys collection" into pi-dev am: 66e6e637a4
am: acc93635c3

Change-Id: I78aab2e3b7bc6f621e2425a88f3787e29f6ec2ff
2018-04-04 17:20:54 -07:00
Matthew Fritze
acc93635c3 Merge "Fix crash in non-indexable keys collection" into pi-dev
am: 66e6e637a4

Change-Id: I8d493a62df0545904a6380813e32247f7f53c414
2018-04-04 17:09:56 -07:00
TreeHugger Robot
66e6e637a4 Merge "Fix crash in non-indexable keys collection" into pi-dev 2018-04-04 23:59:49 +00:00
Jason Monk
8a485f0ada Merge "Updates to match prebuilts drop" into pi-dev am: b299122e08
am: 8e51db884e

Change-Id: I790d275e30bccd446a00615149a90440d172e163
2018-04-04 16:45:09 -07:00
Erik Kline
6027d42a5a Merge "Expressly forbid IP string literals as Private DNS hostnames" into pi-dev am: fe7cc296c1
am: e0d4298210

Change-Id: Idd9b36efa49cfb103876ddf8356055c510c3a44e
2018-04-04 16:05:03 -07:00
Daniel Solomon
a1687df27b Disable user control of color mode depending on Accessibility
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
2018-04-04 16:04:14 -07:00
Jan Nordqvist
cd3f9e2a5e Fall back to Wi-Fi data display in data usage screen with no SIM.
Bug: 70950124

Test: manual
Test: make RunSettingsRoboTests
Change-Id: I06bf78e54119819be87e15baca7e5b6a241958cb
Merged-In: I06bf78e54119819be87e15baca7e5b6a241958cb
2018-04-04 15:58:53 -07:00
Jason Monk
8e51db884e Merge "Updates to match prebuilts drop" into pi-dev
am: b299122e08

Change-Id: I7e4013fb1e3e4ffd193a83dca8ba24deefe1119b
2018-04-04 15:58:43 -07:00
TreeHugger Robot
b299122e08 Merge "Updates to match prebuilts drop" into pi-dev 2018-04-04 22:40:27 +00:00
Erik Kline
e0d4298210 Merge "Expressly forbid IP string literals as Private DNS hostnames" into pi-dev
am: fe7cc296c1

Change-Id: Icd5324bc389485f8f22052f5f4d285455d395780
2018-04-04 15:20:27 -07:00
TreeHugger Robot
fe7cc296c1 Merge "Expressly forbid IP string literals as Private DNS hostnames" into pi-dev 2018-04-04 21:30:32 +00:00
Fan Zhang
c62ecf45db Merge "Log when settings slice is requested/updated." into pi-dev am: 1400734315
am: d820a38820

Change-Id: I9cf169cdca75fdc2b693ad2bf6ab214a796cbec2
2018-04-04 14:26:43 -07:00
Fan Zhang
02295b4074 Merge "Use grey icon for work profile settings" into pi-dev am: d3bb3945bd
am: 5b5dfb94c4

Change-Id: Ifafc0ac9a7e9d957290d9158518a997e8dd51892
2018-04-04 14:19:44 -07:00
Fan Zhang
d820a38820 Merge "Log when settings slice is requested/updated." into pi-dev
am: 1400734315

Change-Id: I1372aa2ad762593e0a499e96ce742bfccfdd9d0a
2018-04-04 14:00:45 -07:00
Makoto Onuki
e0c97aa65d Once auto-battery saver is ever set, don't show suggestion
Bug: 77228046
Test: manual test after adb shell settings delete secure suppress_auto_battery_saver_suggestion
Test: m -j ROBOTEST_FILTER=BatterySaverButtonPreferenceControllerTest RunSettingsRoboTests
Change-Id: If0d26f05399a33269d9540e6e09292ce46765637
2018-04-04 13:58:24 -07:00
TreeHugger Robot
1400734315 Merge "Log when settings slice is requested/updated." into pi-dev 2018-04-04 20:37:15 +00:00
Matthew Fritze
3cd543fb85 Fix crash in non-indexable keys collection
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
2018-04-04 13:36:33 -07:00
Fan Zhang
5b5dfb94c4 Merge "Use grey icon for work profile settings" into pi-dev
am: d3bb3945bd

Change-Id: I9156105dfbc66fb7fdd17ea3f41885ed2e4da8b0
2018-04-04 13:18:15 -07:00
Patrick Baumann
ea4874db83 Update settings to reference correct versionCode
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
2018-04-04 13:17:05 -07:00
TreeHugger Robot
d3bb3945bd Merge "Use grey icon for work profile settings" into pi-dev 2018-04-04 20:10:11 +00:00
Jason Monk
20210122bd Updates to match prebuilts drop
Test: build
Bug: 77482321
Change-Id: I65a2cffb0a921ef6acb58ff500a7da8a8f870e76
2018-04-04 16:08:17 -04:00
ryanywlin
2fd953c0c3 Add new string for sound settings
Bug: 77254162
Test: rebuild
Change-Id: I8dc67c8efe16a8d3ad4029b41e125c3ef2f13541
2018-04-04 18:57:53 +00:00
Fan Zhang
2c3d5c5876 Fix CodeInspectionTest for Setttings am: 27fad993b4
am: 04603ff928

Change-Id: Ib07ca5e031bd750b518c248bcbc0260ec6088a9a
2018-04-04 11:20:23 -07:00
Anton Hansson
e07cf27fe3 [automerger skipped] packages/apps/Settings: Set LOCAL_SDK_VERSION where possible. DO NOT MERGE am: 47e671e148 -s ours
am: d508e73706  -s ours

Change-Id: I495a1e05eb005ad9675fc7cf566c2a96d4b93030
2018-04-04 11:19:53 -07:00
Fan Zhang
04603ff928 Fix CodeInspectionTest for Setttings
am: 27fad993b4

Change-Id: I22a28546d2f08bd118fdbbfd6c704b696c8b06c3
2018-04-04 11:08:58 -07:00
Anton Hansson
d508e73706 [automerger skipped] packages/apps/Settings: Set LOCAL_SDK_VERSION where possible. DO NOT MERGE
am: 47e671e148  -s ours

Change-Id: I1fb0f356b11f5bc5887b97556d1f5e1c51980ec6
2018-04-04 11:03:07 -07:00
Lei Yu
fd62af5792 Fix crash in Monkey test.
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
2018-04-04 11:00:05 -07:00
Tony Mak
9e6b53380e apostrophe should be curly
BUG: 77523074

Test: Build
Change-Id: I6079652ab0a1a3661684976117ae8804c4120749
2018-04-04 17:21:56 +00:00
Fan Zhang
27fad993b4 Fix CodeInspectionTest for Setttings
Bug: 77579651
Bug: 77339683
Test: robotests
Change-Id: I7cb95bc7b1a3890879809e3462d0af8ba3e53923
2018-04-04 09:47:39 -07:00
Anton Hansson
47e671e148 packages/apps/Settings: Set LOCAL_SDK_VERSION where possible. DO NOT MERGE
This change sets LOCAL_SDK_VERSION for all packages where
this is possible without breaking the build, and
LOCAL_PRIVATE_PLATFORM_APIS := true otherwise.

Setting one of these two will be made required soon, and this
is a change in preparation for that. Not setting LOCAL_SDK_VERSION
makes the app implicitly depend on the bootclasspath, which is
often not required. This change effectively makes depending on
private apis opt-in rather than opt-out.

Test: make relevant packages
Bug: 73535841
2018-04-04 15:49:17 +01:00
Tony Mak
922780328a Merge "We should show custom title for suspend app dialog" into pi-dev am: a8c53f7dcb
am: 51a187d64e

Change-Id: Icc9e6ce5456caf119f040553749748862d0932a4
2018-04-04 04:00:51 -07:00
Tony Mak
51a187d64e Merge "We should show custom title for suspend app dialog" into pi-dev
am: a8c53f7dcb

Change-Id: I9d740c884c9f777e76971e5a59b41cb68eb858ee
2018-04-04 03:49:15 -07:00
Tony Mak
a8c53f7dcb Merge "We should show custom title for suspend app dialog" into pi-dev 2018-04-04 10:38:18 +00:00
Erik Kline
6c2ad0d62d Expressly forbid IP string literals as Private DNS hostnames
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
2018-04-04 00:42:19 -07:00
Julia Reynolds
ee9ddf4cae Merge "Add app info notification summary" into pi-dev am: 54ee35c35c
am: afe35d6259

Change-Id: I28d403c24d6417b1abd0e1c54e2ed9ffd7bb5d09
2018-04-03 17:37:34 -07:00
Lei Yu
4daf2dc7bc Add anomaly log to dumpsys
Log the anomaly config version in settings dump

Bug: 77490545
Test: RunSettingsRoboTests
Change-Id: I9cddcb0c0c8adcf0901dae6a31a3a0e84e48077a
2018-04-03 17:08:47 -07:00
Julia Reynolds
afe35d6259 Merge "Add app info notification summary" into pi-dev
am: 54ee35c35c

Change-Id: I0db2133a3edb399ad589dd485de249ebb5244705
2018-04-03 16:40:25 -07:00
TreeHugger Robot
54ee35c35c Merge "Add app info notification summary" into pi-dev 2018-04-03 22:22:24 +00:00
Pengquan Meng
1e1daac83a Merge "Move apn settings to network" into pi-dev am: cf60ff7e08
am: 1dda7ae8b9

Change-Id: Ic94c8ac5f76c725ee5bc295bcb3dfb25a04a138b
2018-04-03 14:57:02 -07:00