Commit Graph

3226 Commits

Author SHA1 Message Date
Maurice Lam
d78ea6af4a Don't default to PIN on non FBE devices
So that EncryptionInterstitial is shown as part of the flow

Test: cd tests/robotests && mma
Bug: 65192141
Change-Id: I13e8b9059aae39cef2a8509f9f0eee1cd0808220
2017-09-08 13:31:58 -07:00
Maurice Lam
563af1cda9 Add FakeFeatureFactory.setupForTest
In AssisGestureSettingsTest, FakeFeatureFactory was used but was
missing a setupForTest call.

Test: cd tests/robotests && \
      ROBOTEST_FILTER=AssistGestureSettingsTest mma

Change-Id: Ie78232d854aee00c7969a3d2dc148354be7de484
2017-09-08 13:08:03 -07:00
Maurice Lam
f26fe2763a Merge "Don't default to PIN on non FBE devices. DO NOT MERGE" into oc-mr1-dev
am: 40e284b196

Change-Id: Ica634ce9776b0b0c30bfb49223a4d1d5fc5398ad
2017-09-08 19:56:09 +00:00
Maurice Lam
40e284b196 Merge "Don't default to PIN on non FBE devices. DO NOT MERGE" into oc-mr1-dev 2017-09-08 19:50:52 +00:00
Andrew Scull
e1f4703dbe Merge "Policy transparency when DISALLOW_FACTORY_RESET prevents OEM unlock." into oc-mr1-dev
am: 0bac26b6cd

Change-Id: I30996559ac5166d4ed2cf59688239effe335a305
2017-09-08 19:33:34 +00:00
TreeHugger Robot
0bac26b6cd Merge "Policy transparency when DISALLOW_FACTORY_RESET prevents OEM unlock." into oc-mr1-dev 2017-09-08 19:08:48 +00:00
Stephen Chen
fbc7a00a5c Merge "Make auto Wi-Fi summary text consistent with feature availability." into oc-mr1-dev am: 194638ac78
am: d2f9de37c7

Change-Id: Id8725588b14f6a74efbdb2065864f2fce1561873
2017-09-08 19:04:48 +00:00
Maurice Lam
f2063cff30 Don't default to PIN on non FBE devices. DO NOT MERGE
So that EncryptionInterstitial is shown as part of the flow

Test: cd tests/robotests && mma
Bug: 65192141
Change-Id: I13e8b9059aae39cef2a8509f9f0eee1cd0808220
2017-09-08 18:58:27 +00:00
Stephen Chen
d2f9de37c7 Merge "Make auto Wi-Fi summary text consistent with feature availability." into oc-mr1-dev
am: 194638ac78

Change-Id: I6dc3ce13040a0b20b5197c5cfac6bc55b09ab679
2017-09-08 18:55:58 +00:00
TreeHugger Robot
194638ac78 Merge "Make auto Wi-Fi summary text consistent with feature availability." into oc-mr1-dev 2017-09-08 18:47:08 +00:00
Daniel Nishi
59c8d77c8c Re-add the block of text explaining the feature.
When the automatic storage manager  is off (or has never been run), we
display a block of text that explains what it does. In order to make
this testable, I've implemented the feature in a PreferenceController
and upgraded the existing AutomaticStorageManagerSettings class to be
closer to the newer Settings IA.

Change-Id: I3f7d20347a6d5a7bae8bffcd2014c3fdcd315b90
Fixes: 63082545
Test: Settings Robotest
2017-09-08 09:58:05 -07:00
Andrew Scull
2ca3017f8e Policy transparency when DISALLOW_FACTORY_RESET prevents OEM unlock.
If an admin has set the DISALLOW_FACTORY_RESET user restriction, OEM
unlock is also restricted. If this is the case, it should be explained
to the user that the admin is preventing the OEM unlock.

DISALLOW_OEM_UNLOCK is deprecated and now managed by OemLockManager.
This restriction is also one set by the carrier, not an admin.

