Commit Graph

40 Commits

Author SHA1 Message Date
Fan Zhang
c7162cd24d Reorder and clean up imports.
Test: rebuild
Change-Id: I178485c84ae7146f991fd77b6d7504b029942a68
2018-06-18 15:45:09 -07:00
Antony Sargent
28f04c984d Merge "Updated delete icon" into pi-dev am: 55642ef91b
am: d55b214dbd

Change-Id: Ifca325273ca5e99461a93487b127b5d0adcf6a39
2018-05-18 14:52:44 -07:00
Antony Sargent
0d9afde271 Updated delete icon
Also remove the duplicate ic_menu_delete.xml and fix up places where it
was used.

Bug: 77982107
Test: manual
Change-Id: I23ede37b7cdf9bea59b44cd0f817bf0ad0cd1d69
2018-05-17 11:55:40 -07:00
hjchangliao
e86eec0c07 Rename SubSettingLauncher.setTitle, add java doc
For make this method usage more clear,
setTitle(charSequence) rename as setTitleText,
add java doc: it is only for user generated string
setTitle(int) rename as setTitleRes.

Change-Id: I972cb6a8ff90873dfdc25c23f6dc3d68103c8e4e
Fixes: 78347436
Test: make RunSettingsRoboTests
2018-05-09 10:00:05 +08:00
Aurimas Liutikas
e0069d332d Migrate Settings to androidx.
Test: make Settings
Bug: 76692459
Change-Id: I941dea40562170649bf056e675cc32e5163c0e39
2018-04-20 12:52:29 -07:00
Fan Zhang
fa9849e282 Bidi wrap owner name in account setting page.
This fixes RTL issue when owner is set to have a LTR name but the
device language is in RTL.

Change-Id: I9f3fed76f641c2ff6a18e3bc8db98aef7011c33f
Fixes: 77947484
Test: visual
2018-04-18 15:58:50 -07:00
Fan Zhang
41c4e5f5db Use grey icon for work profile settings
Change-Id: I2b40d44578599d6abd892dd2198eb38471beb663
Fixes: 77537465
Test: visual
2018-04-03 13:21:34 -07:00
James Lemieux
22a39c2b93 Use external/robolectric-shadows/run_robotests.mk
This allows Settings to test against the latest framework changes.

Also replaced TestConfig with traditional robolectric.properties.

Bug: 73173204
Bug: 73892008
Test: make -j56 RunSettingsRoboTests
Change-Id: I3135b4fa5f095ba79b282a76f45dd9baa2584bc7
2018-03-04 03:50:08 -08:00
Fan Zhang
7cf99f5f12 Migrate more settings to use SubSettingsLauncher
Bug: 73250851
Test: robotests
Change-Id: I08f6f380489646231d6d8ceb1488e2efb036bf69
2018-02-18 21:10:03 -08:00
Leif Hendrik Wilden
28dee1f086 Migrate to use instrumentation classes from settingslib.
Test: Compiles. Manually tested.
Change-Id: I70a6e76cc8440547746ecc008c32bd06a7de8161
2018-01-24 12:30:39 -08:00
Leif Wilden
cab0ee611d Revert "Migrate to use instrumentation classes from settingslib."
This reverts commit 1546cca529.

Reason for revert: Broke fingerprint setup flow. b/72267201

Change-Id: I8321265ae64732c526325882ddea51080decddf5
2018-01-22 20:57:36 +00:00
Leif Hendrik Wilden
1546cca529 Migrate to use instrumentation classes from settingslib.
Test: Compiles. Manually tested.
Change-Id: Ie5515bb0fe3e621fc7723a9b04ba23e4bfa9c401
2018-01-18 11:13:24 -08:00
Fan Zhang
12b03b2794 Clean up: remove dimmableIconPreference
- DimmableIconPreference is not a support pattern.
- Also updated a few icon tint colors to match with the rest of screen.

Bug: 68426851
Test: visual
Change-Id: Ia18d9f74458237403b94d3474cf09050d2039428
2017-10-30 10:06:45 -07:00
Fan Zhang
823dde54c7 Misc clean up in search
- Remove updateFromClassNameResource() because it's just a no-op method.
- Simplify SearchIndexResources
- Update some pref pages to have unique keys.

Change-Id: I51e542d9947aafd046861ce7be0b4c7213fcd01d
Fixes: 64951285
Test: UniquePreferenceKeyTest
Test: robotest
Bug: 67852637
2017-10-26 17:54:45 -07:00
Tony Mantler
1d583e125f Make PreferenceController a mixin
Bug: 62912136
Test: Existing tests in BaseSearchIndexProviderTest
Change-Id: Ieda359806c09a019840b2005446c7ec8b61fdb00
2017-06-26 10:58:36 -07:00
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