History log of /frameworks/base/core/java/android/content/res/AssetManager.java
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
ac85f90466dd60d2af8ffc3942d503a0de606726 11-Mar-2016 Alan Viverette <alanv@google.com> Ensure all Java-side usages of config flags are using Java flags

Previously we were using native config flags in some places that expected
Java flags, and vice-versa. All usages of config flags are now annotated
to ensure we're using the right type.

Cleans up annotations on most methods that were touched.

Bug: 21161798
Change-Id: Ifd87dfb12199fc8258915d8a510e03ddb681ca89
/frameworks/base/core/java/android/content/res/AssetManager.java
b7e3363359eea808a3225f5e9133175f2cf4106c 06-Jan-2016 Alan Viverette <alanv@google.com> Merge "Clean up asset manager package-private methods"
e273b93651785d0692e21d3f93f324aa496c4696 05-Jan-2016 Alan Viverette <alanv@google.com> Clean up asset manager package-private methods

Refactors duplicate code, flattens methods by inverting if blocks, updates
nullability annotations, fills out missing javadoc, uses consistent
variable names. No functional changes.

Change-Id: I4c3a139197697a9d6f6afc9c428a193c02fc777c
/frameworks/base/core/java/android/content/res/AssetManager.java
1c686f2ce6cbfa3fdb598f452aa31d38f3eb2320 18-Dec-2015 Roozbeh Pournader <roozbeh@google.com> Avoid matching system locales in locale negotiation

Also:
1. Add AssetManager method for finding non-system locales: This is
used in per-app locale negotiation. (Normally,
AssetManager#getLocales() returns both system and non-system
locales.)

2. Match pseudolocales correctly in locale negotiation.

Bug: 25800576
Bug: 26236938
Change-Id: I116caf3a91c290deb4ad68b291c65b7035b18dd4
/frameworks/base/core/java/android/content/res/AssetManager.java
0d02bd8442f6c062130aa6b9e6be5f87fddf7fb3 07-Nov-2015 Roozbeh Pournader <roozbeh@google.com> Removed unused setLocale() method.

The setLocale() method in android.content.res.AssetManager was not
used. Removing it to reduce maintenance cost.

Change-Id: I1b168fe84c2465d1ebc2b62bb965eda885e1220a
/frameworks/base/core/java/android/content/res/AssetManager.java
a6d7e3fb9c9233b9ae46b702d17433854c43d6a0 02-Sep-2015 Tao Bai <michaelbai@google.com> Load app resource as shared library.

- Added aapt command line flag --app-as-shared-lib to build app resources
that could be loaded as shared lib at runtime.
- Added new method AssetManager.addAssetPathAsSharedLibrary() to load an
app resource as shared library.

Bug 22487604

Change-Id: Ib9b33c35f9c2b7129f3ba205de03d4564623ea39
/frameworks/base/core/java/android/content/res/AssetManager.java
2349332f9f69189d7889692b9aafd6f80070e352 30-Jul-2015 Filip Gruszczynski <gruszczy@google.com> Only relaunch activity on significant size configuration changes.

Currently if the configuration width/height/smallest width changes, we
relaunch the activity or invoke onConfigurationChanged callback. When it
comes to size based configuration changes it might not be necessary: if
the size change doesn't pass one of the threshold defined by the
resources, it means there is no need to relaunch the activity.

In this CL the ActivityManager will receive the thresholds from the
application and use them to decide, whether to relaunch the activity.
The application reads the thresholds from the resources, specifically
from resource qualifiers used by the app.

Change-Id: Ie3cf0a172dc1ba0b865cf30c2962e7cfd9ad8436
/frameworks/base/core/java/android/content/res/AssetManager.java
e54d245b993e1347cb32c23a6bdc907a45fab324 06-May-2015 Alan Viverette <alanv@google.com> Improve keying for theme caches, rebase system theme on config change

Themes now use an array of applied styles rather than a String to store
their history. They are keyed based on a hash code computed from the
history of applied styles. The themed drawable cache has been abstracted
out into its own class.

