Commit Graph

43256 Commits

Author SHA1 Message Date
Bill Yi
d90d7c5193 Merge "Import translations. DO NOT MERGE" into oc-mr1-dev am: 89688902b8 -s ours
am: d3528de4c9  -s ours

Change-Id: I05bcb32b3c013d15a76939a3a974f88d36d94aeb
2017-10-31 03:54:53 +00:00
Bill Yi
2e841fd17e Merge "Import translations. DO NOT MERGE" into oc-dr1-dev am: a68a0f0463 -s ours
am: 9a983dd72f  -s ours

Change-Id: I072b7f8f6e320f2339b1b134193aabc2c654604c
2017-10-31 03:46:08 +00:00
Bill Yi
d3528de4c9 Merge "Import translations. DO NOT MERGE" into oc-mr1-dev
am: 89688902b8  -s ours

Change-Id: I443ed7404e199e87ec76d7f4724f0b66de7f3e19
2017-10-31 03:45:23 +00:00
Bill Yi
9a983dd72f Merge "Import translations. DO NOT MERGE" into oc-dr1-dev
am: a68a0f0463  -s ours

Change-Id: I4b9282935fe15d3c1418edb43506aad058a3e485
2017-10-31 03:41:23 +00:00
TreeHugger Robot
89688902b8 Merge "Import translations. DO NOT MERGE" into oc-mr1-dev 2017-10-31 03:35:52 +00:00
TreeHugger Robot
a68a0f0463 Merge "Import translations. DO NOT MERGE" into oc-dr1-dev 2017-10-31 03:34:28 +00:00
TreeHugger Robot
9fb5426315 Merge "Enable suggestion v2 experiment" 2017-10-31 02:55:03 +00:00
Fan Zhang
33ad251a38 Merge "Set device credential's Window flag to be SECURE." into oc-dr1-dev am: 83c49be1da am: fb06488712
am: 601fdf83f9

Change-Id: I745f8ae697987149ec4d905f4607aae2966dfcfe
2017-10-31 02:53:09 +00:00
Fan Zhang
601fdf83f9 Merge "Set device credential's Window flag to be SECURE." into oc-dr1-dev am: 83c49be1da
am: fb06488712

Change-Id: I1153c5c89819e8083d77d0ecd9e3ca982d199f40
2017-10-31 02:48:01 +00:00
Fan Zhang
fb06488712 Merge "Set device credential's Window flag to be SECURE." into oc-dr1-dev
am: 83c49be1da

Change-Id: Iacdaedc972e9d8ba013860be1442620c46c4f19d
2017-10-31 02:44:34 +00:00
TreeHugger Robot
40ebbf01a5 Merge changes from topic "small_icons"
* changes:
  Use small icon in location and vpn settings UI
  Clean up: use AppPreference for PowerGaugePreference
  Switch to use small icon for most app related pages
  Update UI to use a smaller icon for ManageApplication page.
2017-10-31 02:44:21 +00:00
TreeHugger Robot
83c49be1da Merge "Set device credential's Window flag to be SECURE." into oc-dr1-dev 2017-10-31 02:37:43 +00:00
TreeHugger Robot
f12dbf9333 Merge changes from topic "anomaly_metric_update"
* changes:
  Add metric log for anomaly.
  Add metric id for anomaly fragments.
2017-10-31 02:09:47 +00:00
TreeHugger Robot
1f88913674 Merge "Move the bluetooth icon logic to settingslib" 2017-10-31 01:59:37 +00:00
TreeHugger Robot
fd234a07be Merge "Don't consider managedProfile in PowerUsageAdvanced" 2017-10-31 01:54:25 +00:00
Bill Yi
97eec4be9f Import translations. DO NOT MERGE
Auto-generated-cl: translation import
Exempt-From-Owner-Approval: translation import

Bug: 64712476
Change-Id: If1e768b33481061f37bac9612b862ece348f15fb
2017-10-30 18:16:54 -07:00
Bill Yi
e2dbd96742 Import translations. DO NOT MERGE
Auto-generated-cl: translation import
Exempt-From-Owner-Approval: translation import

Bug: 64712476
Change-Id: Idb8eeaa4ee52a3d250c95a164a7bf28512d32901
2017-10-30 18:12:54 -07:00
Fan Zhang
f9e985d018 Enable suggestion v2 experiment
Bug: 68662574
Test: robotests
Change-Id: Ib8aeef45ebe1260e9c8699e231db37840a0ce3db
2017-10-30 18:06:40 -07:00
TreeHugger Robot
e06aa2e739 Merge "Remove DividerPreference and its corresponding usage." 2017-10-31 01:00:30 +00:00
Fan Zhang
47a50edf31 Add a dialog when turning off oem unlock dialog.
Change-Id: I93a93c0a110c2770d3701b5449c7939f941c7593
Fixes: 28199132
Test: robotests
2017-10-30 17:53:11 -07:00
jackqdyulei
e233162c3a Add metric log for anomaly.
This cl creates metric log when anomaly surfaces in battery page or
anomaly dialog.

