History log of /frameworks/base/services/java/com/android/server/AppWidgetServiceImpl.java
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
ac6331be6ff6d757c44aad6497f3ea0c63804d5f 23-Mar-2013 Dianne Hackborn <hackbod@google.com> am 8277f248: am b685faa2: Merge "Implement #8323587, #8323342, #8323590: new features." into jb-mr2-dev

* commit '8277f24865e52915b4825517860629c0385f79ed':
Implement #8323587, #8323342, #8323590: new features.
119bbc378d3c836f1196e14b847e564205a29728 23-Mar-2013 Dianne Hackborn <hackbod@google.com> Implement #8323587, #8323342, #8323590: new features.

8323587: Add feature for supporting app widgets
8323342: Add feature for replacing the home screen
8323590: Add feature for supporting input methods

The app widget service looks for the app widget feature
and refuses to work if it doesn't exist. I didn't do
this for the input method service because some devices
will probably want to still make use of that mechanism
without supporting third party input methods.

Change-Id: Ie3b089105e104f4d767cdb03cdbe4fdb1c17382e
/frameworks/base/services/java/com/android/server/AppWidgetServiceImpl.java
39d129e59a1c3985cb1e68f8da6deeea7b2bcbe9 08-Mar-2013 Jim Miller <jaggies@google.com> Add "database" upgrader for widget hosts.

When keyguard moved to a new process, the package name changed which
caused the old widgets to be lost.

This change migrates the old widget host for keyguard and adds a
mechanism to perform future upgrades.

Updated after review.

Change-Id: I78a616501ddc71e3b1e86622d353eb82528f9eff
/frameworks/base/services/java/com/android/server/AppWidgetServiceImpl.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/services/java/com/android/server/AppWidgetServiceImpl.java
27b89e6658a0d233a53f5d7ca20dc57fec82d955 16-Jan-2013 Amith Yamasani <yamasani@google.com> Rename bindService to bindServiceAsUser to follow convention.

This is for the multi-user version of bindService, not the original.

Change-Id: Ib2de35941196accf387b1a276a77e6f9af805ec0
/frameworks/base/services/java/com/android/server/AppWidgetServiceImpl.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/services/java/com/android/server/AppWidgetServiceImpl.java
035352b4d62e259c86576dd3d1495b21bed172ff 29-Nov-2012 Adam Cohen <adamcohen@google.com> Merge "Making sure keyguard and homescreen only display eligible widgets (issue 7550090)" into jb-mr1.1-dev
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/services/java/com/android/server/AppWidgetServiceImpl.java
791f877473cc6b3e8e484b741012c95aba70c3b0 21-Nov-2012 Amith Yamasani <yamasani@google.com> Logging to help find the cause of widget crash in clock widget.

This will continue to crash as before, but will show some useful
information in the exception.

Bug: 7450247

Change-Id: Ib3160a5f64154517791d165973c12294ecd09901
/frameworks/base/services/java/com/android/server/AppWidgetServiceImpl.java
75b5cfb4a41030333820d072578a288d4ec9899c 16-Nov-2012 Michael Jurka <mikejurka@google.com> Delete appWidgetId when removing lockscreen widgets

Bug: 7550012

Change-Id: Ia9f5266256016eb91bfd6a2d5a7f910c42948f1e
/frameworks/base/services/java/com/android/server/AppWidgetServiceImpl.java
3fcc6b26c3302f47c911730f81cbc3dc9b71484d 15-Nov-2012 Adam Cohen <adamcohen@google.com> Making sure launcher doesn't show keyguard-only widgets (issue 7550090)

Change-Id: I5d0675f0c03677e06371a6730209c3466c6b0f15
/frameworks/base/services/java/com/android/server/AppWidgetServiceImpl.java
a1a2f967e2a0de4c4190a775ac314ad32288727e 01-Nov-2012 Adam Cohen <adamcohen@google.com> Pushing state persistence to a background thread

Change-Id: If776bc22c48525ba91dc7e4dd0e27de92612f2f5
/frameworks/base/services/java/com/android/server/AppWidgetServiceImpl.java
67a871d85732e582c70a2a1d85ef4419eb658a12 02-Nov-2012 Michael Jurka <mikejurka@google.com> Use clock's widget as the default keyguard widget

Also, if we have no widgets in lockscreen,
reinflate the default widget. If that fails,
inflate the built-in clock (KeyguardStatusView)

Change-Id: I2e90ab0893c993a755700e075e4a8ac5a685e0f2
/frameworks/base/services/java/com/android/server/AppWidgetServiceImpl.java
8f697d858098ec1e7bb7f84abcd15ba49e3e8927 01-Nov-2012 Adam Cohen <adamcohen@google.com> Stripping dead API related to keyguard widgets

