Commit Graph

4753 Commits

Author SHA1 Message Date
Alexandria Cornwall
a9ff14098b AAPT2: Strip dedicated tools namespace from XML
Android has a dedicated XML namespace dedicated for tools that should not be
included in the final APK. AAPT strips this out, but the feature was missing
from AAPT2. See: http://tools.android.com/tech-docs/tools-attributes

Bug: 29115919
Change-Id: I8f4fc79e6c8592a313a691134e44d16fd91f36ed
2016-08-03 10:02:15 -07:00
Diego Perez
a4a100d206 Merge "ImageSwitcher -> ImageView in appcompat inflate" 2016-08-03 15:41:04 +00:00
Diego Perez
689a1093a6 Merge "Try to resolve IDs also as enums" 2016-08-03 15:34:31 +00:00
TreeHugger Robot
391dfcfa68 Merge "Revert "Add per-user versions of set{Component,Application}EnabledSetting."" 2016-08-02 23:56:55 +00:00
Sudheer Shanka
38c67d3c0f Revert "Add per-user versions of set{Component,Application}EnabledSetting."
This reverts commit 0e6bfff6c1.

Change-Id: I4eafa9fc052e9eba9e26fd32c09b5e759fe63b00
2016-08-02 22:13:17 +00:00
Sergio Giro
e55e65c993 Merge "Unicode: specify destination length in utf8_to_utf16 methods" 2016-08-02 18:48:19 +00:00
Adam Lesinski
bad90c3888 AAPT2: Add missing error statement
Change-Id: I955ba6f151d68db02c3dc16d121994fb553dcea8
2016-08-02 11:39:17 -07:00
Adam Lesinski
39df2f25dc Merge "Move utility scripts to tools/" 2016-08-02 17:17:15 +00:00
Adam Lesinski
98bda74eb5 Move utility scripts to tools/
Change-Id: Iddb755f3cec0a32801128b4eb20f2c185b0cc626
2016-08-02 10:15:33 -07:00
Diego Perez
55656fedcd ImageSwitcher -> ImageView in appcompat inflate
Bug: http://b.android.com/215389
Change-Id: Ica5401bc1084247ac8ba7dc6482f7e4a2b8b593d
(cherry picked from commit 8ea861a609b5b03a1f80d4834183947f0603ba5e)
2016-08-02 15:42:23 +00:00
Adam Lesinski
72979573d9 AAPT: faketouch feature implied if no touchscreen feature requested. am: ca955a4c3a am: 76cbcd495e
am: 12e5b87771

Change-Id: Idf7c77d4122ab88b0fe1a1b3c42a196fd532d45c
2016-08-02 02:57:35 +00:00
Dan Willemsen
3b16cf057a Rename libprotobuf-cpp-lite_static to libprotobuf-cpp-lite am: 2005edf642 am: 4ee22dd083
am: 77508b9c19

Change-Id: Ifb0fef3c2dfaef7b19e2f03dbbdce41431a51a2f
2016-08-02 02:36:20 +00:00
Adam Lesinski
12e5b87771 AAPT: faketouch feature implied if no touchscreen feature requested. am: ca955a4c3a
am: 76cbcd495e

Change-Id: I29700574c70f35695ccbdd60c570bb222e1aa0eb
2016-08-02 02:01:37 +00:00
Adam Lesinski
ca955a4c3a AAPT: faketouch feature implied if no touchscreen feature requested.
This changes the default implied feature of 'android.hardware.touchscreen'
to 'android.hardware.faketouch' if no 'android.hardware.touchscreen'
feature is requested, required or otherwise.

Bug:30571641
Change-Id: I1e41242d4b1dc549cf69741d2a309baf476d084e
2016-08-01 17:20:28 -07:00
Dan Willemsen
77508b9c19 Rename libprotobuf-cpp-lite_static to libprotobuf-cpp-lite am: 2005edf642
am: 4ee22dd083

Change-Id: I5a9006361b3ded4eaf03b1362a0dfa2aa36fdb2e
2016-08-01 23:46:15 +00:00
Dan Willemsen
4ee22dd083 Rename libprotobuf-cpp-lite_static to libprotobuf-cpp-lite
am: 2005edf642

