Commit Graph

25 Commits

Author SHA1 Message Date
Tony Mantler
1c9e2f65a2 Use Settings.ACTION_ADD_ACCOUNT
Bug: 62586588
Test: No functional change
Change-Id: I01ffc240fe7299a6d5f08c390870eaf3ba0f4260
2017-06-13 15:16:50 -07:00
Matthew Fritze
2078bc2358 Remove search2 package and put everything into search
Change-Id: Ie8651c79ef023f154cd7120a88a20f3481abce2b
Fixes: 38502743
Test: make RunSettingsRoboTests
2017-05-23 13:57:28 -07:00
TreeHugger Robot
3f4056212f Merge "Fix issue for new account not being shown in work profile." 2017-05-18 18:55:27 +00:00
Fan Zhang
867c68e76c Merge "Fix bug where accounts are duplicated in user&account list." into oc-dev am: 2b030aeb65
am: 60d26cfffa

Change-Id: I878bafe5a626e2f6fe9d8f4cfbb89dfeb763c7a0
2017-05-18 01:14:10 +00:00
Fan Zhang
c754f59fb0 Fix bug where accounts are duplicated in user&account list.
This happens when user has different accounts with same account name. For
example: user@domain.com for type1 and same email for type2, etc. When
we refresh the account list during onResume(), the same account name
incorrectly causes the logic to think they are the same account and
updates the account list by mistake.

- Introduced a util method to generate unique key from Account object.
And set it as preference key.
- when updating preference on screen, use key to find preference instead
of the preference instance itself.

Change-Id: I0aa692cb965b7037155a746389a919cd155843da
Fix: 34035653
Test: make RunSettingsRoboTests
2017-05-17 23:50:30 +00:00
Doris Ling
71090678c0 Fix issue for new account not being shown in work profile.
When refreshing the UI, we tried to only create profile data for new
profile, and skip the initialization for existing profiles. However,
the authentication helper will not get the updated account list, since
the account update listener is being paused. Re-create the
authentication helper to get the latest list of enabled accounts.

Change-Id: Ie29699456e5b32747e8158d51382afaa2c0c5908
Fix: 38302246
Test: make RunSettingsRoboTests
2017-05-17 23:42:17 +00:00
Juan Lang
777ed2535a Depend on SettingsLib's version of lifecycle and FooterMixin.
The implementations have been imported into SettingsLib. Setting's copy
can now be removed, which this change also does.

Test: Manually check battery status, which uses FooterMixin, looks OK.
make RunSettingsLibRobotTests && make RunSettingsRoboTests
     && make RunSettingsGoogleRoboTests
Change-Id: I6539605fdad80d156ff5ff249e68df4a1c412067
2017-05-12 11:10:46 -07:00
Doris Ling
633250bd78 Also update the account preferences in displayPreference().
- start creating the account preferences in displayPreference() to make
the data available earlier.
- when trying to update the UI when the page is resumed, instead of
clearing the whole list and add the latest accounts, compare the
differences between the currently shown accounts and the latest accounts
and only update the account preferences that has been changed.

Change-Id: I249eb2fe67f4adaab02bf77680c62d07756dc94a
Fix: 34035653
Test: make RunSettingsRoboTests
2017-05-10 11:59:47 -07:00
Matthew Fritze
8a42b074a7 Reserve full indexing for SearchFragment
Full Index should only be accessible from Search Fragment,
and when only full index should declare a locale to be
indexed.

Test: make RunSettingsRoboTests
Fixes: 36656637
Change-Id: Ie673067118ac6b184570e116ea24a169be027053
2017-03-29 23:55:48 +00:00
Doris Ling
f2cf2aea37 Remove code that check for dashboard feature.
- remove DashboardFeatureProvider.isEnabled() and all relating code
and tests.

Bug: 35764802
Test: make RunSettingsRoboTests
Change-Id: If7796677abc8904b7436525836d50cdef38e37a4
2017-03-07 11:15:03 -08:00
Doris Ling
f074f0f6dd Removed AccountSettings used in old IA only.
- remove AccountSettings and all related code that is used in old IA, so
that it will not show up in search.

