summaryrefslogtreecommitdiffstats
path: root/libs/androidfw
Commit message (Collapse)AuthorAgeFilesLines
* Add -round and -notround qualifier to android runtime/aaptAdam Lesinski2015-05-152-0/+121
| | | | | | | | The round qualifier denotes a device with a screen shape that is round. The qualifier shows up after the 'long/notlong' qualifier and before the orientation 'port/land/square' qualifiers. Change-Id: I3044258b2703a9165694b79725bade770fa6cea1
* Fix file descriptor leak when opening invalid archives.Narayan Kamath2015-05-121-0/+1
| | | | | | | | | | I've inspected all other callers of OpenArchive and this seems to be the only broken one. The easiest way to reproduce this is by using getPackageArchiveInfo or by adding an asset path that isn't a valid APK. bug: https://code.google.com/p/android/issues/detail?id=171099 Change-Id: I41cd85d20f26ad47968e2a6f1384cc03330b558b
* Improve keying for theme caches, rebase system theme on config changeAlan Viverette2015-05-061-0/+24
| | | | | | | | | | | | | | | 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
* Merge "Add API for obtaining changing configurations bitmask from Theme" ↵Alan Viverette2015-05-051-0/+10
|\ | | | | | | into mnc-dev
| * Add API for obtaining changing configurations bitmask from ThemeAlan Viverette2015-05-051-0/+10
| | | | | | | | | | | | | | | | 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
* | am 815d9bb1: Merge "Add a static dependency on libbase."Narayan Kamath2015-04-291-1/+1
|\ \ | |/ |/| | | | | * commit '815d9bb178a0488ed1579cd230d447630ad0891b': Add a static dependency on libbase.
| * Add a static dependency on libbase.Narayan Kamath2015-04-291-1/+1
| | | | | | | | | | | | Used by libziparchive. Change-Id: I120494b620c72b36a725b01f1f274f5dc862a9a3
* | am 05ad674a: am 00e165ae: am e8101c04: Merge "fix compiler error under ↵Nick Kralevich2015-04-251-1/+3
|\ \ | |/ | | | | | | | | | | FORTIFY_SOURCE=2" * commit '05ad674aa888e3f9217de0e5c3176161dd8e31aa': fix compiler error under FORTIFY_SOURCE=2
| * fix compiler error under FORTIFY_SOURCE=2Nick Kralevich2015-04-241-1/+3
| | | | | | | | | | | | | | | | | | | | frameworks/base/libs/androidfw/ObbFile.cpp:340:5: error: ignoring return value of function declared with warn_unused_result attribute [-Werror,-Wunused-result] ftruncate(fd, mFooterStart); ^~~~~~~~~ ~~~~~~~~~~~~~~~~ 1 error generated. amake: *** [out/host/linux-x86/obj/STATIC_LIBRARIES/libandroidfw_intermediates/ObbFile.o] Error 1 Change-Id: I7080d64e7a830a10b41c1ebf33c60d32b7c8356e
* | am 7b09e7a9: am 44d7989a: am 571c5a26: Merge "Fix UB in ↵Dan Albert2015-04-153-34/+151
|\ \ | |/ | | | | | | | | | | ResourceTable::stringToInt." * commit '7b09e7a9f3ef804e9cd159023b64eac1ef8b7931': Fix UB in ResourceTable::stringToInt.
| * Fix UB in ResourceTable::stringToInt.Dan Albert2015-04-083-34/+151
| | | | | | | | | | | | | | | | | | | | Was here because UBsan found integer overflow in the parsing for hex numbers, since hex numbers here are actually unsigned but assigned to a signed integer. Also fixes a number of missing error conditions. Change-Id: Iaea576daedfc6c75521cde02de3fe9dd0198a3b7
* | Add payload-size preflight stage to full transport backupChristopher Tate2015-03-261-5/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We now peform a total-size preflight pass before committing data to the wire. This is to eliminate the large superfluous network traffic that would otherwise happen if the transport enforces internal quotas: we now instead ask the transport up front whether it's prepared to accept a given payload size for the package. From the app's perspective this preflight operation is indistinguishable from a full-data backup pass. If the app has provided its own full-data handling in a subclassed backup agent, their usual file-providing code path will be executed. However, the files named for backup during this pass are not opened and read; just measured for their total size. As far as component lifecycles, this measurement pass is simply another call to the agent, immediately after it is bound, with identical timeout semantics to the existing full-data backup invocation. Once the app's file set has been measured the preflight operation invokes a new method on BackupTransport, called checkFullBackupSize(). This method is called after performFullBackup() (which applies any overall whitelist/blacklist policy) but before any data is delivered to the transport via sendBackupData(). The return code from checkFullBackupSize() is similar to the other transport methods: TRANSPORT_OK to permit the full backup to proceed; or TRANSPORT_REJECT_PACKAGE to indicate that the requested payload is unacceptable; or TRANSPORT_ERROR to report a more serious overall transport-level problem that prevents a full-data backup operation from occurring right now. The estimated payload currently does not include the size of the source-package metadata (technically, the manifest entry in its archive payload) or the size of any widget metadata associated with the package's install. In practice this means the preflighted size underestimates by 3 to 5 KB. In addition, the preflight API currently cannot distinguish between payload sizes larger than 2 gigabytes; any payload estimate larger than that is passed as Integer.MAX_VALUE to the checkFullBackupSize() query. Bug 19846750 Change-Id: I44498201e2d4b07482dcb3ca8fa6935dddc467ca
* | Output modified bcp47 tag in ResTable_config::toString()Adam Lesinski2015-03-161-6/+53
| | | | | | | | | | | | | | We expect to be able to parse the output of ResTable_config::toString(), so it should use modified bcp47 (b+en+Latn+US). Change-Id: I597a1779a1fa5cff171c473e6a0368d93b9c7722
* | Enforce null-termination in ResStringPool::stringAtVishwath Mohan2015-03-111-0/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | Rejects any non null-terminated string that a caller asks ResStringPool::stringAt for, returning NULL instead. The rationale for returning NULL rather than amending the string to add a null-terminator is that conformant APK files will have all their strings null-terminated anyway, and that this is a possible signal of a malformed package. Bug: 15288069 Change-Id: I370937b92f2cadf67fbd54203cbc7d1494be969f
* | Prevent integer overflow in ResourceTypesVishwath Mohan2015-03-101-4/+8
| | | | | | | | | | | | | | | | | | | | Adds checks to 2 malloc() calls to ensure that the finally allocated buffer size is not vulnerable to integer overflows. Also includes a sanity check on the upper bound for type_info.numEntries before each call. Bug: 15171384 Change-Id: Ifdf0276bcca7e3d93da7c3577b9486d3c03a9d03
* | am 287c53f4: am 76507a64: am 72dc62ea: Merge "Track removal of refcounts ↵Narayan Kamath2015-02-242-4/+4
|\ \ | |/ | | | | | | | | | | from FileMap." * commit '287c53f4a8bade1cb6c2dd2fe858da9c303e3e3d': Track removal of refcounts from FileMap.
| * am 72dc62ea: Merge "Track removal of refcounts from FileMap."Narayan Kamath2015-02-242-4/+4
| |\ | | | | | | | | | | | | * commit '72dc62ead214bdec5c46d42f4e859b139dba0a00': Track removal of refcounts from FileMap.
| | * Track removal of refcounts from FileMap.Narayan Kamath2015-02-232-4/+4
| | | | | | | | | | | | | | | | | | Use delete instead of release. Change-Id: I25c841b368aa9d51e9259399b94cafa2bbb7a076
* | | am d9bd0886: am aee7225e: Merge "Process base APK" into lmp-mr1-dev ↵Adam Lesinski2015-01-201-1/+7
|\ \ \ | |/ / | | | | | | | | | | | | | | | automerge: 554a6f5 * commit 'd9bd08864eaf9d8847d974eadb81806b9e086a2d': Process base APK
| * | am aee7225e: Merge "Process base APK" into lmp-mr1-devAdam Lesinski2015-01-201-1/+7
| |\ \ | | | | | | | | | | | | | | | | | | | | | | | | automerge: 554a6f5 * commit '554a6f5278ec05077d8252249afc911897fbfe76': Process base APK
| | * | Process base APKAdam Lesinski2015-01-161-1/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The base APK may have resources with configurations that compete against some splits. The base APK must be involved in the selection of splits. Bug:18982001 Change-Id: Ieb29b5a36cf2c68e7831484d98a9fd275acd97e8
| * | | Restore write_delete_fileBrian Carlstrom2015-01-141-0/+7
| | | | | | | | | | | | | | | | Change-Id: Id93a59ae6c82f6068c58b22e2a651ff8a3b8f530
* | | | Restore write_delete_fileBrian Carlstrom2015-01-141-0/+7
| | | | | | | | | | | | | | | | | | | | | | | | (cherry picked from commit 5baa164aec06a9973a68303bc7752aa76e5c68e5) Change-Id: Ifa9a157346edd479ce03982baf435ab213dc2e79
* | | | am 49138184: am 9568307c: am 43a4a8c7: Fix redundant file backupsChristopher Tate2015-01-151-36/+41
|\ \ \ \ | |/ / / | | | | | | | | | | | | * commit '49138184dee54357b1923f302e4b3fedd73ca34f': Fix redundant file backups
| * | | am 9568307c: am 43a4a8c7: Fix redundant file backupsChristopher Tate2015-01-151-36/+41
| |\ \ \ | | |/ / | | | | | | | | | | | | * commit '9568307cf32c8abc6703dc7a1b0b0fee56c4f8f5': Fix redundant file backups
| | * | Fix redundant file backupsChristopher Tate2015-01-141-38/+41
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We'd observed a bug in which an unchanged file was nevertheless being redundantly transmitted for backup on every backup pass. The underlying issue turns out to have been the FileBackupHelper base implementation's logic for diffing the prior-state file set against the current state, in the case when there had been deletions of prior files. In addition, there was also a parallel bug in which file checksums were not calculated properly in some cases, leading to at least one additional redundant backup of the file in question. Bug 18694053 Change-Id: Ie0dec06486b5fef4624561737019569c85d6b2a0
* | | | am 1e147221: am d6c475dc: am 595ae39f: Merge "Use more intention-revealing ↵Elliott Hughes2015-01-131-1/+3
|\ \ \ \ | |/ / / | | | | | | | | | | | | | | | | | | | | tests for S_ISLNK and S_ISSOCK." * commit '1e14722167210e176cc1f6e702f1a7a98271c6d2': Use more intention-revealing tests for S_ISLNK and S_ISSOCK.
| * | | am d6c475dc: am 595ae39f: Merge "Use more intention-revealing tests for ↵Elliott Hughes2015-01-131-1/+3
| |\ \ \ | | | |/ | | |/| | | | | | | | | | | | | | | | | S_ISLNK and S_ISSOCK." * commit 'd6c475dc246b1681f5c9af9e00ac74183812329c': Use more intention-revealing tests for S_ISLNK and S_ISSOCK.
| | * | Use more intention-revealing tests for S_ISLNK and S_ISSOCK.Elliott Hughes2015-01-121-1/+3
| | | | | | | | | | | | | | | | Change-Id: Ia7f13eb7d5a36cf2b4c0a253b2b4d7f7af396951
* | | | am 347040cf: am 740acf21: am c7801877: Merge "Fix issue where non-resource ↵Adam Lesinski2014-12-111-0/+17
|\ \ \ \ | |/ / / | | | | | | | | | | | | | | | | | | | | attributes would cause obtainStyleAttributes to fail" into lmp-mr1-dev * commit '347040cf84401601b0d5cbb1d76e4648d1c8a461': Fix issue where non-resource attributes would cause obtainStyleAttributes to fail
| * | | am 740acf21: am c7801877: Merge "Fix issue where non-resource attributes ↵Adam Lesinski2014-12-111-0/+17
| |\ \ \ | | | |/ | | |/| | | | | | | | | | | | | | | | | would cause obtainStyleAttributes to fail" into lmp-mr1-dev * commit '740acf213c56c406132294790fa2fadd0380cfa7': Fix issue where non-resource attributes would cause obtainStyleAttributes to fail
| | * | Fix issue where non-resource attributes would cause obtainStyleAttributes to ↵Adam Lesinski2014-12-101-0/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | fail A sentinal value of 0x00000000 was used to mark the first time an AttributeFinder was used. If the resource ID of an attribute was also 0x00000000 (which occurs with non-resource attributes, like 'style'), then it would be mistaken as the sentinel start value. Bug:18421787 Change-Id: I4be353e0f8c940cb6f262d155129f048dcc444ae
* | | | am e97908d3: Merge commit \'0953ab27\' into manualmergeAdam Lesinski2014-12-051-48/+57
|\ \ \ \ | |/ / / | | | | | | | | | | | | * commit 'e97908d32ee8ea80138d085260a0eac93841c722': AAPT: Move private attrs to new type for framework
| * | | Merge commit '0953ab27' into manualmergeAdam Lesinski2014-12-051-48/+57
| |\ \ \ | | |/ / | | | | | | | | Change-Id: I36dea45f7571096136ea7bda5e2680bd85a0df32
| | * | AAPT: Move private attrs to new type for frameworkAdam Lesinski2014-12-031-46/+57
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Private attributes are typically placed after public attributes in the resource table. Each time a new version of the Android framework is released, new public attributes take the place of the private attributes, and the private attributes are shifted after the new public ones. This means that any apps built against the newer SDK may inadvertently be using private attributes on older devices. This change moves all private attributes to a completely different type ID, so there will never be collisions across versions. These private attributes are automatically moved to a synthesized type only for the system resources. Bug:18263655 Change-Id: I7a850512953fadcc9f3524d509cea30249782db8
* | | | am 8e5362f2: am 503071ae: am a2b5067a: Merge "RRO: prevent duplicate system ↵Adam Lesinski2014-12-041-0/+6
|\ \ \ \ | |/ / / | | | | | | | | | | | | | | | | | | | | overlays" * commit '8e5362f20e2bc41b1dcf130a613b7e0b3cd1db58': RRO: prevent duplicate system overlays
| * | | am 503071ae: am a2b5067a: Merge "RRO: prevent duplicate system overlays"Adam Lesinski2014-12-041-0/+6
| |\ \ \ | | | |/ | | |/| | | | | | | | | * commit '503071ae41374a66f61e53e05a91243473db83b9': RRO: prevent duplicate system overlays
| | * | Merge "RRO: prevent duplicate system overlays"Adam Lesinski2014-12-031-0/+6
| | |\ \
| | | * | RRO: prevent duplicate system overlaysMårten Kongstad2014-11-071-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | System overlays, ie overlays with targetPackage="android", were loaded twice, which caused all sorts of issues. Ensure they are only loaded once, which will be during Zygote initialization. Bug: 17765434 Change-Id: Ia5064045c77f713c58fb78adc3942f6af1abdc93
* | | | | am 9438ad15: am e580d661: am e89a2865: Merge changes If2c7e09f,Ie21f227cAdam Lesinski2014-12-032-5/+9
|\ \ \ \ \ | |/ / / / | | | | | | | | | | | | | | | | | | | | * commit '9438ad1599716176fb6c593e77a2e93b265bbcb5': RRO idmap: pad with 0xffffffff, not 0x00000000 RRO: reintroduce lost ResTable insert of assets
| * | | | am e580d661: am e89a2865: Merge changes If2c7e09f,Ie21f227cAdam Lesinski2014-12-022-5/+9
| |\ \ \ \ | | |/ / / | | | | | | | | | | | | | | | | | | | | * commit 'e580d6617f67a1db5eff7ffe5450684cfc7e1a2b': RRO idmap: pad with 0xffffffff, not 0x00000000 RRO: reintroduce lost ResTable insert of assets
| | * | | Merge changes If2c7e09f,Ie21f227cAdam Lesinski2014-12-022-5/+9
| | |\ \ \ | | | |/ / | | | | | | | | | | | | | | | | | | | | * changes: RRO idmap: pad with 0xffffffff, not 0x00000000 RRO: reintroduce lost ResTable insert of assets
| | | * | RRO idmap: pad with 0xffffffff, not 0x00000000Mårten Kongstad2014-11-071-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
| | | * | RRO: reintroduce lost ResTable insert of assetsMårten Kongstad2014-11-071-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* | | | | am ee46d162: am 08e2fd72: am ff4dd15c: Merge "We HAVE_LITTLE_ENDIAN."Elliott Hughes2014-11-221-8/+0
|\ \ \ \ \ | |/ / / / | | | | | | | | | | | | | | | * commit 'ee46d1621f817d626e8dd42e9ffe7051f4a829eb': We HAVE_LITTLE_ENDIAN.
| * | | | am 08e2fd72: am ff4dd15c: Merge "We HAVE_LITTLE_ENDIAN."Elliott Hughes2014-11-221-8/+0
| |\ \ \ \ | | |/ / / | | | | | | | | | | | | | | | * commit '08e2fd7238c50b5d06af41bc944ee08acb023d51': We HAVE_LITTLE_ENDIAN.
| | * | | We HAVE_LITTLE_ENDIAN.Elliott Hughes2014-11-211-8/+0
| | | | | | | | | | | | | | | | | | | | Change-Id: I5b5d0ef3f91fe84d629d2ddac436bd22019edfd4
* | | | | am 11bdd5b1: Merge commit \'06d8b7b8\' into manualmergeAdam Lesinski2014-11-173-3/+119
|\ \ \ \ \ | |/ / / / | | | | | | | | | | | | | | | * commit '11bdd5b10b5f921b657283fa94463263171218d5': Implement back-tracking when searching for attributes in XML or resource bag
| * | | | Merge commit '06d8b7b8' into manualmergeAdam Lesinski2014-11-173-3/+119
| |\ \ \ \ | | | |_|/ | | |/| | | | | | | | | | | | | | | | | | | | | | Conflicts: core/jni/android_util_AssetManager.cpp Change-Id: I77b72d0d3ec8184ccd97419e4c76b7d55b1a52ca
| | * | | Merge "Implement back-tracking when searching for attributes in XML or ↵Adam Lesinski2014-11-173-3/+119
| | |\ \ \ | | | | | | | | | | | | | | | | | | resource bag" into lmp-mr1-dev