Each anomaly action contains two fields:
1. FIELD_CONTEXT(int): determine which fragment start this action.
2. FIELD_ANOMALY_ACTION_TYPE(int): determine action type for this
anomaly.

Bug: 68215016
Test: RunSettingsRoboTests
Change-Id: I83761e2a9c206ea7a04f7d031a6961fdab7ca9a0
2017-10-30 16:00:16 -07:00
Fan Zhang
fc29247da4 Use small icon in location and vpn settings UI
Fixes: 65182905
Test: rerun tests
Change-Id: I18aa5c5bb4c8f573872cda3d003506c4dff5177c
2017-10-30 14:24:49 -07:00
Matthew Fritze
fb772248b1 Move search querying into a single API
Settings now collects search results from a single
loader which fetches from an aggregator. This is to
facilitate the separation of search functionalitiy,
where "query" becomes a single synchronous call.
In this case, the aggregator will move to the
unbundled app and would be called on the
other end of the Query call. i.e. the new search
result loader will just call query, and unbundled
search will handle everything else.

An important implication is that the results will
be returned in a ranked order. Thus the ranking and
merging logic has been moved out of the RecyclerView
adapter (which is a good clean-up, anyway).

The SearchResultAggregator starts a Future for each
of the data sources:
- Static Results
- Installed Apps
- Input Devices
- Accessibility Services

We allow up to 500ms to collect the static results,
and then an additional 150ms for each subsequent
loader. In my quick tests, the static results take
about 20-30ms to load. The longest loader is installed
apps which takes roughly 50-60ms seconds (note that
this will be improved with dynamic result caching).

To handle the ranking in DatabaseResultLoader,
we start a Future to collect the dynamic ranking before
we start the SQL queries. When the SQL is done, we
wait the same timeout as before. Then we merge the
results, as before.

For now we have not changed how the Dynamic results
are collected, but eventually they will be a cache
of dynamic results.

Bug: 33577327
Bug: 67360547
Test: robotests
Change-Id: I91fb03f9fd059672a970f48bea21c8d655007fa3
2017-10-30 14:20:49 -07:00
Doris Ling
afa12a41d5 Remove DividerPreference and its corresponding usage.
Change-Id: I64ff1b2d6ab77cf40159e6ad157ab2464e7970ed
Fixes: 37250410
Test: visual, make RunSettingsRoboTests
2017-10-30 12:42:50 -07:00
Fan Zhang
fdf96975e3 Clean up: use AppPreference for PowerGaugePreference
- And remove the code for customizing app icon size.

Bug: 65182905
Bug: 68426851
Test: robotests
Change-Id: I4e37bbee3636266f7c1a639b8e9faabb78d61110
2017-10-30 12:20:49 -07:00
Fan Zhang
1c3a4de93d Switch to use small icon for most app related pages
- Renamed AppProgressPreference to AppPreference to handle most app
  related prefs
- Add ed AppSwitchPreference - the same layout as AppPreference except
  it's a SwitchPreference
- Use above 2 prefs in most app related pages.
  - Everything under special access pages
  - Recent app list in App & notifications
  - App data usage detail page
  - Default app picker pages

Bug: 65182905
Test: robotests
Change-Id: I96c980ba1db49e36dabe25b5eade1197215aad11
2017-10-30 12:20:49 -07:00
Fan Zhang
974d2fe080 Update UI to use a smaller icon for ManageApplication page.
- Rewrite preference_app.xml to have a small icon
- Update ApplicationViewHolder to hide/show summary row dynamically
  - but only do this for notification settings - this UI has empty
    summary for most row. For other UI, just keep the empty summary row
    until summary comes in. If we also hide/show summary row there will
    be a height change animation which is janky.

Bug : 65182905
Fixes: 63582851
Test: robotests

Change-Id: Ice67324f08c67e014a018dfc51e00fe4449036dd
2017-10-30 12:20:49 -07:00
jackqdyulei
725562c748 Add metric id for anomaly fragments.
1. PowerUsageAnomalyDetails
2. AnomalyDialogFragment

Bug: 37681923
Test: Build

Change-Id: Ia82fde0fa3e61b6284dc18db3018dd223a0e435b
2017-10-30 12:15:31 -07:00
TreeHugger Robot
10d0518fa3 Merge "Update confirm button label" 2017-10-30 19:09:34 +00:00
xiyuan.wang
c8e304aea6 Merge "Fix app crash while adding new user" am: 1e5cd4c3df am: 5cf3dcd11c
am: 029aeca640

Change-Id: I0c10300fd1714d68769473ab28d90177cbf35162
2017-10-30 18:51:13 +00:00
TreeHugger Robot
056ee030c6 Merge "Clean up: remove dimmableIconPreference" 2017-10-30 18:35:36 +00:00
xiyuan.wang
029aeca640 Merge "Fix app crash while adding new user" am: 1e5cd4c3df
am: 5cf3dcd11c

Change-Id: I328ca5045b1fabf9f6756cc0265458bda531fccf
2017-10-30 18:17:47 +00:00
xiyuan.wang
5cf3dcd11c Merge "Fix app crash while adding new user"
am: 1e5cd4c3df