Change-Id: Ieb6c57ef736712b3266de08027f9626104cdf1bb
/frameworks/base/services/java/com/android/server/AppWidgetServiceImpl.java
756901d82b41f50610a63b7cf4c7747a70f1f724 12-Oct-2012 Amith Yamasani <yamasani@google.com> Do cleanup when Stopping users

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
/frameworks/base/services/java/com/android/server/AppWidgetServiceImpl.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/services/java/com/android/server/AppWidgetServiceImpl.java
596b1850f39e6d4b2f4392dbfb591d99a73b7563 11-Oct-2012 Winson Chung <winsonc@google.com> Skip merge and assign RemoteViews directly if updateAppWidget() has not been called. (Bug 7214731)

Change-Id: Ie19b629deea9133800df265a2cebedc8bcb2a74d
/frameworks/base/services/java/com/android/server/AppWidgetServiceImpl.java
8320de8e29819963845d3d386d6d087844a5ae31 06-Oct-2012 Amith Yamasani <yamasani@google.com> Fix widget cross-talk between users due to Settings widget

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
/frameworks/base/services/java/com/android/server/AppWidgetServiceImpl.java
3ff2d867d46067132890a5a6ad68be8a4314d7f6 26-Sep-2012 Adam Cohen <adamcohen@google.com> Fixing AppWidgetService / AppWidgetHost to work in system process

-> Fixes issue 7208464
-> Fixed issue with partial update as well, should address
issue 7214731

Change-Id: Ib8d9d5bee68b4fa7d6b4fbbc2f6609c287689958
/frameworks/base/services/java/com/android/server/AppWidgetServiceImpl.java
98edc951712823dbf5db2b7e9c203a0e98fc616b 25-Sep-2012 Amith Yamasani <yamasani@google.com> Load resources for the correct user

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
/frameworks/base/services/java/com/android/server/AppWidgetServiceImpl.java
9b93f4def131845200997c861858f34cc15c8dee 24-Sep-2012 Michael Jurka <mikejurka@google.com> Merge "Fix security check for private allocateAppWidgetId api" into jb-mr1-dev
db38d8a4ff28caef8f2565a8ba5dca2a7efe9d83 22-Sep-2012 Adam Cohen <adamcohen@google.com> Fixing typos

Change-Id: I3d470a18bd14a4040dffb0b0d8a11e282546057e
/frameworks/base/services/java/com/android/server/AppWidgetServiceImpl.java
03bdc8a8f756a951b460b01cbd4d01c2ffd05041 22-Sep-2012 Michael Jurka <mikejurka@google.com> Fix security check for private allocateAppWidgetId api

Bug: 7182054
/frameworks/base/services/java/com/android/server/AppWidgetServiceImpl.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/services/java/com/android/server/AppWidgetServiceImpl.java
f229e4d3eb8f910c181f96416c6798f6f305a395 13-Sep-2012 Jim Miller <jaggies@google.com> Add support for settings for lock widgets

Change-Id: Iade094c6f32a7653bdbbd4921d345d68f2443ff4
/frameworks/base/services/java/com/android/server/AppWidgetServiceImpl.java
ca5e341574774379f157a4ea579a1732bd4cf7fb 14-Sep-2012 Michael Jurka <mikejurka@google.com> Fix bug with getting widget categories

Change-Id: I3b0f410707d37436732c45b572c2f588427a784f
/frameworks/base/services/java/com/android/server/AppWidgetServiceImpl.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/services/java/com/android/server/AppWidgetServiceImpl.java
61f57379ca2c5b6290c8da7548fa17128f7ab24f 31-Aug-2012 Amith Yamasani <yamasani@google.com> Centralize the creation of the user system directory

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
/frameworks/base/services/java/com/android/server/AppWidgetServiceImpl.java
f203aeef993b0f4ce65c9630d06bbd50a504e89f 30-Aug-2012 Amith Yamasani <yamasani@google.com> Enforce permissions for calls with specified userId

Fix a couple of places where incorrect userIds were being passed in.

Change-Id: I398c676e0488ff7e584be96e96c8b32652134238
/frameworks/base/services/java/com/android/server/AppWidgetServiceImpl.java
79af1dd54c16cde063152922b42c96d72ae9eca8 17-Aug-2012 Dianne Hackborn <hackbod@google.com> Switch public APIs to use new UserHandle class for identifying users.

Gets rid of "yet another integer" confusion.

Change-Id: Id07ea7307aea7c62f0087c6663a1f1c08e2e5dee
/frameworks/base/services/java/com/android/server/AppWidgetServiceImpl.java
f02b60aa4f367516f40cf3d60fffae0c6fe3e1b8 16-Aug-2012 Dianne Hackborn <hackbod@google.com> Rename UserId to UserHandle.

This is the start of turning this into a formal public API.

Change-Id: I5786d2c320f1de41a06ed5d0f65adb68967287a0
/frameworks/base/services/java/com/android/server/AppWidgetServiceImpl.java
b4163a6e12ee7100c758c6d3d062ade1f2843fce 03-Aug-2012 Dianne Hackborn <hackbod@google.com> Add APIs for interacting across users.

