Commit Graph

11 Commits

Author SHA1 Message Date
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