Commit Graph

21078 Commits

Author SHA1 Message Date
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
Robin Lee
9c2758f407 VpnSettings PreferenceList tests
For validating that when VPNs are added / removed, the right set of
changes are made to the PreferenceGroup in which they are supposed to
be shown.

Bug: 30998549
Bug: 29093779
Test: runtest -x packages/apps/Settings/tests/unit/src/com/android/settings/vpn2/PreferenceListTest.java
Change-Id: I9394db0e78cc984ab62e3670aa0a7942ae767a66
2016-11-28 17:42:56 +00:00
Tadashi G. Takaoka
b51f6bf869 Add initialize helper method to improve readability
This CL also reduces SearchIndexableResources class about 1kB.

Test: Added Robolectric test. "make RunSettingsRoboTests" passed.
Change-Id: Id7f7676e175db4aba0be23c0c1a3fc12dd6acc2e
2016-11-25 16:21:22 +09:00
TreeHugger Robot
f0c64a3cdb Merge "Fix DPM.ACTION_SET_NEW_PASSWORD" 2016-11-23 23:07:10 +00:00
Tony Mak
8f41b9b665 Fix DPM.ACTION_SET_NEW_PASSWORD
Problem:
SetNewPasswordActivity is the new entrance for
ACTION_SET_NEW_PASSWORD. And it starts ChooseLockGeneric with the
fingerprint extras. ChooseLockGeneric infers which user is starting it
and determine which user is setting password. However, it now always
think that it is current user as it is always SetNewPasswordActivity
in current user starting it.

Solution: Resolve the user id in SetNewPasswordActivity and forward it
to ChooseLockGeneric. SetNewPasswordActivity needs to know the user id
anyway in order to have the fingerprint checking in the correct user id.

Test: 1. make RunSettingsRoboTests
      2. Manual Test
      	a. Start SET_NEW_PASSWORD intent in user 0, set password.
         	User 0 password is set.
      	b. Start SET_NEW_PASSWORD intent in work profile, set password.
         	work profile password is set.
        c. SET_PROFILE_PARENT_NEW_PASSWORD is always setting parent
           password.
        d. If fingerprint is disabled, both intent should not show
           fingerprint option
        e. DO sync auth flow with google.com account, fingerprint option
           is shown.

Change-Id: I2f73d01ab11e91b337beb90c05bbcb857dfd40dc
Fix: 32959373
2016-11-23 11:36:18 +00:00
TreeHugger Robot
424453e621 Merge "Make RemoveUserFragment public." 2016-11-22 19:05:28 +00:00
Fan Zhang
e97c91ec73 Make RemoveUserFragment public.
Fixes: 33034368
Test: make RunSettingsRoboTests
Change-Id: Icbda53c1a5992774fb8bd638f6ab5ad6d4590cfb
2016-11-22 09:26:13 -08:00
Neil Fuller
6096050bb1 Merge "Change EXTRA_TIME_PREF_24_HOUR_FORMAT from boolean to int" 2016-11-22 11:55:28 +00:00
Fan Zhang
beddff82b0 Move date/time prefs to PreferenceController and add tests.
Bug: 32996243
Test: RunSettingsRoboTests
Change-Id: Ie537bbcc35a96a63251e46f84b57c0a861b9d013
2016-11-21 16:42:14 -08:00