summaryrefslogtreecommitdiffstats
path: root/services/java/com/android/server/AppWidgetServiceImpl.java
Commit message (Collapse)AuthorAgeFilesLines
* Fix crosstalk between users for widgets hosted in lockscreenAmith Yamasani2012-11-301-24/+14
| | | | | | | | | | | | | | | | | | | | | | | | This was initially about the Clock widget crashing repeatedly on some devices with multiple users. Turned out that there were race conditions when switching users that could result in remote views of one user calling back to the RemoteViewsAdapter in keyguard that in turn sent an incorrect widget id to a different user's widget, resulting in a crash. Since KeyguardHostView is instantiated in the same process for different users, it needs to carry a user identity to pass along to AppWidgetService so that remote views services were bound to the correct user and callbacks were attached and detached properly. Added some aidl calls that take the userId to do the binding properly. A more complete fix might be needed in the future so that all calls from Keyguard carry the user id. Also, there was a problem in comparing host uid for secondary users, since Settings for a secondary user has a different uid than keyguard. Not an issue on single-user systems. Changed the host.uid comparison to accomodate for the secondary user. Bug: 7450247 Change-Id: Idbc36e3c60023cac74174f6cb7f2b2130dd3052c
* Merge "Making sure keyguard and homescreen only display eligible widgets ↵Adam Cohen2012-11-281-5/+1
|\ | | | | | | (issue 7550090)" into jb-mr1.1-dev
| * Making sure keyguard and homescreen only display eligible widgets (issue ↵Adam Cohen2012-11-281-5/+1
| | | | | | | | | | | | 7550090) Change-Id: I25acb7bde2e8e5ac3185a009f5c7151b81f0ae19
* | Logging to help find the cause of widget crash in clock widget.Amith Yamasani2012-11-261-0/+24
|/ | | | | | | | | This will continue to crash as before, but will show some useful information in the exception. Bug: 7450247 Change-Id: Ib3160a5f64154517791d165973c12294ecd09901
* Delete appWidgetId when removing lockscreen widgetsMichael Jurka2012-11-161-0/+22
| | | | | Bug: 7550012 Change-Id: Ia9f5266256016eb91bfd6a2d5a7f910c42948f1e
* Making sure launcher doesn't show keyguard-only widgets (issue 7550090)Adam Cohen2012-11-151-1/+5
| | | | Change-Id: I5d0675f0c03677e06371a6730209c3466c6b0f15
* Pushing state persistence to a background threadAdam Cohen2012-11-151-13/+33
| | | | Change-Id: If776bc22c48525ba91dc7e4dd0e27de92612f2f5
* Use clock's widget as the default keyguard widgetMichael Jurka2012-11-011-2/+2
| | | | | | | | Also, if we have no widgets in lockscreen, reinflate the default widget. If that fails, inflate the built-in clock (KeyguardStatusView) Change-Id: I2e90ab0893c993a755700e075e4a8ac5a685e0f2
* Stripping dead API related to keyguard widgetsAdam Cohen2012-10-311-4/+0
| | | | Change-Id: Ieb6c57ef736712b3266de08027f9626104cdf1bb
* Do cleanup when Stopping usersAmith Yamasani2012-10-151-1/+4
| | | | | | | | | | | | Mark user 0 as initialized, otherwise it will show up as uninitialized when viewed from secondary user if never switched to user 0. Bug: 7301595 Also clean up any users that were in the process of being removed, if device crashes at a bad time. Change-Id: Ic16a6c9ccb6a64b7463725f6cc279335a821fcd5
* Letting partial update fall through if the widget has not received a full ↵Winson Chung2012-10-111-2/+5
| | | | | | update yet. (Bug 7214731) Change-Id: I4da99c259df51f8f66d3ade1156040bd0360ca5d
* Skip merge and assign RemoteViews directly if updateAppWidget() has not been ↵Winson Chung2012-10-111-1/+1
| | | | | | called. (Bug 7214731) Change-Id: Ie19b629deea9133800df265a2cebedc8bcb2a74d
* Fix widget cross-talk between users due to Settings widgetAmith Yamasani2012-10-051-7/+20
| | | | | | | | | | | | Bug: 7247911 Bug: 7294899 Also did some cleanup of unused code that resulted from refactoring the app widget service. Fixed a few more ambiguous calls that weren't using the correct user id. Added some logging and improved the dump() formatting. Change-Id: I27abb5c6341458e1e50a2cc9ab67e8de573ab283
* Fixing AppWidgetService / AppWidgetHost to work in system processAdam Cohen2012-09-261-5/+35
| | | | | | | | -> Fixes issue 7208464 -> Fixed issue with partial update as well, should address issue 7214731 Change-Id: Ib8d9d5bee68b4fa7d6b4fbbc2f6609c287689958
* Load resources for the correct userAmith Yamasani2012-09-251-3/+3
| | | | | | | | | | | | | | For apps that are only installed on secondary users, the SystemUI is unable to see them by default. Added some methods to explicitly pass the userId of the user the resources are requested for by the StatusBarIcon Bug: 7214384 Also fix binding to remote views Bug: 7192802 Change-Id: I5d6c5f624aa37fb231f3467f9764c8d99077a91d
* Merge "Fix security check for private allocateAppWidgetId api" into jb-mr1-devMichael Jurka2012-09-241-2/+1
|\
| * Fix security check for private allocateAppWidgetId apiMichael Jurka2012-09-211-2/+1
| | | | | | Bug: 7182054
* | Fixing typosAdam Cohen2012-09-211-5/+5
| | | | | | | | Change-Id: I3d470a18bd14a4040dffb0b0d8a11e282546057e
* | Fixing partiallyUpdateAppWidget to cache the new changesAdam Cohen2012-09-201-2/+6
|/ | | | | | | -> This is a good change to the widget framework that I've wanted to make for a while, but issue 7174198 triggered the immediate need. Change-Id: I3f267e0e67f2d9f28920bb53973af365a3c9e0ba
* Add support for settings for lock widgetsJim Miller2012-09-141-1/+11
| | | | Change-Id: Iade094c6f32a7653bdbbd4921d345d68f2443ff4
* Fix bug with getting widget categoriesMichael Jurka2012-09-141-2/+2
| | | | Change-Id: I3b0f410707d37436732c45b572c2f588427a784f
* Adding notion of keyguard widgetsAdam Cohen2012-09-111-7/+72
| | | | | | | | | -> Persisting certain appwidget options -> Adding ability to specify appwidget options on bind so as to avoid AppWidgetProvider update call with no options. Change-Id: I5631039f19f1822b8e123b559b6353c880c0192e
* Centralize the creation of the user system directoryAmith Yamasani2012-08-311-2/+3
| | | | | | | | | | Environment.getUserSystemDirectory(int userId) Use it all relevant places that was hardcoding it. Also, wipe out the user's system directory when user is removed, otherwise old state might be transferred to a new user. Change-Id: I788ce9c4cf9624229e65efa7047bc0c019ccef0a
* Enforce permissions for calls with specified userIdAmith Yamasani2012-08-301-4/+5
| | | | | | Fix a couple of places where incorrect userIds were being passed in. Change-Id: I398c676e0488ff7e584be96e96c8b32652134238
* Switch public APIs to use new UserHandle class for identifying users.Dianne Hackborn2012-08-171-5/+5
| | | | | | Gets rid of "yet another integer" confusion. Change-Id: Id07ea7307aea7c62f0087c6663a1f1c08e2e5dee
* Rename UserId to UserHandle.Dianne Hackborn2012-08-161-6/+6
| | | | | | This is the start of turning this into a formal public API. Change-Id: I5786d2c320f1de41a06ed5d0f65adb68967287a0
* Add APIs for interacting across users.Dianne Hackborn2012-08-021-5/+5
| | | | | | | | | | | | | | | | - Expose the existing Context.sendBroadcast() as Context.sendBroadcastAsUser(). - Add new android:singleUser attribute for services. - Add new INTERACT_ACROSS_USERS_FULL permission for full system-level access to cross-user interface (allows sendBroadcastAsUser() to send to any receiver). - Add new INTERACT_ACROSS_USERS_FULL permission for more restricted cross-user interaction: this is required for android:singleUser, and allows you to use sendBroadcastAsUser() but only to send to your own receivers. Change-Id: I0de88f6718e9505f4de72e3f45d29c0f503b76e9
* Make AtomicFile a public API. It's about time!Dianne Hackborn2012-07-311-1/+1
| | | | Change-Id: Ib34e294747405b7ab709cb0bbb2d9a0cc80ce86a
* Stop using raw display size except in window manager.Jeff Brown2012-07-251-3/+6
| | | | | | | | | | We don't actually need the raw size in these places. The logical size is good enough. Starting to move dependencies on surface flinger and window manager out of the Display class. Change-Id: I2065bee8e5bf7f42c5a452dd1e8479e40ebb0d37
* Fixing issue where you couldn't set null RemoteViews for a widgetAdam Cohen2012-07-161-1/+4
| | | | | | -> As noted here: http://code.google.com/p/android/issues/detail?id=35014 Change-Id: Id5d1c47b6961d4b448453d8b16700801c0137f2b
* Merge "Fixing index-out-of-bounds in AppWidgetService. (Bug 6717459)"Winson Chung2012-07-091-6/+23
|\
| * Fixing index-out-of-bounds in AppWidgetService. (Bug 6717459)Winson Chung2012-06-251-6/+23
| | | | | | | | Change-Id: I9d676fbb2110f01eb1d36adc59437a6a5ec97cc2
* | am 037faad0: am ab779e0b: Merge "Increase bitmap memory cap for widgets (Bug ↵Michael Jurka2012-06-221-1/+3
|\ \ | |/ |/| | | | | | | | | 6597440)" into jb-dev * commit '037faad0f437c5fdc5435c030ef03d61de75090f': Increase bitmap memory cap for widgets (Bug 6597440)
| * Increase bitmap memory cap for widgets (Bug 6597440)Winson Chung2012-06-221-1/+3
| | | | | | | | Change-Id: I4149b8c5f204f10ebf0ef1f8d03709c0559178d0
* | Updating AppWidgetHost to receive a callback when any appWidget has changed. ↵Winson Chung2012-06-131-8/+48
|/ | | | | | (Bug 6602951) Change-Id: I76d688b10ee7775b4ebe81259713f2aaf0009d05
* Cap widget bitmap usage by screen size (issue 6464700)Adam Cohen2012-05-101-0/+19
| | | | Change-Id: I04e16223861a88d40ad757afa086a0f92e84493b
* Merge "Changing app widget "extras" to "options" and another small API ↵Adam Cohen2012-05-021-8/+8
|\ | | | | | | Review issue" into jb-dev
| * Changing app widget "extras" to "options" and another small API Review issueAdam Cohen2012-05-021-8/+8
| | | | | | | | | | | | -> (issue 6427146), (issue 6427861) Change-Id: Ib69a9b3717a5b62317ec227936bc3b2fd5954043
* | Fix a bug in appwidget migration to multiuser directory.Amith Yamasani2012-05-011-9/+9
|/ | | | | | | | | | Bug: 6393606 Migrate the old appwidgets.xml if the file doesn't exist, not if the directory doesn't exist. It worked earlier because this was the first service that I migrated to multi-user :( Change-Id: I59bcbc31ff9d101e44dff5e5f44b3cab8f08dc06
* New API to allow third-party apps to bind widgetsMichael Jurka2012-04-241-6/+77
| | | | Change-Id: I1a3761c1a0f557a32d4d3bdd0207567fec918ba7
* Adding callback for widget size changed, and potentially other extra infoAdam Cohen2012-04-191-0/+33
| | | | Change-Id: I57738c92b6a0ba68ae66b19a533559470c64e6f1
* User management and switchingAmith Yamasani2012-03-271-1/+15
| | | | | | | | | | | | | | | | | | | Broadcast intents that get sent out when users are added/removed/switched. More work on generating user-specific information in package manager queries. APIs to update user name and query a user by id. Removed Package.mSetStopped and mSetEnabled, since they're not user specific. User removal: - Cleanup ActivityManager, PackageManager, WallpaperManager, AppWidgetService and AccountManager. - Shutdown processes belonging to the user. Don't show vibrate option in long-press power if there's no vibrator. Lock the screen when switching users, to force unlocking. Change-Id: Ib23a721cb75285eef5fd6ba8c7272462764038fa
* Package restrictions per userAmith Yamasani2012-03-221-19/+42
| | | | | | | | | | | | | | | | | | | Packages can be enabled/disabled per user. This requires maintaining stopped/launched states and enabled / disabled components and packages per user. Refactored pm.Settings and PackageSettingsBase to keep track of states per user. Migrated the stopped-packages.xml to users/<u>/package-restrictions.xml Changed intent resolution to handle individual user restrictions. Bunch of IPackageManager calls now have a userId argument. Make AppWidgetService handle removals of packages. Added some tests for pm.Settings and PackageManager. Change-Id: Ia83b529e1df88dbcb3bd55ebfc952a6e9b20e861
* Fix Power Control widgetAmith Yamasani2012-02-161-9/+6
| | | | | | | | | | Some changes in AppWidgetService were interfering with widget permissions. Added some hidden methods in Context to communicate the requesting user information instead of using the calling uid. Bug: 6019296 Change-Id: I5e519fd3fbbfa5b3fcc5c297b729c671dac8e7c7
* Multi-user - wallpaper serviceAmith Yamasani2012-02-101-10/+12
| | | | | | | | | | | | - Allow each user to have their own wallpaper (live or static). - Migrate old wallpaper on upgrade. - Update SystemBackupAgent to backup/restore from primary user's new wallpaper directory. Reduce dependency on Binder.getOrigCallingUser() by passing the userId for bindService. Change-Id: I19c8c3296d3d2efa7f28f951d4b84407489e2166
* Multi-user - 1st major checkinAmith Yamasani2012-02-031-0/+1606
Switching activity stacks Cache ContentProvider per user Long-press power to switch users (on phone) Added ServiceMap for separating services by user Launch PendingIntents on the correct user's uid Fix task switching from Recents list AppWidgetService is mostly working. Commands added to pm and am to allow creating and switching profiles. Change-Id: I15810e8cfbe50a04bd3323a7ef5a8ff4230870ed