4834 Commits

Author SHA1 Message Date
Adam Lesinski
96692047e6 Merge "AAPT2: Revert warning when merging packages" 2016-08-31 20:18:19 +00:00
Adam Lesinski
a6ad7d5cc3 Merge "AAPT2 tools: Fix logging in resource file fixer" 2016-08-31 00:55:53 +00:00
Colin Cross
7fd4eb7ff7 Merge "Replace libziparchive-host with libziparchive" am: 611e205bbe am: 8c8bb25089 am: 63dc310e6a
am: e3cd4b394c

Change-Id: Icc088a0cdd6a2ebc2b7bedb719ad7220d947273d
2016-08-31 00:29:35 +00:00
Adam Lesinski
198cb0f048 AAPT2 tools: Fix logging in resource file fixer
Change-Id: I5113012229005c94e466f43a30932ebdc74d76fc
2016-08-30 15:07:50 -07:00
Adam Lesinski
085f495747 AAPT2: Revert warning when merging packages
A compiled ResourceTable may contain multiple packages.
When referencing a framework attribute, for instance,
the compile phase has no idea if that attribute is a USE
or a DECLARATION, like so:

  <declare-styleable name="Foo">
    <item name="android:id" />
  </declare-styleable>

If this file is compiled with the package 'android', then this
is a declaration. If it is compiled with the package 'com.foo',
this is a reference that must resolve at link time.

Since this is common, warning that the package 'android' is being
ignored during the merge phase is incorrect behaviour.

The warning was antroduced in ag/1363992

Change-Id: I09254d79ac379439face177eb724df882d1d0ce1
2016-08-30 14:25:51 -07:00
Adam Lesinski
79758c8e77 Merge "AAPT2: Fix merging of styleables the right way" 2016-08-30 17:49:14 +00:00
Adam Lesinski
5c3464c75f AAPT2: Fix merging of styleables the right way
Styleables should only be merged when processing overlays.
This moves the styleable merging code out of ResourceTable
and into TableMerger.

Change-Id: I3aae05cf4dd875cd25ac2ac744b61194409b2fee
2016-08-26 19:40:50 -07:00
Colin Cross
e3cd4b394c Merge "Replace libziparchive-host with libziparchive" am: 611e205bbe am: 8c8bb25089
am: 63dc310e6a

Change-Id: I645d077dd656f84446f77fd91c169fd7b977e661
2016-08-26 20:40:27 +00:00
Colin Cross
9a1a3bcb16 Replace libziparchive-host with libziparchive
libziparchive-host is no longer necessary, and mixing libziparchive-host
and libziparchive can cause ODR violations.

Change-Id: I623c0c5579e28f26a6e1db7bd953f33ed1ca68cd
2016-08-26 11:15:17 -07:00
Chong Zhang
ad24f96def Only use saved surface if started by launcher or moved to front
Restrict saved surface to launcher start (ACTION_MAIN&CATEGORY_
LAUNCHER), or there is no intent at all (eg. task being brought to
front). If the intent is something else, likely the app is going
to show some specific page or view, instead of what's left last time.

This solves problems like the launcher shortcuts on DeckClock,
each of them is a different intent and will show one specific
view regardless of last states. Another example is Chrome tab
opened directly by action VIEW to open some URL.

(Note that this doesn't solve the problem with Chrome homescreen
shortcuts, it will still start with saved surface (if Chrome
is already open). This is because the shortcut is a trampoline
activity that starts the real chrome tab activity, but when
the trampoline is started, the whole task is already brought
to front, and ChromeTab could become visible with the task
before we actually start it.)

bug:27747315

Change-Id: Id3e61c61ef516b0edc1f174320f02661222f226b
2016-08-26 09:58:19 -07:00
Martijn Coenen
2cc64692ce Merge changes from topic 'utf' am: 0a357a1a73 am: de8a6a66f6
am: 1657493c22

Change-Id: Ie675738a4f9042929d1ffb5e1ffcc7bbb5c7b217
2016-08-25 20:31:31 +00:00
Sergio Giro
d90d8d615a Add bound checks to utf16_to_utf8
Test: ran libaapt2_tests64
Bug: 29250543
Change-Id: I1ebc017af623b6514cf0c493e8cd8e1d59ea26c3
(cherry picked from commit 4781057e78f63e0e99af109cebf3b6a78f4bfbb6)
2016-08-25 12:19:12 +02:00
Sergio Giro
8f7b8a1f6c Unicode: specify destination length in utf8_to_utf16 methods
Change-Id: I5223caa7d42f4582a982609a898a02043265c6d3
2016-08-25 12:04:40 +02:00
Raph Levien
2ec19e2c2d Update lint check to accommodate new emoji sequences am: 0790ac68bc
am: b1581dbbfd

Change-Id: I17b2989e1ee0477991705d15e0324a449da69c1a
2016-08-23 14:53:06 +00:00
Raph Levien
0790ac68bc Update lint check to accommodate new emoji sequences
These are not yet ready for updating in the unicode data, so we patch
them in code until they are.

