History log of /frameworks/base/core/java/android/content/ContextWrapper.java
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
fd854ee58c5d56f84047007ead9f88a767ae956f 14-Jul-2015 Dianne Hackborn <hackbod@google.com> Fix issue #21626564: MMS should be receivied while Dozing

We now place whoever is receiving the MMS on the temporary
whitelist while doing so, so they can get network access to
download it.

There was also an issue that needed to be fixed where we
were no longer updating the list of allowed uids while
dozing based on their proc states... we now do that.

Also did a bit of optimization of the temp white list update
path do the network policy manager, instead of going through
a broadcast we now directly call in to the network policy
manager. This also allows us to have a synchronous version
of updating the list, so we can know the app has network access
before we tell it to do anything.

Finally added battery stats events for things going on and off
the whitelist so we can diagnose the behavior there.

Change-Id: Ic7fe010af680034d9f8cb014bb135b2addef7455
/frameworks/base/core/java/android/content/ContextWrapper.java
d4fd8c766da8a70e3359bbc7efbbc79496efe71a 14-Jul-2015 Fyodor Kupolov <fkupolov@google.com> Added sendBroadcastMultiplePermissions method

Added Context.sendBroadcastMultiplePermissions(Intent intent, String[]
receiverPermissions) method, which allows an array of required permissions
to be enforced.

Bug: 21852542
Change-Id: I27c9130e8f004b428452501ebc8a36aabde1f343
/frameworks/base/core/java/android/content/ContextWrapper.java
e37520b49da8fc2b7b7501c6dbbe1e6ac984dd9f 15-Jul-2015 Fyodor Kupolov <fkupolov@google.com> Revert "Allow array of required permissions in sendBroadcast"

This reverts commit b4e7283c9afd9fb15ebd63f6ce9b75c9c1af658b.

Change-Id: Ie8390964bda5bdfa869cee8f46584043d8e7c664
/frameworks/base/core/java/android/content/ContextWrapper.java
b4e7283c9afd9fb15ebd63f6ce9b75c9c1af658b 14-Jul-2015 Fyodor Kupolov <fkupolov@google.com> Allow array of required permissions in sendBroadcast

Added Context.sendBroadcast(Intent intent, String[] receiverPermissions)
method, which allows an array of required permissions to be enforced.

Bug: 21852542
Change-Id: I3b8ff258fa9f3249c344bb8093b820b24eef00c0
/frameworks/base/core/java/android/content/ContextWrapper.java
a750a63d639f6936af456df904fa6b9ba941885e 17-Jun-2015 Dianne Hackborn <hackbod@google.com> Fix issue #21814207 and issue #21814212 (alarm manager)

Issue #21814207: AlarmManager.setAndAllowWhileIdle should also allow wake locks.

Introduce a whole new infrastructure for providing options when
sending broadcasts, much like ActivityOptions. There is a single
option right now, asking the activity manager to apply a tempory
whitelist to each receiver of the broadcast.

Issue #21814212: Need to allow configuration of alarm manager parameters

The various alarm manager timing configurations are not modifiable
through settings, much like DeviceIdleController. Also did a few
tweaks in the existing DeviceIdleController impl.

Change-Id: Ifd01013185acc4de668617b1e46e78e30ebed041
/frameworks/base/core/java/android/content/ContextWrapper.java
16a16899505ec0a9ede5b76650bfb8817b3227c7 16-Apr-2015 Svet Ganov <svetoslavganov@google.com> Add OP_READ_PHONE_STATE app op - framework

The READ_PHONE_STATE permission protects PII information and
is in the Phone group. This change is adding the corrseponding
app op for gating access to the API guarded by READ_POHNE state
which will be used instead as an access control for legacy apps.

Change-Id: I2ff895a5a0e529f26ec0ad706266a30d829268ba
/frameworks/base/core/java/android/content/ContextWrapper.java
d5bf3ed9b0138e9fd305da91386d1df03f9a75cc 27-Mar-2015 Clara Bayarri <clarabayarri@google.com> Show and trigger activities that implement Text Processing actions

This CL adds the Activities that support Intent.ACTION_PROCESS_TEXT
to the Text Selection Action Mode in Editor, and triggers an intent
with the currently selected text when they are selected.

It also adds the required mechanism to allow a View to request an
intent to be started, and return the activity result back to it.

