History log of /frameworks/base/core/java/android/appwidget/AppWidgetManager.java
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
ee0b12161ab8563378e33e9d694d15ed1a757a26 04-Sep-2014 Winson Chung <winsonc@google.com> Generalizing Recents widget category to Search box. (Bug 17334589)

Change-Id: Id62398255799844cc89affcb4bafc86b6479dad0
/frameworks/base/core/java/android/appwidget/AppWidgetManager.java
5771ad7bc7533f4a9bc72ac1ecabfdf6ca493b16 24-Aug-2014 Svet Ganov <svetoslavganov@google.com> RemoteViews service not unbound.

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
/frameworks/base/core/java/android/appwidget/AppWidgetManager.java
8e1d299da27da534b508b1da51ebe351a689cefa 08-Aug-2014 Svetoslav <svetoslavganov@google.com> Polish the new cross-profile app widget APIs

bug:14991269

Change-Id: I5996f8c69a3d151ff1ecd8f19403dd606f588150
/frameworks/base/core/java/android/appwidget/AppWidgetManager.java
976e8bd2017d0263216c62111454438cc0f130e3 17-Jul-2014 Svetoslav <svetoslavganov@google.com> Allow adding widgets from user profiles.

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
/frameworks/base/core/java/android/appwidget/AppWidgetManager.java
c04e9aa916b77909698ce32ba131561275629f60 29-May-2014 Christopher Tate <ctate@google.com> Widget restore documentation tweaks

- 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
/frameworks/base/core/java/android/appwidget/AppWidgetManager.java
da5b84c8d38d8322b5bb7d22653625bb51734a4e 05-May-2014 Winson Chung <winsonc@google.com> Exposing the API to support widgets in Recents.

Change-Id: I2d53f226dbc328f0dbda7006eac647c6468c6b36
/frameworks/base/core/java/android/appwidget/AppWidgetManager.java
adfe8b86e9178a553b6db9722340fa4ff5201cf1 05-Feb-2014 Christopher Tate <ctate@google.com> App widget backup/restore infrastructure

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
/frameworks/base/core/java/android/appwidget/AppWidgetManager.java
6090995951c6e2e4dcf38102f01793f8a94166e1 19-Nov-2013 John Spurlock <jspurlock@google.com> Remove unused imports from frameworks/base.

Change-Id: Ia1f99bd2c1105b0b0f70aa614f1f4a67b2840906
/frameworks/base/core/java/android/appwidget/AppWidgetManager.java
77624cd71f21c32ea4b5dc64e0afa76667036b3a 03-Jun-2013 John Spurlock <jspurlock@google.com> Fix awkward wording in AppWidgetManager docs.

Change-Id: I6d1e180be666b3d88e88f357e8d79f6bbc0c9857
/frameworks/base/core/java/android/appwidget/AppWidgetManager.java
a40cfeb55f6caa35fee894b86175b7d916520c80 26-Mar-2013 Dianne Hackborn <hackbod@google.com> Fix issue #8470131: Process thrash kills battery

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
/frameworks/base/core/java/android/appwidget/AppWidgetManager.java
a75a883fe9ea1790803148f0a561473073e3f264 08-Feb-2013 Jim Miller <jaggies@google.com> Add explicit userId to AppWidget binder calls

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
/frameworks/base/core/java/android/appwidget/AppWidgetManager.java
66adf0d04d92257e60a583617fb97f136fefd192 08-Jan-2013 Scott Main <smain@google.com> am 70af3cdb: Merge "docs: resolve bugs from external tracker" into jb-mr1-dev

* commit '70af3cdb90bafc081ffa693a350b95ced48b6cfd':
docs: resolve bugs from external tracker
6aad995042599dd0f5def79fea85cee90439c9a8 08-Jan-2013 Scott Main <smain@google.com> docs: resolve bugs from external tracker

Change-Id: I680970ec63701197103f6c5ab55c25c736aa0519
/frameworks/base/core/java/android/appwidget/AppWidgetManager.java
c566b43d02596cba437e9a2723e9f989297cca72 01-Dec-2012 Amith Yamasani <yamasani@google.com> Fix crosstalk between users for widgets hosted in lockscreen

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
/frameworks/base/core/java/android/appwidget/AppWidgetManager.java
d9e5af3851f592a00549b689dec325dc46268606 29-Nov-2012 Adam Cohen <adamcohen@google.com> Making sure keyguard and homescreen only display eligible widgets (issue 7550090)

