Commit Graph

3977 Commits

Author SHA1 Message Date
Doris Ling
5a66ddbd6f Add screen resource for Colors setting.
- each preference fragment should have its own preference screen layout
in order to show the title correctly. Adding the missing data for
ColorModePreferenceFragment.

Change-Id: I172429dc957f94351456d4bc829897a578d7dbf9
Fixes: 68763217
Test: make RunSettingsRoboTests
2017-11-01 17:49:35 -07:00
Fan Zhang
f0b027f4ce Improve settings cold start latency.
- Move view initialization from onViewCreated to onCreateView. This
  doesn't really improve anything, it simply aligns the code more
  with view's lifecycle management.
- Move dashboard category init into background. The init contains logic
  invoking packageManager, which can be very expensive.
  - Remove any call to DashboardFeatureProvider from SummaryLoader, and
    delay the getCategory call until someone calls setListener().
  - call updateCategory() from background thread.

Test: rerun app launch test. Avg latency drops back to pre-suggestion-v2
      level.
Test: robotest
Fixes: 68761512

Change-Id: I5ec85af08e7b610786e439bda93b3651f5975593
2017-11-01 17:24:53 -07:00
jeffreyhuang
c2f8ab587e Popup a dialog to display user IMEI information
- Add new dialog fragment to show imei information
 - Create layout files for the dialog
 - Create a new controller to launch the dialog activity
 - Create a new controller to update the contents of the dialog
 - Deprecate old files that are no longer used in about phone v2

Bug: 36458278
Test: make RunSettingsRoboTests -j40
Change-Id: I6d4273726e2271049a0ab69c2375dac0ac393e04
2017-11-01 14:57:10 -07:00
TreeHugger Robot
910d452874 Merge "Do not start suggestion loader if host isn't attached." 2017-11-01 20:12:44 +00:00
Fan Zhang
6d7aa4e951 Do not start suggestion loader if host isn't attached.
Change-Id: I1ab1de8f0bea6c66d8415e06aedcc7cbc6baf89c
Fixes: 68759380
Test: robotests
2017-11-01 10:34:33 -07:00
Fan Zhang
7b1ab13ddc Merge "Add a readme with instructions on running tests" am: 08217cbd4b am: 931504bb24
am: 45f3c5b261

Change-Id: Ia45d584ab37ae15b4620f00199a477d913040295
2017-11-01 01:29:35 +00:00
TreeHugger Robot
baaea544a5 Merge "Convert EncryptionAndCredential into DashboardFragment" 2017-11-01 00:32:31 +00:00
Fan Zhang
45f3c5b261 Merge "Add a readme with instructions on running tests" am: 08217cbd4b
am: 931504bb24

Change-Id: I5e631e039e1fadd499e70fd7ad8d40acc945a9de
2017-10-31 23:49:31 +00:00
TreeHugger Robot
ef7eb162cf Merge "Mark core unit tests for Presubmit" 2017-10-31 22:59:59 +00:00
TreeHugger Robot
0955bd7e51 Merge "Vibrate when fingerprint error text is shown" 2017-10-31 21:54:02 +00:00
TreeHugger Robot
134b4237c1 Merge "Implement the missing PreferenceControllerMixin interface" 2017-10-31 21:46:04 +00:00
Fan Zhang
9679dba668 Convert EncryptionAndCredential into DashboardFragment
The logic still lives in fragment for now. They will be moved into
PrefControllers in follow-up changes.

Bug: 32953042
Test: RoboTests
Change-Id: I2b03d26b5f4e6bbb37b42f9dc83a9464eb169868
2017-10-31 14:39:52 -07:00
TreeHugger Robot
f8091755e7 Merge "Switch to use new activity title handling." 2017-10-31 21:16:44 +00:00
Fan Zhang
6438ee5466 Mark core unit tests for Presubmit
Bug: 68716631
Bug: 68720368
Test: rerun test
Change-Id: Ia8cca6aede824928fc358b005172bbe2ed670c8f
2017-10-31 14:09:31 -07:00
TreeHugger Robot
e717a5fdd1 Merge "Move search querying into a single API" 2017-10-31 20:42:33 +00:00
Maurice Lam
4f41dea738 Vibrate when fingerprint error text is shown
Some users block the screen when enrolling the fingerprint. Vibrate
the phone to prompt the user to look at the screen in case they get
stuck.

