Commit Graph

13849 Commits

Author SHA1 Message Date
Fan Zhang
af71eb20c8 Merge "Always reserve space for preference icons." 2016-12-13 17:06:59 +00:00
Fan Zhang
1c118b5f2a Always reserve space for preference icons.
This aligns text on preferences on the same screen when some of them
don't have icons.

- Use a custom layout for
  preference
  EditPreference
  switch preference
  VolumeSeekPreference
  DialogPreferencei
  Restricted*Preference
  DropdownPreference

- Moved related style defs into a new file styles_preference.xml,
  because current styles file is too large to read.
- Switch <PreferenceScreen ...> to <Preference ...> for a bunch of
  regular preferences.
- Also removed some dead style.

Bug: 33430928
Test: runtest --path packages/apps/Settings/tests/app/src/com/android/settings/dashboard/PreferenceThemeTest.java

Change-Id: Ic9b75d3f133f2a83cd999297b8596253d4b10161
2016-12-12 16:02:45 -08:00
Lei Yu
4eba3954e2 Merge "Fix account picker crash when there is no account before." 2016-12-12 21:06:12 +00:00
jackqdyulei
9134548ea4 Fix account picker crash when there is no account before.
Bug: 33497222
Test: make RunSettingsRoboTests
Change-Id: I06adb4e0a4afcb359a4f7e8b15f13f67c28d5b46
2016-12-11 12:37:26 -08:00
TreeHugger Robot
1a71c05c7c Merge "Handle tap on intent based search results." 2016-12-09 23:04:03 +00:00
TreeHugger Robot
0a56f479f9 Merge "First step in refactoring Index.java" 2016-12-09 22:13:26 +00:00
TreeHugger Robot
aff89527e6 Merge "Remove divider lines from new IA fragments." 2016-12-09 21:43:11 +00:00
Fan Zhang
12daf6830d Handle tap on intent based search results.
Also fix how icon is loaded. IconResId is specific to the package of the
indexed result. If result comes from external app, icon needs to be
decoded against the external app's package context.

Bug: 33432310
Test: RunSettingsRoboTests
Change-Id: Ia0c53e63be757405dfaeceb2d865e7d8de87c5ee
2016-12-09 13:27:00 -08:00
TreeHugger Robot
62b397d38c Merge "Add check for DISALLOW_DEBUGGING_FEATURES restriction" 2016-12-09 21:26:36 +00:00
Matthew Fritze
18fcb08308 First step in refactoring Index.java
Handles the following refators:
 - Indexing code into: DatabaseIndexingManager
 - Indexing utility methods into: DatabaseIndexingUtil
 - XML Parsiing utility methods into XMLParserUtil

Bug: 33451851
Test: make RunSettingsRoboTests
Change-Id: I4264ad3806d1bd3a66d879c16ad6c8315ecb832b
2016-12-09 20:51:32 +00:00
Fan Zhang
cdc1135e51 Remove divider lines from new IA fragments.
Change-Id: I0ce486f7ac6148e1747a948c9c2b187157734ed1
Fixes: 33486181
Test: RunSettingsRoboTests
2016-12-09 11:43:42 -08:00
Doris Ling
cc20600102 Add check for DISALLOW_DEBUGGING_FEATURES restriction
- if the user has restriction for the action
  DISALLOW_DEBUGGING_FEATURES, remove the preference for taking bug
  report and the switch preference to enable bug report shortcut in the
  power key.
- refactor DevelopmentSettings to use preference controller for Take bug
  report and enable bug report in power key.

Fixes: 27145643
Test: make RunSettingsRoboTests

Change-Id: I18784d218d37956130c33f527d514ab703727397
2016-12-09 11:38:22 -08:00
Fan Zhang
d4b43228b0 Merge "Improve UI pref when sync/cancel account syncs." 2016-12-09 17:39:16 +00:00
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