Change-Id: I9f83112f760fd991caf89de109fde9e675b8c981
Fix: 34165913
Test: make RunSettingsRoboTests
2017-02-24 16:04:35 -08:00
Fan Zhang
c6ca314c0b Log source with visibility change
- Add a method in VisibilityLoggerMixin to log visible event using
  LogMaker, which allows logging additional FIELD_CONTEXT field.
- In Utils.startFragment, add current page's metricsCategory as an extra
  to next page.
- In next page's onResume(), extract the previous page's metricsCategory
  and send it to VisibilityLoggerMixin.visible()
- Update all caller with additional paramters

Change-Id: I8e1f2597fa465b7d3aa16fa1d21c052a3219694a
Fix: 35359289
Test: RunSettingsRoboTests
2017-02-15 17:17:19 -08:00
Doris Ling
829d3aaa7a Update text for User & accounts page.
- Add the user name to the Account preference group title.
- Add the summary text to Emergency information.

Bug: 34976320
Test: make RunSettingsRoboTests
Change-Id: I771e355ce3b313ffa50feb5c5e7907b1f3857592
2017-02-07 10:35:47 -08:00
Fan Zhang
c7804c130b Another attempt fix for account preference screen.
Fix: 34219500
Test: RunSettingsRoboTests

Change-Id: I316e36496fc9d7eca9c718275c0f113b181d7f1e
2017-01-13 16:31:16 -08:00
Fan Zhang
81a030fdfa Fix NPE when adding account but prefManager doesn't exist
Change-Id: Ie7371ba461995bae96ed1d99e224ab7e0d7acc99
Fix: 34219500
Test: make -j40 RunSettingsRoboTests
2017-01-11 10:46:45 -08:00
Fan Zhang
424443bdb2 Fix NPE in accountPrefController
Change-Id: I83dba35604c501780fa9a99d122b9d9bc8068661
Fix: 34193417
Test: RunSettingsRoboTests
2017-01-10 11:50:42 -08:00
Doris Ling
fd06d2fcf4 Add header and remove button to account detail page.
- Add account header which contains the account icon and name to the top
  of the account detail page.
- Also add the remove account button to the bottom of the page.

Change-Id: I24f1a17a7f9c4dd8c840a2b0329c0965e4e612e9
Fix: 33543525
Test: make RunSettingsRoboTests
2017-01-06 13:20:08 -08:00
Fan Zhang
ac81f26e30 Align more prefs for icon space.
Bug: 33775510
Fixes: 33798492
Test: Visual
Test: RunSettingsRoboTests

Change-Id: I9b296e4148be8c1ae537b6418b4f384bbc63a8db
2016-12-21 11:20:24 -08:00
Fan Zhang
8af4c10476 Revert "Align more prefs for icon space."
Bug: 33798492
This reverts commit ded9fc9b07.

Change-Id: I9831858ffda263496617dff29249e243c007fa12
2016-12-21 17:03:00 +00:00
Fan Zhang
ded9fc9b07 Align more prefs for icon space.
- Extend preference_category to support summary text
- Removed work_profile_category, used by account list
- align prefs in storage settings
- Use Preference instead of PrefScreen in xmls
- Use proper footer preference in NightDisplaySettings, BatterySaver,
  DataSaver, AutomaticStorageManage
- Remove WallOfTextPreference

Bug: 33775510
Test: visual
Change-Id: I28156b857ff5acac8746c42384dc03d5997ebd9d
2016-12-20 13:24:31 -08:00
Esteban Talavera
e539c886fd Merge "Check new user restriction for profile removal" 2016-12-14 19:16:28 +00:00
Fan Zhang
9b6f181340 Remove no-op handlePerferenceTreeClick from PrefControllers
Bug: 33429853
Test: RunSettingsRoboTests
Change-Id: I5633953e3d7b07f9006e541b96a24a2a769e2686
2016-12-07 15:34:31 -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
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
Doris Ling
bfac31b517 Add account preference controller.
- Add account preference controller and move the handling for
displaying user's accounts from AccountSettings to the
controller.

- Move AccountPreference and RemoveUserFragment from inner class to
standalone class.

- Add AccountRestrictionHelper to handle API that needs to be mocked for
testing.

Bug: 31801423
Test: make RunSettingsRoboTests
Change-Id: I3d16d0b6a8922a8abec7037c52b7a4de2d76eb0d
2016-11-17 16:33:36 -08:00