213 Commits

Author SHA1 Message Date
Adam Lesinski
e89a286541 Merge changes If2c7e09f,Ie21f227c
* changes:
  RRO idmap: pad with 0xffffffff, not 0x00000000
  RRO: reintroduce lost ResTable insert of assets
2014-12-02 22:52:37 +00:00
Elliott Hughes
9d074a1fb7 We HAVE_LITTLE_ENDIAN.
Change-Id: I5b5d0ef3f91fe84d629d2ddac436bd22019edfd4
2014-11-21 23:36:45 -08:00
Elliott Hughes
4da9dc5a62 bionic's struct stat is now POSIX-compliant.
One less hack needed...

Bug: 18298106
Change-Id: I1e9e5ebf329bd6cbaf3445201f182793ee4871ce
2014-11-10 10:48:25 -08:00
Andreas Gampe
25df5fba3a Frameworks/base: Fix more warnings
Exposed by switching the target to Clang, and GCC 4.9 used by
MIPS.

Change-Id: Icb79285ab2306c39c2d381e53ea2e643ee2d2947
2014-11-07 22:24:57 -08:00
Andreas Gampe
2204f0bf56 Frameworks/base: Wall Werror in libs/androidfw
Turn on -Wall -Werror in libs/androidfw. Fix warnings. Refactor
some code.

Change-Id: I66fe54ace433c15dee5de328b149ca142f74b2dd
2014-11-07 13:35:05 -08:00
Mårten Kongstad
96198ebae8 RRO idmap: pad with 0xffffffff, not 0x00000000
In the new idmap format (version 0x1), 0x00000000 no longer represents a
non-existing entry: 0xffffffff should be used instead.

Bug: 17765434
Change-Id: If2c7e09feba2224eeafe88fd9230e6392d81b9a7
2014-11-07 16:08:04 +01:00
Mårten Kongstad
30113131fb 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
2014-11-07 16:07:42 +01:00
Bill Yi
5a71f83227 Merge lmp-dev-plus-aosp-without-vendor into stage-aosp-master
Change-Id: I7063b7b52e9c09a57eb6bf3b4ffa3716d58ebf43
2014-10-22 09:00:49 -07:00
Dan Albert
00b4e773ab More LOCAL_ADDITIONAL_DEPENDENCIES.
Change-Id: I9bf20507442b0722e93446fdb32d8236be974e28
2014-10-21 08:58:39 -07:00
Adam Lesinski
73587de154 am aeef612f: Merge "Search all packages for a given type string when looking up resources by name" into lmp-dev
* commit 'aeef612f200b6b5cee214230271e1c3d718151ee':
  Search all packages for a given type string when looking up resources by name
2014-10-09 19:15:36 +00:00
Adam Lesinski
e60a87f552 Search all packages for a given type string when looking up resources by name
Previously we would stop at the first match when looking for a type string,
but we should search all packages in case a feature Split added a type
with the same name.

Bug:17924027

Change-Id: I6bc7ef073324db99448538cd8bdf566658f066ff
2014-10-09 11:26:19 -07:00
Adam Powell
e4275843fe am c6a06d43: Merge "Revert "Fix issue with using locally defined attrs in a shared lib"" into lmp-dev
* commit 'c6a06d437cf2ee7926a01b2f8ee685555bfb3d81':
  Revert "Fix issue with using locally defined attrs in a shared lib"
2014-10-01 22:37:27 +00:00
Adam Powell
908c748096 Revert "Fix issue with using locally defined attrs in a shared lib"
This reverts commit 5069dd69898bd0d9c69ba2bbd37239ec8d1c9dc6.

The reverted commit caused issues loading resources supplied by static libraries.

Bug 17748356

Change-Id: I860a4f31451ee7c03c02974826472a67226b029f
2014-10-01 18:11:18 +00:00
Adam Lesinski
d388b1fdde am cd8e7381: Merge "Fix issue with using locally defined attrs in a shared lib" into lmp-dev
* commit 'cd8e73817d14798f9d2031ffd301a03a096b7907':
  Fix issue with using locally defined attrs in a shared lib