Change-Id: I25acb7bde2e8e5ac3185a009f5c7151b81f0ae19
/frameworks/base/core/java/android/appwidget/AppWidgetManager.java
fc753c0cf676000b1c2d3cb2728af85a9b49f795 31-Oct-2012 Michael Jurka <mikejurka@google.com> Use new keyguard appwidget picker

Also, remove ability to filter widgets by feature
in appwidget picker in anticipation of api change

Change-Id: I325de0b98f03d3a250758d504229ea27794b5330
/frameworks/base/core/java/android/appwidget/AppWidgetManager.java
6611988429d1d70ec429f87bbf2b093cf1e2e31f 11-Oct-2012 Winson Chung <winsonc@google.com> Letting partial update fall through if the widget has not received a full update yet. (Bug 7214731)

Change-Id: I4da99c259df51f8f66d3ade1156040bd0360ca5d
/frameworks/base/core/java/android/appwidget/AppWidgetManager.java
fbe44b7d5e2d9d06a238a54f8ed460fb8bc49585 20-Sep-2012 Adam Cohen <adamcohen@google.com> Fixing partiallyUpdateAppWidget to cache the new changes

-> 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
/frameworks/base/core/java/android/appwidget/AppWidgetManager.java
f229e4d3eb8f910c181f96416c6798f6f305a395 13-Sep-2012 Jim Miller <jaggies@google.com> Add support for settings for lock widgets

Change-Id: Iade094c6f32a7653bdbbd4921d345d68f2443ff4
/frameworks/base/core/java/android/appwidget/AppWidgetManager.java
8c09f636ba704a41d45cf051383abc2320a5a2b8 12-Sep-2012 Adam Cohen <adamcohen@google.com> Adding a couple extras keys for keyguard widget selection

Change-Id: I2ca60769379174d12055ad44cab0fefafb24eb5c
/frameworks/base/core/java/android/appwidget/AppWidgetManager.java
0aa2d42e87e4a1ed5b83f356690e465d6a3587cc 08-Sep-2012 Adam Cohen <adamcohen@google.com> Adding notion of keyguard widgets

-> 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
/frameworks/base/core/java/android/appwidget/AppWidgetManager.java
0e9f34bffdfc476122337d077453f722fc22038f 11-Sep-2012 Katie McCormick <kmccormick@google.com> Doc update: ACTION_APPWIDGET_OPTIONS_CHANGED link

Change-Id: I62def95b138282eba4f2e70fd4ab4de35aa03e89
/frameworks/base/core/java/android/appwidget/AppWidgetManager.java
f25ab44975bb0aaeaa88e8dc564f160bb640902e 26-Jun-2012 Michael Jurka <mikejurka@google.com> Update documentation on max widget bitmap usage

Change-Id: I564afccc425f7e76501cb7ffd404ad369bdd396d
/frameworks/base/core/java/android/appwidget/AppWidgetManager.java
311c79c3e93589c6fc720fe6c58ed522af591376 10-May-2012 Adam Cohen <adamcohen@google.com> Cap widget bitmap usage by screen size (issue 6464700)

Change-Id: I04e16223861a88d40ad757afa086a0f92e84493b
/frameworks/base/core/java/android/appwidget/AppWidgetManager.java
d2097ebacf3a3658624cad10669a4d98e8d7d846 02-May-2012 Adam Cohen <adamcohen@google.com> Changing app widget "extras" to "options" and another small API Review issue

-> (issue 6427146), (issue 6427861)

Change-Id: Ib69a9b3717a5b62317ec227936bc3b2fd5954043
/frameworks/base/core/java/android/appwidget/AppWidgetManager.java
61a5b0160d9f2e53ef4d4b451212a63032dad32d 13-Apr-2012 Michael Jurka <mikejurka@google.com> New API to allow third-party apps to bind widgets

Change-Id: I1a3761c1a0f557a32d4d3bdd0207567fec918ba7
/frameworks/base/core/java/android/appwidget/AppWidgetManager.java
e8724c82ab1479f13c85a2c6219841e1fd95f2d2 20-Apr-2012 Adam Cohen <adamcohen@google.com> Adding callback for widget size changed, and potentially other extra info

Change-Id: I57738c92b6a0ba68ae66b19a533559470c64e6f1
/frameworks/base/core/java/android/appwidget/AppWidgetManager.java
3aef8e1d1b2f0b87d470bcccf37ba4ebb6560c45 20-Dec-2011 Joe Fernandez <joefernandez@google.com> docs: Add developer guide cross-references, Project ACRE, round 4