Change-Id: I62ec618010edf01da41338c8c1a7dd4292a15227
/frameworks/base/core/java/android/content/ContextWrapper.java
c6d1c345f41cf817bf2c07c97b97107d94296064 26-Feb-2015 Svetoslav <svetoslavganov@google.com> Runtime permissions: per user permission tracking.

Before all permissions were granted at install time at once, so the user
was persented with an all or nothing choice. In the new runtime permissions
model all dangarous permissions (nomal are always granted and signature
one are granted if signatures match) are not granted at install time and
the app can request them as necessary at runtime.

Before, all granted permission to an app were identical for all users as
granting is performed at install time. However, the new runtime model
allows the same app running under two different users to have different
runtime permission grants. This change refactors the permissions book
keeping in the package manager to enable per user permission tracking.

The change also adds the app facing APIs for requesting runtime permissions.

Change-Id: Icbf2fc2ced15c42ca206c335996206bd1a4a4be5
/frameworks/base/core/java/android/content/ContextWrapper.java
6e53931f49f49245deef8622eb8e7dc6ccf04536 25-Feb-2015 Jeff Brown <jeffbrown@google.com> Add Context.getSystemService(Class<?>).

Added an overload of getSystemService() that takes a class instead of a
service name to eliminate the extra cast and provide more type safety.

Cleaned up docs.

Removed the default constructor of BatteryManager which should not have
existed.

Change-Id: I9da46b20641fc83ecd3342560e5b94cb721f289c
/frameworks/base/core/java/android/content/ContextWrapper.java
ff17024e583b170312d82089fd358d278ce16c9a 19-Nov-2014 Dianne Hackborn <hackbod@google.com> Fix issue with call backs from media process.