Test: RunSettingsRoboTests
Test: CTS verifier test from the bug
Bug: 65124732
Change-Id: I8bde87a522742a7cbda006eee17c2a19797b1835
(cherry picked from commit 0aa45bed65)
2017-09-08 16:11:36 +00:00
Andrew Scull
f9ab23ef03 Merge "Policy transparency when DISALLOW_FACTORY_RESET prevents OEM unlock." 2017-09-08 16:01:41 +00:00
Andrew Scull
0aa45bed65 Policy transparency when DISALLOW_FACTORY_RESET prevents OEM unlock.
If an admin has set the DISALLOW_FACTORY_RESET user restriction, OEM
unlock is also restricted. If this is the case, it should be explained
to the user that the admin is preventing the OEM unlock.

DISALLOW_OEM_UNLOCK is deprecated and now managed by OemLockManager.
This restriction is also one set by the carrier, not an admin.

Test: RunSettingsRoboTests
Test: CTS verifier test from the bug
Bug: 65124732
Change-Id: I8bde87a522742a7cbda006eee17c2a19797b1835
2017-09-08 12:40:25 +01:00
Ajay Nadathur
1fe7838e70 Merge "Set title in remote views if present in bundle" into oc-mr1-dev
am: 4ce113d6f8

Change-Id: Iaa650a18bd4efb74e6b903efad0ad1a02865429c
2017-09-08 06:43:46 +00:00
TreeHugger Robot
4ce113d6f8 Merge "Set title in remote views if present in bundle" into oc-mr1-dev 2017-09-08 06:36:46 +00:00
Ajay Nadathur
2e6e4c12a9 Merge "Set title in remote views if present in bundle" 2017-09-08 05:09:21 +00:00
Fan Zhang
1ca6b25321 Don't attempt to tint icon if icon is not available
Change-Id: I0aa2a17d51d966dce182381c7bba8913ad997738
Fixes: 65460834
Test: robotests
2017-09-08 00:10:55 +00:00
Jack He
9a45bab608 Bluetooth: add metrics for pairing with devices without names am: 5b017f7b05
am: d9de1ecc03

Change-Id: I34a61269d955ffd9aa073aa1c514c3f3e148adbc
2017-09-07 23:54:21 +00:00
Jack He
d9de1ecc03 Bluetooth: add metrics for pairing with devices without names
am: 5b017f7b05

Change-Id: If74bd132ee1352888a7f9513444e998537f11145
2017-09-07 23:25:43 +00:00
Jack He
5b017f7b05 Bluetooth: add metrics for pairing with devices without names
* Also caches context in onClick() method

Bug: 34685932
Test: make, unit test
Change-Id: I99beab2c85b8e48c4bc41f69146759d4b7c62428
2017-09-07 12:09:00 -07:00
TreeHugger Robot
6f7f25e3fe Merge "Separate collection of indexable data from indexing" 2017-09-07 17:51:22 +00:00
Matthew Fritze
bdc8fe6da9 Separate collection of indexable data from indexing
The first step in refactoring the god class,
DatabaseIndexingManager.

The class has one major entry point: indexDatabase
which begins a chain of calls that first collects all the
data from the fragments, and then massages that data into
the SQLite database. Unfortunately, most of the methods
do not return data, and just pass along some mutated
form of the data until it can be insterted.

Reading and testing this class is very difficult.

This first step moves the collection of the indexable data
into a new class which has a few benefits:
- The data can be easily mocked in tests
- Reduces complexity of D.I.M.
- Separates data collection from indexing, which allows the
indexable data to be piped into a new API that unbundled
search can consume.

Bug:33577327
Test: make RunSettingsRoboTests
Test: Grabbed a DB dump before change, compared to DB dump after change
to make sure everything is still indexed.
Change-Id: Ibc91e3d75ff5dcf5274b93b29bf3544f90b2194d
2017-09-07 08:53:41 -07:00
Daniel Nishi
ab5e8ce249 Merge "Cache storage values for fast loading." into oc-mr1-dev am: 7fae6c67fb
am: cad295918c

