Commit Graph

207 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
73f4101383 Fix bug #12903673 Stability: 47 ANRs in com.android.settings
- fix the recursive call (probably introduced by some search/replace)

Change-Id: I563a68c2cc141a59ef8bb9dd64cd67a62dbfcd4a
2014-02-05 12:53:04 -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
Lifu Tang
fe9420f7da Shows LGAAYL when launching Location Settings
- Partial fix of b/10897468

Change-Id: Iec96909b87e71869c5a020ce848c6cf4fada3616
2013-11-04 11:37:55 -08:00
Amith Yamasani
2972c0136d Load account type icons in a background thread before scrolling down
This reduces the jank when scrolling down in top-level Settings if you
happen to have several account types like Google, Twitter, Facebook, etc.

In the process of doing this, discovered that headers get built even when
they're not showing (SubSettings). Skip setting up the headers, which can
be expensive when there are several accounts.

Bug: 11006601
Change-Id: I8b4eafdcc2fc2beecac01317c3c8f07a82febcc0
2013-10-02 11:48:46 -07:00
Lifu Tang
d3dbc6e3a1 Launches the Location setting as fragment
Change-Id: I0fb04a346236676ce9483a0c4d1fc3b2b590b08c
2013-08-19 18:42:56 -07:00
Amith Yamasani
a677ee210c Whitelist fragments appropriate for an activity
Change-Id: If4f8c4e9d9949b652946cffe0ebb09b587e5a042
2013-07-30 16:24:58 -07: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
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
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
Guang Zhu
167ba2af93 Prevent sync state changes when user is a monkey
Bug: 7385019

Change-Id: Icf305683e57b83b3260f2587ae0a3d1a6dc3c21d
2012-10-22 11:37:31 -07: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
Amith Yamasani
f595a2b884 am 450c4c86: Merge "Exit to Settings when removing the only account for a type." into jb-dev
* commit '450c4c86ca6583abc27520174d0f51b8f171f4a3':
  Exit to Settings when removing the only account for a type.
2012-06-08 15:30:58 -07:00
Amith Yamasani
c8a9317649 Exit to Settings when removing the only account for a type.
Skip over the ManageAccounts screen which shows the list of accounts
for a particular type, if there are no accounts there.

Bug: 6630827

Also fix text alignment in top-level of settings.

Change-Id: Icd446babc131e7052fc9e95514214fffe6e6e113
2012-06-08 15:21:05 -07: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
Amith Yamasani
3882c2e215 Directly go to account sync screen if there's only one account for that type.
Bug: 6629330
Change-Id: Ieb2bad131b1580a6b75d970c9a0ea9980580f66d
2012-06-07 17:03:20 -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
86708a8a6d Add back a SYNC_SETTINGS screen
Revive the old Accounts&Sync screen as a dialog with the auto-sync
checkbox and a list of accounts. This will be launched when Apps
request a SYNC_SETTINGS page for controlling account and master sync.

Auto-sync data checkbox will also continue to exist in Data Usage.

Minor fixes to account list and account update monitoring.

Bug: 6614013
Bug: 6622995
Bug: 6610247
Change-Id: I35c0919a29c6bc7e5edf64f2734a3ef4f5ae5e7a
2012-06-06 20:55:40 -07:00
Amith Yamasani
56821dbeaa Update headers when accounts are changed.
Also pass an account to authenticator settings to avoid Email settings crash.

Bug: 6610990
Change-Id: I42884619728dd97446de65cc77e1729f3e143efa
2012-06-05 14:28:17 -07: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
Amith Yamasani
b0b37ae21c Help menus for several screens.
Bug: 5144896
Change-Id: Ib2f5146f6f62f2a33261bb165c3bf1bf13b22f38
2012-04-23 15:35:36 -07:00
Amith Yamasani
6b7cf25776 Kill the Switch on top-right after exiting Accounts & sync.
Bug: 5564377  - Bluetooth screen showing a Switch that doesn't follow
the bluetooth setting.

This seems to have been the Switch in Accounts & sync being set as a
custom view for the Settings activity and not removed on changing
fragments.

Change-Id: I4575a769fbf5482048dbc4e912c6b6f782f505a0
2011-11-15 12:43:59 -08:00
Gilles Debunne
13b7d8aa45 Bug 5353255: use a switch to toggle accounts & sync
Change-Id: I00821ba63651d713a148021f64bb95e7f69e6b88
2011-09-28 15:15:30 -07:00
Gilles Debunne
b59e068d29 Bug 5092721: Accounts & sync settings, auto sync in overflow menu.
Was usually "Make auto-sync an on/off switch in the action bar"

Changed to a check box in the overflow menu as per the comment in the bug.