All but a few lines of this is for issue #16013164, which allowed
apps to do some operations as the media uid by having it call
back to them to open a file. The problem here is with the tempory
identity stuff in the activity manager, allowing us to make the open
call as the original caller... ideally we should figure out a way
to just get rid of all of that, but the solution here is actually
easier (even though it doesn't look it) -- we now hand a token over
to the openFile() call that it can use when doing permission checks
to say "yes I would like the check to be against whoever is responsible
for the open". This allows us to do the uid remapping for only this
one specific set of permission checks, and nothing else.

Also fix issue #17487348: Isolated services can access system services
they shouldn't be able to. Don't send any system service IBinder objects
down for the first initialization of an isolated process.

Change-Id: I3c70e16e0899d7eef0bae458e83958b41ed2b75e
/frameworks/base/core/java/android/content/ContextWrapper.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/content/ContextWrapper.java
4ed745d359ada6986ac15d8718452e5c55f40170 16-Jul-2014 Jeff Sharkey <jsharkey@android.com> Add code cache directory for apps.

This provides a directory where apps can cache compiled or optimized
code generated at runtime. The platform will delete all files in
this location on both app and platform upgrade.

Bug: 16187224
Change-Id: I641b21d841c436247f35ff235317e3a4ba520441
/frameworks/base/core/java/android/content/ContextWrapper.java
a7835b6b6b00923b608a6bc3194e7840f67de7a8 12-Jul-2014 Christopher Tate <ctate@google.com> Add Context.getNoBackupFilesDir()

This is an app-private filesystem space exactly like the one
reported by Context.getFilesDir(), with one exception: files
placed here are never backed up by the full-backup infrastructure.
If an app attempts to back up any of its contents via the normal
API it's immediately ignored with a logged warning.

The restriction is also enforced on the restore side, because
apps using support libraries might wind up creating full backup
archives containing no_backup subdirs on pre-L devices (via
adb backup, Helium, &c.). We check for this before passing the
restore data to the app, and drop it if we detect the situation
so that the app never sees the bits.

Bug 16240573

Change-Id: I11216a391f1d32117ec7ce15aafc9cd93d0337de
/frameworks/base/core/java/android/content/ContextWrapper.java
2ee3c1e189819cc6efb4d7de24f1438bdb824087 31-May-2014 Jeff Sharkey <jsharkey@android.com> Per-app media directories on external storage.

This change defines per-app directories on external storage that
will be scanned and included in MediaStore. This gives apps a way
to write content to secondary shared storage in a way that can
easily be surfaced to other apps.

Bug: 14382377
Change-Id: I4cb367c870509e76f0c2c598f01e2f699780030a
/frameworks/base/core/java/android/content/ContextWrapper.java
3cf75729d5a27b8ddd1ea174626dbcf0349a1d07 16-May-2014 Amith Yamasani <yamasani@google.com> Variant of sendBroadcast with appOp flag for cross-user.

Needed for delivering SMS notifications to multiple users.

Change-Id: Ib772292699aba37144621742e6f0ee5c68aadd78
/frameworks/base/core/java/android/content/ContextWrapper.java
6090995951c6e2e4dcf38102f01793f8a94166e1 19-Nov-2013 John Spurlock <jspurlock@google.com> Remove unused imports from frameworks/base.

Change-Id: Ia1f99bd2c1105b0b0f70aa614f1f4a67b2840906
/frameworks/base/core/java/android/content/ContextWrapper.java
95d785346b4dae808a2d8f77356175e55a572d96 11-Sep-2013 Dianne Hackborn <hackbod@google.com> Fix issue #10688644: Java crash in com.android.phone:

java.lang.SecurityException: Operation not allowed

There was a situation I wasn't taking into account -- components
declared by the system has a special ability to run in the processes
of other uids. This means that if that code loaded into another
process tries to do anything needing an app op verification, it will
fail, because it will say it is calling as the system package name but
it is not actually coming from the system uid.

To fix this, we add a new Context.getOpPackageName() to go along-side
getBasePackageName(). This is a special call for use by all app ops
verification, which will be initialized with either the base package
name, the actual package name, or now the default package name of the
process if we are creating a context for system code being loaded into
a non-system process.

I had to update all of the code doing app ops checks to switch to this
method to get the calling package name.

Also improve the security exception throw to have a more descriptive
error message.

Change-Id: Ic04f77b3938585b02fccabbc12d2f0dc62b9ef25
/frameworks/base/core/java/android/content/ContextWrapper.java
1abdb7123025e52512b2ed7a518f8c754c35f50a 12-Aug-2013 Jeff Sharkey <jsharkey@android.com> APIs for multiple external storage devices.

Provide developer APIs to discover application-specific paths on
secondary external storage devices. Covers files, cache, and OBB
directories. Apps will not have write access outside their package-
specific directories on secondary devices, so only primary storage is
exposed through Environment.

Creation of .nomedia files will be handled by FUSE daemon in future
change.

Change-Id: Ifcce6201a686d80269d7285adb597c008cf8fa7c
/frameworks/base/core/java/android/content/ContextWrapper.java
48d0d1886731ff19ed3fb47a5997be5df0d1bba8 11-Jun-2013 Craig Mautner <cmautner@google.com> Add activity token to display system.

First step in adding activity specific information to displays.
Replace CompatibilityInfoHolder with DisplayAdjustmentsHolder that
holds an activity token in addition to the CompatibilityInfo.

Change-Id: Ie113cd8dd9c62e0b5311204e039a4829096bea68
/frameworks/base/core/java/android/content/ContextWrapper.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/content/ContextWrapper.java
f51f61269aacdfcf737b2c32b6b216c48ab61e65 05-Feb-2013 Dianne Hackborn <hackbod@google.com> App ops: new operations for SMS.

Implementation required a new framework feature
to associate an app op with a broadcast.

Change-Id: I4ff41a52f7ad4ee8fd80cbf7b394f04d6c4315b3
/frameworks/base/core/java/android/content/ContextWrapper.java
d8e1dbb6bc1fbaf4f2e38c3ba92ced94270deaac 18-Jan-2013 Dianne Hackborn <hackbod@google.com> Rework ParceledListSlice to be much easier to use.

Take advantage of this to return better information about
packages filtered by permissions -- include the permissions
they have in the requested array.

Also fix issue #8026793 (Contact picture shows default pic
while searching for a contact in qsb) by using the base
package name of the Context when reporting the app name
of an operation. Otherwise you could make a resource-only
context for another application and do calls through that
and get reported as the wrong app.

Change-Id: I5e0488bf773acea5a3d22f245641828e1a106fb8
/frameworks/base/core/java/android/content/ContextWrapper.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/core/java/android/content/ContextWrapper.java
ea7e91514ee1968d15713e82a5cca745e2c46a05 25-Sep-2012 Amith Yamasani <yamasani@google.com> AppInfo from Notifications for secondary users