Also updates system context to use DayNight as the default and ensures
that GlobalActions uses the correct context, which exercises the change.

CTS tests have been added in another CL.

Bug: 20421157
Change-Id: I9eb4b7dffd198ad24d02f656eaf0839570b59caa
/frameworks/base/core/java/android/content/res/AssetManager.java
c1d527926e1c82828e42bdc0c7abf50f6decc0a7 05-May-2015 Alan Viverette <alanv@google.com> Add API for obtaining changing configurations bitmask from Theme

Required to know when to reload the system context's theme in response
to configuration changes, and thus needed to support the DayNight theme.

Bug: 20267825
Change-Id: I7df5e28b7a6d8b611ea030032544cf4800788514
/frameworks/base/core/java/android/content/res/AssetManager.java
9438ad1599716176fb6c593e77a2e93b265bbcb5 03-Dec-2014 Adam Lesinski <adamlesinski@google.com> am e580d661: am e89a2865: Merge changes If2c7e09f,Ie21f227c

* commit 'e580d6617f67a1db5eff7ffe5450684cfc7e1a2b':
RRO idmap: pad with 0xffffffff, not 0x00000000
RRO: reintroduce lost ResTable insert of assets
11bce123b91cee70380bffa3fffa3c9d19ef3ebd 12-Nov-2014 Narayan Kamath <narayan@google.com> Add detailed javadoc for AssetManager.getLocales.

bug: 18218661
Change-Id: Idcbd8678b6dd1b28f993c4dab000e284db76edc0
/frameworks/base/core/java/android/content/res/AssetManager.java
30113131fb958850ef92c6a8f7f2aa2ed92a8ffe 07-Nov-2014 Mårten Kongstad <marten.kongstad@sonymobile.com> RRO: reintroduce lost ResTable insert of assets

With the recent introduction of AssetManager::appendPathToResTable,
overlay packages were not properly added to the AssetManager, and once
added, were not properly inserted into the ResTable.

Bug: 17765434
Change-Id: Ie21f227c654c98730f74a687d0e16ee2b80e747e
/frameworks/base/core/java/android/content/res/AssetManager.java
042ad633bc68bdda2bb0c50216706d73575a5992 04-Sep-2014 Jon Miranda <jonmiranda@google.com> Added getStyleAttributes to access all Theme attributes.

ViewDebug uses getStyleAttributes to get the attributes, and then gets the
attribute name and value so that Hierarchy Viewer can display it.

Bug: 17407087
Change-Id: I3577e32ae99668383701dc908bb46db14a75c3c4
/frameworks/base/core/java/android/content/res/AssetManager.java
7df3625d5bb28d11cce9ac23429f5e3c6ebac030 16-Jan-2014 Martin Kosiba <mkosiba@google.com> Allow for appending of resources to an AssetManager.

BUG: 11505352
Change-Id: Ifa290580a6dc63c2f471d0bbf5f066db14aed4d7
/frameworks/base/core/java/android/content/res/AssetManager.java
da96e137bcc8191c584ada7b5de31eaae92f244f 15-Jul-2014 Jeff Sharkey <jsharkey@android.com> Parse more split APK manifest details.

Allow split APKs to define activities, services, receivers,
providers, and metadata. However, support for many manifest items
are explicitly omitted.

Only dexopt split APKs that include code.

Bug: 14975160
Change-Id: I2fbf99e2a62328aa2185e5924755af33060282fc
/frameworks/base/core/java/android/content/res/AssetManager.java
de898ff42912bd7ca1bfb099cd439562496765a4 30-Jan-2014 Adam Lesinski <adamlesinski@google.com> Shared library resource support

Shared libraries can now export resources for applications
to use.

Exporting resources works the same way the framework exports
resources, by defining the public symbols in res/values/public.xml.

Building a shared library requires aapt to be invoked with the
--shared-lib option. Shared libraries will be assigned a package
ID of 0x00 at build-time. At runtime, all loaded shared libraries
will be assigned a new package ID.