Bug: 30594617
Change-Id: Ib4c8568aa4840341474eb0c0c95674d640473f4d
(cherry picked from commit 2b8b819fee939c1bca6347a74b42272bc7008fd5)
2016-08-22 16:26:24 +00:00
Roozbeh Pournader
f238f6a186 Re-enable disabled emoji tests [DO NOT MERGE] am: 8cd1b1ba80
am: 1062853800

Change-Id: Ie4c1a28f0a37af3fbbce3a8611c1ab5eec79d556
2016-08-19 22:48:15 +00:00
Roozbeh Pournader
f24170aae4 Check defaults for Android default-emoji characters [DO NOT MERGE] am: 84b1746130
am: 21e026bb7e

Change-Id: Ia77312e78e70bd17147d0ef841b6ea551a12ae82
2016-08-19 22:46:54 +00:00
Roozbeh Pournader
1062853800 Re-enable disabled emoji tests [DO NOT MERGE]
am: 8cd1b1ba80

Change-Id: I0cc4e1b30d8df95efea682d0b2ae4dc96822689b
2016-08-19 22:27:50 +00:00
Roozbeh Pournader
21e026bb7e Check defaults for Android default-emoji characters [DO NOT MERGE]
am: 84b1746130

Change-Id: Icadd25ab3dc99a2ce00220900a6b37cf0144d7d4
2016-08-19 22:26:11 +00:00
Roozbeh Pournader
eab8a12845 Merge "Re-enable disabled emoji tests [DO NOT MERGE]" into nyc-mr1-dev 2016-08-19 21:43:06 +00:00
Roozbeh Pournader
01bb406426 Merge "Check defaults for Android default-emoji characters [DO NOT MERGE]" into nyc-mr1-dev 2016-08-19 21:43:06 +00:00
Adam Lesinski
8197cc460e AAPT2: Merge Styleables instead of overriding them
Styleables merge in AAPT. Preserve this behavior.

Bug:30970091
Change-Id: Ie68ca675aeecd873c0648682182e2fc574e329a0
2016-08-19 13:29:40 -07:00
Adam Lesinski
aa0255da28 AAPT2: Add tool to fix positional argument issues
Change-Id: Ie8f733b70d561667cd25b38fb4c09d0837ef9b7f
2016-08-18 14:05:44 -07:00
Adam Lesinski
05e31f1837 AAPT: Handle gaps in resources when building splits am: 26ae640c34
am: 2c8aa38e7a

Change-Id: I475c971fabb2b4bf5acb4f0e9a86d95d79a650ed
2016-08-17 21:56:34 +00:00
Alexandria Cornwall
6de29ed5b4 Merge "AAPT2: Add support to strip namespaces from XML" 2016-08-17 19:57:12 +00:00
Adam Lesinski
26ae640c34 AAPT: Handle gaps in resources when building splits
Due to public ID assignment, gaps in resource type and entry
IDs can occur. This can lead to null pointer dereferencing
if not careful. This happened in ResourceTable::getDensityVaryingResources()
which is called when building Splits.

