Commit Graph

6244 Commits

Author SHA1 Message Date
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
2c3d5c5876 Fix CodeInspectionTest for Setttings am: 27fad993b4
am: 04603ff928

Change-Id: Ib07ca5e031bd750b518c248bcbc0260ec6088a9a
2018-04-04 11:20:23 -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
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
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
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
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
Fan Zhang
19f1ebd1fa Merge "Remove wrapper for ConnectionManager/IPackageManager" into pi-dev am: 4720ba39e3
am: 308e6dbcfb

Change-Id: I5e76a432d845a19f31de6ebfe7ed326f428d4e46
2018-04-03 14:04:32 -07:00
TreeHugger Robot
87ba4a4d5f Merge "Autogenerate SearchIndexableResources subclass" 2018-04-03 20:11:26 +00: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
Lei Yu
db4ada245f Merge "In High usage, hide apps without screen time." into pi-dev am: 6f61ae0adf
am: c6882cf458

Change-Id: Icaf40316eaff1db5dd711c92400179bea4f58650
2018-04-03 11:00:21 -07: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
Tony Mantler
0fcd6cbaa8 Autogenerate SearchIndexableResources subclass
Bug: 77148954
Test: RunSettingsLibRoboTests RunSettingsRoboTests RunSettingsGoogleRoboTests RunArcSettingsRoboTests
Change-Id: I842c42c55014c3310070ef22bd4f0d9a70dfd804
2018-04-03 10:26:55 -07: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
60d38db8d9 Enterprice privacy: let the user know if admin enabled backups. am: a112226db2
am: 6f42f7beec

Change-Id: Iaf11a4d7a7880c77be65d97bb5c9a3527b9b2c22
2018-04-03 08:14:55 -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
07f803d115 Merge "Move the Private DNS dialog back to the top level." into pi-dev am: a62df616f9
am: cf793eb632

Change-Id: I2a5a0d55fb01091deb00aa7d79f72344207e8793
2018-04-03 02:05:20 -07:00
Fan Zhang
f60c3384fa Merge "Remove more wrappers" into pi-dev am: d73d3a8f55
am: 893f9db1ac

Change-Id: I7f9e765e842e4bc8f8c4ad3c041faa9edee2b744
2018-04-03 01:54:04 -07: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
87e4022129 Merge "Add afterclass method to remove static field" 2018-04-03 04:41:57 +00:00
Matthew Fritze
6c79de9a75 Merge "Expand isAvailable to include DISABLED_DEPENDENT" into pi-dev am: 2a51657c8e
am: 749728094f

Change-Id: Ibb470b1340d5f7c0b151b635bd7c64b5dfd8e1c7
2018-04-02 20:15:33 -07:00
rafftsai
662aa42bca Merge "MagnificationPreferenceFragment use DashboardFragment" into pi-dev am: e1549f0af1
am: 9d4f21140c

Change-Id: I88ebcb0cc46b03f42acb242e58857585e4ae63f8
2018-04-02 19:58:51 -07: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
Fan Zhang
bf0a17a90b Merge "Remove wrapper for device policy manager" into pi-dev am: e35e00712c
am: 4d91ea3036

Change-Id: If7baa937eda42db42cc5161c195f8da56677f06e
2018-04-02 22:30:37 +00:00
Lei Yu
d5dceb7d5c Merge changes Ib497aca6,Ic6def54a into pi-dev am: 5e8a0e2436
am: fc6f4e05da

Change-Id: I44510b8dd49325b913d0d7ad82ceb844f3d98886
2018-04-02 22:29:29 +00:00
Salvador Martinez
49d0d7b492 Merge "Update auto wi-fi to prompt user for permissions" into pi-dev am: 27587f7884
am: 3903f787e9

Change-Id: Ia5f05b32874ec93019fad725bb78d1adae922e4b
2018-04-02 22:27:49 +00:00
TreeHugger Robot
e1549f0af1 Merge "MagnificationPreferenceFragment use DashboardFragment" into pi-dev 2018-04-02 22:25:04 +00:00
Lei Yu
739c68c369 Merge "Update the battery string." into pi-dev am: 43a325dd05
am: 3dbdb27605

Change-Id: If997f4feac5446310ab8e98091ea40b65aa5256c
2018-04-02 21:56:11 +00:00
Jyun LuoLai
6c5c6d7c22 Merge "Let battery status icon has consist UI in PowerSummaryPage" into pi-dev am: ab19293cf4
am: 6b0a77647c

Change-Id: I2fffa4d581d527b302056e2535f496e62ed1c272
2018-04-02 21:44:35 +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
Pengquan Meng
811a0ad404 Merge "Fixed ApnEditor issue" 2018-04-02 18:52:31 +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
Julia Reynolds
78756b1880 Add app info notification summary
Test: make -j RunSettingsRoboTests
Change-Id: I803b473d994dff4ec8591c43452820b0e702ea0e
Fixes: 72442731
2018-04-02 09:52:20 -04:00
Chalard Jean
42405603c7 Move the Private DNS dialog back to the top level.
Bug: 64133961
Fixes: 74844869
Test: visual test and interaction
      also updated tests and checked they pass
Change-Id: I7c8d50e5941c2a7dd46014932bdace14dc222c80
2018-04-02 09:58:12 +00:00
hylo
14d00bbafd Add afterclass method to remove static field
Some unit tests did not clean their status
So add @after method to fix this issue

Change-Id: I9450714d1133049a87c2287f527f0598eab56041
Fixes: 73960706
Test: make RunSettingsRoboTests
2018-04-02 10:54:55 +08:00
TreeHugger Robot
27587f7884 Merge "Update auto wi-fi to prompt user for permissions" into pi-dev 2018-04-02 01:36:37 +00:00