2014-10-01 00:44:31 +00:00
Adam Lesinski
5069dd6989 Fix issue with using locally defined attrs in a shared lib
The attribute name resource IDs were never fixed up with
the runtime package ID so we weren't finding attributes
whenever the runtime package ID was different than the build
time one, which happened to be when a shared lib referenced itself
(0x00 vs 0x02).

Bug:17666947
Change-Id: Icf3e874bcea0e27eebe42d60fbed626a34bf9266
2014-09-30 16:18:09 -07:00
Dan Albert
ece13f90ed resolved conflicts for merge of 8791ebf0 to lmp-dev-plus-aosp
Change-Id: I9d0f81003f84d03a7a67420dd496fde18dd654d4
2014-09-19 15:37:15 -07:00
Adam Lesinski
8d2556f0de am 8bdb265f: am 19f9d54f: Merge "Fix backwards compat problem with AAPT public attrs" into lmp-dev
* commit '8bdb265f0a73bc6f2114ca70f141c214a23696c7':
  Fix backwards compat problem with AAPT public attrs
2014-09-19 18:37:15 +00:00
Adam Lesinski
82a2dd8efe Fix backwards compat problem with AAPT public attrs
AAPT has traditionally assigned resource IDs to public attributes,
and then followed those public definitions with private attributes.

--- PUBLIC ---
| 0x01010234 | attr/color
| 0x01010235 | attr/background

--- PRIVATE ---
| 0x01010236 | attr/secret
| 0x01010237 | attr/shhh

Each release, when attributes are added, they take the place of the private
attributes and the private attributes are shifted down again.

--- PUBLIC ---
| 0x01010234 | attr/color
| 0x01010235 | attr/background
| 0x01010236 | attr/shinyNewAttr
| 0x01010237 | attr/highlyValuedFeature

--- PRIVATE ---
| 0x01010238 | attr/secret
| 0x01010239 | attr/shhh

Platform code may look for private attributes set in a theme. If an app
compiled against a newer version of the platform uses a new public
attribute that happens to have the same ID as the private attribute
the older platform is expecting, then the behavior is undefined.

We get around this by detecting any newly defined attributes (in L),
copy the resource into a -v21 qualified resource, and delete the
attribute from the original resource. This ensures that older platforms
don't see the new attribute, but when running on L+ platforms, the
attribute will be respected.

We still need to address this problem in the platform moving forward,
as this will only help us in the transition from pre L to L.

Bug:17520380
Change-Id: Ia2a985798b50006c21c7c3431d30d9598f27cd91
2014-09-18 14:05:24 -07:00
Dan Albert
bcaaebb8a8 Merge "Clean up test makefiles." 2014-09-11 23:21:14 +00:00
Dan Albert
715d01aedf Clean up test makefiles.
The build system takes care of linking the correct STL and gtest
libraries for you, and specifying them manually confuses the build
system when using libc++.

Change-Id: I9f76ab26a63ace51293614cfb5ca002f37438e02
2014-09-11 15:49:57 -07:00
Dan Albert
20ec4fa229 resolved conflicts for merge of 6c585756 to lmp-dev-plus-aosp
Change-Id: I5a25f2bac44ac5efcd7462af91005e09680a1d96
2014-09-08 22:25:54 -07:00
Dan Albert
2ffa4aabd7 Merge "Use char16_t for char things." 2014-09-09 04:30:35 +00:00
Dan Albert
f348c15ecf Use char16_t for char things.
When compiling in C++ mode, the compiler will complain about conversions
from uint16_t to char16_t. Be consistent in using char16_t for strings.

Change-Id: I052b6176ced635162920b31560052d9a64f92764
2014-09-08 18:30:08 -07:00
Adam Lesinski
d299fef90c am a7e85db1: am fe622efc: Merge "Add test to ensure themes get copied from separate resource tables" into lmp-dev
* commit 'a7e85db12557c0480e3836c414519b28331d502c':
  Add test to ensure themes get copied from separate resource tables