Currently, shared libraries should not import other shared libraries,
as those dependencies will not be loaded at runtime.

At runtime, reflection is used to update the package ID of resource
symbols in the shared library's R class file. The package name of
the R class file is assumed to be the same as the shared library's
package name declared in its manifest. This will be customizable in
a future commit.

See /tests/SharedLibrary/ for examples of a shared library and its
client.

Bug:12724178
Change-Id: I60c0cb8ab87849f8f8a1a13431562fe8603020a7
/frameworks/base/core/java/android/content/res/AssetManager.java
52b999f0721b53e9c6e18a4bd664e89aeb65b2d5 25-Mar-2014 Alan Viverette <alanv@google.com> Implement APIs for obtaining, caching themed Drawables

When Drawables are inflated during preload (or otherwise without a theme)
they cache their themeable attributes in their constant state as an array
keyed on attribute index. Drawables inflated with a theme will simply
resolve theme attributes as part of normal inflation, and they will not
cache any themeable attributes.

Drawables obtained from Resources are pulled from theme-specific cache
when possible. If an unthemed Drawable exists in the preload cache, a
new constant state will be obtained for the Drawable and the theme will
be applied by resolving the cached themeable attributes and overwriting
their respective constant state properties. If no cached version exists,
a new Drawable is inflated against the desired theme.

Constant states from themed drawables may be cached if the applied theme
is "pure" and was loaded from a style resource without any subsequent
modifications.

This CL does not handle applying themes to several Drawable types, but it
fully supports BitmapDrawable, GradientDrawable, NinePatchDrawable,
ColorDrawable, and TouchFeedbackDrawable.

BUG: 12611005
Change-Id: I4e794fbb62f7a371715f4ebdf946ee5f9a5ad1c9
/frameworks/base/core/java/android/content/res/AssetManager.java
a393735a5d637d211713b2b580bdd16f8eba2f7d 27-Feb-2014 Narayan Kamath <narayan@google.com> am 2589067d: am 9fc8e6fe: am f61add84: am 2000fe58: Merge "Make getAssetInt throw unconditionally."

* commit '2589067d10b5f6a67eb1f789b4cf5943914dd9d2':
Make getAssetInt throw unconditionally.
2d19d202bdf6c16b8e01b73f3a742b2670bff907 25-Feb-2014 Narayan Kamath <narayan@google.com> Make getAssetInt throw unconditionally.

All callers have been moved over to getNativeAsset, and
this method has been hidden from the public API internally.

Change-Id: I5f29b5ddb4449adadf426e49a4085c7320289a15
/frameworks/base/core/java/android/content/res/AssetManager.java
d5c8044e7e1f1402fdd4a035690329294ab07b33 12-Feb-2014 Nick Kralevich <nnk@google.com> resolved conflicts for merge of 1cbea39f to master

Change-Id: Ib33484546c6a03cbc4cd96e97d9d785d68e10700
48d22323ce39f9aab003dce74456889b6414af55 31-Jan-2014 Mårten Kongstad <marten.kongstad@sonymobile.com> Runtime resource overlay, iteration 2

Support any number of overlay packages. Support any target package.

UPDATED PACKAGE MATCHING
------------------------
In Runtime resource overlay, iteration 1, only a single overlay package
was considered. Package matching was based on file paths:
/vendor/overlay/system/framework-res.apk corresponded to
/system/framework-res.apk. Introduce a more flexible matching scheme
where any package is an overlay package if its manifest includes

<overlay targetPackage="com.target.package"/>

For security reasons, an overlay package must fulfill certain criteria
to take effect: see below.

THE IDMAP TOOL AND IDMAP FILES
------------------------------
Idmap files are created by the 'idmap' binary; idmap files must be
present when loading packages. For the Android system, Zygote calls
'idmap' as part of the resource pre-loading. For application packages,
'idmap' is invoked via 'installd' during package installation (similar
to 'dexopt').

UPDATED FLOW
------------
The following is an outline of the start-up sequences for the Android
system and Android apps. Steps marked with '+' are introduced by this
commit.