Bug:30879690
Change-Id: I588e4dcd2e042fccfcb2e87967b5cbd0d23b4497
(cherry picked from commit 081d1b4cf602fdd7302b597e6bf902cb415bc3a8)
2016-08-17 19:53:01 +00:00
Alexandria Cornwall
a7cc3f1d79 AAPT2: Add support to strip namespaces from XML
The --no-xml-namespaces flag will strip namespace information from
compiled binary XML files in res/* (excluding res/raw/*) and
AndroidManifest.xml. It will also strip URI information from compiled
binary XML files in res/* (excluding res/raw/* and AndroidManifest.xml).

AndroidManifest.xml URI information is retained due to PackageParser, which
requires the Android URI for intent filters.

Bug: 29115919
Change-Id: I90cad6ed39ce02a69776f55314c1d4f38ad1aabe
2016-08-17 11:01:05 -07:00
Adam Lesinski
84ae78b109 Merge "AAPT: Handle gaps in resources when building splits" 2016-08-17 00:03:36 +00:00
Chih-Hung Hsieh
c37e88100d Merge "Fix google-explicit-constructor warnings." am: ea537bf5b3 am: 9c0b881c9d am: 1ab51f3769
am: bd070b7792

Change-Id: Ibb5f0df9e4c4119330224075bb91b3961da1ab64
2016-08-16 02:48:15 +00:00
Chih-Hung Hsieh
bd070b7792 Merge "Fix google-explicit-constructor warnings." am: ea537bf5b3 am: 9c0b881c9d
am: 1ab51f3769

Change-Id: Ide274953e85d1ba9e0e978a531d69c3543e7923a
2016-08-16 02:39:40 +00:00
Chih-Hung Hsieh
1ab51f3769 Merge "Fix google-explicit-constructor warnings." am: ea537bf5b3
am: 9c0b881c9d

Change-Id: If4ec2ed4609d130e2b25dae2bf90f2209878cd4c
2016-08-16 02:31:42 +00:00
Chih-Hung Hsieh
9c0b881c9d Merge "Fix google-explicit-constructor warnings."
am: ea537bf5b3

Change-Id: I38d1f635b7bf2c46648c852bf0caa421e67218f4
2016-08-16 02:23:48 +00:00
Treehugger Robot
ea537bf5b3 Merge "Fix google-explicit-constructor warnings." 2016-08-16 02:12:39 +00:00
Adam Lesinski
081d1b4cf6 AAPT: Handle gaps in resources when building splits
Due to public ID assignment, gaps in resource type and entry
IDs can occur. This can lead to null pointer dereferencing
if not careful. This happened in ResourceTable::getDensityVaryingResources()
which is called when building Splits.

Bug:30879690
Change-Id: I588e4dcd2e042fccfcb2e87967b5cbd0d23b4497
2016-08-15 18:45:00 -07:00
Adam Lesinski
00e7ebbe1a AAPT: Fix use-after-free error am: 193ed74c2d am: 646f2d9c33
am: 9e8da4a476

Change-Id: I591fd51bf456cd42fe8c633de8924a9f2c844866
2016-08-15 23:33:01 +00:00
Adam Lesinski
9e8da4a476 AAPT: Fix use-after-free error am: 193ed74c2d
am: 646f2d9c33

Change-Id: If9fe7a52e62ae6b2900aa187996b4b785894ab03
2016-08-15 23:22:04 +00:00
Chih-Hung Hsieh
21c0f29597 Fix google-explicit-constructor warnings.
* Add explicit keyword to conversion constructors.
Bug: 28341362
Test: build with WITH_TIDY=1

Change-Id: I7422d703de17c4266d2a022990d0e1df40f48226
2016-08-15 14:45:02 -07:00
Adam Lesinski
193ed74c2d AAPT: Fix use-after-free error
Re-order deletion of ResXMLTree and the Asset object
it iterates over.

Bug:30844391
Change-Id: Ied033d0a8f93343006228a2054c6d0f42bb4717a
2016-08-15 14:22:36 -07:00
TreeHugger Robot
e42bc0587f Merge "Fix clang-tidy warnings in aapt and aapt2." 2016-08-15 21:10:23 +00:00
TreeHugger Robot
1d740812e6 Merge "AAPT2: Expose split support to command line" 2016-08-15 20:46:38 +00:00
Chih-Hung Hsieh
470f8fcb5c Fix clang-tidy warnings in aapt and aapt2.
* Add explicit keyword to conversion constructors.
* Add NOLINT(implicit) comments for implicit conversion constructors.
Bug: 28341362
* Use const reference type for read-only parameters.
Bug: 30407689
* Add NOLINT to suppress wrong clang-tidy warnings on macros.
Test: build with WITH_TIDY=1

Change-Id: Ibfafb23d9be463b4072745a51a6d9f1812dcac45
2016-08-15 12:32:51 -07:00
Adam Lesinski
36c73a5959 AAPT2: Expose split support to command line
Bug:30445078
Change-Id: If4b8530dba71b9059b8e62c04757da99c1119d22
2016-08-15 12:14:26 -07:00
Chih-Hung Hsieh
84717d4118 resolve merge conflicts of 17bd236 to stage-aosp-master am: b3d46b44a3
am: c76aa69207

Change-Id: I6bb066d131dde297612c5dcbf5051f4964e62a8b
2016-08-12 19:35:08 +00:00
Chih-Hung Hsieh
c76aa69207 resolve merge conflicts of 17bd236 to stage-aosp-master
am: b3d46b44a3

Change-Id: I5123493e165c4d2ab74cf045e5fb8181886dce62
2016-08-12 19:30:02 +00:00
Alexandria Cornwall
c34027ec3d Merge "AAPT2: Fix resource type id symbol merging" 2016-08-12 19:27:32 +00:00
Chih-Hung Hsieh
b3d46b44a3 resolve merge conflicts of 17bd236 to stage-aosp-master
Change-Id: I08d4500aaa378b08d41e8d046c62101e08dbfba8
2016-08-12 11:44:16 -07:00
Chih-Hung Hsieh
56996ff61e resolve merge conflicts of 76ce8e5 to stage-aosp-master am: ed935c32f4
am: ef57a0d629

Change-Id: Ifcc24ad835f2e74a25954bf3fd7090c75abdc084
2016-08-12 00:40:25 +00:00
Chih-Hung Hsieh
ef57a0d629 resolve merge conflicts of 76ce8e5 to stage-aosp-master
am: ed935c32f4

Change-Id: Ibb7415686469d7b15e8dbe0cd04226c4e0cd7d76
2016-08-12 00:31:29 +00:00
Chih-Hung Hsieh
ed935c32f4 resolve merge conflicts of 76ce8e5 to stage-aosp-master
Change-Id: I4b4ca9906373a95776d2da8ba2fa39a4a78e2a30
2016-08-11 16:48:46 -07:00
Treehugger Robot
76ce8e5242 Merge "Fix clang-tidy warnings in libs/hwui." 2016-08-11 23:20:47 +00:00