Change-Id: I1b43414aaec8ea217b39a0d780c80a25409d0991
/frameworks/base/core/java/android/appwidget/AppWidgetManager.java
bac26a1205883ad30343f1d1f64a039dcdda9f63 17-Aug-2011 Adam Cohen <adamcohen@google.com> Getting rid of the (hidden) oldName parameter for widgets

Change-Id: I191cf64ed045fd7cb53e106f337cbeab5a914336
/frameworks/base/core/java/android/appwidget/AppWidgetManager.java
324afba161ae5b802e38f89c9015d8306ea3ddd1 22-Jul-2011 Adam Cohen <adamcohen@google.com> Fixing new minResizeWidth/Height API

Change-Id: I6b57cca32ed7678597e7c0d81dc483ee294537a9
/frameworks/base/core/java/android/appwidget/AppWidgetManager.java
81f39eb6e76d0be1dd341af835e8002a0f80524e 12-Jan-2011 Winson Chung <winsonc@google.com> Refactoring app widgets to address security/performance issues.

- 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
/frameworks/base/core/java/android/appwidget/AppWidgetManager.java
6394c0e52cf641d93f678fd052499aa952e3595d 16-Aug-2010 Winson Chung <winsonc@google.com> Adding callback and fix to RemoteViewsFactory on notifyDataSetChanged.
Also removing extra parameter in AppWidgetManager.notifyDataSetChanged.

Change-Id: Ic771fe045ae793a6dacf09f1230e7c1c4b59a13e
/frameworks/base/core/java/android/appwidget/AppWidgetManager.java
2dd2197805edb4d9547b143deef2226413218f4c 16-Aug-2010 Adam Cohen <adamcohen@google.com> -> Enabled partial updates to app widgets through AppWidgetManager.
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
/frameworks/base/core/java/android/appwidget/AppWidgetManager.java
499cb9f516062b654952d282f211bee44c31a3c2 16-Jul-2010 Winson Chung <winsonc@google.com> Initial changes to allow collections in widgets.

Change-Id: I3cfa899bae88cd252912cecebc12e93c27a3b7c9
/frameworks/base/core/java/android/appwidget/AppWidgetManager.java
b812925aeebf86a35e580041effb66203c7a079f 13-Jul-2010 The Android Open Source Project <initial-contribution@android.com> am b65d2256: merge from open-source master

Merge commit 'b65d225633d14326d1ba2af862861e92d7ea45bc'

* commit 'b65d225633d14326d1ba2af862861e92d7ea45bc':
Reduced Warnings by adding Type Arguments and removing unused imports
5d1409191ea8d76268ddc4cd14759ad0d6a3c180 12-Jul-2010 Patrick Dubroy <dubroy@google.com> Convert the minWidth and minHeight to device units when calling getInstalledProviders
/frameworks/base/core/java/android/appwidget/AppWidgetManager.java
10c543da2f407d7a4e2a6fa0375e39ec0d232233 25-Jun-2010 Christian Mehlmauer <FireFart@gmail.com> Reduced Warnings by adding Type Arguments and removing unused imports

Change-Id: I42f8f9f9a6a6b271eaeb1a02f6d6567a630936ea
/frameworks/base/core/java/android/appwidget/AppWidgetManager.java
d2671e1fcf1d7f1b8e25a2615d514cf3c26b6a9c 12-Mar-2010 Romain Guy <romainguy@android.com> Preserve widgets on upgrade.
Bug #2464545

Change-Id: I802878af49dc4d98210fb8049df0bbdc49268d99
/frameworks/base/core/java/android/appwidget/AppWidgetManager.java
8f25c426b118c35f558cbf27bd413e1eb6d59823 01-Jul-2009 Mitsuru Oshima <oshima@google.com> resolve complex value in application context instead of system context.
/frameworks/base/core/java/android/appwidget/AppWidgetManager.java
105925376f8d0f6b318c9938c7b83ef7fef094da 19-Mar-2009 The Android Open Source Project <initial-contribution@android.com> auto import from //branches/cupcake_rel/...@140373
/frameworks/base/core/java/android/appwidget/AppWidgetManager.java
c39a6e0c51e182338deb8b63d07933b585134929 11-Mar-2009 The Android Open Source Project <initial-contribution@android.com> auto import from //branches/cupcake/...@137873
/frameworks/base/core/java/android/appwidget/AppWidgetManager.java