- 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
/frameworks/base/services/java/com/android/server/AppWidgetServiceImpl.java
39606a007a5b1309dd000234f2b8cf156c49fd0f 01-Aug-2012 Dianne Hackborn <hackbod@google.com> Make AtomicFile a public API. It's about time!

Change-Id: Ib34e294747405b7ab709cb0bbb2d9a0cc80ce86a
/frameworks/base/services/java/com/android/server/AppWidgetServiceImpl.java
a8b9defade5b937d4ad64f9aff4bca792298f43c 23-Jul-2012 Jeff Brown <jeffbrown@google.com> Stop using raw display size except in window manager.

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
/frameworks/base/services/java/com/android/server/AppWidgetServiceImpl.java
f08a8b78b61bc7f1a6a71c70da25ec3ef41b8cff 16-Jul-2012 Adam Cohen <adamcohen@google.com> Fixing issue where you couldn't set null RemoteViews for a widget

-> As noted here: http://code.google.com/p/android/issues/detail?id=35014

Change-Id: Id5d1c47b6961d4b448453d8b16700801c0137f2b
/frameworks/base/services/java/com/android/server/AppWidgetServiceImpl.java
4461f6028df664009c707b3dc1815b789171f4dc 10-Jul-2012 Winson Chung <winsonc@google.com> Merge "Fixing index-out-of-bounds in AppWidgetService. (Bug 6717459)"
a3195057fc5874d158cc8ea053aa75d5e016bdcf 25-Jun-2012 Winson Chung <winsonc@google.com> Fixing index-out-of-bounds in AppWidgetService. (Bug 6717459)

Change-Id: I9d676fbb2110f01eb1d36adc59437a6a5ec97cc2
/frameworks/base/services/java/com/android/server/AppWidgetServiceImpl.java
e1a1e40358c34d66152f7a252f10f9c9f103ac94 22-Jun-2012 Michael Jurka <mikejurka@google.com> am 037faad0: am ab779e0b: Merge "Increase bitmap memory cap for widgets (Bug 6597440)" into jb-dev

* commit '037faad0f437c5fdc5435c030ef03d61de75090f':
Increase bitmap memory cap for widgets (Bug 6597440)
e92aad432add317793a69a34eab5d271962df220 22-Jun-2012 Winson Chung <winsonc@google.com> Increase bitmap memory cap for widgets (Bug 6597440)

Change-Id: I4149b8c5f204f10ebf0ef1f8d03709c0559178d0
/frameworks/base/services/java/com/android/server/AppWidgetServiceImpl.java
7fbd28438c2322973c77f31f0721a24fe1c35039 13-Jun-2012 Winson Chung <winsonc@google.com> Updating AppWidgetHost to receive a callback when any appWidget has changed. (Bug 6602951)

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

Change-Id: I04e16223861a88d40ad757afa086a0f92e84493b
/frameworks/base/services/java/com/android/server/AppWidgetServiceImpl.java
dfed49a2852e9336e212f6934dcddec7dd743c26 02-May-2012 Adam Cohen <adamcohen@google.com> Merge "Changing app widget "extras" to "options" and another small API Review issue" into jb-dev
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/services/java/com/android/server/AppWidgetServiceImpl.java
e0eb39b54812b9403496f0d300395eee73ffa57a 01-May-2012 Amith Yamasani <yamasani@google.com> Fix a bug in appwidget migration to multiuser directory.

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
/frameworks/base/services/java/com/android/server/AppWidgetServiceImpl.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/services/java/com/android/server/AppWidgetServiceImpl.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/services/java/com/android/server/AppWidgetServiceImpl.java
135936072b24b090fb63940aea41b408d855a4f3 23-Mar-2012 Amith Yamasani <yamasani@google.com> User management and switching

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
/frameworks/base/services/java/com/android/server/AppWidgetServiceImpl.java
483f3b06ea84440a082e21b68ec2c2e54046f5a6 14-Mar-2012 Amith Yamasani <yamasani@google.com> Package restrictions per user

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
/frameworks/base/services/java/com/android/server/AppWidgetServiceImpl.java
67cf7d314b5b94db1a9f1c57140b6615b0ea8291 16-Feb-2012 Amith Yamasani <yamasani@google.com> Fix Power Control widget

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
/frameworks/base/services/java/com/android/server/AppWidgetServiceImpl.java
37ce3a8af6faab675319d0803b288ab1dddc76be 06-Feb-2012 Amith Yamasani <yamasani@google.com> Multi-user - wallpaper service

- 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
/frameworks/base/services/java/com/android/server/AppWidgetServiceImpl.java
742a67127366c376fdf188ff99ba30b27d3bf90c 04-May-2011 Amith Yamasani <yamasani@google.com> Multi-user - 1st major checkin

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
/frameworks/base/services/java/com/android/server/AppWidgetServiceImpl.java