Commit Graph

636 Commits

Author SHA1 Message Date
Fan Zhang
2829958456 Improve UI pref when sync/cancel account syncs.
The core of the change is in ManageAccountSettings#showSyncState(). New
code caches as much information as it can. And break out of loops as
early as possible.

Bug: 28575620
Test: make RunSettingsRoboTests
Change-Id: I076ce148e3d8db55f6cadfd9491f037f7a55a986
2016-12-08 14:35:13 -08:00
Jaewoong Jung
56a8c64c43 Merge "Makes it possible to robo-test Settings app fragments." 2016-12-08 04:31:14 +00:00
TreeHugger Robot
2a6193df36 Merge "Use a single layout for CreateShortcut activity." 2016-12-08 01:59:22 +00:00
Jaewoong Jung
bccd652503 Makes it possible to robo-test Settings app fragments.
This adds bunch of shadow/placeholder classes and logic to handle
references to Android internal resources or newly added classes/methods
that Robolectric hasn't yet picked up.

Developers can follow ManageApplicationsTest example to use the shadow
classes and the utility method to start ther fragment in their
robolectric tests.

Bug: 33431346
Test: This is a test improvement CL. RunSettingsRoboTests still passes.
Change-Id: I943ab871631cb8c368d9f9db481c00558c5c4d1f
2016-12-07 17:32:39 -08:00
TreeHugger Robot
6c6c0e1151 Merge "Refactor SoundSettings to use more preference controller." 2016-12-08 00:30:25 +00:00
Fan Zhang
b95ff4ec31 Use a single layout for CreateShortcut activity.
The old layout is inherited from LauncherActivity, which uses a
inconsistent theme and UI between phone and tablet. It's more consistent
to just use a single layout that matches setting theme.

Fixes: 32220535
Test: runtest --path packages/apps/Settings/tests/app/src/com/android/settings/CreateShortcutTest.java
Change-Id: I769d1404c82c2057bf021e4cf557e7cf397d92a7
2016-12-07 16:11:42 -08:00
TreeHugger Robot
276e3b7a5e Merge "Add search loader for installed apps." 2016-12-07 23:01:53 +00:00
Doris Ling
6c2cf0dbc5 Refactor SoundSettings to use more preference controller.
- second round of refactoring SoundSettings to use preference
  controller.
- add controller for Emergency broadcast, Vibrate when ring, Phone
  ringtone, Alarm ringtone, and Notification ringtone.

Bug: 32276590
Test: make RunSettingsRoboTests
Change-Id: Iaff48ecb27bf156a5c8995de20ce7a440b094cdb
2016-12-07 14:33:13 -08:00
Fan Zhang
36d0d143be Add search loader for installed apps.
- The loader filters out system apps.
- Loader performs case-insensitive match with app names.
- SearchResultAdapter combines results from multiple loaders into a
  single list.

Fixes: 33347966
Test: make RunSettingsRoboTests
Change-Id: I228ca6fb82f0ac5151b2346c079c2de41104a4df
2016-12-07 13:00:26 -08:00
Matthew Fritze
cacb2f00c1 Merge "Test the Columns in the SearchIndexablesContract" 2016-12-07 19:37:43 +00:00
Matthew Fritze
172eac4c51 Test the Columns in the SearchIndexablesContract
The test is going into settings because of the lack testing
support in framework/base for this kind of change, and
because Settings search depends on this change.

Test: make RunSettingsUnitTests
Bug: 33390556
Change-Id: I8a87d4228a37fca475791409b89c7d135c29004a
2016-12-07 09:45:51 -08:00
Fan Zhang
adab6060f1 Merge "Clean up search fragment loader lifecycle." 2016-12-07 00:58:42 +00:00
TreeHugger Robot
e4dc672005 Merge "Added feature for surveys provider to Settings" 2016-12-07 00:51:41 +00:00
Fan Zhang
413eaa4070 Clean up search fragment loader lifecycle.
- Programatically create SearchView to make it always expand across
  entire action bar.
- Store current query text during screen rotation
- Restart loader when query text changes

Bug: 33354491
Test: RunSettingsRoboTests
Change-Id: I63838a38514569aac60c5d67ac52ac06a7acd5a3
2016-12-06 14:43:01 -08:00
Maurice Lam
016e4c6dad Hide next button when max fingerprints enrolled
Hide the next button in FingerprintEnrollIntroduction when the
maximum number of fingerprints is enrolled, and show a message
telling the user about the error.

