Commit Graph

58 Commits

Author SHA1 Message Date
Aurimas Liutikas
b1af85d155 Migrate Settings to androidx.
Test: make Settings
Bug: 76692459
Change-Id: I941dea40562170649bf056e675cc32e5163c0e39
Merged-In: I941dea40562170649bf056e675cc32e5163c0e39
(cherry picked from commit a290b873d0)
2018-08-28 11:48:56 -07:00
Fan Zhang
76dbb21cb5 Protect against invalid authority in account sync pref.
Some apps might contain account synclets with empty authority. Settings
UI should protect against this type of synclets. Otherwise clicking on
these synclets will crash.

(Also removed some strings that are no longer needed)

Change-Id: I364b45fc67679aa287ff1e04e6f5ac749116543a
Fixes: 74240862
Test: robotests
2018-04-05 15:19:51 -07:00
Fan Zhang
e0b0e9f902 Refactor help menu stuff into a controller
This is a clean up to action bar menu item pattern, we will use the same
pattern to build search icon on all pages in a later change.

Bug: 68814716
Test: robotests
Change-Id: Iedd3ec263e8ccb63ed75ec7a95b28c00878b1de4
2017-11-29 15:51:04 -08:00
Fan Zhang
499c8d54e8 Remove "remove account" from account sync detail page
Change-Id: I40cc9d3d593c31a5e3b02553ac12f77c0825ed51
Fix: 36375879
Test: make RunSettingsRoboTests
2017-03-17 11:02:46 -07:00
Tamas Berghammer
265d3c2a0c Update package names to work with the proto3 compiler
Bug: b/28974522
Change-Id: I5f3adf4946ee4ba1e09e4f40afe83c151405972a
2016-11-08 14:06:17 +00:00
Fan Zhang
d65184faef Log visibility change for DialogCreatable in Settings.
Bug: 30681529
Test: adb logcat -b events | egrep "(sysui_|notification_)"
Test: make RunSettingsRoboTests
Change-Id: I51754d258ba1ddfae24323681f21cd02de4dbb4e
2016-09-21 16:30:32 -07:00
Sudheer Shanka
87ec133f52 Merge "Show summary of "Add user" item" into nyc-mr1-dev am: acd34a9c72 am: 35221c350d
am: e9f958f2b6

Change-Id: I050044222863cca5884461a555c05f47d2cc9a0e
2016-08-24 16:16:52 +00:00
Svetoslav Ganov
6f9bf1da90 Only sync adapters with access can see an account - settings
This change ensures that when the user tries to toggle a sync for a
sync adapter that doesn't have access to an account we show UI for
the user to approve the sync.

bug:28163381

Change-Id: I59802df6614572cf0eaf4b72a177beb111b87b34
2016-08-23 21:44:47 +00:00
Fan Zhang
6507613ebc Log visibility change for all fragments.
Bug: 30681771
Test: SettingsUnitTests

Refactor visibility logging from InstrumentedFragment into a mixin. And
apply mixin in remaining fragments.

Change-Id: Ibbb59904336254a3e4bb9e8c7d0b36e5a6bc2622
2016-08-18 14:04:13 -07:00
Tony Mak
981e9a96dc Disable instead of hiding add account preference
Bug: 29236399
Change-Id: Ieb1af7f31a54b1502ae99682fc423e37c86a2353
2016-07-14 13:42:50 +08:00
Jason Monk
cd66b4a99f Cache account prefs so we don't lose a11y focus
Fixes: 28767151
Change-Id: I876712c42b02bb2efaaa492ad951ad42935ecb32
2016-06-01 17:19:01 +00:00
Sudheer Shanka
9e9e63b7b3 Part3 - Don't add padlock if the restriction is not set by admin.
Bug: 26687435
Change-Id: Ibfea6d7d5bd32e7a05dcc2cc32b121c9e50b6a34
2016-02-16 11:04:11 +00:00
Sudheer Shanka
f755baf1c3 Use the correct userId when checking if disabled by admin.
And when adding accounts if only one account type is possible and
it is disabled by admin, show the admin support dialog.

Bug: 26897250
Bug: 26767564
Change-Id: I5cca64491a100efc34307c45aa35c14412f043cd
2016-02-02 20:31:48 +00:00
Chris Wren
9d1bfd1e8d port settings over to new metrics enum
Change-Id: I0b3efd2f4db773ccbc52bfe59ee8eb0dab9584fb
2016-01-27 10:58:58 -05:00
Sudheer Shanka
7ff7ea1e7f Made changes to menu items in WifiSettings and AccountSyncSettings.
When the admin has set disallow_config_wifi, menu items are not added.
we need to check if the menu items can be added after this fragment is
resumed. And for remove account menuitem, check whether any admin has
disabled management of a specific account type.

