Commit Graph

62 Commits

Author SHA1 Message Date
Chaohui Wang
8e2ae547d6 Clean up FeatureFactory.getFeature()
Bug: 286764889
Test: m Settings
Change-Id: I7e472e6b0ca6b7a735c1b92742ddf06c545176fc
2023-08-08 08:41:48 +00:00
Chaohui Wang
2541381259 Fix references to resources for Settings
Bug: 293810334
Test: m Settings
Change-Id: Ie140278f492ef7e1c062ec1ecae2866c521a86aa
2023-08-08 01:56:05 +00:00
Jigar Thakkar
0e8b8ec57f Modify clone profile accounts info section
This change renames clone profile accounts header on the account
management dashboard to "Clone" from "Personal" by using the newly added
clone category header config. This also includes changes to remove the
add account preference from the clone profile accounts.

Bug: 260181765
Test: Flashed on a sunfish device and tested

Change-Id: Iff8b75119d85d2cd8ab065ed1057fb2b35e64650
2023-05-03 14:20:48 +00:00
Jason Chiu
c89755525f Update all preferences when the account preference updates UI
When an account is added or removed, the account preference controller
just updates the account list, whereas there's no trigger point for the
account data sync preferences to refresh.

Add an API to update all preferences in DashboardFragment, so we can
refresh the account sync preferences whenever the account list is
updated.

Bug: 185479221
Test: robotest, manual
Change-Id: Ide3d972abae09ce0175e3bafbb1f4a5e307d20c8
2022-07-19 10:32:23 +00:00
Jason Chiu
9c1a1cb884 Relaunch the account page after removing a work account
Removing a work account goes back the previous page.
However, this closes Settings app in dual pane mode since the account
page is in the 2nd layer.

Bug: 223755141
Test: manual, robotest
Change-Id: I40407cb052c0474f62254bcb2216e33496c901c8
2022-04-25 12:39:51 +08:00
kholoud mohamed
de78149c16 RESTRICT AUTOMERGE Refactor device policy resource APIs to a separate class
Bug: 217388602
Bug: 218875965
Test: atest EnterpriseResourcesTests
Test: manual
Change-Id: I4775d7741c7819fd811c3fc4eda1636b1e04b398
2022-03-17 17:37:45 +00:00
Jonathan Scott
e0d439472f Allow Device Management Role Holder to update Settings strings.
Test: manual
Bug: 188414370
Change-Id: I6e1a06619799a9e99382d791e72e2e4518f93cac
2022-01-25 19:03:24 +00:00
TreeHugger Robot
52f627f9ef Merge "Account settings: Fix duplicate title and extra padding." into sc-dev 2021-05-14 04:14:24 +00:00
Ahaan Ugale
6663bed71c Account settings: Fix duplicate title and extra padding.
This change reverts the change in
I3981ce73fef63f06a40e61e894481d24284614ba to add a PreferenceCategory
for the accounts after merging the page with autofill settings. That was
done to get the Accounts heading to display for the personal/work
profile view.
This change instead sets the title on the existing PreferenceCategory
that's created dynamically in the Controller.

Removing the extra PreferenceCategory also fixes the padding.

Fix: 183677515
Bug: 183677706
Test: manual - with single profile, with personal/work profiles
Test: make -j RunSettingsRoboTests \
 ROBOTEST_FILTER="com.android.settings.accounts.AccountPreferenceControllerTest"
Change-Id: Ib7fe6f97b93b81d5a5897280cdd6bbad1b75f3a9
2021-05-13 19:49:04 -07:00
Sunny Shao
2fade46f0a Fix talkback label "ACCOUNTS FOR OWNER" is not matching problem
- Root cause: the content description is different with title.
- Solution: set the description same as title.

Fixes: 181192849
Test: make RunSettingsRoboTests ROBOTEST_FILTER=com.android.settings.accounts
Change-Id: Ic566d061e78eaf427add6aac4701142a6180e557
2021-05-13 11:36:17 +00:00
Ahaan Ugale
9b183778f2 Merge Autofill settings into Account settings.
Autofill settings are removed from Language and Input.

They are now in a new top-level Passwords and Accounts page.

Some polish work is left to match the new design.