Zygote initialization
Initial AssetManager object created
+ idmap --scan creates idmaps for overlays targeting 'android', \
stores list of overlays in /data/resource-cache/overlays.list
AssetManager caches framework-res.apk
+ AssetManager caches overlay packages listed in overlays.list

Android boot
New AssetManager's ResTable acquired
AssetManager re-uses cached framework-res.apk
+ AssetManager re-uses cached 'android' overlays (if any)

App boot
ActivityThread prepares AssetManager to load app.apk
+ ActivityThread prepares AssetManager to load app overlays (if any)
New AssetManager's ResTable acquired as per Android boot

SECURITY
--------
Overlay packages are required to be pre-loaded (in /vendor/overlay).
These packages are trusted by definition. A future iteration of runtime
resource overlay may add support for downloaded overlays, which would
likely require target and overlay signatures match for the overlay to
be trusted.

LOOKUP PRIORITY
---------------
During resource lookup, packages are sequentially queried to provide a
best match, given the constraints of the current configuration. If any
package provide a better match than what has been found so far, it
replaces the previous match. The target package is always queried last.

When loading a package with more than one overlay, the order in which
the overlays are added become significant if several packages overlay
the same resource.

Had downloaded overlays been supported, the install time could have been
used to determine the load order. Regardless, for pre-installed
overlays, the install time is randomly determined by the order in which
the Package Manager locates the packages during initial boot. To support
a well-defined order, pre-installed overlay packages are expected to
define an additional 'priority' attribute in their <overlay> tags:

<overlay targetPackage="com.target.package" priority="1234"/>

Pre-installed overlays are loaded in order of their priority attributes,
sorted in ascending order.

Assigning the same priority to several overlays targeting the same base
package leads to undefined behaviour. It is the responsibility of the
vendor to avoid this.

The following example shows the ResTable and PackageGroups after loading
an application and two overlays. The resource lookup framework will
query the packages in the order C, B, A.

+------+------+- -+------+------+
| 0x01 | | ... | | 0x7f |
+------+------+- -+------+------+
| |
"android" Target package A
|
Pre-installed overlay B (priority 1)
|
Pre-installed overlay C (priority 2)

Change-Id: If49c963149369b1957f7d2303b3dd27f669ed24e
/frameworks/base/core/java/android/content/res/AssetManager.java
90b8eaa68bda6beaf2ff886c3ed642e7050e3ff6 31-Jan-2014 Narayan Kamath <narayan@google.com> am 797b5adc: am 77a1986c: am 49b7ba4d: Merge "AArch64: Make AssetManager and related classes 64-bit compatible"

* commit '797b5adcb4ead3c687db3d9fd831dff93760dd4a':
AArch64: Make AssetManager and related classes 64-bit compatible
896043d67d3ac75760bd99db8a1561e31ebee1e1 17-Jan-2014 Ashok Bhat <ashok.bhat@arm.com> AArch64: Make AssetManager and related classes 64-bit compatible

Following changes have been done:

[x] Long is used to store native pointers as pointers can be
64-bit.

[x] AssetManager openAsset native function returned -1 if
file name was empty and java function considered any
non-zero value as success. This has been fixed by native
function throwing Illegal Argument Exception as well.

[x] AssetManager incRefsLocked and decRefsLocked now accept
long as input to support 64-bit native references.

[x] AssetManager incRefsLocked method incorrecly used
'this.hashCode()' instead of the passed parameter id.
This has been fixed.

[x] Some minor changes have been done to conform with
standard JNI practice (e.g. use of jint instead of int
in JNI function prototypes)

Change-Id: I095b9f900d49e51f43ad6afc47cbc23116a6a64a
Signed-off-by: Ashok Bhat <ashok.bhat@arm.com>
Signed-off-by: Craig Barber <craig.barber@arm.com>
Signed-off-by: Kévin PETIT <kevin.petit@arm.com>
/frameworks/base/core/java/android/content/res/AssetManager.java
01664b3709451d287f30a68fcb8f599e8dc484a5 24-Jan-2014 Narayan Kamath <narayan@google.com> am 5d094b94: am aa43eb51: am 7866f2fc: am 8005b9af: am 3c30eff6: Merge "Remove unused field from AssetManager."