Change-Id: I58f5a59fe0614c9bc7068b15f43f89527939359d
2016-01-27 14:08:44 +00:00
Sudheer Shanka
ef550767b0 Trigger a support dialog when an action is disabled by policy
Change-Id: I847b481a16cce33fe7bd4040d38ec50ca62172c2
2016-01-20 21:00:44 +00:00
Sudheer Shanka
661043571c Move restricted padlock support to SettingsLib
Change-Id: Ief5afa8f612f3619b6451ac7785952a84bd5100a
2016-01-12 18:11:48 +00:00
Sudheer Shanka
4bb4886fce Add padlock to items in overflow menus and dropdown dialogs.
Bug: 26378442
Change-Id: I7b21ff8e0b95f6cda9f720f979f7c475244b340d
2016-01-11 20:19:45 +00:00
Jason Monk
4b2e456e90 Fix accounts screen
Bug: 25212341
Change-Id: Ia8953b6a9fbbd4c90cd0eb327081c478420f7db6
2015-10-30 12:50:31 -04:00
Jason Monk
39b467482d Depend on support lib preferences
Bug: 24576551
Change-Id: Ic6190bacd3f7582c9bbc8de972da4612bd92421e
2015-10-13 10:12:20 -04:00
Fyodor Kupolov
1f432586b3 Moved restricted profile setup logic to UserManagerService
Bug: 24212155
Change-Id: Iea214877dd856e830a42467780b7407b8991c52d
2015-09-28 10:03:35 -07:00
Bart Sears
fbd126e423 Revert "Moved restricted profile setup logic to UserManagerService"
This reverts commit 151dffcd64.

Change-Id: If98fddcfc8f46c77e3491f7a9fc918ed3752a0e8
2015-09-26 02:00:46 +00:00
Fyodor Kupolov
151dffcd64 Moved restricted profile setup logic to UserManagerService
Bug: 24212155
Change-Id: Ifd19cf5833fb8f2d61cfd6d0019849aa27701c38
2015-09-24 12:59:34 -07:00
Julia Reynolds
ce25af4838 Talkback improvements for Settings screens.
Bug: 21164141
Change-Id: I7444261ccf967f6db70c9fe44a00bd3f19ceb975
2015-07-09 13:21:20 -04:00
Jason Monk
fb6e1186ab Fix accessibility for account sync
Needed to get views recycling so that feedback could occur during
switch turning off.

Bug: 20020216
Change-Id: Ib7b1cdca78f5ac5064cdf521122ff7a5ee49f572
2015-06-25 15:06:00 -04:00
Chris Wren
8a963babe2 log visibility of views
Depends-On: I5b1dccb5d103ece3112acf38889bae16273b092f
Change-Id: I116aed2bb805f723a5bf2ec9eb94257de0b4a7b5
2015-03-27 13:39:07 -04:00
Alexandra Gherghina
7e50b12fde Remove call to deprecated getBackgroundDataSetting()
It seems that the setting is now enforced at the network level (see
NetworkPolicyManagerService).

Bug: 15848128
Change-Id: Ie7d178bab8ebb133f78cb5356ee1c27fbe61ba05
2015-01-06 11:01:50 +00:00
Simranjit Singh Kohli
7df0b799a8 [New RemoveAccount API in Settings App]:
Modify Settings app to use the new account remove API

Bug: 18292092
Change-Id: I5f02d71bc0c7ca3e38157d38dea077c6fe6eb34e
2014-11-19 17:01:32 -08:00
Alexandra Gherghina
2a3d649766 Fix NPE caused by status update outside activity lifecycle
Bug: 18373656
Change-Id: I3c7db15df7c47b65a42a13fc7a3a077c3ad48f77
2014-11-17 12:12:11 +00:00
Alexandra Gherghina
b2d9795cda Reorganize sync state menu options for accounts settings
Fixes inverted condition for displaying the buttons, updates
at the right time and removes the useless dependence on mFirstAccount

Bug: 18310988
Change-Id: Id55e11a210aa58a10ee9613891470862d42b65ad
2014-11-11 14:36:09 +00:00
Fabrice Di Meglio
1bc996532c Fix bug #15730311 Checkboxes on R side should update to Quantum/Material on/off switch
Per UX request, convert Account Sync feeds CheckBoxes to Switches

Change-Id: I7017020700b4214a16ca119a6992e6c7a484db0b
2014-10-16 17:16:26 -07:00
Amith Yamasani
247520c369 More User Settings improvements
Add a menu checkbox to allow creation of users from lockscreen.
Add a delete icon in restricted profiles settings.
Other little fixes to icons.
Update some strings based on feedback.

Bug: 15761405
Bug: 16550371
Bug: 16298824

Change-Id: Ib876bd57f15c6ce2d71856f72571c6b8b0e3102d
2014-07-26 14:09:43 +00:00
Alexandra Gherghina
e82d0f2f8e Checks if the right user has a restriction
Bug: 15466880
Change-Id: I9199c6054e9955a90958fd3a751f321cf6fa9990
2014-07-23 22:09:07 +01:00
Alexandra Gherghina
c42d4059b5 Remove account for a managed user
Bug: 16056552
Change-Id: Iad24856cab908ed40c32af799ca2c41fe85b6b45
2014-07-17 19:57:43 +00:00
Alexandra Gherghina
7d748c0267 Handle choosing and adding accounts for a managed profile
The user id can now be passed through the app as a fragment argument.

