Commit Graph

43256 Commits

Author SHA1 Message Date
Doris Ling
fc4d46495d Ignore null value in Account settings summary.
If an account type has no valid label, null is returned. Check the value
to make sure that it is a valid label before adding it to the summary.

Change-Id: I0cf3ef9a976e1a7fe16720da237f416c674791fc
Fixes: 73375480
Test: make RunSettingsRoboTests
2018-02-15 10:47:29 -08:00
Fan Zhang
970bacd8cb Remove IA mapping for old connected device page
Change-Id: I201c09facb9e21d452c58ff3d257bdd37e6b854d
Fixes: 69471219
Test: robotest
2018-02-15 10:36:16 -08:00
TreeHugger Robot
49c8080a50 Merge "Centralize the automatic storage manager on check." 2018-02-15 03:46:19 +00:00
TreeHugger Robot
cfffedbf43 Merge "Add android.permission.MANAGE_SCOPED_ACCESS_DIRECTORY_PERMISSIONS" 2018-02-14 23:53:28 +00:00
jackqdyulei
c76bb78758 Make BatteryDatabaseManager singleton
In BatteryTipLoader, two threads may access BatteryDatabaseManager
simultaneously. In this case thread A may close the database thread B
holds, then settings will crash.

In this cl, we make the BatteryDatabaseManager as singleton and
synchronize all the database related method. Then it shouldn't have
the crash anymore.

Bug: 73346734
Test: RunSettingsRoboTests
Change-Id: Ib53b2894b25155cca0c6ec60d1a816663d27a578
2018-02-14 14:24:02 -08:00
Felipe Leme
a5bbad439c Add android.permission.MANAGE_SCOPED_ACCESS_DIRECTORY_PERMISSIONS
This permission is required to access the ScopedAccessProvider. Although
Settings doesn't currently needs it because it has implicit access because
it runs as UID 1000, it's better to explicitly grant it.

Bug: 72055774

Test: atest CtsAppSecurityHostTestCases:ScopedDirectoryAccessTest#testResetDoNotAskAgain,testResetGranted

Change-Id: I843d7e4a1f674b4e012ac7f744d6ffccadde5a24
2018-02-14 13:17:23 -08:00
Daniel Nishi
da4fa80717 Centralize the automatic storage manager on check.
Bug: 70893105
Test: Existing tests pass.
Change-Id: I83fa0e1033eb530a02eca230d0dd79495cbcbc9d
2018-02-14 11:13:55 -08:00
TreeHugger Robot
956dd9451b Merge "Re-added support for deprecated BIND_AUTOFILL permission." 2018-02-14 17:34:56 +00:00
TreeHugger Robot
d32b62d887 Merge "Handle Looper in PreferenceController" 2018-02-14 17:22:55 +00:00
TreeHugger Robot
a33ee8b349 Merge "Fix instrumentation tests" 2018-02-14 17:22:55 +00:00
Yuchen Chang
c6233057ca [Settings] Add focus for SSIDtext to show IME
Add focus to SSIDtext to show IME when choosing add network.

Bug: 72882629
Test: RunSettingsRobotests & Manual test
Change-Id: I1c51c4b800a7668c6760c88b97e920cf75c26b26
2018-02-14 14:07:25 +08:00
Adrian Roos
807cf8d2c5 Use new OverlayManager categories
Using this, we split overlays based on their category, so that
cutout emulation and theme overlays no longer clash in their
respective settings.

Bug: 72436677
Test: make ROBOTEST_FILTER=EmulateDisplayCutoutPreferenceControllerTest RunSettingsRoboTests
Change-Id: I23f22113351b3948beb9e3a1fb969700852539cc
2018-02-13 19:13:10 -08:00
HJ ChangLiao
f6631e8924 [Settings] Update margin of summary of ring volumn
Update margin of summary of ring volumn settings,
to align with Title.

Bug: 69978042
Test: Robotest and manual test
Change-Id: Id621bc4b2d755f84d68df6729731356dcdd3a625
2018-02-14 11:03:31 +08:00
TreeHugger Robot
03017fc928 Merge "Don't set USB mode if user is a monkey" 2018-02-14 02:35:10 +00:00
Felipe Leme
b25ffe2c9f Re-added support for deprecated BIND_AUTOFILL permission.
This permission was renamed during the O previews but it was supported on the
final O release, so we need to carry it over.

Test: manual verification
Bug: 70682223

Change-Id: I24b41358fba7449d9216b49aa8b90480906cfb67
2018-02-13 18:09:30 -08:00
Sudheer Shanka
bc1c50c182 Raise priority of SHOW_ADMIN_SUPPORT_DETAILS intent filter.
We don't want SHOW_ADMIN_SUPPORT_DETAILS intent to be handled
by other apps.

Bug: 69981936
Test: make -j32 RunSettingsRoboTests
Test: manual - Install another app which handles SHOW_ADMIN_SUPPORT_DETAILS
      intent and verify that when SHOW_ADMIN_SUPPORT_DETAILS intent is
      triggered, Settings activity gets launched.

