Commit Graph

5285 Commits

Author SHA1 Message Date
TreeHugger Robot
148af6ba16 Merge "Update WifiScanningRequiredFragment dialog to show help page" into pi-dev 2018-04-05 22:07:30 +00:00
TreeHugger Robot
3f59ce67b6 Merge "Do not use warning or limit to display "X B left" above usage bar" into pi-dev 2018-04-05 21:36:59 +00:00
Fan Zhang
79cd7986e5 Update SliceContollerInXmlTest to match latest slice spec.
- 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
2018-04-05 13:56:07 -07:00
TreeHugger Robot
40d411abf5 Merge "Update launch intent flags for settings shortcut widgets." into pi-dev 2018-04-05 20:50:06 +00:00
Salvador Martinez
0768f15470 Update WifiScanningRequiredFragment dialog to show help page
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
2018-04-05 13:34:03 -07:00
Jan Nordqvist
bdd559a181 Do not use warning or limit to display "X B left" above usage bar
Bug: 70950124

Test: manual
Test: make RunSettingsRoboTests
Change-Id: I46f4f5f1cf6092038e49beaafe5aa6a19ffb0aa1
2018-04-05 13:22:06 -07:00
TreeHugger Robot
220a6a002e Merge "Fall back to Wi-Fi data display in data usage screen with no SIM." into pi-dev 2018-04-05 19:59:00 +00:00
Julia Reynolds
560637970f Make volume sliders sliceable
Test: make -j RunSettingsRoboTests
Change-Id: I8495770792dfdada54174ca61937f336e4fc219c
Fixes: 67997207
2018-04-05 14:47:44 -04:00
Lei Yu
197be04330 Merge "Show Battery saver tip when battery saver is on" into pi-dev 2018-04-05 17:48:55 +00:00
TreeHugger Robot
d95668db99 Merge "Fix crash in Monkey test." into pi-dev 2018-04-05 17:46:21 +00:00
Lei Yu
0a358ba47c Add battery illustration
Also update the VideoPreference to handle the full screen
illustration by adding attr isFullWidth and aspectRadio.

Change-Id: If2ccba4ce792801c6fd79b7c60af4e3826c091cc
Fixes: 74409022
Test: Screenshot | RunSettingsRoboTests
2018-04-05 10:26:41 -07:00
Doris Ling
f2d7680d2c Update launch intent flags for settings shortcut widgets.
- 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
2018-04-05 10:20:26 -07:00
TreeHugger Robot
1b899f2a0a Merge "Fix issue in ring volume sample not always being played." into pi-dev 2018-04-05 17:12:43 +00:00
Lei Yu
2e96ec2f99 Merge "Hide uninstalled app in restrict app dialog" into pi-dev 2018-04-05 16:57:13 +00:00
Jan Nordqvist
a2731e24a6 Change "X over" text color to ColorError
Bug: 70950124

Test: manual
Test: make RunSettingsRoboTests
Change-Id: I2a59d6b4b4549a780ae168e9e1b3f356c677262c
2018-04-05 09:30:43 -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
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
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
TreeHugger Robot
66e6e637a4 Merge "Fix crash in non-indexable keys collection" into pi-dev 2018-04-04 23:59:49 +00: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
TreeHugger Robot
fe7cc296c1 Merge "Expressly forbid IP string literals as Private DNS hostnames" into pi-dev 2018-04-04 21:30:32 +00: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
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
Fan Zhang
27fad993b4 Fix CodeInspectionTest for Setttings
Bug: 77579651
Bug: 77339683
Test: robotests
Change-Id: I7cb95bc7b1a3890879809e3462d0af8ba3e53923
2018-04-04 09:47:39 -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
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
TreeHugger Robot
54ee35c35c Merge "Add app info notification summary" into pi-dev 2018-04-03 22:22:24 +00:00
Lei Yu
499644b8a9 Hide uninstalled app in restrict app dialog
Change-Id: Ic615d8b1150890e6ad0d393e410d0f5ab8648986
Fixes: 77429442
Test: RunSettingsRoboTests
2018-04-03 14:14:50 -07:00
TreeHugger Robot
cf60ff7e08 Merge "Move apn settings to network" into pi-dev 2018-04-03 19:41:39 +00:00
TreeHugger Robot
4720ba39e3 Merge "Remove wrapper for ConnectionManager/IPackageManager" into pi-dev 2018-04-03 18:31:39 +00:00
Tony Mak
cbc3a6a1de We should show custom title for suspend app dialog
BUG: 77523074

Test: Suspend an app, observe the new title.
Test: m -j RunSettingsRoboTest

Change-Id: Ide0329422e68b5ed6418365f2d0b0e0d11f0dec7
2018-04-03 17:54:13 +00:00
Lei Yu
6f61ae0adf Merge "In High usage, hide apps without screen time." into pi-dev 2018-04-03 17:37:46 +00:00
Fan Zhang
87b2634fc0 Log when settings slice is requested/updated.
Change-Id: Ie6b7000729b3a414a29e3dfc25a29e1f2f939ddd
Fixes: 71503986
Test: robotests
2018-04-03 10:15:56 -07:00
Lenka Trochtova
a112226db2 Enterprice privacy: let the user know if admin enabled backups.
Bug: 73750212
Bug: 64012357
Test: make RunSettingsGoogleRoboTests

Change-Id: I586eaccaebb89a8b3e5b4014b3d6427ab2eb15a9
2018-04-03 13:58:39 +02:00
Chalard Jean
a62df616f9 Merge "Move the Private DNS dialog back to the top level." into pi-dev 2018-04-03 05:17:56 +00:00
TreeHugger Robot
d73d3a8f55 Merge "Remove more wrappers" into pi-dev 2018-04-03 02:07:17 +00:00
Pengquan Meng
7a1c93dcf3 Move apn settings to network
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
2018-04-02 17:27:56 -07:00
Fan Zhang
01cfb9d8c5 Remove wrapper for ConnectionManager/IPackageManager
Bug: 76167422
Test: robotests
Change-Id: I5f051b0ce58b97a3cfd5d4bae469463dcd6d83ac
2018-04-02 17:09:10 -07:00
Fan Zhang
947a673f74 Remove more wrappers
- WallpaperManagerWrapper
- UserManagerWrapper

Bug: 76167422
Test: robotests
Change-Id: I3ca866089082e01f1e9d7a4554387962f45a5437
2018-04-02 16:51:40 -07:00
TreeHugger Robot
2a51657c8e Merge "Expand isAvailable to include DISABLED_DEPENDENT" into pi-dev 2018-04-02 23:49:22 +00:00
TreeHugger Robot
e1549f0af1 Merge "MagnificationPreferenceFragment use DashboardFragment" into pi-dev 2018-04-02 22:25:04 +00:00
rafftsai
807506b166 MagnificationPreferenceFragment use DashboardFragment
- 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>
2018-04-02 13:18:58 -07:00
Matthew Fritze
8c48defb52 Expand isAvailable to include DISABLED_DEPENDENT
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
2018-04-02 11:59:40 -07:00
Pengquan Meng
519009d3ed Fixed ApnEditor issue
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)
2018-04-02 18:53:53 +00:00
TreeHugger Robot
e35e00712c Merge "Remove wrapper for device policy manager" into pi-dev 2018-04-02 18:45:53 +00:00
TreeHugger Robot
5e8a0e2436 Merge changes Ib497aca6,Ic6def54a into pi-dev
* changes:
  Make anomaly jobs persistent.
  Update job ids in Settings
2018-04-02 16:44:51 +00:00