Bug: 15466880
Change-Id: I0e2be20551b4ec8c9226640ac74ea74115156ccd
2014-07-17 19:05:57 +00:00
Alexandra Gherghina
defdfc54bb Only show AccountSyncSettings when we have an account
Also removes useless list of accounts

Bug: 16295803
Change-Id: Ida3c1846327874af9f97695a485b12ec689fd343
2014-07-16 13:27:26 +01:00
Alexandra Gherghina
024ba5e4d9 Adds missing per-user calls for displaying and syncing accounts
Bug: 15466880
Change-Id: Ifa96af782adc8485f925dc45d5c71b1c28a075d2
2014-07-01 16:03:06 +01:00
Alexandra Gherghina
1eb3f316bd Handle forwarded intents from a managed user in AccountSyncSettings
Bug: 15466880
Change-Id: I4041b69f237033dbe5b78c8eb52f5e6ebb6ff7f7
2014-06-30 11:38:04 +01:00
Alexandra Gherghina
3939cd70b1 Add work account settings.
Bug: 15467756
Change-Id: I13b5a0bb3967611d0d24b575bfc15d9bfaad4cfa
2014-06-26 10:01:29 +01:00
Amith Yamasani
728b631653 am 91b5fab9: Merge "Check if the Activity is finishing before showDialog()"
* commit '91b5fab9b0e8338850fe2838311a0801fddf31d4':
  Check if the Activity is finishing before showDialog()
2013-04-16 06:43:04 -07:00
Amith Yamasani
91b5fab9b0 Merge "Check if the Activity is finishing before showDialog()" 2013-04-16 13:13:53 +00:00
Maggie Benthall
0c5a401a58 Respect user restrictions about adding/removing accounts, sideloading
Hide or disable options in the settings app when the user is restricted from
making changes.

Remove "Add account" button from Settings menu, and "remove account" option from menu in AccountSyncSettings.
Remove sideloading checkbox in SecuritySettings.

Also handle replacement of UserManager.isShareLocationToggleAllowed() with hasUserRestriction, which takes a restriction key string.

Change-Id: I34c74fd5aed8956ba00f92e3d3c657b608454dfe
2013-03-27 18:12:44 -04:00
Tony Guo
63c91f0973 Check if the Activity is finishing before showDialog()
Check if the Activity is going through its finishing phase before
displaying the Dialog, because Showing dialog once the activity
is no longer in context will cause BadTokenException.

Change-Id: I58940e694f61cd79536abe2df60a0b745a7b806f
2013-01-29 14:39:26 +01:00
Jeff Sharkey
97d07fa3ae Push scrollbars to screen edges.
Push scrollbar to screen edges on custom ListView and ScrollViews to
match Preferences framework behavior.

Bug: 7633165
Change-Id: Ideecd0e243c7de7bf977caef2b1585e707a00ca4
2012-11-30 16:15:09 -08:00
Jean-Baptiste Queru
ce1a3acf15 am 5a0b3230: Merge "Add account type check for invisible sync adapters."
* commit '5a0b3230e2a70c5837b35753fdd2ffd7536946f4':
  Add account type check for invisible sync adapters.
2012-06-08 08:21:39 -07:00
Zhenguo Fu
193821e6e8 Add account type check for invisible sync adapters.
The invisible sync adapters array is modified to
store the sync adapters instead of their authorities,
so that "Sync now" function will only synchronize
those with the same account type as the current
account.

Change-Id: If9b0b32db9828d8671f57a0d7a2f64712a7ebabf
2012-06-07 14:42:28 +02:00
Amith Yamasani
d1ab82807a Account types at toplevel of Settings
Reorganized Account settings to show account types at the top-level
of Settings. Only account types that have accounts added are visible
here. There is an Add account button to add a new account.

Master sync toggle has moved to Data Usage screen in the overflow menu.
It shows additional detail of the function of the auto-sync toggle when
it is toggled by the user.

Account type screen (ManageAccountsSettings) shows list of accounts of
that type and any available authenticator settings. It additionally
verifies any Intents can be resolved before showing the corresponding
entry. This screen now shows last synced time for each account.

You can now sync all accounts of a type by selecting Sync now in the
Account type screen.

Account Sync screen that shows the list of syncable items has minor
tweaks:
 - "Last synced...", "Sync is OFF"
 - Doesn't show the authenticator settings here anymore.

Bug: 6579937

Change-Id: I8139a4c992b525a3e1efc24d2d223c3f5caddc76
2012-06-04 17:01:22 -07:00
Amith Yamasani
e88be4f620 Fix crash when removing an account.
Bug: 6494527
Change-Id: I9ab3b54ac4e4d679fd9ec22ab438b9e1ea0be2b1
2012-05-23 14:13:13 -07:00
Carlos Valdivia
13ade46b53 Occlude syncs without provider info.
Bug: 934147
Change-Id: Ib3413efda07432cfc52cb5b1a20350ed5c7655a8
2012-05-08 16:39:15 -07:00
Jeff Sharkey
7a7ea2bf2f Sync asset drop and smoother animation.
Bug: 5233703
Change-Id: I3fa52da71b78dcfa7842047b427c5121d3ac7e68
2011-08-30 20:00:51 -07:00