Change-Id: I42136185af82217383526a38c8c3a4ffc2e4829e
2017-09-07 15:35:03 +00:00
Daniel Nishi
cad295918c Merge "Cache storage values for fast loading." into oc-mr1-dev
am: 7fae6c67fb

Change-Id: I5e29852872dd08e0e5bb3f1822127879dc354319
2017-09-07 15:15:16 +00:00
Ajay Nadathur
ab07989b97 Set title in remote views if present in bundle
- Title set if defined in the Bundle returned by summaryUri's content
provider.
- summaryUri invoked inline with onBindView call

bug: 62713030
Test: Manually tested, verified that title and summary are retrieved
when settings app is resumed
Change-Id: Id82531eec5ec11ec3492f033fb34ec65a5437a48
2017-09-07 14:56:38 +00:00
Emilian Peev
6530b21cc5 Settings: Add laser sensor preference
Add a switch for enabling/disabling the laser sensor within
developer options.

Test: Manual using setting app, RunSettingsRoboTests
Bug: 64423712
Change-Id: I89a32dfa062fc62c4be096d2e026a32ce9b784ca
2017-09-07 08:54:58 +01:00
Daniel Nishi
7fae6c67fb Merge "Cache storage values for fast loading." into oc-mr1-dev 2017-09-06 23:07:14 +00:00
Fan Zhang
6d5a277622 Merge "Misc polishing fixes for Settings" into oc-mr1-dev am: bda6500884
am: 08c4871dbe

Change-Id: Ib01d65ae56ac7f03f25ca320724ba6b3cd90b861
2017-09-06 22:54:09 +00:00
Fan Zhang
0a07b19dd9 Merge "Pre-set initial state to wifi tether switches." into oc-mr1-dev am: dad9b79630
am: b1ff93dfeb

Change-Id: I9206b968d53c89924076e1f3b9979fd00e68945d
2017-09-06 22:53:14 +00:00
Ajay Nadathur
d1c3084bd5 Set title in remote views if present in bundle
- Title set if defined in the Bundle returned by summaryUri's content
provider.
- summaryUri invoked inline with onBindView call

bug: 62713030
Test: Manually tested, verified that title and summary are retrieved
when settings app is resumed
Change-Id: Id82531eec5ec11ec3492f033fb34ec65a5437a48
2017-09-06 15:25:04 -07:00
jackqdyulei
1e887c17e2 Make system item has a consistent name.
In battery settings, the system item contains many packages. In old
behaviour it will use the first package(which has legal name and icon)
to represent this item. This behaviour is not consistent.

In this cl, we always use package "android" to extract name and icon
if it is system item.

Bug: 65090883
Test: RunSettingsRoboTests
Change-Id: Ibb7f85c06ab1745867f1eaa666cea32c8d3295a6
2017-09-06 14:49:49 -07:00
Fan Zhang
08c4871dbe Merge "Misc polishing fixes for Settings" into oc-mr1-dev
am: bda6500884

Change-Id: I119661153a87d0ebe67367c7350c2934679902a3
2017-09-06 21:23:04 +00:00
Fan Zhang
b1ff93dfeb Merge "Pre-set initial state to wifi tether switches." into oc-mr1-dev
am: dad9b79630

Change-Id: I6236900d715e7ef85e2855513c41689a68046a07
2017-09-06 21:22:14 +00:00
TreeHugger Robot
bda6500884 Merge "Misc polishing fixes for Settings" into oc-mr1-dev 2017-09-06 20:37:15 +00:00
TreeHugger Robot
dad9b79630 Merge "Pre-set initial state to wifi tether switches." into oc-mr1-dev 2017-09-06 19:53:39 +00:00
TreeHugger Robot
7f541b8227 Merge "Clean up test strings" 2017-09-06 19:49:36 +00:00
TreeHugger Robot
a43af4a43c Merge "Import translations. DO NOT MERGE" 2017-09-06 18:05:42 +00:00
Fan Zhang
31d8a89220 Misc polishing fixes for Settings
- Never return null when querying userDictionaryLocales
- Auto mirror mobile setting icon in RTL to match status bar.