Change-Id: I6f764fe53b32559da829d515dd448c817b6bf7c9
2018-02-13 17:19:38 -08:00
Jerry Zhang
9e16092cb3 Don't set USB mode if user is a monkey
Test: tests pass
Fixes: 73246183
Change-Id: I9570c8bd8b11edd6eb0944a4aa766c22b4cc3619
2018-02-13 16:51:21 -08:00
TreeHugger Robot
bee1a6d990 Merge "Introduce config_disable_uninstall_update flag." 2018-02-14 00:33:59 +00:00
TreeHugger Robot
c0850a75e4 Merge "Add summary for hostspot when airplane is on." 2018-02-14 00:14:09 +00:00
TreeHugger Robot
1bbe424e6e Merge "Mark AccessibilitySettings#update methods as protected." 2018-02-13 22:51:32 +00:00
TreeHugger Robot
54d6620e58 Merge "Update detector and action for restrict app" 2018-02-13 22:46:07 +00:00
Hemant Gupta
e2551064d2 Merge "OPP: Prevent sending intent while orientation change" am: f32fa0b5f6 am: def626bea0
am: 6385eb1014

Change-Id: I2589be4755ca02d2ff1265607c735ca2cf1332d1
2018-02-13 22:45:38 +00:00
Ben Lin
bba02d88a4 Introduce config_disable_uninstall_update flag.
This adds the following flag:
config_disable_uninstall_update

Which by default is false. When set to true, it will hide the "Uninstall
updates" menu item for all cases.

This is useful for cases where the device OEMs want to allow users to
install apps, but do not want the ability to roll back updates on system
applications.

Bug: 62379281
Test: make RunSettingsRoboTests ROBOTEST_FILTER=AppInfoDashboardFragmentTest
Change-Id: I55fe92467ca95c05f6682174c117031d8295790e
2018-02-13 14:45:34 -08:00
TreeHugger Robot
2e0de6bb41 Merge "Remove the battery optimization menu" 2018-02-13 22:31:39 +00:00
jackqdyulei
2c45737dfb Add summary for hostspot when airplane is on.
Change-Id: I5470dab7050b73ed474abd5b948e873699819751
Fixes: 72716285
Test: RunSettingsRoboTests
2018-02-13 14:25:05 -08:00
Hemant Gupta
6385eb1014 Merge "OPP: Prevent sending intent while orientation change" am: f32fa0b5f6
am: def626bea0

Change-Id: I811e1801a145e9bb010359fdb8c74fb8ca968e7d
2018-02-13 22:22:23 +00:00
Hemant Gupta
def626bea0 Merge "OPP: Prevent sending intent while orientation change"
am: f32fa0b5f6

Change-Id: Id576b0cda560d565d86d6369b7552801cac7b0cd
2018-02-13 22:10:34 +00:00
TreeHugger Robot
2792da1ec7 Merge "Add method to update "state" column in anomaly db." 2018-02-13 22:05:32 +00:00
Treehugger Robot
f32fa0b5f6 Merge "OPP: Prevent sending intent while orientation change" 2018-02-13 20:43:24 +00:00
Lei Yu
2f6f8c7360 Merge "Upgrade the anomaly database." 2018-02-13 20:37:55 +00:00
jackqdyulei
af2ece7387 Update detector and action for restrict app
1. In detector, read data from database and display it.
2. Update the RestrictAppAction to mark anomaly as handled
if restriction is toggled.
3. Update the RestrictAppTip to handle state change.

Bug: 72385333
Test: RunSettingsRoboTests

Change-Id: I0bbe6f6fd049bf2e7a2bee1dee08d5199f922e31
2018-02-13 12:35:11 -08:00
TreeHugger Robot
5b6d2ac00c Merge "[Settings] Remove 'a' from "Set a PIN"" 2018-02-13 20:31:48 +00:00
jackqdyulei
25fc8e4556 Remove the battery optimization menu
Change-Id: I129f2c39dba506dabef2cf543e71f70cfd1e7fdf
Fixes: 73189468
Test: Test still pass
2018-02-13 11:06:26 -08:00
Hemant Gupta
3483fc3638 OPP: Prevent sending intent while orientation change
Steps:
1. Take any photo/picture and share it via Bluetooth
2. Before choosing remote device in Device Picker Activity, rotate
   the device.

Expected result:
File transfer should complete after selecting the device.

Actual result:
The dialog "Bluetooth share: File Unknown file not sent" is shown and
file sharing fails.

Fix:
Add configuration related check in manifest to avoid activity restart during
orientation change.

Test: File transferred successfully after step 2

Fixes: 72715713
Change-Id: I045c2940d3788059c9313e5501a7957608d8879c
2018-02-13 18:53:34 +00:00
jackqdyulei
fe13d2813a Add method to update "state" column in anomaly db.
This state could be "new", "handled" or "auto-handled".