Test: cd tests/robotests && mma
Bug: 67664182
Change-Id: I70dc5a5a566f2e764f8109fb2be25ec6d7c48da9
2017-10-31 13:19:25 -07:00
Fan Zhang
e261535192 Implement the missing PreferenceControllerMixin interface
Change-Id: I0bb28cf9d2ec24629485a754778faddcbc8f9fdb
Fixes: 68716631
Test: atest PreferenceControllerContractTest
2017-10-31 13:17:13 -07:00
Fan Zhang
83e7581690 Add a readme with instructions on running tests
Test: is a test
Change-Id: I5f3a4745a1b2376259b2aab8df58d8660c3fe0bc
2017-10-31 13:14:58 -07:00
Doris Ling
ac8cb35208 Switch to use new activity title handling.
Bug: 64564191
Test: make RunSettingsRoboTests
Change-Id: I66894c1541ea483ab4fe4b1b68ba5f94b9a5e210
2017-10-31 12:27:50 -07:00
TreeHugger Robot
f60c99af53 Merge "Display network name in status bar" 2017-10-31 17:52:47 +00:00
TreeHugger Robot
9138de153c Merge "Add a dialog when turning off oem unlock dialog." 2017-10-31 17:11:30 +00:00
Yoshinori Hirano
53cfd11793 Display network name in status bar
When config_showOperatorNameInStatusBar is true, "Network name" setting
is displayed in Settings app (Settings > Display).
The user can turn on/off the feature to display the network name in the
status bar from Settings app.

Fixes: 67620513
Test: manual - go to Settings > Display and turn on/off Network name.

Change-Id: I43f1d9cbea363527250639ce6146f1c5c6c8a482
2017-10-31 09:08:06 -07:00
TreeHugger Robot
9fb5426315 Merge "Enable suggestion v2 experiment" 2017-10-31 02:55:03 +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
Fan Zhang
f9e985d018 Enable suggestion v2 experiment
Bug: 68662574
Test: robotests
Change-Id: Ib8aeef45ebe1260e9c8699e231db37840a0ce3db
2017-10-30 18:06:40 -07: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
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
TreeHugger Robot
ecb8355aff Merge "Remove locale checking for indexing." 2017-10-30 16:48:29 +00: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
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
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
Doris Ling
8b14a1a7a6 Change to use the expand button in support lib.
- functionality for hiding portions of the preferences in the preference
screen is added to the support lib. So, changing the settings
implementation to use the feature from the support lib instead.
- remove ProgressiveDisclosureMixin and the related code

Fixes: 63985174
Test: make RunSettingsRoboTests
Change-Id: Ib1d39b2db93d78a56c7adf90abcae5226f9564c2
2017-10-27 13:16:38 -07:00
Christine Franks
34f7b5af59 Merge "Move color mode to DisplayTransformManager" 2017-10-27 16:10:22 +00:00
TreeHugger Robot
244f4c5686 Merge "Misc clean up in search" 2017-10-27 15:41:29 +00:00
TreeHugger Robot
295a6b42f4 Merge "Moved zenMode visual effects + automatic rule page" 2017-10-27 15:23:19 +00:00
Beverly
4359d4b9c9 Moved zenMode visual effects + automatic rule page
- Automatic zen rules have their own page like in N
- Minor string changes to page and add rule dialog
- Zen mode visual effects was moved into behavior settings

Bug: 63077372
Test: $ make SettingsUnitTests -j40
$ adb install -r ${OUT}/data/app/SettingsUnitTests/SettingsUnitTests.apk
$ adb shell am instrument -w com.android.settings.tests.unit/android.support.test.runner.AndroidJUnitRunner

Change-Id: I9635f8f7969b76d036bc06ec44705815e540777a
2017-10-27 09:49:04 -04:00
TreeHugger Robot
85fb6726e9 Merge "Search in Settings for Japanese" 2017-10-27 03:31:46 +00:00