* commit '5d094b947b328d2631a0203c1527b0c7c20ce219':
Remove unused field from AssetManager.
2f756cbb5aeb1f4dcbcb28baa0fbd0a478e7371b 22-Jan-2014 Narayan Kamath <narayan@google.com> Remove unused field from AssetManager.

This field was introduced in commit 4bdd33b81a17 but wasn't
used there (or since).

Change-Id: I0615e98b8990d42da6b85f8094ab19eb0465fd9e
/frameworks/base/core/java/android/content/res/AssetManager.java
2ba4efff8bece69f95401768e48db1b20afd077d 16-Jan-2014 Narayan Kamath <narayan@google.com> Hide AssetInputStream.getAssetInt (Take 2)

This reverts commit b1bd1fe7fd9ed6b6e4518713ef5f5716a84d97e8.
/frameworks/base/core/java/android/content/res/AssetManager.java
6606d16e097480e061546306cc95a729f5dccae8 16-Jan-2014 Narayan Kamath <narayan@google.com> am 6706888e: am 775667c0: am 03e8be75: am 8796ab7f: am bb35356d: Merge changes Id54087dd,I946325e4,I2a2b2e68

* commit '6706888e24aee04c2c914c44e5ef5b1510cf8013':
AArch64: Use long for pointers in BitmapRegionDecoder
AArch64: Use long for pointers in Movie class
AArch64: Add AssetInputStream.getNativeAsset
a0545dd54fdab5b284b509b7121515f15f4d728a 14-Jan-2014 Ashok Bhat <ashok.bhat@arm.com> AArch64: Add AssetInputStream.getNativeAsset

This patch adds AssetInputStream.getNativeAsset. This function
returns asset pointer, which can then be passed to JNI functions.
Note that this function is hidden and not part of Android API.

This function will eventually replace getAssetInt,
once all the classes that use getAssetInt are changed
to use getNativeAsset instead.

Change-Id: I2a2b2e6864f1f57ae2b3a10c45559b3635266ed5
Signed-off-by: Ashok Bhat <ashok.bhat@arm.com>
/frameworks/base/core/java/android/content/res/AssetManager.java
3a248a14938cc723942e68fc06ed2589efb53a4b 14-Jan-2014 Narayan Kamath <narayan@google.com> am ec70f809: am d34950cf: am 80b0496a: am 2db26788: am e71afc2e: Merge "Revert "Hide AssetInputStream.getAssetInt.""

* commit 'ec70f8091185cd68afd4fcda42b513111eae70e4':
Revert "Hide AssetInputStream.getAssetInt."
b1bd1fe7fd9ed6b6e4518713ef5f5716a84d97e8 14-Jan-2014 Narayan Kamath <narayan@google.com> Revert "Hide AssetInputStream.getAssetInt."

This reverts commit 842d44ec1765e01f4a37af99cc1935b4d0399758.

Change-Id: I188e49d3651fd4941491c239b6a7c9f475995187
/frameworks/base/core/java/android/content/res/AssetManager.java
842d44ec1765e01f4a37af99cc1935b4d0399758 10-Jan-2014 Narayan Kamath <narayan@google.com> Hide AssetInputStream.getAssetInt.

It returns a pointer to a private data structure, so there's
no sensible use for it. Also, the emergence of 64 bit processors
means that the return value isn't wide enough to represent
values in the native heap.

(cherry picked from commit f8f09a15a409f373f22aa475bb0defd264088e4f)

Change-Id: I9c9b5bae6db8638e65dda60f924aa3dddd06813a
/frameworks/base/core/java/android/content/res/AssetManager.java
f8f09a15a409f373f22aa475bb0defd264088e4f 10-Jan-2014 Narayan Kamath <narayan@google.com> Hide AssetInputStream.getAssetInt.