Test: Added FingerprintEnrollIntroductionTest
Bug: 32406375
Change-Id: If8e3c4f5eb13dd2b3edb5c0442d8f34a16a22674
2016-12-06 18:56:44 +00:00
Doris Ling
2425a528ad Merge "Add handling for tiles with intent-action metadata." 2016-12-06 18:14:06 +00:00
TreeHugger Robot
f5c1577609 Merge "Add search provider for dashboard fragments in new IA." 2016-12-06 03:58:10 +00:00
TreeHugger Robot
cdec3495f8 Merge "Add InstrumentFragment for non-PreferenceFragment types." 2016-12-06 03:10:01 +00:00
Fan Zhang
2d0b344736 Add InstrumentFragment for non-PreferenceFragment types.
This allows app fragment use a less heavyweight fragment as super class
if they don't need PreferenceFragment. Using this class as base is
generally easier to set up robolectric tests too.

Bug: 33354536
Test: RunSettingsRoboTests
Change-Id: I91c4d242ea0333c76c8767c03c3f18dee6b6e104
2016-12-05 17:13:33 -08:00
Doris Ling
a155197d65 Add handling for tiles with intent-action metadata.
If intent action is provided in the metadata for the dynamic tiles, it
will be added to the launching intent when user selects the tile.

Fixes: 31801423
Test: make RunSettingsRoboTests
Change-Id: Ic3e583a578660f4d9c40feff1418e5e354ab8f60
2016-12-05 16:50:47 -08:00
TreeHugger Robot
3bdf0fc85c Merge "Add search indexing for new gesture pages." 2016-12-06 00:02:16 +00:00
Salvador Martinez
980f575955 Added feature for surveys provider to Settings
It is now possible to create and show surveys to a user
asking them for feedback within the Settings app.

Test: JUnitTests
Bug: 27823357
Change-Id: I824899045f6ce30e5b6f46d20888da673114f658
2016-12-05 15:42:07 -08:00
Fan Zhang
6e88635e97 Add search provider for dashboard fragments in new IA.
Bug: 33252252
Test: make RunSettingsRoboTests
Change-Id: I8ea3a144f2bee3d979b909aba29a3360e25fd04b
2016-12-05 15:27:18 -08:00
Fan Zhang
ee524404ff Add search indexing for new gesture pages.
Bug: 33252252
Test: make RunSettingsRoboTests
Change-Id: I927e5b9b87b226ea5ce2006fc2524ac8db740446
2016-12-05 14:24:08 -08:00
Bill Yi
b305ec6762 Revert "Import translations. DO NOT MERGE"
This reverts commit da32519ef4.

Change-Id: I5c1241a6bf00d73f3b877b2eaeaeabd774413401
2016-12-05 18:37:12 +00:00
Bill Yi
da32519ef4 Import translations. DO NOT MERGE
Change-Id: I13691a933f0c8c83859723b28329673fc2467e8d
Auto-generated-cl: translation import
2016-12-03 00:41:05 -08:00
Lei Yu
3740f8f028 Merge "Add account picker to Support Tab" 2016-12-02 17:14:16 +00:00
TreeHugger Robot
64559d3049 Merge "Update SoundSettings to extend DashboardFragment." 2016-12-02 03:32:09 +00:00
TreeHugger Robot
6158fa691c Merge "Add search providers for Connected Devices in new IA" 2016-12-02 02:27:35 +00:00
Lei Yu
89beefdb37 Merge "Add DashboardItemAnimator to stop flash" 2016-12-02 01:32:08 +00:00
Doris Ling
1b3ec04748 Update SoundSettings to extend DashboardFragment.
- initial round of refactoring SoundSettings to use DashboardFragment.
- add controller for Cast, Do not disturb, Alarm volume, Media volume,
  Ring volume and Notification volume.

Bug: 32276590
Test: make RunSettingsRoboTests
Change-Id: I5c02a344bff5117bfce93d7ccac650fccc82d2b0
2016-12-01 17:24:05 -08:00
Fan Zhang
762b4969d9 Add search providers for Connected Devices in new IA
Also add code inspection tests to ensure search provider is added
properly.

Bug: 33252252
Test: make RunSettingsRoboTests
Change-Id: I192e1d9fe0498b76013c4d43b5624d1ef2beb6f9
2016-12-01 15:11:14 -08:00
Fan Zhang
032a77be8d Fix test for appcounter
Bug: 33275978
Test: make RunSettingsRoboTests
Change-Id: Ie3c58dc95b4abde83f33ee7c2af925cef3be85fb
2016-12-01 15:07:41 -08:00
Fan Zhang
a3e8f5c024 Upload query text whenever it changes.
Bug: 33266688
Test: make RunSettingsRoboTests
Change-Id: Ie26f9d4ad7460d49305457a7a3066d121e374eab
2016-12-01 10:15:54 -08:00
Fan Zhang
1e798ff51f Merge "Add code inspector to ensure fragments implements search." 2016-12-01 00:50:41 +00:00
jackqdyulei
fa45aee813 Add DashboardItemAnimator to stop flash
When there is no offset change for identical holder in
animateChange, simply return and don't invoke the
resetAnimation.