Required wiring up startActivitiesAsUser()

Bug: 7224950

Also fix a bug in navigateUp in secondary user

Change-Id: I114ae2de0457362d62e899fdb94b12239a3eb778
/frameworks/base/core/java/android/content/ContextWrapper.java
6d51571835737c7502a2e111ee9dc2527ebad984 21-Sep-2012 Jeff Sharkey <jsharkey@android.com> Allow acquiring ContentProviders across users.

Otherwise services like SystemUI will always open content://-style
Uris as USER_OWNER. Surfaces through createPackageContextAsUser()
which points all ContentResolver operations towards a given user.

Start using in RemoteViews, so that Notifications correctly resolve
image Uris to the sending user. Also add user support for "content"
shell tool.

Bug: 7202982
Change-Id: I8cb7fb8a812e825bb0b5833799dba87055ff8699
/frameworks/base/core/java/android/content/ContextWrapper.java
20e809870d8ac1e5b848f2daf51b2272ef89bdfc 01-Sep-2012 Dianne Hackborn <hackbod@google.com> Add registering for explicit users.

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
/frameworks/base/core/java/android/content/ContextWrapper.java
a492c3a7b2c18426fd0cb4d017eacbc368195dc5 24-Aug-2012 Jeff Brown <jeffbrown@google.com> Initial draft of high-level multi-display APIs.

This patch introduces the ability to create a Context that
is bound to a Display. The context gets its configuration and
metrics from that display and is able to provide a WindowManager
that is bound to the display.

To make it easier to use, we also add a new kind of Dialog
called a Presentation. Presentation takes care of setting
up the context as needed and watches for significant changes
in the display configuration. If the display is removed,
then the presentation simply dismisses itself.

Change-Id: Idc54b4ec84b1ff91505cfb78910cf8cd09696d7d
/frameworks/base/core/java/android/content/ContextWrapper.java
5ac72a29593ab9a20337a2225df52bdf4754be02 30-Aug-2012 Dianne Hackborn <hackbod@google.com> Improve multi-user broadcasts.

You can now use ALL and CURRENT when sending broadcasts, to specify
where the broadcast goes.

Sticky broadcasts are now correctly separated per user, and registered
receivers are filtered based on the requested target user.

New Context APIs for more kinds of sending broadcasts as users.

Updating a bunch of system code that sends broadcasts to explicitly
specify which user the broadcast goes to.

Made a single version of the code for interpreting the requested
target user ID that all entries to activity manager (start activity,
send broadcast, start service) use.

Change-Id: Ie29f02dd5242ef8c8fa56c54593a315cd2574e1c
/frameworks/base/core/java/android/content/ContextWrapper.java
7767eac3232ba2fb9828766813cdb481d6a97584 24-Aug-2012 Dianne Hackborn <hackbod@google.com> Keep track of whether an app is installed for each user.

This add a new per-user state for an app, indicating whether
it is installed for that user.

All system apps are always installed for all users (we still
use disable to "uninstall" them).

Now when you call into the package manager to install an app,
it will only install the app for that user unless you supply
a flag saying to install for all users. Only being installed
for the user is just the normal install state, but all other
users have marked in their state for that app that it is not
installed.

When you call the package manager APIs for information about
apps, uninstalled apps are treated as really being not visible
(somewhat more-so than disabled apps), unless you use the
GET_UNINSTALLED_PACKAGES flag.

If another user calls to install an app that is already installed,
just not for them, then the normal install process takes place
but in addition that user's installed state is toggled on.

The package manager will not send PACKAGE_ADDED, PACKAGE_REMOVED,
PACKAGE_REPLACED etc broadcasts to users who don't have a package
installed or not being involved in a change in the install state.
There are a few things that are not quite right with this -- for
example if you go through a full install (with a new apk) of an
app for one user who doesn't have it already installed, you will
still get the PACKAGED_REPLACED messages even though this is
technically the first install for your user. I'm not sure how
much of an issue this is.

When you call the existing API to uninstall an app, this toggles
the installed state of the app for that user to be off. Only if
that is the last user user that has the app uinstalled will it
actually be removed from the device. Again there is a new flag
you can pass in to force the app to be uninstalled for all users.