It returns a pointer to a private data structure, so there's
no sensible use for it. Also, the emergence of 64 bit processors
means that the return value isn't wide enough to represent
values in the native heap.

Change-Id: If02d42a528b9d90f11cb25c3342404b7d5f7b625
/frameworks/base/core/java/android/content/res/AssetManager.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/res/AssetManager.java
f7be4800df28d7cb6a96003046bf90245e7054ab 12-Apr-2013 Dianne Hackborn <hackbod@google.com> Add new resources trace, also trace apk dex loading.

Change-Id: Ia48566efb21ee018659bd976ddb3a0f4997b9a3a
/frameworks/base/core/java/android/content/res/AssetManager.java
7f9f99ea11051614a7727dfb9f9578b518e76e3c 11-Aug-2011 Xavier Ducrohet <xav@android.com> Make some methods/fields package private so that layoutlib can access them.

Change-Id: I4aeadfbaf8a4f6a459fa19937c21ac23d9e5fb64
/frameworks/base/core/java/android/content/res/AssetManager.java
161e67ff3ba26408eea09221734ad2e29a1eed11 20-May-2011 Dianne Hackborn <hackbod@google.com> resolved conflicts for merge of 06a8ceac to master

Change-Id: Id51574c825affddfac14ad7214c5496d6a3d6e69
06a8ceacb0dc2713cb0bb2c93d2a750f2a58db68 20-May-2011 Dianne Hackborn <hackbod@google.com> am c851ea56: am 69cb8757: Add new "-swNNNdp" resource qualifier.

* commit 'c851ea5672f6e042c2e89b2a2ce4a2467e1fcd2a':
Add new "-swNNNdp" resource qualifier.
69cb87576ba163b61bb0e6477a3b7c57a9b11d40 20-May-2011 Dianne Hackborn <hackbod@google.com> Add new "-swNNNdp" resource qualifier.

Change-Id: I0101e88ca9d8d44138bdcaf571f24b0352f4f6ce
/frameworks/base/core/java/android/content/res/AssetManager.java
2e4a3236a7634d17f89288e9739a438ecbea0471 13-May-2011 Dianne Hackborn <hackbod@google.com> am 46a282f3: am 0ed2e845: Merge "DO NOT MERGE. Integrate add new screen width/height in "dp" configs." into honeycomb-mr2

* commit '46a282f323bc05606e4fe1eba795bd9ac7c99819':
DO NOT MERGE. Integrate add new screen width/height in "dp" configs.
ebff8f92f13513ce37bd74759eb1db63f2220590 13-May-2011 Dianne Hackborn <hackbod@google.com> DO NOT MERGE. Integrate add new screen width/height in "dp" configs.

You can now specify resource configuration variants "wNNNdp"
and "hNNNdp". These are the minimum screen width/height in "dp"
units. This allows you to do things like have your app adjust
its layout based only on the about of horizontal space available.

This introduces a new configuration change flag for screen size.
Note that this configuration change happens each time the orientation
changes. Applications often say they handle the orientation change
to avoid being restarted at a screen rotation, and this will now
cause them to be restarted. To address this, we assume the app can
handle this new config change if its target SDK version is < ICS.

Change-Id: I4acb73d82677b74092c1da9e4046a4951921f9f4
/frameworks/base/core/java/android/content/res/AssetManager.java
b7642cbae40aa6b1c54e5b39ed046f7f52e327d9 26-Apr-2011 Jean-Baptiste Queru <jbq@google.com> am 31418a1e: am 45e13ec1: am 5fcfce96: am 4b72eec3: Merge "Re-assingning local variable if mStringBlocks was initialized here. NPE is thrown otherwise."

* commit '31418a1e9b905593587d8bf7a4705429db549d97':
Re-assingning local variable if mStringBlocks was initialized here. NPE is thrown otherwise.
31418a1e9b905593587d8bf7a4705429db549d97 26-Apr-2011 Jean-Baptiste Queru <jbq@google.com> am 45e13ec1: am 5fcfce96: am 4b72eec3: Merge "Re-assingning local variable if mStringBlocks was initialized here. NPE is thrown otherwise."