Bug: 33198024
Test: make RunSettingsRoboTests
Change-Id: Ib83363873bc5f51e5bd71af5a013ee0756728d1a
2016-11-30 16:39:28 -08:00
Fan Zhang
89e669f5d8 Add code inspector to ensure fragments implements search.
Unless a fragment is grandfathered:
- If it's a SearchPreferenceFragment, it needs to implement Indexable.
- If it's a Indexable, it needs to contain SEARCH_INDEX_DATA_PROVIDER.

Bug: 33209410
Test: make RunSettingsRoboTests
Change-Id: I078c54374341ba2966145429fc1507a3d5763d3b
2016-11-30 15:09:09 -08:00
jackqdyulei
5538be509c Add account picker to Support Tab
Add a spinner to select the account for user.

Bug: 32249920
Test: make RunSettingsRoboTests
Change-Id: I372d16ec5ec3230f5f2994d79f4fd27085092236
2016-11-30 14:16:55 -08:00
Esteban Talavera
50e515e5ec Check new user restriction for profile removal
Test: make RunSettingsRoboTests
Bug: 31952368
Change-Id: I3c8b0820a5541201006d12f9893d5b89332334c2
2016-11-30 22:14:00 +00:00
TreeHugger Robot
7aad8a97a4 Merge "Add handling for account tiles for specific account type." 2016-11-30 20:53:16 +00:00
TreeHugger Robot
fcbb6528ae Merge "Add test to ensure all future fragments implements logging." 2016-11-29 23:20:35 +00:00
Doris Ling
20d4b041f7 Add handling for account tiles for specific account type.
- List individual account instead of account type under User & account
  screen.

- Add handling to move account tiles with specific account type from
  top level account dashboard to inside the corresponding account
  preference.

- Rename settings.accounts.AccountPreference to
  settings.accounts.AccountTypePreference to make it less confused
  with settings.AccountPreference

Bug: 31801423
Test: make RunSettingsRoboTests
Change-Id: Iebe70a3c4230e8d979344f142a5c2a60945e552e
2016-11-29 14:18:30 -08:00
TreeHugger Robot
737ae83a66 Merge changes from topic 'show-deleted-vpn'
* changes:
  VpnSettings PreferenceList tests
  VpnSettings: slightly more robust callback context
  VpnSettings: show connected VPN even if deleted
2016-11-29 10:22:35 +00:00
Tadashi G. Takaoka
5e8b93bc53 Merge "Add initialize helper method to improve readability" 2016-11-29 04:03:54 +00:00
Fan Zhang
8b8218c01b Add test to ensure all future fragments implements logging.
The idea is: if a class is Fragment, it must also implements
Instrumentable.

To make the test possible, I added a structure to load all classes in
current classloader, and filter to only the ones we care about. Then
insepct each class definition using reflection.

Bug: 32952614
Test: make RunSettingsRoboTests
Change-Id: Ifa5e27c41d5ad0e84b6e9e9df81c96e8be2878c5
2016-11-28 16:34:45 -08:00
Shahriyar Amini
3d7f09d7ad Merge "Use preference key specified in injected settings." 2016-11-29 00:17:29 +00:00
Shahriyar Amini
6259129d69 Use preference key specified in injected settings.
Bug: 31002801
Test: make RunSettingsRoboTests

Reads in optional metadata field for specifying the key used for an
injected preference.

Change-Id: Ief2ff10c508d42f91906b531cf34906c1c42fdd4
2016-11-28 14:49:46 -08:00
TreeHugger Robot
01bffd0751 Merge "Update strings." 2016-11-28 22:26:26 +00:00
Fan Zhang
3d9fd0cd73 Update strings.
Bug: 32841662
Test: RunSettingsRoboTests
Change-Id: I178070bfd5f20188e580f8a3a8dd442bd17f3632
2016-11-28 12:48:07 -08:00
Bartosz Fabianowski
2e0b608495 Populate Enterprise Privacy Settings page - batch 2
This CL adds the second batch of items to the Privacy Settings page.

These are all the remaining items that fall into the "What types of
information can your organization see?" category.

Test: make RunSettingsRoboTests
Bug: 32692748
Change-Id: I08569646ed6bb6f5d9d6d65ed2718be8456f50ae
2016-11-28 21:13:30 +01:00