2014-08-29 23:53:37 +00:00
Adam Lesinski
9d9cc6233c Add test to ensure themes get copied from separate resource tables
Change-Id: I94e9966cf1e9d0e7e6c7daa0606a87bb0f67705e
2014-08-29 14:34:54 -07:00
Adam Lesinski
1ff88036da am 0f885328: am b9095bac: Merge "Clean up test allocations so real memory leaks are more visible" into lmp-dev
* commit '0f885328bc54e896d0f3cdf2faf25abaab95bece':
  Clean up test allocations so real memory leaks are more visible
2014-08-29 20:05:19 +00:00
Adam Lesinski
d79e33379d Clean up test allocations so real memory leaks are more visible
Change-Id: Ic405f08c8d8e3e7fc4e4a991671e980752c19899
2014-08-29 12:29:31 -07:00
Adam Lesinski
ec187b726b am 1ec1f85d: am 995c771f: Merge "Fix memory leak in ResTable" into lmp-dev
* commit '1ec1f85d6ebab39f3aad6f426e0fe0aeca2b04bb':
  Fix memory leak in ResTable
2014-08-29 18:49:14 +00:00
Adam Lesinski
343cabb316 am 60f193fb: am e0cfbb61: Merge "Stamp platform version code into app Apks" into lmp-dev
* commit '60f193fbe905f65750503cdaf8616d31c85016d6':
  Stamp platform version code into app Apks
2014-08-29 18:48:33 +00:00
Adam Lesinski
a9aa9f0458 Merge "Fix memory leak in ResTable" into lmp-dev 2014-08-29 05:27:49 +00:00
Adam Lesinski
7f668d03ce Fix memory leak in ResTable
We were basically never cleaning any of the
cached bags... oops :S

Bug:16683269
Change-Id: Ic0a44218f660e16fbaac8df1d61ce6f1fdb0018b
2014-08-28 18:32:32 -07:00
Adam Lesinski
ad2d07d2d9 Stamp platform version code into app Apks
The versionCode of theframework resources that an app is built against
gets stamped inside an app's AndroidManifest.xml in the <manifest>
tag as "platformBuildVersionCode" and "platformBuildVersionName"
attributes.

Bug:17207635
Change-Id: Id573c3dffcbca38eec9c0eb3e89f4a547e3361d3
2014-08-27 18:28:49 -07:00
Adam Lesinski
6d41a45679 am 1d3ecf16: am 1c959e92: Merge "Introduce anydpi density resource qualifier" into lmp-dev
* commit '1d3ecf16766d92ef3d847f1420b9a622e871f6cd':
  Introduce anydpi density resource qualifier
2014-08-26 17:23:35 +00:00
Adam Lesinski
31245b4f06 Introduce anydpi density resource qualifier
This is meant to be used with scaleable vector
drawables, and are chosen as the best match unless
there is a configuration that matches the density
requested exactly.

Bug:17007265
Change-Id: Ic3288d0236fe0bff20bb1599aba2582c25b0db32
2014-08-25 17:47:30 -07:00
Adam Lesinski
ad2d935763 am c931d0d8: am fcb42104: Merge "AAPT: Fix regression generating dynamic ref table for shared libraries" into lmp-dev
* commit 'c931d0d8540f7648d5bb247fa1b03e492363debb':
  AAPT: Fix regression generating dynamic ref table for shared libraries
2014-08-21 17:48:33 +00:00
Adam Lesinski
6022debdbc AAPT: Fix regression generating dynamic ref table for shared libraries
AAPT stopped generating dynamic reference tables for shared libraries.

Change-Id: Ib0025811bdca1a4756eb21080dd6b6bb3fc1ca3d
2014-08-20 17:55:33 -07:00
Piotr Jastrzebski
fc1b26fc68 am 626e1c65: am 8a28e16c: Merge "Update ziparchive usage to the new API."
* commit '626e1c65ef408fd9eb7d3bbbbb90137e90c82a4e':
  Update ziparchive usage to the new API.