* commit '45e13ec1c5cd765162b7450b1c3a4632e8979894':
Re-assingning local variable if mStringBlocks was initialized here. NPE is thrown otherwise.
41a5ed7cd9f56d955a797a485c11ae5e7ccfb094 19-Apr-2011 Jozef BABJAK <jozef.babjak@gmail.com> Re-assingning local variable if mStringBlocks was initialized here. NPE is thrown otherwise.

Change-Id: Ic8648aa5ae6a61348803171243c1c217feb058ec
/frameworks/base/core/java/android/content/res/AssetManager.java
43a17654cf4bfe7f1ec22bd8b7b32daccdf27c09 07-Apr-2011 Joe Onorato <joeo@google.com> Remove the deprecated things from Config.java. These haven't been working since before 1.0.

Change-Id: Ic2e8fa68797ea9d486f4117f3d82c98233cdab1e
/frameworks/base/core/java/android/content/res/AssetManager.java
3fc982f41fda1f254bfbc35490d81cd82a0ed90a 31-Mar-2011 Dianne Hackborn <hackbod@google.com> Add new resource configurations for screen width/height in "dp".

You can now specify resource configuration variants "wNNNdp"
and "hNNNdp". These are the minimum screen width/height in "dp"
units. This allows you to do things like have your app adjust
its layout based only on the about of horizontal space available.

This introduces a new configuration change flag for screen size.
Note that this configuration change happens each time the orientation
changes. Applications often say they handle the orientation change
to avoid being restarted at a screen rotation, and this will now
cause them to be restarted. To address this, we assume the app can
handle this new config change if its target SDK version is < ICS.

Change-Id: I22f8afa136b4f274423978c570fa7c9855040496
/frameworks/base/core/java/android/content/res/AssetManager.java
55fc850cf992cdcb0993cb109d2f716613c0dbdd 28-Oct-2010 Kenny Root <kroot@google.com> Add path to get different DPI drawables

Allow a caller to request a different density than their current display
allows. This can mean a device displaying mdpi can get a resource that's
in hdpi and have it pretend to be in mdpi resolution. If a drawable
that's returned is not in the requested density, it will set it at the
appropriate density to be scaled up later on.

The API for this is hidden currently.

Bug: 3134688
Change-Id: I6c3908cbdef4907b8d3f1576df9e3b0e7af1755a
/frameworks/base/core/java/android/content/res/AssetManager.java
6cce32b6adbb3a9725fc730ba0e0068a74657e60 13-Jul-2010 Christopher Tate <ctate@google.com> Add native C APIs for working with the Asset Manager

Change-Id: I493b142c4b35e5cc1a1e85283bb5dfb306a6d261
/frameworks/base/core/java/android/content/res/AssetManager.java
c3b91fd26a940f8cee54888f91b490cb1768b03c 24-Feb-2010 Dianne Hackborn <hackbod@google.com> Fix crash in PendingIntentRecord debug output.

Add null checks to a few places to avoid crashes when dumping
debug data.

Also add some sanity checks for accessing content providers in
the activity manager.
/frameworks/base/core/java/android/content/res/AssetManager.java
27b28b3f62bd3b54fa13acd5d035940b9be464f3 09-Feb-2010 Tobias Haamel <haamel@google.com> Introduce special UI modes for night and car usage.

The device mode is now called ui mode. Furthermore is the order of
precedence for the resources now in such a way that the ui mode needs
to be specified after the orientation and before the density.

The ui mode can be set, like it is done for the locale, as follows:

IActivityManager am = ActivityManagerNative.getDefault();
Configuration config = am.getConfiguration();
config.uiMode = Configuration.UI_MODE_TYPE_CAR | Configuration.UI_MODE_NIGHT_ANY;
am.updateConfiguration(config);

To allow users to disable the car mode and set the night mode the IUiModeManager
interface is used.