Also fixed issues with cleaning external storage of apps, which
was not dealing with multiple users. We now keep track of cleaning
each user for each package.

Change-Id: I00e66452b149defc08c5e0183fa673f532465ed5
/frameworks/base/core/java/android/content/ContextWrapper.java
98365d7663cbd82979a5700faf0050220b01084d 20-Aug-2012 Jeff Brown <jeffbrown@google.com> Refactor for multi-display support.

Split WindowManagerImpl into two parts, the WindowManager
interface implementation remains where it is but the global
communications with the window manager are now handled by
the WindowManagerGlobal class. This change greatly simplifies
the challenge of having separate WindowManager instances
for each Context.

Removed WindowManagerImpl.getDefault(). This represents the
bulk of this change. Most of the usages of this method were
either to perform global functions (now handled by WindowManagerGlobal)
or to obtain the default display (now handled by DisplayManager).

Explicitly associate each new window with a display and make
the Display object available to the View hierarchy.

Add stubs for some new display manager API features.

Start to split apart the concepts of display id and layer stack.
since they operate at different layers of abstraction.
While it's true that each logical display uniquely corresponds to a
surface flinger layer stack, it is not necessarily the case that
they must use the same ids. Added Display.getLayerStack()
and started using it in places where it was relatively easy to do.

Change-Id: I29ed909114dec86807c4d3a5059c3fa0358bea61
/frameworks/base/core/java/android/content/ContextWrapper.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/core/java/android/content/ContextWrapper.java
756220bd1912535840388a6743830d2e59ad4964 15-Aug-2012 Dianne Hackborn <hackbod@google.com> Add API to create new contexts with custom configurations.

This allows you to, say, make a Context whose configuration
is set to a different density than the actual density of the device.

The main API is Context.createConfigurationContext(). There is
also a new API on ContextThemeWrapper that allows you to apply
an override context before its resources are retrieved, which
addresses some feature requests from developers to be able to
customize the context their app is running in.

Change-Id: I88364986660088521e24b567e2fda22fb7042819
/frameworks/base/core/java/android/content/ContextWrapper.java
258848d2ae04f447ff1c18023fa76b139fcc0862 11-Aug-2012 Amith Yamasani <yamasani@google.com> User Manager service to manage users and query user details

Moved a bunch of methods from PackageManager to UserManager.

Fix launching of activities from recents to correct user.

Guest creation APIs

Change-Id: I0733405e6eb2829675665e225c759d6baa2b708f
/frameworks/base/core/java/android/content/ContextWrapper.java
8264408f5995534f8e3147b001664ea0df52aaa5 03-Aug-2012 Amith Yamasani <yamasani@google.com> Start the correct settings from the status bar.

Added a new method to Context: startActivityAsUser() requiring the
INTERACT_ACROSS_USERS_FULL permission.

Show the correct Recents list, based on current user.
Added a getRecentTasksForUser() in ActivityManager. Hidden and requires
the INTERACT_ACROSS_USERS_FULL permission.

Change-Id: If5b56465efdd3ead36601a3b51ed4af157bbf35c
/frameworks/base/core/java/android/content/ContextWrapper.java
7d19e0242faac8017033dabb872cdf1542fa184c 08-Aug-2012 Dianne Hackborn <hackbod@google.com> More mult-user API work.

- You can now use android:singleUser with receivers and providers.
- New API to send ordered broadcasts as a user.
- New Process.myUserHandle() API.

For now I am trying out "user handle" as the name for the numbers
representing users.

Change-Id: I754c713ab172494bb4251bc7a37a17324a2e235e
/frameworks/base/core/java/android/content/ContextWrapper.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/core/java/android/content/ContextWrapper.java
a4972e951bf2bdb7afdafee95b3ab0c15b8bacae 14-Mar-2012 Dianne Hackborn <hackbod@google.com> Add new "options" argument to all startActivity APIs.

This will be used to allow new features to be requested... such as,
say, a special kind of animation. Right now there are no options
defined.

Change-Id: I4eb6f27275cdd4bf186f6da316ab93a2372ad4b7
/frameworks/base/core/java/android/content/ContextWrapper.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/core/java/android/content/ContextWrapper.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/core/java/android/content/ContextWrapper.java
805fd7ee0e5dc2939e85c84f78d9890a51982bc0 17-Jan-2011 Dianne Hackborn <hackbod@google.com> Add API to get path to OBBs.

