History log of /frameworks/base/core/jni/android_util_AssetManager.cpp
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
fb5c3dba4ddac023cfd4cdcabdfdbcf343197c94 19-May-2012 Dianne Hackborn <hackbod@google.com> Fix issue #6440173: MenuItem.setIcon(Drawable) scaling incorrectly...

...when resource is aliased

We were not correctly using the final resolved configuration when
retrieving a drawable through Resources.getDrawable(). (It already
does the correct behavior when going through TypedArray.getDrawable()).

Change-Id: I9032b788b592412178e31e2e6b0181b92c20fe45
/frameworks/base/core/jni/android_util_AssetManager.cpp
b13b9bdad2baf6ad1ec2e56b6b7598fa20f55fc4 18-Feb-2012 Mathias Agopian <mathias@google.com> frameworks/base refactoring.

step 2: move libutils headers to their new home: androidfw

Change-Id: I14624ba23db92a81f2cb929f104386e1fab293ef
/frameworks/base/core/jni/android_util_AssetManager.cpp
129e19cb37b1d30f8c46f77a3853d347c3e78bb3 11-Jan-2012 Glenn Kasten <gkasten@google.com> Fix build warnings

Change-Id: I334e0a6e018bb1067c90e050cf3583c1057aacd9
/frameworks/base/core/jni/android_util_AssetManager.cpp
71f2cf116aab893e224056c38ab146bd1538dd3e 20-Oct-2011 Steve Block <steveblock@google.com> Rename (IF_)LOGV(_IF) to (IF_)ALOGV(_IF) DO NOT MERGE

See https://android-git.corp.google.com/g/#/c/143865

Bug: 5449033
Change-Id: I0122812ed6ff6f5b59fe4a43ab8bff0577adde0a
/frameworks/base/core/jni/android_util_AssetManager.cpp
161e67ff3ba26408eea09221734ad2e29a1eed11 20-May-2011 Dianne Hackborn <hackbod@google.com> resolved conflicts for merge of 06a8ceac to master

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

Change-Id: I0101e88ca9d8d44138bdcaf571f24b0352f4f6ce
/frameworks/base/core/jni/android_util_AssetManager.cpp
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/jni/android_util_AssetManager.cpp
a3804cf77f0edd93f6247a055cdafb856b117eec 12-Apr-2011 Elliott Hughes <enh@google.com> You don't need to poke around inside FileDescriptor manually.

We can help you with that.

Note also that getParcelFileDescriptorFD did no such thing. All its callers
were passing in a regular java.io.FileDescriptor and expecting the int. No
ParcelFileDescriptors involved.

Change-Id: Idc233626f20c092e719f152562601f406cc1b64a
/frameworks/base/core/jni/android_util_AssetManager.cpp
69a017bc1d1649350f830dfada5c6ed5eac0b770 08-Apr-2011 Elliott Hughes <enh@google.com> More JNI exception-throwing cleanup.

There are a few (unimportant) bug fixes here. There were several attempts to
throw exceptions in situations where there's already a pending exception.

There were also cases where the code was wrong; it was checking for a NULL
return from Get*ArrayElements and throwing NPE, but passing NULL is an error
that causes a crash and a NULL return means an exception has already been
thrown. I didn't want to get into the Scoped* classes just yet, but that
was by far the easiest way to fix this.

Change-Id: I0b31160ee51b96e82539f6514b8412b149dba7c3
/frameworks/base/core/jni/android_util_AssetManager.cpp
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/jni/android_util_AssetManager.cpp
c1318babb44dded89b88fb5df950b5cd6c6f83da 03-Mar-2011 Carl Shapiro <cshapiro@google.com> Establish a global reference before saving a class into a global.

A local reference is obtained to the string class for the purpose of
using it later in another routine to create string object arrays.
However, the local reference is invalid by the time it is next used.
Making the string class reference a global reference eliminates the
problem.

Change-Id: I8a04642e0ed3060f2fff2cb63996559f004aacff
/frameworks/base/core/jni/android_util_AssetManager.cpp
7fbe4d2e7445ad4db07a42c74fe2934af46d1c7f 20-Jan-2011 Kenny Root <kroot@google.com> Don't pay attention to string block on @null

When someone referenced an empty string by putting in the special value
"@null" the string block was kept, but when filtering themes this wasn't
filtered because the framework thought it was actually a null string.

Bug: 3000940
Change-Id: I1e9a0479ef761b3e388b562ae728c5da0f4b5deb
/frameworks/base/core/jni/android_util_AssetManager.cpp
ddb76c4644756b31be948d70aaa8ee541dd94999 24-Nov-2010 Kenny Root <kroot@google.com> Change assets to use 64-bit API

The asset system and supporting libraries were using off_t instead of
off64_t to access files larger than 2GB (32-bit signed). This change
replaces all off_t with off64_t and lseek64.

There is a new utils/Compat.h added for Mac OS compatibility.

Also fixed some size-related compiler warnings.

Bug: 3205336
Change-Id: I9097b3cb7a602e811fe52f245939d8975da55e9e
/frameworks/base/core/jni/android_util_AssetManager.cpp
d7c8672ccc8ccd1f99da60accc63d6817d41ac52 18-Nov-2010 Olivier Bailly <olivier@google.com> fix int vs. pointer mismatch in return statement.
Add missing include header for compilation on x86 target.

Change-Id: I3651fb3be0178b888c5ada3d3754fb379b55a847
/frameworks/base/core/jni/android_util_AssetManager.cpp
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/jni/android_util_AssetManager.cpp
0db187a3e62074af6a22802bded52a921f69e7df 27-Aug-2010 Gilles Debunne <debunne@google.com> Broken build. Missing ;

