Commit Graph

19 Commits

Author SHA1 Message Date
Jason Monk
b7e4380cd2 Remove PreferenceActivity
Its broken and isn't worth maintaining, instead port the few things
using it over to SettingsPreferenceActivity with wrapping blank
Activities like the rest of Settings.

Change-Id: Ic82f0dcb63ed9b4078f7da6a79c0c52f0130e8d1
Fixes: 28779941
2016-06-08 09:48:58 -04:00
Nicolas Prevot
bd4c570bfd Only ask for credentials in add account if user is locked.
Also: if work mode is off, ask to turn work on before adding
a work account.

BUG:28220470
Change-Id: Ib23f87f056ad41c1f9713bb8d3c5263f015e6475
2016-05-04 11:34:26 +01:00
Nicolas Prevot
a599c8fd04 Ask the user to unlock the work profile before adding a work account.
If the work profile is locked, and the user tries to add a
work account from Settings:
Show the work profile security challenge.

BUG:28005200
Change-Id: I87ff25d9de94026b0d7ac307ea3a541e77989aa6
2016-04-06 11:19:08 +01: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
Maurice Lam
9e4aeb548f [AccountSettings] Start add account in new task
Start add account activities in a new task separate from settings
so that users can reach it from recents later, even if they navigate
to a different settings screen (via launcher) like selecting Wi-Fi.

Bug: 22351974
Change-Id: Icd3e20fa8f2426276c52cd11cbc916c56ca86ee3
2015-09-11 00:35:36 +00:00
Carlos Valdivia
f5d3e74ecc SECURITY: Don't pass a usable Pending Intent to 3rd parties.
Unfortunately the Settings app has super powers. We shouldn't let
untrusted 3rd party authenticators re-purpose those powers to their own
nefarious ends.  This means that we shouldn't pass along PendingIntents
that can have addressing information (component, action, category)
filled in by third parties.

Bug: 17356824
Change-Id: I397d26c5f465ddfb0e58bbc66cd44756e58cc507
2014-09-07 17:45:58 -07:00
Alexandra Gherghina
9ce0da9cf1 Add account for managed user
Bug: 16056552
Change-Id: I225a1b447d9b4024703b82be8a1fa66359d9e9a1
2014-07-17 21:18:34 +01: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
Fabrice Di Meglio
74309ea53a Fix bug #13058470 Cannot add account -- Settings app crashes
- revert back to an Activity instead of a fragment. This
is a straight reverse of the changes introduced for trying
to have a Fragment.

Basically ChooseAccountActivity was previously an Activity for
choosing an account type. If the list of account types was containing
only one item, then the ChooseAccountActivity was just a pass thru
and was falling back to the only account authority available.

In the current reported bug, this was happening by disabling the
Email app and thus having only the GoogleAuthenticator as an
Authority.

Then in the onCreate() the ChooseAccountFragment was seeing that
there was only one account authenticator and issuing a BACK button
press. Too bad, this was done into a non finished Fragment transaction
and leading to a crash.

All in all, we NEED to have an Activity and cannot use a Fragment
in that case.

Change-Id: I4a867a25fe9580929ec50a6775105adac1f88c52
2014-02-20 16:21:14 -08:00
Fabrice Di Meglio
263bcc8b73 Use Drawer in Settings app
- get rid of PreferenceActivity as much as we can and use fragments instead
- add Drawer widget
- add Dashboard high level entry into the Drawer (but this is work in progress and would be done in another CL)
- add bypass of fragment's Header  validation when launched from the Drawer but *force* validation if external
call thru an Intent

Be aware that WifiPickerActivity should remain for now a PreferenceActivity. It is used by SetupWizard and should
not trigger running the SettingsActivity's header building code. SetupWizard is a Home during the provisionnig process
and then deactivate itself as a Home but would make the Home header to appear in the Drawer (because momentarily we
would have two Home).

Also, verified that:

- the WiFi settings still work when called from SetupWizard
- when you have multiple Launchers, the Home header will appear in the list of Headers in the Drawer

Change-Id: I407a5e0fdd843ad7615d3d511c416a44e3d97c90
2014-02-03 16:36:46 -08:00
Amith Yamasani
c39dcc1ce4 Don't show developer options to secondary users
Show just a message that developer options are not available for the user.

Also fix silent exit of AddAccount operation by showing a toast that user
cannot add accounts.

Bug: 7409523
Bug: 8519646
Bug: 7304007

Change-Id: Id3f430d568d6b7151ac55f86dbc0ef91803fa10c
2013-04-13 18:43:41 -07: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
Amith Yamasani
cbabf19cbb Launch account addition activity from Settings instead of from AccountManager
This enables us to watch for failure cases from certain authenticators that
misbehave.

Bug: 7318390
Change-Id: I43398e7622214cabd1d1bf171502c6a988af00a3
2012-10-10 16:42:20 -07:00
Amith Yamasani
21c2904ba3 Revert "Show warning dialog in a multiuser system when adding a new account."
This reverts commit eb71f26897

Change-Id: Iad4a6656e922c0d2dbd3dd349d1c24d597eab7f5
2012-10-05 19:56:18 -07:00
Russell Brenner
84d04c2053 Pass flag to indicate multiple users on device
When creating a new account, some informational text changes when
more than one user exists on the device. Because GLS is built with
the SDK and because there is no public API to indicate this state,
a flag is added to the bundle passed to the AccountManager, which
then funnels down to GLS.

Bug: 7255673
Change-Id: Ida2aa5f70ab308958de510a95194463c2a089182
2012-10-02 10:56:24 -07:00
Amith Yamasani
eb71f26897 Show warning dialog in a multiuser system when adding a new account.
Bug: 7207092

Change-Id: I95ac107dbc867490dd2e492291501fd3630d267c
2012-09-26 18:02:54 -07:00
Costin Manolache
b22a242e0e Add an extra parameter to identify the caller application. Fix the handling of 'suspend' - the callback will not be visible.
Change-Id: Ide8b841b6b57e31ac082678b27c314b9eeff8846
2011-07-21 10:37:12 -07:00
Amith Yamasani
7bb8f7288e Fix account type dialog re-creation on orientation change.
Bug: 4499512

Dummy activity that launches ChooseAccountActivity was re-launching it on orientation
changes. Make sure that it only launches it one time.

Change-Id: I764a59eaefc3ce4546330ed1b994d88b8703ce80
2011-06-02 18:23:55 -07:00
Amith Yamasani
43c697854c Move Account & sync settings into Settings app.
Fragmentized some of the activities and moved buttons into the menu area.

Bug: 3148844
2010-12-01 15:14:09 -08:00