Also hide the bitmap thumbnail stuff, we can't support it in its
current form.

And fix some bugs with propagating paths to native code. Yikes!

Change-Id: I13ab37ddbdba5c073489cba5eab035117d3c1574
/frameworks/base/core/java/android/content/ContextWrapper.java
247fe74c934cb3fba85aae7e051a8044f460fb11 09-Jan-2011 Dianne Hackborn <hackbod@google.com> Implement issue # 3255887 could CursorLoader offer...

...to throttle contentobserver-based requeries

Why yes, I guess it could.

This also reworks AsyncTaskLoader to not generate multiple
concurrent tasks if it is getting change notifications before
the last background task is complete.

And removes some of the old APIs that had been deprecated but
need to be gone for final release.

And fixes a few little problems with applying the wrong theme
in system code.

Change-Id: Ic7a665b666d0fb9d348e5f23595532191065884f
/frameworks/base/core/java/android/content/ContextWrapper.java
621e17de87f18003aba2dedb719a2941020a7902 23-Nov-2010 Dianne Hackborn <hackbod@google.com> Implement issue #3221502: New APIs to support new back stack / task navigation

What this adds:

- A new Intent activity flag to completely replace an existing task.
- A new Intent activity flag to bring the current home task up behind
a new task being started/brought to the foreground.
- New versions of startActivity() that take an array of Intents to be
started, allowing applications to start a task in a specific state.
- A public moveTaskToFront() method on ActivityManager, with a new flag
that allows the caller to have the task moved to the front with the
current home task immediately behind it.

Change-Id: Ie8028d09acffb5349d98043c67676daba09f75c8
/frameworks/base/core/java/android/content/ContextWrapper.java
74f170f9468d3cf6d7d0ef453320141a3e63571b 02-Jun-2010 Vasu Nori <vnori@google.com> new API in Context. on openDatabase, new param DatabaseErrorHandler

add new method openOrCreateDatabase in Context.java to allow
callers specify a DatabaseErrorHandler object to be used when
database corruption occurs.
add new constructor in SQLiteOpenHelper to accept DatabaseErrorHandler
as an additional param to be used when SQLiteDatabase instance is
created.

Change-Id: I912a0202a74510f9ca0206dd8101c4abab9102ae
/frameworks/base/core/java/android/content/ContextWrapper.java
e83cefcef07f9ac025642c1ffec76b4c7ab39cf2 05-Feb-2010 Dianne Hackborn <hackbod@google.com> New external storage APIs.

This implements the spec for external storage organization, and
properly reflects how the media scanner organizes the files it finds.

Also includes package manager support for removing app private
files from external storage when the application is uninstalled.

For the new APIs and paths, the main place to look is Environment
and Context.
/frameworks/base/core/java/android/content/ContextWrapper.java
efa199f016985b0a9d0471e42c803ee9f7941f0e 19-Sep-2009 Dianne Hackborn <hackbod@google.com> Add API to send an ordered sticky broadcast.

Change-Id: Ida7081204e226db0cd07ff618c08e308a909ec0c
/frameworks/base/core/java/android/content/ContextWrapper.java
fa82f22f1d8c4c828bdf9b670006be4f4fec772e 18-Sep-2009 Dianne Hackborn <hackbod@google.com> Fix issue #2093608: Calendar widget takes a few seconds to launch

Avert your eyes!

The key change here is that RemoteViews can now call a Context API to
start its pending intent, which inside of the activity manager we can
use to determine to cancel the timeout delay for external entities
to disrupt the home screen.

Change-Id: If097cf7478cbed7a3c04a304050bd7fd5703d197
/frameworks/base/core/java/android/content/ContextWrapper.java
7f2054392e9957d3ba8579ef08c29cfb27df564e 28-Jul-2009 Dianne Hackborn <hackbod@google.com> Updates from API review.

* AccessibilityService -- document onBind() to not be implemented.
* GestureLibrary.getLearner() -- needs to be hidden.
* IntentSender -- remove protected constructors, document that it is retrieved from a PendingIntent.
* Hide permissions: SHUTDOWN, STOP_APP_SWITCHES.
* Context -- hide BACKUP_SERVICE.
* ContextWrapper -- hide getSharedPrefs bla h blah
* Intent.parseUri() -- fix docs.
* ApplicationInfo.FLAG_TEST_ONLY?!?
* Hide MockContext.getSharedPrefs blah blah
/frameworks/base/core/java/android/content/ContextWrapper.java
870e09fcd2dfdc12ac318962efd28b0420c562bb 07-Jul-2009 Romain Guy <romainguy@android.com> Fixes #1963229. Introduces Context#isRestricted().