Change-Id: I5a722ec1c743232c019fe89144a0a9463431747a
2011-09-14 11:10:57 -07:00
Jeff Sharkey
7a7ea2bf2f Sync asset drop and smoother animation.
Bug: 5233703
Change-Id: I3fa52da71b78dcfa7842047b427c5121d3ac7e68
2011-08-30 20:00:51 -07:00
Jeff Sharkey
b10e52fcf1 Remove "background data" from accounts settings.
This has been replaced by setting in data usage panel.

Bug: 4979025
Change-Id: I4e3011233aa2522c05b1497abc54fd421f4a25fb
2011-08-16 17:31:24 -07:00
Gilles Debunne
cd8e5246f1 Text instead of icons in account settings options
Also changed the default style to remove the opaque title background.

Change-Id: I948d9a15961223c3703bb607e2e5a6bf41e0ff5e
2011-07-25 14:01:12 -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
Gilles Debunne
8b3c13bf48 Merge "Fixed intents to start Settings activities" 2011-07-07 15:59:18 -07:00
Gilles Debunne
ab189bd9a6 Fixed intents to start Settings activities
All tested, on tablet and on phone.

Change-Id: I8ab206b9db61c7c3800fe9bff175e87baf97ed7c
2011-07-07 08:45:46 -07:00
Chia-chi Yeh
7606a2f4f3 VpnSettings: switch to the new user interface.
Change-Id: I7158cd8f146677b2823cfa936792fd232a37ae28
2011-07-02 17:45:23 -07:00
Amith Yamasani
5a259aae18 am 80cc0ffa: am e7f7643c: am 6ef6f183: Stability fixes for Settings. Asynchronous callbacks causing NPEs.
* commit '80cc0ffa2b284aee595c45f8f4142f615486f797':
  Stability fixes for Settings. Asynchronous callbacks causing NPEs.
2011-06-14 20:56:45 -07:00
Amith Yamasani
6ef6f183e4 Stability fixes for Settings. Asynchronous callbacks causing NPEs.
Bug: 4598717
Change-Id: I7f1c5bf6e079bb36301e81085096c5b82615814b
2011-06-14 15:19:14 -07:00
Amith Yamasani
f41be7908b am 51a1bb15: am ad466222: am 51a9d157: Merge "Fix account type dialog re-creation on orientation change." into honeycomb-mr2
* commit '51a1bb15ea2d669d783e1938deb7eb061f3112da':
  Fix account type dialog re-creation on orientation change.
2011-06-03 15:55:28 -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
Brian Carlstrom
d26321eecb Tolerate missing AccountManager resource, not just missing resource name
Change-Id: I29ceed33a9cc8e697bfd3226f6ec58291c36daae
2011-04-07 11:58:39 -07:00
Alon Albert
5b6983049d Use main looper to post start animation commands
This is a workaround till we find a better solution. Posting start() on mail
looper will make sure the animation starts but animation can stop randomly
when the list gets refreshed which happens for example any time the user
interacts with the list by check/uncheking boxes. This is because the list
rebuilds itself and views gets detached/attached which binds to a new view.

The long term solution is to switch to the new animator framework but for now
posting on main looper will be consistent with GB behavior.

Bug: 3426585
Change-Id: I77f15873bb47ad05113dc914a5d3d6d8af27e2e8
2011-02-08 09:43:12 -08:00
Justin Ho
8472b1b60d Updating Delete and Refresh icons to Honeycomb style
Bug: 3362749
Change-Id: Ib4b61c9e7db05b0627c1f353d3747268455dab6c
2011-01-27 17:59:23 -08:00
Fabrice Di Meglio
ab58d933a7 Fix bug #3366401 (Accounts in "Add accounts" list should be sorted alphabetically)
- sort the account type list

Change-Id: Ibf1712dc75fabf144382648acc57d6f19fe0ac96
2011-01-18 18:30:14 -08:00
Fabrice Di Meglio
100d51fbe9 Fix bug #3333939 (Add secondary Account UI needs some love)
- sort the feed list in lexicographic order

Change-Id: Iab998624d9cb4154b32fe8e726b462c55e726687
2011-01-17 12:26:42 -08:00
Fabrice Di Meglio
ce9f77bb55 Fix for bug #3325868 (add accounts should not use the settings activity as part of its flow)
- suppress non needed AccountSyncSettingsInAddAccount class

Change-Id: I27ba9ea2d45a5e2c9ec1d2ed6033f6d68e100a3f
2011-01-07 17:47:59 -08:00
Amith Yamasani
855d216dd4 Unregister the listener in onStop() instead of onDestroy()
Bug: 3259661
2010-12-29 12:29:23 -08:00