The automatic night mode switching will be added in a separate change.
/frameworks/base/core/java/android/content/res/AssetManager.java
3a19833750de7f8872ad44892054e409b2d77614 22-Jan-2010 Kenny Root <kroot@google.com> Multiple asset adding in one shot for AssetManager

Add a hidden convenience method to allow adding multiple assets
to an AssetManager at once.

Change-Id: I56753a85904a2c8e9a405cba2ea3cb85ec40e1cc
/frameworks/base/core/java/android/content/res/AssetManager.java
60d7db4c3e3d60060e7ac021445ea1f510b7a1fb 17-Nov-2009 Dianne Hackborn <hackbod@google.com> Fix #2262593: 42 ANR reports from android.process.acore

There was a lock in AssetManager that purported to be per-instance (mSync)
but was actually static. A lot of code used it like it was per-instance,
but this would actually block all instances. This is now changed to fix
the name and make everything except the actual static data lock on the
specific AssetManager instance.

Change-Id: Ie8e9ad60f962184e76b2301f7a2790d0c2487063
/frameworks/base/core/java/android/content/res/AssetManager.java
8cae124af2142687a6833dbaab8a43df6dd67b43 10-Sep-2009 Dianne Hackborn <hackbod@google.com> Various cleanup around resources and nine-patches.

Remove the stuff that doesn't use preloaded drawables when in
compatibility mode, since this works fine ever since we were able
to deal with drawables in a different density than the canvas.

Change the snapshot function on View to return a snapshot at
the same size that will actually be drawn on screen (when in
compatibility mode), to be able to show scaling artifacts and
all.

This change was original an attempt to fix issue #2101917: Text
field edges appears to be improperly rounded. That turns out to
probably be something deeper in the graphics system, but also
included here is the debugging code I did to try to track down the
problem to make it easy to turn on again later.

Change-Id: I34bfca629639c7ff103f3989d88874112ef778d9
/frameworks/base/core/java/android/content/res/AssetManager.java
82e1ee93eece8fb0aec6acc3ef4ee7b1c86feec7 12-Aug-2009 Dianne Hackborn <hackbod@google.com> Fix issue #2048263: More debugging information

We now hopefully do better about generating the anr reports, and include
information about the malloc loaded assets in meminfo.
/frameworks/base/core/java/android/content/res/AssetManager.java
0d221012ff5fd314711c00ed30e9b807b9c454c1 30-Jul-2009 Dianne Hackborn <hackbod@google.com> Fix #2018814: System cannot correctly render assets with "wrap_content" attribute in QVGA

It turns out we were not returning the density for anything retrieved from a
TypedArray... which basically means any bitmap references from a layout or style...!!!

This is now fixed.

Also fiddle with the density compatibility mode to turn on smoothing in certain situations,
helping the look of things when they need to scale and we couldn't do the scaling at
load time.
/frameworks/base/core/java/android/content/res/AssetManager.java
723738cfaec3dd7b0fe152c872c41bebf94074c4 26-Jun-2009 Dianne Hackborn <hackbod@google.com> Expand support for different screen sizes.

Applications can now declare that they support small, normal, or
large screens. Resource selection can also be done based on these
sizes. By default, pre-Donut apps are false for small and large,
and Donut or later apps are assumed to support all sizes. In either
case they can use <supports-screens> in their manifest to declare
what they actually support.
/frameworks/base/core/java/android/content/res/AssetManager.java
b2a3dd88a53cc8c6d19f6dc8ec4f3d6c4abd9b54 09-Mar-2009 The Android Open Source Project <initial-contribution@android.com> auto import from //branches/cupcake/...@137197
/frameworks/base/core/java/android/content/res/AssetManager.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/res/AssetManager.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/res/AssetManager.java
54b6cfa9a9e5b861a9930af873580d6dc20f773c 21-Oct-2008 The Android Open Source Project <initial-contribution@android.com> Initial Contribution
/frameworks/base/core/java/android/content/res/AssetManager.java