Change-Id: I48dfa98a54a8680d091cbc403feb30bba35f2efd
2016-08-01 23:39:34 +00:00
Adam Lesinski
3822763bfc Merge "AAPT2: Add script to remove duplicate resource definitions" 2016-08-01 22:05:49 +00:00
Adam Lesinski
6bce46e3a9 Merge "AAPT2: Allow <intent-filter> within <provider> in AndroidManifest.xml" 2016-08-01 22:04:52 +00:00
Adam Lesinski
bb5a390142 AAPT2: Allow <intent-filter> within <provider> in AndroidManifest.xml
Change-Id: I005120b76679f51039ddc40160c96ead6ab5fa4f
2016-08-01 15:01:08 -07:00
Adam Lesinski
9eff3cd594 AAPT2: Add script to remove duplicate resource definitions
Change-Id: I1577cc35cf1db0a7cf24a072485fc3af14c1d02e
2016-08-01 12:58:17 -07:00
Diego Perez
f627cbb15b Try to resolve IDs also as enums
This is intended to cover the edge case in ConstraintLayout (and
possibly in other places) where an attribute is defined as
reference|enum.
If we can not resolve the value as a reference, try to resolve it as an
enum and return the value.

Change-Id: I2817aa5d78500247a2e9aec5411586a1db13791d
(cherry picked from commit b24b563654bf7c007f0912bf32fbab948fcb6daa)
2016-08-01 10:12:45 +00:00
Dan Willemsen
2005edf642 Rename libprotobuf-cpp-lite_static to libprotobuf-cpp-lite
Use the same name for the static and shared libraries so that the module
definitions can be shared.

Change-Id: I1578ee7044689194ae1baea4d71f1b0e8737505f
2016-07-31 22:48:28 -07:00
Colin Cross
5abb99e206 Fix build
addAppToekn and setAppTask have a new argument.

Change-Id: I8a66863ba4e1cb2991a9f2ae355d0b89e9789f57
2016-07-29 10:46:58 -07:00
Sergio Giro
03b95c7df5 Unicode: specify destination length in utf8_to_utf16 methods
Change-Id: I5223caa7d42f4582a982609a898a02043265c6d3
2016-07-29 17:54:30 +01:00
Diego Perez
3a6cdb18d1 Silence errors when probing for AppCompat views
Currently, the only way that layoutlib has to detect if the support
library is a dependency of the project is to try to instantiate one of
the classes. In some cases, this might report errors that we do not want
the user to see since we will fall back to loading the non-appcompat
version.

Bug: http://b.android.com/218478
Change-Id: I064209f2c31d00c0cdfc9edb4cddec40e8e8f416
(cherry picked from commit 71dcc03353d4412231c8d8d0398ccdcad6c225d1)
2016-07-28 18:36:09 +00:00
Roozbeh Pournader
ede3a17f60 Add test for ascent and descent of serif and mono fonts
fontchain_lint now has tests making sure that their ascent and
descent matches that of Roboto.

Also, this moves a test class that contains a similar test and and
other related tests from graphictests to coretests.

Bug: 19791102
Change-Id: I8b473dd2a5f97ae2e3d322a2cabc16f3d32489f6
2016-07-27 16:35:12 -07:00
Roozbeh Pournader
3abdfedac4 Merge "Test Roboto's vertical font metrics" 2016-07-27 23:22:42 +00:00
Roozbeh Pournader
bac1aec635 Test Roboto's vertical font metrics
Test that yMin, yMax, Ascent, and Descent values of Roboto are not
changed.

Bug: 26187231
Change-Id: Ia41f5a118e292b8eda8dae5124be112dc0cdbc8d
2016-07-27 13:10:24 -07:00
Adam Lesinski
b720bc304e Merge "AAPT2: Add version info and release notes" 2016-07-27 19:53:18 +00:00
Adam Lesinski
ad48bbcbf6 Merge "AAPT2: Change accepted notation for resource names in tests" 2016-07-27 19:52:44 +00:00
Adam Lesinski
f455762ec6 Merge "AAPT2: Add support to specify stable IDs" 2016-07-27 19:52:27 +00:00
Roozbeh Pournader
2d0ee1436c Merge "Check defaults for Android default-emoji characters" 2016-07-26 23:11:34 +00:00
Roozbeh Pournader
10ea8f7431 Check defaults for Android default-emoji characters
There are 12 characters that Android is defaulting to emoji,
differing from UTR #51 recommendation. This tests for their proper
support.

Change-Id: Icd570510090ef29b3b7a3520bc368c5f77f99fa4
2016-07-26 23:09:48 +00:00
Chad Brubaker
c7d6470f75 Add missing sendBroadcastAsUser to BridgeContext
Change-Id: I843c4a97e07c955d5f588448ec1c147f4634117f
2016-07-26 14:28:56 -07:00
Adam Lesinski
0368ebfc29 AAPT2: Add version info and release notes
Bug:30402888
Change-Id: Idb532cc71921eb1cfba31c00a6fb7108e31fddd8
2016-07-26 12:57:21 -07:00
Adam Lesinski
58a20a6482 AAPT2: Change accepted notation for resource names in tests
Previously the way to name resources in tests was to use reference
notation (@[package:][type/]name). Now we use name notation (no @).

