summaryrefslogtreecommitdiffstats
path: root/core/java/android/appwidget
Commit message (Collapse)AuthorAgeFilesLines
* AppWidgetServiceImpl should use ParceledListSlice as return objectHyunyoung Song2015-06-171-3/+4
| | | | | | | | | b/19904873 > Reason: to prevent TransactionTooLargeException from occuring when binder transaction size goes over the limit. Change-Id: I054cb161d235234f3ccdaadd70314163e690b0db
* Exclude bound app widgets from idle app listAmith Yamasani2015-05-011-0/+14
| | | | | | | | Track package names of bound app widgets and use the list when querying for idle apps. Bug: 20066058 Change-Id: If8039397a061ef04bb13aa38d57cd7f0221f5fc7
* Remove unused imports in frameworks/base.John Spurlock2015-02-281-2/+0
| | | | Change-Id: I031443de83f93eb57a98863001826671b18f3b17
* Fix accessibility delegationAlan Viverette2015-01-071-2/+3
| | | | | | | | | | | | | | | Ensures that delegate code is run last. Previously, calling the super method from an accessibility delegate set on a widget would only run code in the widget's parent. Next, the delegate code would run. Finally, the widget's code would run. As a result, the widget code would override any data supplied by the delegate. By moving all overridden code to internal methods, we ensure that the call chain for super includes the widget's parent code followed by the widget's code. The delegate code will always run last. BUG: 17641433 Change-Id: Ib9d403156c1fc4fb04f65f3c126d1277a44b3740
* Avoid non-static innner classes that are passed over via IPC.Svetoslav2014-12-181-13/+37
| | | | Change-Id: Ic14565c135b1f2ba50fa57462738b8dbc0e73301
* Removing context ref from AppWidgetHost. (Bug 18769791)Winson Chung2014-12-171-11/+11
| | | | Change-Id: Ieec1314ece219c178c140e572b031c94e83b8a93
* Generalizing Recents widget category to Search box. (Bug 17334589)Winson Chung2014-09-042-3/+3
| | | | Change-Id: Id62398255799844cc89affcb4bafc86b6479dad0
* RemoteViews service not unbound.Svet Ganov2014-08-242-10/+9
| | | | | | | | | | | | | | | | | | | | We are checking whether an app can access an app widget based on the calling uid and the package name. The package is mostly to make sure that hosts in different apps do not accidentally interfere whereas the security is enforced by the uid. When remote views adapter binds and unbinds to a remote views serivce it was passing the package of the context we create to load resources for the widget instead the package of the host. Now it is passing the host package and also we are checking if the caller of bind remove serivce API is in uid that has the host package - this makes it consistent with elsewhere. bug:17226052 Change-Id: I2b0b6669e3dc027037b7481c2871cedabd642433
* Fixing wrong tag usageSunny Goyal2014-08-151-1/+1
| | | | Change-Id: I4cb0084a89cc079383d666ad1c5711d96ea81ebe
* Returning null when preview image is not available for AppWidgetProviderInfoSunny Goyal2014-08-151-7/+8
| | | | | | | | The default application icon generally has a different aspect ratio that a preview image, and cannot transparently be used in place of the image. Returning null will allow the apps to handle the case as they see fit. Change-Id: Ie6e8e16dd7b4e58b222187a81c62d27eccab45a9
* Polish the new cross-profile app widget APIsSvetoslav2014-08-083-38/+35
| | | | | | bug:14991269 Change-Id: I5996f8c69a3d151ff1ecd8f19403dd606f588150
* Polish of the app widgets cross-profiles feature.Svetoslav2014-08-072-47/+8
| | | | | | | | | | | | | | | | | | | | 1. Added API for badging an arbitrary drawable at a given location. 2. Updated the icon and previewImage deprecation as they are no longer returning a badged drawable. The methods to load the icon and the preview are now just making it easier for a developer to get the drawables. 3. Fixed a bug in AppWidgetServiceImpl leading to a crash when a user is removed. 4. Fixed a bug in AppWidgetHost which was unnecessarily caching its package name and having code paths where the cached value was not populated when calling into the system. bug:14991269 Change-Id: I50d011a6597d88814715d5ec04ee67815e8ce0bd
* Allow adding widgets from user profiles.Svetoslav2014-08-054-218/+493
| | | | | | | | | | | | | The goal of this change is to enable support for appwidget from user profiles to the user main profile. A user profile is a user which is associated as a child of the main user profile. For example, a user may have a personal (parent) and corporate (child) profile. The device policy should be able to control whether adding a widget from a child profile and given packages is allowed. This change assumes that all packages from managed profiles are white listed. Another change will add the device policy changes. Change-Id: I267260b55d74c48b112a29979a9f59eef7a8194e
* Widget restore documentation tweaksChristopher Tate2014-05-281-6/+6
| | | | | | | | | | | - Fix broken Javadoc @see directives - Linkify AppWidgetProvider in the documentation for the new ACTION_APPWIDGET_RESTORED broadcast - Minor content edits Bug 15022842 Change-Id: Ia7d4ad5be476c260492e1be5d83e21f6943a6847
* Exposing the API to support widgets in Recents.Winson Chung2014-05-052-2/+2
| | | | Change-Id: I2d53f226dbc328f0dbda7006eac647c6468c6b36
* Adding ability to load a search widget into Recents.Winson Chung2014-05-021-0/+6
| | | | Change-Id: Ie17d9b9a47c979774b39a37e87f75d9dadc79ad9
* App widget backup/restore infrastructureChristopher Tate2014-03-202-12/+125
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Backup/restore now supports app widgets. An application involved with app widgets, either hosting or publishing, now has associated data in its backup dataset related to the state of widget instantiation on the ancestral device. That data is processed by the OS during restore so that the matching widget instances can be "automatically" regenerated. To take advantage of this facility, widget-using apps need to do two things: first, implement a backup agent and store whatever widget state they need to properly deal with them post-restore (e.g. the widget instance size & location, for a host); and second, implement handlers for new AppWidgetManager broadcasts that describe how to translate ancestral-dataset widget id numbers to the post-restore world. Note that a host or provider doesn't technically need to store *any* data on its own via its agent; it just needs to opt in to the backup/restore process by publishing an agent. The OS will then store a small amount of data on behalf of each widget-savvy app within the backup dataset, and act on that data at restore time. The broadcasts are AppWidgetManager.ACTION_APPWIDGET_RESTORED and ACTION_APPWIDGET_HOST_RESTORED, and have three associated extras: EXTRA_APPWIDGET_OLD_IDS EXTRA_APPWIDGET_IDS EXTRA_HOST_ID [for the host-side broadcast] The first two are same-sized arrays of integer widget IDs. The _OLD_IDS values are the widget IDs as known to the ancestral device. The _IDS array holds the corresponding widget IDs in the new post- restore environment. The app should simply update the stored widget IDs in its bookkeeping to the new values, and things are off and running. The HOST_ID extra, as one might expect, is the app-defined host ID value of the particular host instance which has just been restored. The broadcasts are sent following the conclusion of the overall restore pass. This is because the restore might have occurred in a tightly restricted lifecycle environment without content providers or the package's custom Application class. The _RESTORED broadcast, however, is always delivered into a normal application environment, so that the app can use its content provider etc as expected. *All* widget instances that were processed over the course of the system restore are indicated in the _RESTORED broadcast, even if the backing provider or host is not yet installed. The widget participant is responsible for understanding that these are promises that might be fulfilled later rather than necessarily reflecting the immediate presentable widget state. (Remember that following a cloud restore, apps may be installed piecemeal over a lengthy period of time.) Telling the hosts up front about all intended widget instances allows them to show placeholder UI or similarly useful information rather than surprising the user with piecemeal unexpected appearances. The AppWidgetProvider helper class has been updated to add a new callback, onRestored(...), invoked when the _RESTORED broadcast is received. The call to onRestored() is immediately followed by an invocation of onUpdate() for the affected widgets because they will need to have their RemoteViews regenerated under the new ID values. Bug 10622506 Bug 10707117 Change-Id: Ie0007cdf809600b880d91989c00c3c3b8a4f988b
* Tabs -> spaces in frameworks/base.John Spurlock2014-02-251-1/+1
| | | | Change-Id: I5a84e8e93ac99b5ed0212b37bf66efa5e53864be
* Remove unused imports from frameworks/base.John Spurlock2013-11-202-3/+0
| | | | Change-Id: Ia1f99bd2c1105b0b0f70aa614f1f4a67b2840906
* am 18748035: am 379517b0: Merge "Fixing issue where ↵Winson Chung2013-06-051-9/+1
|\ | | | | | | | | | | | | AppWidgetHost.onProvidersChanged() was not being called. (Bug 9270309)" into jb-mr2-dev * commit '18748035bbced3b6246b802ab07ee58859a29b0c': Fixing issue where AppWidgetHost.onProvidersChanged() was not being called. (Bug 9270309)
| * Fixing issue where AppWidgetHost.onProvidersChanged() was not being called. ↵Winson Chung2013-06-041-9/+1
| | | | | | | | | | | | (Bug 9270309) Change-Id: I6cfb8e0c586fad7360a07f98e1280a954f62e5e1
| * Fix awkward wording in AppWidgetManager docs.John Spurlock2013-06-031-6/+6
| | | | | | | | Change-Id: Ia06221f75898ab53f97852880bf2a7ec49b4f489
* | Fix awkward wording in AppWidgetManager docs.John Spurlock2013-06-031-6/+6
| | | | | | | | Change-Id: I6d1e180be666b3d88e88f357e8d79f6bbc0c9857
* | am 177543db: am 3bcc2fba: Merge "Fix issue #8470131: Process thrash kills ↵Dianne Hackborn2013-03-261-4/+16
|\ \ | |/ | | | | | | | | | | battery" into jb-mr2-dev * commit '177543db55f88f060d9a43df79afd6733cd565da': Fix issue #8470131: Process thrash kills battery
| * Fix issue #8470131: Process thrash kills batteryDianne Hackborn2013-03-251-4/+16
| | | | | | | | | | | | | | | | | | | | | | | | Protect app widget broadcasts from abuse. In this case the app was sending an APPWIDGET_UPDATE broadcast without specifying a target, which (a) should not be allowed (you should not be able to send updates to other apps), and (b) resulted in every single potential app widget in the system being launched... which was about 75 of them. Change-Id: I9d48733610ce6d5a7c32e69a3e06b9f33bd79a34
* | am 26ebeb6d: am 7b3526d5: Merge "Fix alternate time zone display for clock ↵Jim Miller2013-03-221-2/+2
|\ \ | |/ | | | | | | | | | | widget." into jb-mr2-dev * commit '26ebeb6d554e963a496d42ec3ab8213c35c51e1c': Fix alternate time zone display for clock widget.
| * Fix alternate time zone display for clock widget.Jim Miller2013-03-211-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | This fixes a bug where the widget resize event was being sent for the wrong user. The issue was with creating AppWidgetHostViews with Keyguard's context which contains the wrong user id. Fixes bug 8392718 Change-Id: I7efbc13161800224a342880c35470ed0b45824d0
* | am 33c05985: am e70748e7: Merge "Remove unnecessary userid check" into ↵Jim Miller2013-03-111-13/+0
|\ \ | |/ | | | | | | | | | | jb-mr2-dev * commit '33c05985102ea9a357263bba8e6a3789d20f6ba7': Remove unnecessary userid check
| * Remove unnecessary userid checkJim Miller2013-03-111-13/+0
| | | | | | | | | | | | | | | | | | This removes code used to verify the userid's were consistent, which is no longer needed. Fixes bug 8167800 Change-Id: I592e4bc1158fb7775bd31ae8a26c1782b60f0fa0
* | Fix widget update issueJim Miller2013-03-051-5/+2
| | | | | | | | | | | | | | | | | | | | | | | | This fixes an issue where widgets weren't being updated. It was caused by creating widgets with the wrong package id. Keyguard used to be identified with package "android" when it was running in the system proces. Now that it's separate, we need to explicitly pass in the package name for keyguard ("com.android.keyguard") when we allocate app widget ids. Change-Id: I48e1b78d97aa3d0271773219e477d3b741994901
* | Move keyguard to its own process.Jim Miller2013-02-271-1/+0
|/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is in preparation to moving keyguard into its own process. Moved keyguard source and resources into new .apk. Got basic test app working. Still need to implement MockPatternUtils and means to pass it into KeyguardService with local binder interface. Added new ACCESS_KEYGUARD_SECURE_STORAGE permission. Temporarily disabled USER_PRESENT broadcast. Remove unintentional whitespace changes in PhoneWindowManager, etc. Checkpoint basic working version. Move to systemui process. Synchronize with TOT. Sync with recent user API changes. Fix bug with returing interface instead of stub for IKeyguardResult. Create KeyguardServiceDelegate to allow for runtime-selectable local or remote interface. More keyguard crash robustness. Keyguard crash recovery working. Currently fails safe (locked). Fix selector view which was still using frameworks resources. Remove more references to internal framework variables. Use aliases for those we should move but currently have dependencies. Allow runtime switching between service and local mode. Fix layout issue on tablets where orientation was reading the incorrect constant from the framework. Remove more framework dependencies. Fix PIN keyboard input. Remove unnecessary copy of orientation attrs. Remove unused user selector widget and attempt to get multi user working again. Fix multi-user avatar icon by grabbing it from UserManager rather than directly since keyguard can no longer read it. Merge with AppWidget userId changes in master. Change-Id: I254d6fc6423ae40f6d7fef50aead4caa701e5ad2
* Add explicit userId to AppWidget binder callsJim Miller2013-02-202-93/+95
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Keyguard currently relies on being in the system process to grab the given user's widgets. When we split keyguard into a new process, it will need to have access to user-specific info to instantiate a specific user's widgets. In order to accomplish this, we add an explicit userid to each binder call as well as new permission check to allow keyguard access. This also fixes a potential race condition of having an incorrect user id due to an async call to change the user. Every binder call now has a specific user id. The user id is either the calling process user's id or an explicit one passed by applications like keyguard. It is created once when an AppWidgetManager is instantiated and remains for the lifetime of the object. Fixed bug where widgets sometimes didn't show up for secondary users. Moved permission check in AppWidgetService into getImplForUser() Refactored to use userid from context associated AppWidgetManager instance. Clean up AppWidgetHost to use userId from Context. Remove redundant userId check in checkPermission since it's handled by ActivityManager.handleIncomingUser() Removed redundant userid check. Upload after rebase... Change-Id: Iae3e20f2b342c323bb58768b3d22051510f8268b
* am 5b56d432: am 9107fa5d: am 66adf0d0: am 70af3cdb: Merge "docs: resolve ↵Scott Main2013-01-081-1/+1
|\ | | | | | | | | | | | | bugs from external tracker" into jb-mr1-dev * commit '5b56d43237d959403bb8a32de25376deee2dab22': docs: resolve bugs from external tracker
| * am 70af3cdb: Merge "docs: resolve bugs from external tracker" into jb-mr1-devScott Main2013-01-081-1/+1
| |\ | | | | | | | | | | | | * commit '70af3cdb90bafc081ffa693a350b95ced48b6cfd': docs: resolve bugs from external tracker
| | * docs: resolve bugs from external trackerScott Main2013-01-081-1/+1
| | | | | | | | | | | | Change-Id: I680970ec63701197103f6c5ab55c25c736aa0519
* | | am f663cad2: am 6c58b155: Merge "Make 3rd party lockscreen widgets work on ↵Amith Yamasani2012-12-052-4/+29
|\ \ \ | |/ / | | | | | | | | | | | | | | | secondary users" into jb-mr1.1-dev * commit 'f663cad2248d5d38957f8e1408cd794c0de90202': Make 3rd party lockscreen widgets work on secondary users
| * | Make 3rd party lockscreen widgets work on secondary usersAmith Yamasani2012-12-042-4/+29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If you install a lockscreen widget app on a secondary user, lockscreen fails to find it. There were several places where the correct context and userId were required under the covers - AppWidgetHost, AppWidgetHostView and RemoteViewsAdapter. Set the user id in the required places and use it to query the package information. Bug: 7662835 Change-Id: Ife482c8ab2a2e601650b7cfe2660e88d3b8f2050
* | | am 32df98d5: am c566b43d: Fix crosstalk between users for widgets hosted in ↵Amith Yamasani2012-11-302-6/+37
|\ \ \ | |/ / | | | | | | | | | | | | | | | lockscreen * commit '32df98d52d482498d998b424684610c15098897a': Fix crosstalk between users for widgets hosted in lockscreen
| * | Fix crosstalk between users for widgets hosted in lockscreenAmith Yamasani2012-11-302-6/+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
* | | am 224daede: am 035352b4: Merge "Making sure keyguard and homescreen only ↵Adam Cohen2012-11-291-1/+12
|\ \ \ | |/ / | | | | | | | | | | | | | | | display eligible widgets (issue 7550090)" into jb-mr1.1-dev * commit '224daede9e49f53ca5246aed66d152bfcc6d64e1': Making sure keyguard and homescreen only display eligible widgets (issue 7550090)
| * | Making sure keyguard and homescreen only display eligible widgets (issue ↵Adam Cohen2012-11-281-1/+12
| | | | | | | | | | | | | | | | | | 7550090) Change-Id: I25acb7bde2e8e5ac3185a009f5c7151b81f0ae19
* | | am cf474b1a: am 7b0c8779: Merge "Delete appWidgetId when removing lockscreen ↵Michael Jurka2012-11-161-0/+16
|\ \ \ | |/ / | | | | | | | | | | | | | | | widgets" into jb-mr1.1-dev * commit 'cf474b1a10a1349d0d6d6f7cbb5d48489bacfb09': Delete appWidgetId when removing lockscreen widgets
| * | Delete appWidgetId when removing lockscreen widgetsMichael Jurka2012-11-161-0/+16
| |/ | | | | | | | | Bug: 7550012 Change-Id: Ia9f5266256016eb91bfd6a2d5a7f910c42948f1e
* | Merge commit '58ed5d748c0b9b64845975ef5844ad313de7c3f6' into HEADJean-Baptiste Queru2012-11-081-0/+0
|\ \ | |/ |/|
| * am 768d9e1a: Merge "Correct executable bit for source files"Kenny Root2012-11-071-0/+0
| |\ | | | | | | | | | | | | * commit '768d9e1a72ceee7d4a5f608776b87b62d6ce4a04': Correct executable bit for source files
| | * Correct executable bit for source filesKenny Root2012-11-071-0/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | Many media files and source code files were marked as executable in Git. Remove those. Also a shell script and python script were not marked as executable. Change-Id: Ieb51bafb46c895a21d2e83696f5a901ba752b2c5
* | | If a default keyguard layout isn't specified, fallback to the default layoutAdam Cohen2012-11-042-2/+5
|/ / | | | | | | | | | | | | | | -> Also fixing a typo in AppWidgetProvider clone() -- this was the cause of the "couldn't load widget". It wasn't getting expressed before for various reasons. Change-Id: Ib7114565a414d66facd8b4baeb97d5a71e96b5e9
* | Widget size policy, size callbacksAdam Cohen2012-11-011-8/+16
| | | | | | | | | | | | | | | | | | | | -> vertically resizable widgets behave are sized to fill -> non-vertically resizable widgets use the small size all the time -> providing size call-backs. ensuring that we don't send excessive / incorrect size callbacks. These are expensive. Had to clean things up to ensure we only send the truth, and not bounce around. Change-Id: I8038de01096906526e2622c6f1cd24c171e3a4ec
* | Merge "Stripping dead API related to keyguard widgets" into ↵Adam Cohen2012-11-011-24/+0
|\ \ | | | | | | | | | jb-mr1-lockscreen-dev
| * | Stripping dead API related to keyguard widgetsAdam Cohen2012-10-311-24/+0
| | | | | | | | | | | | Change-Id: Ieb6c57ef736712b3266de08027f9626104cdf1bb