Change-Id: Ic266e491a73fb3df00e77111a4ad9f270741c28b
/frameworks/base/core/jni/android_util_AssetManager.cpp
4d4040b7b3c46ea29a42878c14b325f09f0029ad 27-Aug-2010 Gilles Debunne <debunne@google.com> Fix for 512 limit in assetManager.list

Also replaced all doThrow by jniThrow.

OutOfMemory after string creation were removed: should have been thrown before.

Bug http://b/issue?id=2949164

Change-Id: Idea8e27fdedeb43e3976776c477766e4dcdebcf8
/frameworks/base/core/jni/android_util_AssetManager.cpp
485dd21bbefde378c392da3de48887aee9fabebe 07-May-2010 Kenny Root <kroot@google.com> Prevent local reference table overflows

If we're grabbing references to many strings in a loop, we have to
remove our local references so we don't overflow the VM's local
reference table.

Also, use env->ExceptionCheck() instead of checking for NULL value
returns on trying to allocate new items.

Bug: 2663816
Change-Id: I9cb5e17f6181dbb2f2c03d53841b2f5d8ab10f68
/frameworks/base/core/jni/android_util_AssetManager.cpp
20cb56e26e91df91bd64d4251222e0d421cdbe47 04-Mar-2010 Dianne Hackborn <hackbod@google.com> Fix some bugs.

Bug #2376231: Apps lose window focus (and back key causes ANR) if the
lock screen is dismissed while the phone is in landscape mode

This is another case where we weren't recomputing the focused window
after changing the visibility policy.

bug #2479958: Investigate source of "Resources don't contain package
for resource number 0x7f0a0000"

Um, okay, so it turns out there were bugs all over the place where
we would load an XML resource from a another application, but not
use the Resources for that application to retrieve its resources...!
I think the only reason any of this stuff was working at all was
because it typically only cared about retrieving the resource
identifiers of the items (it would look up the values later).

Bug #2401082: Passion ERE26 monkey crash - InputMethodManagerService

Add some null checks.
/frameworks/base/core/jni/android_util_AssetManager.cpp
780d2a1b714724d85227141c76b3c64f543f00b4 23-Feb-2010 Kenny Root <kroot@google.com> Use UTF-8 strings to avoid duplicate caching, part 1

StringBlock instances containing UTF-8 strings use a cache to convert
into UTF-16, but using that cache and then using a JNI call to NewString
causes the UTF-8 string as well as two copies of the UTF-16 string to
be held in memory. Getting the UTF-8 string directly from the StringPool
eliminates one copy of the UTF-16 string being held in memory.

This is part 1. Part 2 will include ResXMLParser optimizations.

Change-Id: Ibd4509a485db746d59cd4b9501f544877139276c
/frameworks/base/core/jni/android_util_AssetManager.cpp
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/jni/android_util_AssetManager.cpp
dc4cc3f469097150921a20dac49a5ccb54f83788 06-Jan-2010 Joe Onorato <joeo@android.com> Stop spamming the log.
/frameworks/base/core/jni/android_util_AssetManager.cpp
b8d81679553ee33f6ae5281310abf2effca4ffcd 20-Nov-2009 Dianne Hackborn <hackbod@google.com> Debugging for issue #2228381 android.view.InflateException

Binary XML file line #37: Error inflating class <unknown> after adding a secondary account

Now that I have these debug logs, I want to keep them since they will make
debugging these kinds of issues a lot easier in the future. (Note in this
case there was no problem in the framework.)

Change-Id: If2b0bbeda4706b7c5dc1ba4a5db04b74f40e1543
/frameworks/base/core/jni/android_util_AssetManager.cpp
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/jni/android_util_AssetManager.cpp
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/jni/android_util_AssetManager.cpp
c4db95c077f826585d20be2f3db4043c53d30cf5 22-Jul-2009 Dianne Hackborn <hackbod@google.com> First pass at reworking screen density/size APIs.

This changes the names of the directories in aapt, to what you see
in the list of DpiTest resources. Also adds a new "long" configuration
for wide screens, which the platform sets appropriate, and introduces
a new kind of resizeability for not large but significantly larger
than normal screens which may have compatibility issues.
/frameworks/base/core/jni/android_util_AssetManager.cpp
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/jni/android_util_AssetManager.cpp
9066cfe9886ac131c34d59ed0e2d287b0e3c0087 04-Mar-2009 The Android Open Source Project <initial-contribution@android.com> auto import from //depot/cupcake/@135843
/frameworks/base/core/jni/android_util_AssetManager.cpp
d83a98f4ce9cfa908f5c54bbd70f03eec07e7553 04-Mar-2009 The Android Open Source Project <initial-contribution@android.com> auto import from //depot/cupcake/@135843
/frameworks/base/core/jni/android_util_AssetManager.cpp
d24b8183b93e781080b2c16c487e60d51c12da31 11-Feb-2009 The Android Open Source Project <initial-contribution@android.com> auto import from //branches/cupcake/...@130745
/frameworks/base/core/jni/android_util_AssetManager.cpp
f013e1afd1e68af5e3b868c26a653bbfb39538f8 18-Dec-2008 The Android Open Source Project <initial-contribution@android.com> Code drop from //branches/cupcake/...@124589
/frameworks/base/core/jni/android_util_AssetManager.cpp
54b6cfa9a9e5b861a9930af873580d6dc20f773c 21-Oct-2008 The Android Open Source Project <initial-contribution@android.com> Initial Contribution
/frameworks/base/core/jni/android_util_AssetManager.cpp