Fixes: 65298627
Fixes: 65361092
Test: robotests
Change-Id: I0f9827f7bc23baf4895712c0f86584aeccfb9c73
2017-09-06 10:58:52 -07:00
Fan Zhang
a0372028f0 Clean up test strings
- Mark everything untranslatable to avoid TC confusion

Change-Id: Iea43b0f5f63253833d91aeaa11b3c463cd170741
Fixes: 65355069
Test: builds
2017-09-06 10:54:19 -07:00
Antony Sargent
cbb0bcfeae Merge "Fix Bluetooth switch status in Connected devices screen" into oc-mr1-dev am: c3b47925e3
am: f92f6c24f1

Change-Id: I81d955471c420647b884533cf09656cf7cae28c1
2017-09-06 16:55:27 +00:00
Antony Sargent
f92f6c24f1 Merge "Fix Bluetooth switch status in Connected devices screen" into oc-mr1-dev
am: c3b47925e3

Change-Id: I7c9a07543340992e8bd3ff15538d74d28a1aab22
2017-09-06 16:53:28 +00:00
Antony Sargent
c3b47925e3 Merge "Fix Bluetooth switch status in Connected devices screen" into oc-mr1-dev 2017-09-06 16:42:41 +00:00
Charles He
0a72c23393 Merge "Enforce wifi config lockdown on details page." into oc-mr1-dev am: 10adff1163
am: e7cf5e6221

Change-Id: I356a58cadd3e19e61d9585f08e47c9d4cdcf4318
2017-09-06 16:12:08 +00:00
Charles He
e7cf5e6221 Merge "Enforce wifi config lockdown on details page." into oc-mr1-dev
am: 10adff1163

Change-Id: I8aed4d127bc84c457a672cc5e524aa7ac477b15d
2017-09-06 16:06:32 +00:00
Charles He
289af93896 Enforce wifi config lockdown on details page.
Fixes the bug that, on the new WifiDetailPreference page, the "Forget"
button is not disabled properly for wifi configs created and protected
by DevicePolicyManger.

Robolectric test to follow in a separate CL.

Test: manual, by locking down wifi config with TestDPC
Test: make RunSettingsRoboTests
Bug: 64971700
Bug: 65396674
Change-Id: I27740eabd5eb94415e4258c9c80f91df2d9ab476
2017-09-06 15:58:14 +00:00
Bill Yi
ef8151c8b3 Import translations. DO NOT MERGE
Change-Id: If965ef4d51917904739ed4726b036a285adc6d6d
Auto-generated-cl: translation import
Exempt-From-Owner-Approval: translation import
2017-09-06 08:15:05 -07:00
Daniel Nishi
fb302de0d6 Cache storage values for fast loading.
If the user moves away from the storage fragment and returns, this
allows us to use cached data from the previous calculation. If the data
is > 1 minute old, we consider it stale. Otherwise, we can bypass the
loading screen.

Fixes: 37923463
Test: Settings Robotest

Change-Id: I7650d4d742852f8d447878c077b9190bc0a0bb22
2017-09-05 14:46:14 -07:00
Fan Zhang
657286112f Pre-set initial state to wifi tether switches.
The preset initial state helps eliminating animation jank when first
landing on the page.

Change-Id: Ia7ba83983f18409b1c653cc1ebb0f3aad281358c
Fixes: 64811322
Test: robotests
2017-09-05 13:57:14 -07:00
Stephen Chen
8ffcbccbce Make auto Wi-Fi summary text consistent with feature availability.
"Turn Wi-Fi on automatically" feature is disabled when airplane mode or
battery saver mode is enabled, when Wi-Fi scanning is disabled, or when
network recommendations are disabled / scorer unset. This change
captures these negative cases in the summary text.

Bug: 65085700
Test: make ROBOTEST_FILTER=WifiWakeupPreferenceControllerTest
RunSettingsRoboTests -j40
Change-Id: I2f2d22b5bef3ad03a28d34e79a27e6545cac557f
2017-09-05 13:51:58 -07:00