Change-Id: I0cb1c3a228b85edb6303d4f6c33037e4f787f550
2017-10-30 18:03:09 +00:00
Treehugger Robot
1e5cd4c3df Merge "Fix app crash while adding new user" 2017-10-30 17:43:46 +00:00
Fan Zhang
12b03b2794 Clean up: remove dimmableIconPreference
- DimmableIconPreference is not a support pattern.
- Also updated a few icon tint colors to match with the rest of screen.

Bug: 68426851
Test: visual
Change-Id: Ia18d9f74458237403b94d3474cf09050d2039428
2017-10-30 10:06:45 -07:00
TreeHugger Robot
ecb8355aff Merge "Remove locale checking for indexing." 2017-10-30 16:48:29 +00:00
xiyuan.wang
b6fa43d980 Fix app crash while adding new user
Settings app crashes when tapping Home key while adding new user because
UserSettings#showDialog() is called after onSaveInstanceState().
To fix this issue, a dialog should not be shown after onPause().

Fixes: 68485787
Test: manual - tap Home key while adding new user

Change-Id: I2ddd119b6558927798a52c7977e6fd8137734c93
2017-10-30 19:55:56 +09:00
Bill Yi
b179a4e854 Import translations. DO NOT MERGE am: 198f1320b7 -s ours
am: 603e6e45b0  -s ours

Change-Id: Ieb87a6f8300891f3dd33ba57ee3b3bd5411422d6
2017-10-30 07:43:52 +00:00
Bill Yi
603e6e45b0 Import translations. DO NOT MERGE
am: 198f1320b7  -s ours

Change-Id: I7e6935fcc3adbe7bdf62bf60ca6635e3fb49b0de
2017-10-30 07:35:56 +00:00
Bill Yi
198f1320b7 Import translations. DO NOT MERGE
Auto-generated-cl: translation import
Exempt-From-Owner-Approval: translation import

Bug: 64712476
Change-Id: I17237599107b5576cfc9261b866614c1a69fb531
2017-10-28 23:21:49 -07:00
Fan Zhang
f68e6ec2ae Move app ops classes to their own package
Bug: 68426851
Test: robotests
Change-Id: I076b7adf59d4bf66792eb0aebaa3dc305d6d0c4b
2017-10-28 14:22:45 -07:00
Fan Zhang
5214fae4be Remove dead code
- Remove AppOpsDetails/AppOpsSummary and related code

Bug: 68426851
Test: robotests
Change-Id: I4b665e65bfff8b0365f45325b34965dc51d07bc0
2017-10-28 14:22:45 -07:00
TreeHugger Robot
648cc071b1 Merge "Remove dead code and obsolete patterns" 2017-10-28 19:43:05 +00:00
TreeHugger Robot
11151f5052 Merge "Eliminate duplicate keys in pref xmls." 2017-10-28 19:39:28 +00:00
Fan Zhang
752928ed0d Merge "Make SettingsShadowResources Thread Safe" 2017-10-28 18:55:43 +00:00
Fan Zhang
22d53b14a8 Remove dead code and obsolete patterns
- Remove code and resource for ProcessStatsMemDetail
- Remove TintablePreference (tinting icon is not a supported
  pattern starting in Android O)

Bug: 68426851
Test: robotests
Change-Id: Ib9c2fc8332255fe29c8f3dce378456403d7af8a3
2017-10-28 11:08:19 -07:00
Fan Zhang
57ef92a810 Eliminate duplicate keys in pref xmls.
- Remove additional_system_update pref device_info page, we don't need
  it.
- Update keys in xml and Preference controller, and search index
  provider.
- Clean up in ScreenZoomPreference, it's anti-pattern to set fragment in
  constructor.
- Whitelist 2 that are super hard to remove.

Change-Id: Ibab6e2cb074513042a2ae007d9085aa64046eec8
Fixes: 67852637
Test: uniquePreferenceTest
2017-10-28 11:06:37 -07:00
jeffreyhuang
c682766176 Make SettingsShadowResources Thread Safe
- Add synchronization locks to data structures in
 SettingsShadowResources to avoid ConcurrentModificationException
 - Make temporary variables final variables

Change-Id: I39a894c67d0b5e5b21bc0b9aa89180ba6989f01d
Fixes: 67850343
Test: make RunSettingsRoboTests -j40
2017-10-27 16:39:32 -07:00
Matthew Fritze
cb4b385794 Remove locale checking for indexing.
Remove the the indexing check for the
index data's locale to match the locale of
the device. We don't require locale for
indexables, and we reindex on locale change.

It had introduced a bug where when locale
changed, the default us-en results would
not be added to the db.

Change-Id: I43a4284f5c23bc51ee3efdfcabe511eac2d3317d
Fixes: 66916397
Fixes: 68380443
Test: robotests
2017-10-27 16:03:28 -07:00
Doris Ling
3977a6b482 Revert the way Special app access is launched.
- change it back to launch the fragment instead of intent activity.
- update the test case to launch special app access from Apps &
notifications page instead of directly launching it.

Change-Id: I61289ba0fa6cc4585c87cf337aa2007fb578450f
Fixes: 68397751
Test: visual, make SettingsUnitTests
2017-10-27 15:50:01 -07:00