A restricted Context is a special type of Context that prevents specific features
from being used. For instance, android:onClick, used by View, can be dangerous when
used from within apps widgets. By using a restricted Context to inflate apps widgets,
widgets providers are prevented from using android:onClick.
/frameworks/base/core/java/android/content/ContextWrapper.java
5c1e00b14d2ef10ec76abf3e951fa8003a67f558 19-Jun-2009 Dianne Hackborn <hackbod@google.com> Fix targetSdkVersion, make resize mode a flag, delayed dexopt, easy ApplicationInfo.

- Fix a bug where targetSdkVersion could not be set if minSdkVersion. Stupid, stupid.
Also make sure to fail if minSdkVersion is for a code name. Really stupid.

- Change the API for resize compatibility mode to be a bit in the flags field, instead
of a separate boolean.

- Implement delayed dexopting, to avoid the looong full dexopt during boot. This is
only enabled for "eng" builds. When in this mode, the activity manager will make
sure that a dexopt has been done before loading an .apk into a process, and will
try to avoid displaying ANRs if they are due to the dexopt causing some operation
to take longer than it normally would (though I make no guarantees about this
totally working).

- Add API to Context to get the ApplicationInfo for its package, for easy access to
things like targetSdkVersion.
/frameworks/base/core/java/android/content/ContextWrapper.java
23ecae3bbb60c5af940f3a22170d75eb6ac05b69 11-Jun-2009 Joe Onorato <joeo@android.com> Fix SharedPrefsBackupHelper so it doesn't hard code the paths to the files.

This took quite a bit of refactoring.
/frameworks/base/core/java/android/content/ContextWrapper.java
9189cabb0b6c6c28232fe6f412b7ba7a37352a6a 03-Jun-2009 Mitsuru Oshima <oshima@google.com> * Moved supports-density tag under manifest
* Refactored Compatibility code
* Added CompatibilityInfo class
* Removed getApplicationScale from Context
* Added Resources#getCompatibilityInfo so that RootView can get the compatibility info w/o going through Context
* Expandable support
* Added expandable tag under manifest
* Old application w/o expandable is given the default screen size ([320, 480] x density).
* The non-expandable window is centered.
/frameworks/base/core/java/android/content/ContextWrapper.java
8169daed2f7a8731d478b884b1f455c747b88478 29-Apr-2009 Mitsuru Oshima <> AI 147976: Compatibility mode support. Part 2.
* Introduced ApplicationScale (may not be good name. CompatibilityScale? CanvasScale? Pls let me know if you have better idea)
* Changes to RootView / SurfaceView
- Makes the app believe it's running in the supported density/resolution.
- Makes the window manager believe it's running at the right density/resolution.
* Added methods to Rect/Event for scaling up/down.
Known issues:
* certain kind of images (such as nine patch for buttons) seesm to be loaded not by app, thus does not take the scale into account,
which, in turn, is causing layout issue.
* ZoomButton in MapView is rendered in wrong place
* Transparent region on Surface is not correct
* Specifying different densities in one process is not working.
BUG=1770627

Automated import of CL 147976
/frameworks/base/core/java/android/content/ContextWrapper.java
9066cfe9886ac131c34d59ed0e2d287b0e3c0087 04-Mar-2009 The Android Open Source Project <initial-contribution@android.com> auto import from //depot/cupcake/@135843
/frameworks/base/core/java/android/content/ContextWrapper.java
d83a98f4ce9cfa908f5c54bbd70f03eec07e7553 04-Mar-2009 The Android Open Source Project <initial-contribution@android.com> auto import from //depot/cupcake/@135843
/frameworks/base/core/java/android/content/ContextWrapper.java
54b6cfa9a9e5b861a9930af873580d6dc20f773c 21-Oct-2008 The Android Open Source Project <initial-contribution@android.com> Initial Contribution
/frameworks/base/core/java/android/content/ContextWrapper.java