summaryrefslogtreecommitdiff
path: root/include
AgeCommit message (Collapse)Author
2016-12-14Move libandroid_runtime headers into frameworks/base/core/jni Colin Cross
Move libandroid_runtime's headers into its source directory, and export them to modules that link against libandroid_runtime. Also fixes one unused-paramter warning that was hidden by the use of -isystem to include frameworks/base/include. Bug: 33630870 Test: m -j native Change-Id: Id6c2561d6c7d82a7ca2d183f11b1d3d3dcb42843
2016-12-14Move hwui private headers to frameworks/base/libs/hwui/private Colin Cross
hwui already exports most of its headers, move its private headers into its source directory. Bug: 33630870 Test: m -j native Change-Id: I4968d5aaaa68d9e92c826841d20f29cef349c9d8
2016-12-14Move libstorage includes into frameworks/base/lib/storage Colin Cross
Move the libstorage includes out of the global include path and into frameworks/base/lib/storage/include, and export it. Bug: 33630870 Test: m -j native Change-Id: Idc0735360abc703496b9bc46d1a76ce8039af0d1
2016-11-04Move one more libandroidfw header Colin Cross
The libandroidfw headers were moved into the library directory, move one more that did not exist in the original patch. Test: builds Change-Id: Ic74a41558e1bc3984d98dd766f69d081edd8fc08
2016-11-04Re-unite sources with their headers John Reck
Move all the includes for androidfw under a common base path for that library instead of frameworks/base/includes. Also fixes -Werror issues that resulted in no longer being -isystem. Test: builds Change-Id: Ic4312eb61b197af114dded5691d5ae1ec82923f7 Merged-In: Ic4312eb61b197af114dded5691d5ae1ec82923f7 (cherry picked from commit f6113af2d6f6eebee68d3ac510fe96d38a7a39e9)
2016-07-19Merge \"Handle long process names correctly.\" Dmitriy Filchenko
am: e2994438d2 Change-Id: I4edb617030ed2cedb394729f9ce94af080d3e358
2016-07-18Handle long process names correctly. Dmitriy Filchenko
pthread_setname_np() expects 16 or fewer characters for the name argument. When the process name is longer, we should trim it. Change-Id: I40be3a4212bdaab900c8eb30fa27aeeb7ed1b0d1
2016-05-20Performance improvements in AssetManager Adam Lesinski
Change the implementation of getLocales() to iterate the set of configurations using a templated method, instead of using the result of getConfigurations(). Also remove the check for AndroidManifest.xml when adding an asset path. This is unneccessary. Bug:28625993 Change-Id: I16de5da598d0c371421d1dc8eee054dce9baf53a
2016-05-10Resource shared libraries: fix theme references Adam Lesinski
Theme values that would reference other theme values would not work if they were declared in a shared library. We now introduce a parallel resource type to TYPE_DYNAMIC_REFERENCE, TYPE_DYNAMIC_ATTRIBUTE, which allows us to lookup and resolve theme value references from shared libraries. Bug:28687378 Change-Id: I4f2364e3e8b567679f90784fcaaea12b6b05e926
2016-04-28ZipUtils: Fix wrong timestamps when getEntryInfo Shammi Khattar
"tm_mon" format should align with "ZipEntry::setModWhen" in aapt. "tm_isdst" should be initialized, or it will because random value and cause error in function mktime(). BUG:28021145 (cherry picked from commit bb0eb3f4cb33c077b296a18555a9a1a966ff696b) Change-Id: Ia39cf63fcd4bb39c24af080562960279106f526c
2016-04-28ZipUtils: Fix wrong timestamps when getEntryInfo Shammi Khattar
"tm_mon" format should align with "ZipEntry::setModWhen" in aapt. "tm_isdst" should be initialized, or it will because random value and cause error in function mktime(). BUG:28021145 Change-Id: I1e8d5c14e5d7b875bf9cd940cb7f4c5b93a1bcd6
2016-04-08Add choreographer API to the NDK. Michael Wright
Change-Id: Icb8cffd3cd3bd06814466be72db3e26f6a62cbc6
2016-03-09AssetManager: Cache a pre-filtered list of configurations Adam Lesinski
When we set the parameters for a ResTable, we can pre-filter which resources match and only look at that smaller list when getting entries. This helps A LOT with types that have many configurations, like strings and all their various locales. We must store the cached entries in a parallel data structure because parts of the main Type object are shared with other ResTables, causing data races. Bug:25499111 Change-Id: I63e37dcbd683fc9f1e7d0f3a6ed4c1c01e0fc575
2016-03-07Merge "Revert "AssetManager: Cache a pre-filtered list of configurations"" ↵ Adam Lesinski
into nyc-dev
2016-03-07Revert "AssetManager: Cache a pre-filtered list of configurations" Adam Lesinski
There is a race due to the modification of shared data structures in the framework ResTable. See b/27499488 This reverts commit d4b169173ad7805369204277580d3942cb08174a. Change-Id: I3f400a2ad3b5ffc652b84dd5fe777f7cf34b5548
2016-03-03Fix script-related parts of locale resource matching Roozbeh Pournader
Previously, a bit was kept to find if the script of a locale was explicitly "provided" in a resource. This was not backward compatible, and failed in some edge cases when the package was created with older versions of AAPT that did not set the bit. The cases would happen when the old resource had an explicit script specified in its locale, but since the "provided" bit was not set in the package, we would assume that the script was computed by us. This CL replaces the "provided" bit with a "computed" bit, so the default value of the bit (set to "false" for old packages) would be correct. Bug: 27156990 Change-Id: I99e7f1ad8f70c90e25ab3640ed34cc1a6f8d1d64
2016-02-25AssetManager: Cache a pre-filtered list of configurations Adam Lesinski
When we set the parameters for a ResTable, we can pre-filter which resources match and only look at that smaller list when getting entries. This helps A LOT with types that have many configurations, like strings and all their various locales. Bug:25499111 Change-Id: Ie6894c44bc67e16a10dbe028c8f3e119e5c29ac7
2016-02-01Make default resources a better match for en-US requests Roozbeh Pournader
When locale fallback landed, resources which specified an 'English' locale started to be considered a better match for en-US, even though traditionally, apps tend to ship US English resources under their default locale. This fixes that, and makes en-US requests match default locales. Bug: 26756573 Bug: 26789680 Bug: 26803868 Change-Id: I460c276bfc6ddba0439dcdf87497a0aece0fa05d
2016-01-22Move localeScriptWasProvided to end of ResTable_config Roozbeh Pournader
This is to try and be safer with different versions potentially interpreting the data differently. Change-Id: I599b6a20d908e8379727a5b06cc6631f1954bcff
2016-01-22Merge "Add choreographer API to the NDK." Michael Wright
2016-01-21Add choreographer API to the NDK. Michael Wright
Change-Id: Icb8cffd3cd3bd06814466be72db3e26f6a62cbc6
2016-01-21Implement smarter locale resource selection Roozbeh Pournader
* Add support for determining script from language and region. * Add support for determining special parents of locales. * Add support for smart comparison of locales with only a difference in region, using the locale parentage tree. * Fix LocaleData.matchScore() to not fallback to old locale matching behavior if we can't determine a script. * Allow four-character variant codes. (Previously, only five- to eight-character variant codes were allowed.) Bug: 7296673 Bug: 26589793 Change-Id: Ibde0a48c0564ff383b41068095a5cbacfe7b94bc
2016-01-04Avoid matching system locales in locale negotiation Roozbeh Pournader
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
2015-12-09Camera: add RAW_PRIVATE format Yin-Chia Yeh
Also add necessary plumbing for RAW_PRIVATE to work for ImageReader. Bug: 25596619 Change-Id: Ic90f3f44264ac46fae1fafbc27ac64b5319f0970
2015-09-08Load app resource as shared library. Tao Bai
- 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
2015-08-18am 60a2716f: am 3244dc22: am 677cd087: am e9de1b4c: am 9a010d0a: Merge ↵ Sebastien Hertz
"Allow debugging only for apps forked from zygote" into mnc-dev * commit '60a2716f720e843a7de6e7209c2021d95538711e': Allow debugging only for apps forked from zygote
2015-08-10Only relaunch activity on significant size configuration changes. Filip Gruszczynski
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
2015-08-10Allow debugging only for apps forked from zygote Sebastien Hertz
When starting the runtime from app_process, we only pass JDWP options if starting zygote. It prevents from opening a JDWP connection in non-zygote programs while Android apps (forked from zygote) remain debuggable. Bug: 23050463 Change-Id: If8ea719063a65db4cdeed69a838b52e87b078b08
2015-06-22Let findSupportedAbi and hasRenderscriptBitcode scan only relevant files Yusuke Sato
for better performance. Without the optimization, these two functions may check more than 100k file names in the pre-installed APK files, which can take a few seconds to finish even on a recent device. Bug: 21957428 Change-Id: I315fd3c6d5aa1076b993752525de449a9933de12
2015-06-17ZipFileRO: Use precise widths for zip file types. Narayan Kamath
getEntryInfo crashes on 64-bit devices because "long" types were being passed int pointers (that pointed to a stack frame) that were reinterpret_cast'ed to long* (sigh.). To fix this issue once and for all, use types with explicitly defined widths. This change also removes some dead invariant checking from Asset.cpp instead of cleaning it up. Note that we've introduced a wart in NativeLibraryHelper, where we need to deal with zlib's uLong type, which is "at least 32 bits wide". bug: 21622286 Change-Id: Iae675a9601db7aae03a8b80b40321d2cc1d97f50
2015-05-15Add -round and -notround qualifier to android runtime/aapt Adam Lesinski
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
2015-05-06Improve keying for theme caches, rebase system theme on config change Alan Viverette
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
2015-05-05Add API for obtaining changing configurations bitmask from Theme Alan Viverette
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
2015-04-15am 7b09e7a9: am 44d7989a: am 571c5a26: Merge "Fix UB in ↵ Dan Albert
ResourceTable::stringToInt." * commit '7b09e7a9f3ef804e9cd159023b64eac1ef8b7931': Fix UB in ResourceTable::stringToInt.
2015-04-14Merge "Fix UB in ResourceTable::stringToInt." Dan Albert
2015-04-09am e24d36b7: am 1f799a6b: am d9f32b16: Merge "Ensure alignment of ↵ Dan Albert
Res_png_9patch." * commit 'e24d36b7b744540ccd3401609248ed9d48be4cc9': Ensure alignment of Res_png_9patch.
2015-04-09Ensure alignment of Res_png_9patch. Dan Albert
This doesn't alter the alignment of the data within the struct, but enforces that this structure will be appropriately aligned when used. The image_info struct has this struct preceded by a bool, which causes odd alignment for the members of this struct. Change-Id: Ia2ef5c81b2f961c0f61858a10a7821d82f600919
2015-04-08Fix UB in ResourceTable::stringToInt. Dan Albert
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
2015-04-03Merge "AAPT2" Adam Lesinski
2015-04-02AAPT2 Adam Lesinski
First checking of AAPT2. The individual phases of AAPT2 work, but there are some missing pieces. For early testing we are missing: - Need to properly mark file references and include them in package - Need to package into zip Final AAPT for apps we are missing: - Need to crush PNGs - Need to parse 9-patches - Need to validate all of AndroidManifest.xml - Need to write align method to align resource tables for splits. Final AAPT for apps + system we are missing: - Need to handle overlays - Need to store comments for R file - Need to handle --shared-lib (dynamic references too). New AAPT features coming: - Need to import compiled libraries - Name mangling - R file generation for library code Change-Id: I95f8a63581b81a1f424ae6fb2c373c883b72c18d
2015-03-30ImageFormat: add PRIVATE format Zhijun He
Bug: 19865019 Change-Id: I1a9335fe1733a5b28d9cb20485b509fb216cb52b
2015-03-26Add payload-size preflight stage to full transport backup Christopher Tate
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
2015-03-16Output modified bcp47 tag in ResTable_config::toString() Adam Lesinski
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
2015-03-09Add DEPTH image formats, support in ImageReader Eino-Ville Talvala
- Add an explicit mapping between public ImageFormat/ PixelFormat enums and internal HAL format/dataspace. - Add DEPTH16 and DEPTH_POINT_CLOUD formats - Wire up mapping layer to ImageReader to support depth formats Change-Id: I8197eccef900cc91baddcfcb934ccd4d8c972eff
2015-01-27am 3523e4fc: am efe085ff: Merge "Handle bad ninepatch data." into lmp-mr1-dev Leon Scroggins III
automerge: 8475144 * commit '847514499f5920d073f5cd402dd0d3bbd19ac2c1': Handle bad ninepatch data.
2015-01-27am 3523e4fc: am efe085ff: Merge "Handle bad ninepatch data." into lmp-mr1-dev Leon Scroggins III
* commit '3523e4fcb3c74a5dee2f4497e2b8ec7b9e2b5e57': Handle bad ninepatch data.
2015-01-27Handle bad ninepatch data. Leon Scroggins III
Changes proposed by Ben Hawkes of Google Project Zero. NinePatchPeeker.cpp: Instead of asserting, return false for bad data. ResourceTypes.h: Store ninepatch values as unsigned. BUG:19151999 Change-Id: Ibe35e7569f632c6bb8a34a7701e26bb6ed547ec2
2015-01-20am d9bd0886: am aee7225e: Merge "Process base APK" into lmp-mr1-dev ↵ Adam Lesinski
automerge: 554a6f5 * commit 'd9bd08864eaf9d8847d974eadb81806b9e086a2d': Process base APK
2015-01-20am aee7225e: Merge "Process base APK" into lmp-mr1-dev Adam Lesinski
automerge: 554a6f5 * commit '554a6f5278ec05077d8252249afc911897fbfe76': Process base APK
2015-01-20Move Canvas John Reck
Change-Id: I83d557af30fc2d5c69d06eedc0f4d52ac41c4210