Change-Id: I68f0a36562d89cc78c582d128f370d9556c58707
2016-07-25 17:56:58 -07:00
Adam Lesinski
bf0bd0f9ac AAPT2: Add support to specify stable IDs
The --stable-ids flag allows the user to specify a file containing
a list of resource name and resource ID pairs in the form of:

package:type/name = 0xPPTTEEEE

This assigns the given resource the specified ID. It helps ensure
that when adding or removing resources, IDs are assigned in a stable
fashion.

If a package, type, or name is not found, no error or warning is
raised.

Change-Id: Ibc2f4e05cc924be255fedd862d835cb5b18d7584
2016-07-25 16:02:18 -07:00
Roozbeh Pournader
3b3c78e6ba Re-enable disabled emoji tests
Since Ib68f803c6adfb41db70f7319b7736d17cdbb6ec2 updates the emoji
data to version 4.0 beta, we can now re-enable the disabled emoji
tests.

Also fix some style issues, update data file parsing method to handle
the new emoji format, add UN to unsupported flags, and do a little
refactoring.

Bug: 26187231
Change-Id: I441fdfed68381d08e5e0b3af91e94bfae742eef6
2016-07-25 14:13:00 -07:00
Alexandria Cornwall
e0af925c8f AAPT2: Convert StringPool flattening to UTF-8
Convert StringPools in resources.arsc and binary XML files to use UTF-8
instead of UTF-16 to save lots of bytes.

Bug: 30053277
Change-Id: I8eb6c78644e51b15f89edadab71cc86f5a851a45
2016-07-25 09:46:38 -07:00
Chong Zhang
b2f4641039 Clean up surfaces when app is resumed without being stopped. am: 45e6d2dc8b
am: b76adc5117

Change-Id: I35c39c4fc49a953262b5b6ab4cbc2dca2ddf0b8f
2016-07-22 17:26:15 +00:00
Chong Zhang
b76adc5117 Clean up surfaces when app is resumed without being stopped.
am: 45e6d2dc8b

Change-Id: I9ae5c2a9c6a93246338221252cf943db6763e1c4
2016-07-22 17:17:26 +00:00
Chong Zhang
45e6d2dc8b Clean up surfaces when app is resumed without being stopped.
When quickly toggling between two apps, app could be resumed while
it's stopping but not yet stopped. Upon resuming, it could have
surfaces that's marked mDestroying and waiting for the stopped
to be destroyed.

We need to dispose these surfaces properly. If the window is already
removed, we destroy them. Otherwise, clear mDestroying flag so that
the window is ready to be used again. Leaving mDestroying=true makes
the window ineligible for certain things such as receiving wallpaper.

bug: 30255354
Change-Id: Id881653550595ab8e702d6950949bf202ac5a0d9
2016-07-21 10:17:39 -07:00
Ivan Gavrilovic
0ce1875e0c Merge "Aapt main dex proguard rules - always keep application" 2016-07-21 09:03:01 +00:00
TreeHugger Robot
c5837520ba Merge "Add per-user versions of set{Component,Application}EnabledSetting." 2016-07-20 18:58:56 +00:00
Sudheer Shanka
0e6bfff6c1 Add per-user versions of set{Component,Application}EnabledSetting.
Change-Id: Id63b233308e92a4c360f38d4728c519ac2131ff0
Fixes: 30230444
2016-07-20 10:30:57 -07:00
Ivan Gavrilovic
f580d91dab Aapt main dex proguard rules - always keep application
Aapt with -D option was not keeping the application and instrumentation
subclasses, which were instead handled by mainDexClasses.rules. Instead,
include them in the aapt -D output.

Change-Id: Ia3b89fc2edd45d379c4d06f0bf674716646fcb3d
2016-07-20 15:38:48 +01:00
Diego Perez
554881712c Merge "Ignore ?attr/windowActionBar when displaying menus" 2016-07-20 12:32:49 +00:00
Diego Perez
9c142c0e15 Merge "More fixes for VectorDrawable memory management" 2016-07-20 12:32:44 +00:00
Diego Perez
c7c3636c2f Ignore ?attr/windowActionBar when displaying menus
When we are displaying menus we do not care about that theme setting as
we always want to display the actionbar and the menu.

Bug: http://b.android.com/212320
Change-Id: I3b6200cc42e3c525a3763d14d423ee8371acc2f1
(cherry picked from commit 71eb800c0bb21b0e4cea3b29235ac4e544e765b2)
2016-07-19 15:46:54 +00:00
Diego Perez
34e0121962 Restore getAccessibleMethod in the preferences inflater
It turns out that although the method was public, the class is package
protected and hence the "Accessible" call

Change-Id: Iec69ad15db4c22d472a941dd335b6cf7789eea09
(cherry picked from commit ff78c344e63c8665ab7b0773b91e473b4fe650ff)
2016-07-19 15:43:25 +00:00