Bug: 72385333
Test: RunSettingsRoboTests
Change-Id: I2e3a9d2d3457f125421467e72f5b734990273abe
2018-02-13 10:16:24 -08:00
jackqdyulei
ea153abe27 Upgrade the anomaly database.
Add one column for the table. Since the database is not offically
used, we can just simply delete and recreate it.

Bug: 72385333
Test: Build
Change-Id: If999dbccbf168b05f98af5ab389c9e2cbb5ad2e8
2018-02-13 10:05:49 -08:00
Matthew Fritze
404d96058c Handle Looper in PreferenceController
When indexing content in search, the preference controllers
are init'd on the background thread, thus you can't create a
handler without calling Looper.prepare().

We have PreferenceConttrollerContractTest to catch these
errors, but it was not running in presubmit.
Bug tracking: b/73242024

This caused the indexing thread to crash, thus
not adding any non-indexable keys for settings results.

Test: atest PreferenceControllerContractTest
Fixes: 73168342

Change-Id: I89fe596435d317bb3e3baebdaace97a67700d77e
2018-02-13 09:57:11 -08:00
TreeHugger Robot
44935e8602 Merge "Add content description to suggestion card close button." 2018-02-13 11:07:11 +00:00
TreeHugger Robot
b5e283f6c1 Merge "Import translations. DO NOT MERGE" 2018-02-13 11:05:42 +00:00
TreeHugger Robot
9017e45d09 Merge "Disable "double tap to check" when "always on"" 2018-02-13 04:07:14 +00:00
Jyun LuoLai
975f7c8348 [Settings] Remove 'a' from "Set a PIN"
Change-Id: Ic854ac0e87d486e3cc2723145e42a8894d7a9faf
Fixes: 72726923
Test: Manual test
2018-02-13 09:41:28 +08:00
Fan Zhang
20d8dc093b Merge "Change print setting from a dynamic tile to static pref" 2018-02-13 01:08:34 +00:00
Android Build Merger (Role)
5943908af4 [automerger skipped] Import translations. DO NOT MERGE skipped: 0a7ae11c49 skipped: d923718d10 skipped: 59ab695e25 skipped: eb76bf9861 skipped: 5755ec9bff skipped: ddd9cb6be9 skipped: 6827142bd1 skipped: ca801490c1 skipped: fb6a179745
Change-Id: Ib8ff63887495bec58823610df2bfe993d024bb12
2018-02-13 00:43:56 +00:00
Android Build Merger (Role)
fb6a179745 [automerger skipped] Import translations. DO NOT MERGE skipped: 0a7ae11c49 skipped: d923718d10 skipped: 59ab695e25 skipped: eb76bf9861 skipped: 5755ec9bff skipped: ddd9cb6be9 skipped: 6827142bd1 skipped: ca801490c1
Change-Id: Ife59d44c290cc17fb50bf252e0d5018e694249f4
2018-02-13 00:43:53 +00:00
Android Build Merger (Role)
ca801490c1 [automerger skipped] Import translations. DO NOT MERGE skipped: 0a7ae11c49 skipped: d923718d10 skipped: 59ab695e25 skipped: eb76bf9861 skipped: 5755ec9bff skipped: ddd9cb6be9 skipped: 6827142bd1
Change-Id: I2da83a86cf8dce95f26b21c02a426d53f5db5913
2018-02-13 00:43:50 +00:00
Android Build Merger (Role)
6827142bd1 [automerger skipped] Import translations. DO NOT MERGE skipped: 0a7ae11c49 skipped: d923718d10 skipped: 59ab695e25 skipped: eb76bf9861 skipped: 5755ec9bff skipped: ddd9cb6be9
Change-Id: I43b0b5ebdb708b53d3df284c3f836bec85e6e028
2018-02-13 00:43:46 +00:00
Android Build Merger (Role)
ddd9cb6be9 [automerger skipped] Import translations. DO NOT MERGE skipped: 0a7ae11c49 skipped: d923718d10 skipped: 59ab695e25 skipped: eb76bf9861 skipped: 5755ec9bff
Change-Id: I789abf6753a183218b5a5b3497a4496d3e3b937c
2018-02-13 00:43:44 +00:00
Android Build Merger (Role)
5755ec9bff [automerger skipped] Import translations. DO NOT MERGE skipped: 0a7ae11c49 skipped: d923718d10 skipped: 59ab695e25 skipped: eb76bf9861
Change-Id: I999690b501e7fc8fb80b1d0d00b3ea325eef4247
2018-02-13 00:43:40 +00:00
Android Build Merger (Role)
eb76bf9861 [automerger skipped] Import translations. DO NOT MERGE skipped: 0a7ae11c49 skipped: d923718d10 skipped: 59ab695e25
Change-Id: Ib7353cdd97c4da931c3ea3502e40fc72b61c1bb8
2018-02-13 00:43:37 +00:00
Android Build Merger (Role)
59ab695e25 [automerger skipped] Import translations. DO NOT MERGE skipped: 0a7ae11c49 skipped: d923718d10
Change-Id: I04c83c01dd38c7498fdd7ca4b978bab482172801
2018-02-13 00:43:34 +00:00