2014-08-18 09:12:39 +00:00
Adam Lesinski
ab9b1f5b2a am 5bcfb6b9: am 2fdf2db8: Merge "Fix assumption about DynamicRefTable in aapt" into lmp-dev
* commit '5bcfb6b98261c94a6ff33438e6b29ca71bb3c0eb':
  Fix assumption about DynamicRefTable in aapt
2014-08-15 22:07:59 +00:00
Adam Lesinski
2cb761e3dd Fix assumption about DynamicRefTable in aapt
Packages without any resources should not expect to have
a DynamicRefTable.

Bug:16895517
Bug:17056720
Change-Id: Id006f6bdbf08f30505f6ba5982bc9d1b09db0f0a
2014-08-15 14:01:43 -07:00
Adam Lesinski
f6530bca9b am e9e52a2a: am 41cdc4c7: Merge "Revert "Fix aapt dump for APKs with no resources"" into lmp-dev
* commit 'e9e52a2ae2e80286447767b9a83b04d88c41c112':
  Revert "Fix aapt dump for APKs with no resources"
2014-08-15 17:32:04 +00:00
Piotr Jastrzebski
e2134a4b5d Update ziparchive usage to the new API.
Bug: 16162465

Change-Id: If3064e2be3e7e85366b07434294a7879b0e5f9bc
2014-08-15 14:41:08 +01:00
Adam Lesinski
ac44bd1c5b am 4e790e9e: am b4c3c976: Fix crash in ResStringPool
* commit '4e790e9e4b820290284a78c4258d4d60e8d37320':
  Fix crash in ResStringPool
2014-08-15 11:51:01 +00:00
Adam Lesinski
fd9205603a am f3e588ba: am 83b8dc7e: Merge "Fix aapt dump for APKs with no resources" into lmp-dev
* commit 'f3e588bae0b6bdfef1c09f739b68b3e07548f58f':
  Fix aapt dump for APKs with no resources
2014-08-15 11:49:20 +00:00
Adam Lesinski
20ad556d75 am 3c9b2a54: am b6355bcb: Merge "Print xxxhdpi from ResTable_config::toString" into lmp-dev
* commit '3c9b2a540e123a17c91883dd48fb703c6a31982d':
  Print xxxhdpi from ResTable_config::toString
2014-08-15 11:49:15 +00:00
Adam Lesinski
4b2d0f20db Fix crash in ResStringPool
When a String isn't found in the StringPool,
we should not try to construct a String8 object
from the NULL string.

Bug:15163956
Change-Id: I51e701918b10a72c18a860b8a36dce2afd9c0b82
2014-08-15 06:39:01 +00:00
Adam Lesinski
89147ed84b Merge "Revert "Fix aapt dump for APKs with no resources"" into lmp-dev 2014-08-15 04:37:53 +00:00
Adam Lesinski
18560886cb Revert "Fix aapt dump for APKs with no resources"
This reverts commit 0e475302cd196f45a01a525c49089018b238d4ba.

I'll re-upload this CL with the correct fix in LoadedApk.

Change-Id: I17c6381f8e5907dab9f996f89c5d435b9c08a13a
2014-08-15 17:18:21 +00:00
Adam Lesinski
e23a91e2bd Fix aapt dump for APKs with no resources
All APKs are expected to have at least one resource table (even if
it is empty). We were missing the creation of an empty DynamicRefTable.

Bug:16895517
Change-Id: I6a6e887f91b3b4bbcc52b3fd2741ef3d05fab1fd
2014-08-14 21:20:41 +00:00
Adam Lesinski
d7df9d7b38 Merge "Fix aapt dump for APKs with no resources" into lmp-dev 2014-08-14 16:46:52 +00:00
Adam Lesinski
8d5667d2a2 Print xxxhdpi from ResTable_config::toString
Change-Id: I2e1a07649cb498c12023b198d8e50534f9d91840
2014-08-14 21:35:37 +00:00