Bug: 169455298
Test: manual - check settings page and some search keywords
Test: manual - add work profile and check the above again
Test: make RunSettingsRoboTests
Change-Id: I3981ce73fef63f06a40e61e894481d24284614ba
2021-03-23 23:48:09 -07:00
Jason Chiu
b12e3b96c9 Support click metrics logs in several pages
- Assign metrics category to perferences at an earlier stage in
  DashboardFragment for better usability.

Bug: 137559984
Test: robotest
Change-Id: Icd4185efa0e655be20c4b673a1380fa42140923f
2020-04-07 16:44:53 +08:00
Raff Tsai
5c075bad44 Finish Activity when account is changed
Fixes: 146230862
Test: remove work profile account
Change-Id: I7c7c788587d9f17b629358be56befa76b0916e99
2019-12-16 04:37:06 +00:00
Raff Tsai
1e5d8146b5 Change ProfileType definition
Bug: 141601408
Test: rebuild
Change-Id: Ia4d4fabe8a4daad4ce54c243748fa3c29bf944ba
2019-12-12 13:44:35 +08:00
Stanley Wang
8015cbab9e Add work profile items of Account page to dynamic index.
- Add "Work profile settings" & "Remove work profile"
to dynamic index

Test: manual & robotests AccountPreferenceControllerTest
Change-Id: I122269927fd466bc8fbce1dd68faa372a6a7477b
Bugs: 69907442
2019-11-27 18:44:12 +08:00
Raff Tsai
f5277ba54a Modify account page multiple profile UI
- Extend the tab width to 50%
- Hide category title in two tab mode

Bug: 141601408
Test: manual
Change-Id: I73a1a64c704f7a74c200803efef97cdac5534aa7
2019-11-07 14:53:54 +08:00
Raff Tsai
65866290ce Add tablayout for work/personal profile
- Add Tablayout in ProfileSelectFragment
- Add AccountWorkProfileDashboardFragment inherited from
ProfileSelectFragment
- Add ProfileFragmentBridge to convert AccountDashboardFragment
to AccountProfileSelectFragment
- Use flag settings_work_profile to guard the new fragment

Bug: 141601408
Test: Settings->developer options->feature flags->
turn settings_work_profile on/off, then go to settings->account
to see if UI is changed.

Change-Id: Ifb32c22cdeab69c51517664081cacf4a401c46a1
2019-10-15 18:01:08 +08:00
Raff Tsai
966fa01423 Use SettingsLib Indexable
- Use SettingsLib Indexable
- Directly use resource id in getPreferenceScreenResId

Bug: 135053028
Test: roboletric
Change-Id: I05f493b55e8b6e2091301e9231ba5615215618e6
2019-09-25 18:24:56 +08:00
Amin Shaikh
3f1de20c7e Fix themed settings icons.
- Added android prefix for homeAsUpIndicator attribute
- Override ic_arrow_down_24dp from androidx
- Remove ic_lock drawable overlay
- Update date and time icon
- Dedupe ic_menu_add and ic_add_24dp

Bug: 131346125
Test: mp settings;
Change-Id: I7223249f2adccc5569a37e8b68cae5499e7c7620
2019-05-03 17:02:46 +00:00
Fan Zhang
23f8d59d02 Sort imports
Having consistent import order will reduce chance of merge
conflict between internal and external master

Test: rebuild
Change-Id: I0b1a170967ddcce7f388603fd521f6ed1eeba30b
2018-08-28 22:13:15 +00:00
Doris Ling
ce5f9c07da Fix new account not shown for work profile.
When refreshing the Accounts settings UI, we uses the cached user info
for checking user status. However, when the work profile is being
updated, the UserInfo obejct for the user might be updated even the
user id is the same. Using the cached data causes stale info to be
returned for the user and results in the latest account data not
being shown properly for the user. Update the cache to the latest user
info retrieved from user manager.

Change-Id: Ic0127842203f0288f2fdea6c6346cd11e42a8bf0
Fix: 38302246
Test: make RunSettingsRoboTests
2018-07-23 16:13:39 -07:00
Fan Zhang
176ccd0c35 Clean up: fix incorrect @VisibleForTesting imports
Test: rebuild and robotests
Change-Id: I33d7ee1c0622c01f592920baaf01d44ad19d9a13
2018-07-13 13:08:53 -07:00
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