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.
A small optimization to the resource code, to not re-parse the framework
resources every time we build a new AssetManager. Instead, you can now
construct a ResTable from a previously created one... of course, like the
existing code for using the data in-place, you can't delete the original
ResTable until you have deleted the one that has been constructed from it.
It turns out this was not a problem in the resource code at all. Rather,
the system process has a cache of pre-loaded attributes it uses to avoid
continually reloading things as it needs them. Well it turns out this
cache wasn't flushed after a package was uninstalled or a configuration
changed, so you could re-install an app where you change its style resources
so its theme now points to one that is inconsistent in the cache.
This is mostly a problem for developers, where they continually install
new versions of an app where resources have changed. This could possibly
show up when updating an app on a normal phone, although the problem would
eventually correct itself since this cache uses weak references.
Anyway, the cache is now reworked to be flushed appropriately.
This change also includes an update to aapt to be able to dump the
contents of bags in resources.
* changes:
Better (and less) logging from backup.
Add an extra null terminator. String8::unlockBuffer is supposed to be doing this, but it's not and I can't figure out why. This makes BackupHelperDispatcher able to read the keys correctly.
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.
This change adds a fixed-size metadata block at the head of each file's content
entity. The block is versioned, and fixed-size on the theory that it might be
nice to be able to recover the content (if not the full metadata) of the files
if we're ever confronted with data backed up some hypothetical future helper
that stored expanded metadata.
The net effect is that now on restore, we assign the same access mode to the
file that it originally had when backed up.
Also, some of the code was failing to properly free transient heap-based buffers
when it encountered errors. This has been fixed with the addition of a tiny
stack-based object whose job it is to free() its designated pointer from its
destructor.
This change puts the file's access mode into the saved-state blob used by the
file backup helpers. The tests have been updated for the new blob content
format.
What this change *doesn't* do is actually backup/restore the file mode. This
change is a prerequisite for that, but mode preservation in backup/restore will
require adding metadata to the backup data stream itself, so will be approached
a bit more carefully.
(Also fixed one outright bug in the test program: ReadEntityData() had been
changed to return a ssize_t union of either a byte-count or a negative number
indicating error, but the test program was still assuming that nonzero == error,
and was spuriously failing.)
The aapt tool now reports all available densities like it already did
for locales. Also this includes more resource data output, which I
was using to examine bug #1867049 (which at this point I am unable to
reproduce).
Added missing include sys/time.h for utimes.
Detects when stat64 uses a timespec for the modif and access times
and work around the missing st_*time_nsec.
Apologies for the whitespace changes, emacs removed them automatically.
There was a serious problem in the Bundle(Parcel) and readFromParcel() methods,
where it wasn't doing the copying of the Parcel that Parcel.readBundle() does
and is a basic requirement for it to work correctly.
This re-arranges the code to make all of these functions (hopefully) correct.
Also fix a problem in Parcel where we were not duping fds when copying data from
one Parcel to another.
commit 012b56fc607cf243cf4b29cb2a5f172bcbe0aecd
Author: Robert Greenwalt <robdroid@android.com>
Date: Wed Apr 22 14:31:26 2009 -0700
Additional fixes and tests for density.
commit 91fdc8e187551ae69e0029a4325fb3ad38fe411b
Author: Robert Greenwalt <robdroid@android.com>
Date: Tue Apr 14 14:39:00 2009 -0700
Fix runtime resource selection logic.
Fix isBetterThan so that o or this may be supperior at any stage.
Used to only handle this-better or tie at each stage, biasing against o.
Also allows reset of unit test to succeed. Fixes bug 1709202.