summaryrefslogtreecommitdiffstats
path: root/services/java/com/android/server/AppWidgetService.java
Commit message (Collapse)AuthorAgeFilesLines
* Fix crosstalk between users for widgets hosted in lockscreenAmith Yamasani2012-11-301-5/+37
| | | | | | | | | | | | | | | | | | | | | | | | 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
* Making sure keyguard and homescreen only display eligible widgets (issue ↵Adam Cohen2012-11-281-2/+3
| | | | | | 7550090) Change-Id: I25acb7bde2e8e5ac3185a009f5c7151b81f0ae19
* Delete appWidgetId when removing lockscreen widgetsMichael Jurka2012-11-161-0/+5
| | | | | Bug: 7550012 Change-Id: Ia9f5266256016eb91bfd6a2d5a7f910c42948f1e
* Pushing state persistence to a background threadAdam Cohen2012-11-151-2/+10
| | | | Change-Id: If776bc22c48525ba91dc7e4dd0e27de92612f2f5
* Merge "Do cleanup when Stopping users" into jb-mr1-devAmith Yamasani2012-10-161-14/+20
|\
| * Do cleanup when Stopping usersAmith Yamasani2012-10-151-14/+20
| | | | | | | | | | | | | | | | | | | | | | | | 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
* | Protect more service dump() methods.Jeff Sharkey2012-10-151-0/+2
|/ | | | | Bug: 6406965 Change-Id: Ia45a580c1e6f403308e7e540f18f2c0505af0f29
* Fix widget cross-talk between users due to Settings widgetAmith Yamasani2012-10-051-109/+42
| | | | | | | | | | | | 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
* Show lockscreen widgets for the current user.Amith Yamasani2012-09-211-22/+37
| | | | | | | | | | | Also shows the owner info and next alarm for the current user. AppWidgetService now assumes that any widgets running in the system process are for the current user, so that lockscreen shows widgets for the current user Bug: 7211754 Bug: 7212421 Change-Id: Iaf0edc60e49af0afe42625c0b2dcf100c9ecc178
* Adding notion of keyguard widgetsAdam Cohen2012-09-111-4/+7
| | | | | | | | | -> 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
* Fix another issue #7097984 java.lang.SecurityException: Permission Denial:Dianne Hackborn2012-09-041-2/+2
| | | | | | | | broadcast asks to run as user -1 but is calling from user 0; this requires Dupped bug of a different problem. Change-Id: I15f4ab08b81f5f5746ba1cd183dee4f0b1281df5
* Add registering for explicit users.Dianne Hackborn2012-09-041-7/+28
| | | | | | | | | | | | | New API to register as an explicit user, which allows you to also select ALL to see broadcasts for all users. New BroadcastReceiver API to find out which user the broadcast was sent to. Use this in app widget service to handle per-user package broadcasts and boot completed broadcasts correctly. Change-Id: Ibbe28993bd4aa93900c79e412026c27863019eb8
* Remove Binder.getOrigCallingUid().Dianne Hackborn2012-08-311-25/+39
| | | | | | | | | | | | | | | | | | | | | | | | | | | Replaced all remaining places that used it with explicit user specification. While doing this, I ran into stuff that was creating PendingIntent objects (that now need to specify the explicit user they are for), which are also posting notifications... but have no way to specify the user for the notification. So the notification manager in the system process now also gets a formal concept of a user associated with the notification, which is passed in to all the necessary aidl calls. I also removed the old deprecated aidl interface for posting/cancelling notifications, since we now always need a user supplied. There is more work that needs to be done here, though. For example I think we need to be able to specify USER_ALL for a notification that should be shown to all users (such as low storage or low battery). Along with that, the PendingIntent creation needs to be tweaked to be able to handle USER_CURRENT by evaluating the user at the point the pending intent is sent. That's for another change, however. Change-Id: I468e14dce8def0e13e0870571e7c31ed32b6310c
* UserHandle to UserSerialNo mappingAmith Yamasani2012-08-171-1/+1
| | | | | | | | | Use AtomicFile for usermanager files. Added a MANAGE_USERS permission that apps (signature permission) can use to create/query/modify/remove users. Change-Id: I5cf232232d0539e7508df8ec9b216e29c2351cd9
* Changing app widget "extras" to "options" and another small API Review issueAdam Cohen2012-05-021-4/+4
| | | | | | -> (issue 6427146), (issue 6427861) Change-Id: Ib69a9b3717a5b62317ec227936bc3b2fd5954043
* New API to allow third-party apps to bind widgetsMichael Jurka2012-04-241-0/+17
| | | | Change-Id: I1a3761c1a0f557a32d4d3bdd0207567fec918ba7
* Adding callback for widget size changed, and potentially other extra infoAdam Cohen2012-04-191-0/+11
| | | | Change-Id: I57738c92b6a0ba68ae66b19a533559470c64e6f1
* User management and switchingAmith Yamasani2012-03-271-15/+18
| | | | | | | | | | | | | | | | | | | 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-3/+4
| | | | | | | | | | | | | | | | | | | 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
* Multi-user - 1st major checkinAmith Yamasani2012-02-031-1393/+98
| | | | | | | | | | | | | | | 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
* Workaround for issue where the notifyDatasetChanged call chain is broken ↵Winson Chung2011-12-061-1/+43
| | | | | | when Launcher is killed. (Bug 5703782) Change-Id: Ic57a7ce85f41d58cd40b7d30eef4a1bf685182e5
* Verify AppWidget ownership during update.Jeff Sharkey2011-11-031-1/+4
| | | | | Bug: 5563081 Change-Id: I528ec944d404989bb21b32ef01feb3d35e23d3ad
* Fixing issue where widgets file was getting blown away, issue: 5036321Adam Cohen2011-10-121-108/+57
| | | | Change-Id: If40a9c79f70e11eee935b2dd2614e723423ff3bf
* Adding logging to debug widget deletionsAdam Cohen2011-10-051-43/+72
| | | | Change-Id: I15a943650f930fd3fb6163c60af85abc2865e684
* Ensure appwidgets are loaded before usage.Jeff Sharkey2011-09-011-2/+33
| | | | | | | Before accessing appwidget details, always ensure that configuration is loaded from disk. Change-Id: Ic71dd62fcdb1d1e5f7bae397efa8dce787434ba5
* Getting rid of the (hidden) oldName parameter for widgetsAdam Cohen2011-08-171-7/+1
| | | | Change-Id: I191cf64ed045fd7cb53e106f337cbeab5a914336
* Fixing new minResizeWidth/Height APIAdam Cohen2011-07-221-0/+6
| | | | Change-Id: I6b57cca32ed7678597e7c0d81dc483ee294537a9
* Adding resizeMinWidth/Height to AppWidgetProviderInfoAdam Cohen2011-07-191-0/+6
| | | | Change-Id: I17dc27829938a3f25a664d8255965cf9b67cb17e
* Eliminate single-process mode.Jeff Brown2011-07-081-1/+1
| | | | | | Bug: 5010576 Change-Id: Id450dc83efed4897d1e4ff451530fed14457aace
* Fix to clear calling identity when binding a widget.Dianne Hackborn2011-06-151-34/+40
| | | | Change-Id: Id66abc50ec9ee69317b9838f302c4153995664f7
* am 7322e557: am a4cfcf10: am 75d6b3c2: Merge "Fix issue #4502672: Wrong xml ↵Dianne Hackborn2011-06-031-0/+1
|\ | | | | | | | | | | | | resources used for homescreen widgets." into honeycomb-mr2 * commit '7322e557cfe42da42779625d69ced2db74a9df90': Fix issue #4502672: Wrong xml resources used for homescreen widgets.
| * Fix issue #4502672: Wrong xml resources used for homescreen widgets.Dianne Hackborn2011-05-311-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There was a race in the system process between applying the initial configuration and executing code in higher-level system services like the app widget service that relies on the config. For some reason it starting showing up more after my code changes; it should now be completely fixed. Also fix the activity starting window to run in compatibility mode if its application is going to be in compatibility mode. And some various cleanup and small fixes. Change-Id: I0566933bf1bbb4259c1d99a60c0a3c19af1542e5
* | Modifying RemoteViewsFactory interfaceAdam Cohen2011-03-241-1/+3
|/ | | | | | | -made onDestroy() one way -moved uncaught exception handling to the application process Change-Id: I958571a34eaa48b27e441e3a117c109fb2d2c644
* Catching all Exceptions when calling through to RemoteViewsFactoryAdam Cohen2011-03-161-3/+3
| | | | Change-Id: Ib20c880bb7626565541ab4697317fcfaa2e6b5b7
* Small change to AppWidgetProviderInfo public field name and docsAdam Cohen2011-02-281-1/+1
| | | | Change-Id: Ia799cfc1824ccee1f7fd041ae8ecaa1a0395c3f6
* Merge "Adding framework support for resizable widgets"Adam Cohen2011-02-251-6/+9
|\
| * Adding framework support for resizable widgetsAdam Cohen2011-02-251-6/+9
| | | | | | | | | | | | | | | | | | -> Added resizeMode to the widget xml -> Fixed an unexposed bug in AppWidgetHost where minWidth and minHeight were never being converted from complex type to dp Change-Id: Ibbc4fc6542d095623ac2a40694b6a3dbfeb279ad
* | Fixing buildWinson Chung2011-02-251-1/+1
| | | | | | | | Change-Id: I3d60c115190a6e478777229d4851dedc78111c39
* | Fixing issue where RemoteViewsService.onDestroy() was never being called.Winson Chung2011-02-251-5/+81
|/ | | | Change-Id: I15ad04eee18bc3e09d4846c7f2f2d2d8d168e518
* Re-enabling queued unbinding of services after requests to the service. ↵Winson Chung2011-01-261-33/+42
| | | | | | | | | (3394210) - Fix for crash when detaching from window - Potential fix for occasional IllegalStateException when updating List based widgets Change-Id: I3d3f2bb691552a1136111043db686c4926b510c6
* Disabling queued unbinding of RemoteViewsServices until we fix flashing in ↵Winson Chung2011-01-191-1/+1
| | | | | | widgets. Change-Id: Iee53d4930dc4007df4298a282cdd5101876215a1
* Refactoring app widgets to address security/performance issues.Winson Chung2011-01-181-18/+150
| | | | | | | - Moving the service binding to AppWidgetService to prevent arbitrary apps from binding to widget services - Requiring RemoteViewsServices to require android.permission.BIND_REMOTEVIEWS permission Change-Id: Id135bafba998299eb278067712b8a5d8487cfd04
* Make AppWidgetService handle components enabling and disabling.Joe Onorato2011-01-101-2/+12
| | | | Change-Id: Ie6b75cb90be38bbce694ccf2d5a342d7f0172fa4
* Adding widget auto-advance capabilityAdam Cohen2010-11-101-0/+2
| | | | Change-Id: I058573f40a48fd7b5c2efa5f1041a1199919a51a
* am 8f0f1b1e: am 274ad982: Merge "Just disable widgets that come from apps on ↵Joe Onorato2010-08-261-1/+7
|\ | | | | | | | | | | | | | | | | sd cards, because they don\'t work anyway." into gingerbread Merge commit '8f0f1b1e9defc61c2831e8856b18f2e00cfd789d' * commit '8f0f1b1e9defc61c2831e8856b18f2e00cfd789d': Just disable widgets that come from apps on sd cards, because they don't work anyway.
| * Just disable widgets that come from apps on sd cards, because they don't ↵Joe Onorato2010-08-241-1/+7
| | | | | | | | | | | | work anyway. Change-Id: I2d7ef4a63bcbd43547e40c01e997d813cc01e800
* | am 32982c70: am cc45381e: Merge "Fix typo that makes apps on sd work better ↵Joe Onorato2010-08-261-1/+1
|\ \ | |/ | | | | | | | | | | | | | | with app widgets." into gingerbread Merge commit '32982c701cee6f73262200468419b80343a0bea7' * commit '32982c701cee6f73262200468419b80343a0bea7': Fix typo that makes apps on sd work better with app widgets.
| * Fix typo that makes apps on sd work better with app widgets.Joe Onorato2010-08-241-1/+1
| | | | | | | | | | Bug: 2489571 Change-Id: Idbfb91d960b952aaf32c604b7e52592d77b5ef2e
* | Adding callback and fix to RemoteViewsFactory on notifyDataSetChanged.Winson Chung2010-08-171-6/+4
| | | | | | | | | | | | Also removing extra parameter in AppWidgetManager.notifyDataSetChanged. Change-Id: Ic771fe045ae793a6dacf09f1230e7c1c4b59a13e
* | -> Enabled partial updates to app widgets through AppWidgetManager.Adam Cohen2010-08-171-1/+24
| | | | | | | | | | | | | | | | | | | | Partial updates are not cached by the AppWidgetService. -> Added the ability to insert commands with no parameters into RemoteViews objects. -> Added showNext() and showPrevious() methods to RemoteViews. -> Made showNext() / showPrevious() of AdapterViewFlipper remotable. Change-Id: Ic5491bb374424a54728c4ca92b94b1f00dfb87ff