5374 Commits

Author SHA1 Message Date
Seigo Nonaka
ecc3afd49a Merge "Update Typeface.Builder API to reflect API feedback." into oc-dev am: 1e924df63e
am: fa4b862518

Change-Id: I0aa32f46d20a5d46454f2a6057db2ca0e70f1d84
2017-04-12 21:37:09 +00:00
Seigo Nonaka
1e924df63e Merge "Update Typeface.Builder API to reflect API feedback." into oc-dev 2017-04-12 19:39:50 +00:00
Seigo Nonaka
5421e81023 Update Typeface.Builder API to reflect API feedback.
- Stop pooling and remove reset method.
- Introduce overloaded constructors instead of setSource methods.
- Make italic parameter boolean and treat "not called" as
  RESOLVE_BY_FONT_TABLE.
- Remove constants and move them to Typeface with private static
  constant.
- Fix JavaDoc.

Bug: 37082657
Test: android.graphics.cts.TypefaceTest passed
Change-Id: I0c50cf3e2d50c0021f7e12bbb7ed7ae89fa1c2a1
2017-04-12 07:12:41 -07:00
Colin Cross
d88676f363 Merge "Update layoutlib to match java library changes" into oc-dev 2017-04-12 00:05:01 +00:00
Fabrice de Gans-Riberi
7658dbe836 Merge "AAPT2: expose return values through JNI." into oc-dev am: 3f1febbedb
am: c8fcac116b

Change-Id: Ic2f8b64ab62f3d04110faf38575e21eef93bcaf6
2017-04-11 20:21:16 +00:00
Fabrice de Gans-Riberi
c8fcac116b Merge "AAPT2: expose return values through JNI." into oc-dev
am: 3f1febbedb

Change-Id: I2d145aaeb975dfa6abc34f1d5c4e0e9a5708a8b4
2017-04-11 20:11:40 +00:00
Fabrice de Gans-Riberi
3f1febbedb Merge "AAPT2: expose return values through JNI." into oc-dev 2017-04-11 19:56:19 +00:00
Roozbeh Pournader
7c33271ce6 Merge "Update fontchain_lint to test new emoji font" into oc-dev am: f72b0eec6e
am: 028312c74c

Change-Id: I64a8fadde3a5cd1d26e2b244073bc9c3980340f9
2017-04-11 18:40:26 +00:00
Roozbeh Pournader
028312c74c Merge "Update fontchain_lint to test new emoji font" into oc-dev
am: f72b0eec6e

Change-Id: Ie4e8d0621e8b5d133248f457c3a734ef035d7b80
2017-04-11 17:55:45 +00:00
Roozbeh Pournader
f72b0eec6e Merge "Update fontchain_lint to test new emoji font" into oc-dev 2017-04-11 17:24:32 +00:00
Colin Cross
c12fde4f25 Update layoutlib to match java library changes
javalib.jar is now only used for jars that contain dex files, so
host java libraries are now always called classes.jar.  Update
layoutlib's custom rules to match.  Also remove built_ext_data,
the classes.jar in built_ext_classes already contains the
resources.

Bug: 36902714
Test: layoutlib-tests
Change-Id: I522d9e3786ad7deeb291c7c1a61ec4b86be03dc2
(cherry picked from commit 15d18782065c05d6566841da43ce311e5000eddd)
2017-04-11 10:02:54 -07:00
Chris Warrington
014d315653 AAPT2: expose return values through JNI.
Test: Tests for JNI in the studio-master-dev branch.
Change-Id: I709595aabf31c9c2fea659c7af20a5c50d1e3d34
2017-04-11 09:21:29 +00:00
Adam Lesinski
28cbafd016 Merge "AAPT2: Share split functionality between link and optimize" into oc-dev am: 3750fd24c6
am: c9b051fc18

Change-Id: Iba627ab405c847424bbb1d24e06fe2a24daa49e7
2017-04-10 23:59:33 +00:00
Adam Lesinski
c9b051fc18 Merge "AAPT2: Share split functionality between link and optimize" into oc-dev
am: 3750fd24c6

Change-Id: I336963f7e70fb77522d8f478b8c0a831e938d9f1
2017-04-10 23:28:58 +00:00
Roozbeh Pournader
aa3ee8e079 Update fontchain_lint to test new emoji font
The new emoji font has been update to Unicode 10/Emoji 5, and has a
new mechanism for flag fallbacks. It also shares glyphs between
gendered emoji and non-genders ones.

Test: make fontchain_lint passes
Bug: 34688862
Bug: 33276970
Bug: 34738377
Change-Id: I4d43b8c777deb93be1e6a784eaa109e2e7febd7d
2017-04-10 13:52:20 -07:00
Adam Lesinski
d0f492db03 AAPT2: Share split functionality between link and optimize
Generating splits should be possible to do from the optimize command.
This means that a lot of infrastructure around split APKs can be
shared by both the optimize and link phase.

Bug: 35925830
Change-Id: Ia88b9e4bff300a56353b2f7a4a2547c8eb43a299
Test: manual
2017-04-10 11:59:18 -07:00
Jerome Gaillard
eadac86670 Merge "Update Bitmap_Delegate following Change I0092fe44" 2017-04-10 18:43:10 +00:00
Jerome Gaillard
04b4f89d9d Update Bitmap_Delegate following Change I0092fe44
Test: Layoutlib tests
Change-Id: I3b1cfb460a6b7ccd6b63bd53194383154a68591c
2017-04-10 17:07:49 +01:00
Diego Perez
0c06555dca Inline some of the files into the tests
Modify LayoutPullParser construction to make clear what the different
constructors do and create a new one to build a parser just from a
String. By using this constructor, the CL inlines some of the smaller
files into the test for easier reading and maintenance.

Test: Modifies existing tests
Change-Id: Ieb20dcad4f62dc09252d01841bff37cf2c3c4a10
2017-04-10 15:00:43 +00:00
Mihai Nita
b53ce3f32f Merge "AAPT2: fixing the -c flag being ignored" into oc-dev am: 7354ee76aa
am: ab13d9f9b3

Change-Id: I5ef37fa7082ffb12e7cf7454e8fde0ee566e6458
2017-04-07 22:18:50 +00:00
Mihai Nita
ab13d9f9b3 Merge "AAPT2: fixing the -c flag being ignored" into oc-dev
am: 7354ee76aa

Change-Id: Iec7350226e00bca1acf7e24bbf447f95c53b5c51
2017-04-07 22:08:21 +00:00
Mihai Nita
f4dacf29cc AAPT2: fixing the -c flag being ignored
Bug: 36999175
Test: manual

Change-Id: Id9a4a00a3b37bc088d86df7c75bbe711536b980f
2017-04-07 09:27:03 -07:00
Roozbeh Pournader
f439e22fb6 Merge "Use additions/emoji-data.txt instead of hardcoded values" into oc-dev am: 43fed9afe4
am: 5ba27c46bb

Change-Id: I5530187fd5f32de752c82bd22b5d9ccb0496ce27
2017-04-06 22:45:01 +00:00
Roozbeh Pournader
5ba27c46bb Merge "Use additions/emoji-data.txt instead of hardcoded values" into oc-dev
am: 43fed9afe4

Change-Id: I3c077353adf8040118b0610248848fe3d552a70e
2017-04-06 21:20:03 +00:00
Roozbeh Pournader
43fed9afe4 Merge "Use additions/emoji-data.txt instead of hardcoded values" into oc-dev 2017-04-06 21:13:28 +00:00
Colin Cross
9118af6d28 Merge "Update layoutlib to match java library changes" am: ac6414524c am: 72ae1a8958 am: a989576027
am: 8a7b3ce32a

Change-Id: I0afbc3c3fbc03b0e55d6bc1a4da9f4b3d384ad9d
2017-04-06 16:00:28 +00:00
Colin Cross
8a7b3ce32a Merge "Update layoutlib to match java library changes" am: ac6414524c am: 72ae1a8958
am: a989576027

Change-Id: Ib1317327abce727809750ff9a82882e27ce24c66
2017-04-06 15:53:37 +00:00
Colin Cross
ac6414524c Merge "Update layoutlib to match java library changes" 2017-04-06 15:30:45 +00:00
Adam Lesinski
4ab1d64f36 Merge "AAPT2: Fix pseudolocalization (again)" into oc-dev am: 448727bdae
am: 557f8f72c8

Change-Id: Ic6d09cc47c988999f1c566afaa676a59c7a04b41
2017-04-05 22:04:19 +00:00
TreeHugger Robot
448727bdae Merge "AAPT2: Fix pseudolocalization (again)" into oc-dev 2017-04-05 20:43:23 +00:00
Roozbeh Pournader
f7a68c10c7 Use additions/emoji-data.txt instead of hardcoded values
Previously, characters for which Android defaulted to emoji were
hardcoded in the script. Now they are read from a data file.

Test: make checkbuild passes
Bug: 36536216
Change-Id: I99eeadf89a29b8a3336263dd68520433765ed5e2
2017-04-05 09:22:42 -07:00
Adam Lesinski
787f3705b8 Merge "AAPT2: Allow multiple -c flags" into oc-dev am: 7a7e415967
am: 1f44c49fee

Change-Id: I106ad83a5268f3b71316d2f63ac67759a815ae46
2017-04-04 19:40:22 +00:00
TreeHugger Robot
7a7e415967 Merge "AAPT2: Allow multiple -c flags" into oc-dev 2017-04-04 19:14:47 +00:00
Seigo Nonaka
c802751704 Merge "Reorganize font enumeration API." into oc-dev am: 2ac9698271
am: de5fa6b3d8

Change-Id: I72a02f3f681b3b5f82cffc317fe0668e842464fe
2017-04-04 17:04:40 +00:00
Adam Lesinski
113ee09738 AAPT2: Allow multiple -c flags
AAPT allows multiple -c flags in addition to separating -c arguments
with commas.

Bug: 35671619
Test: manual
Change-Id: I90491968e8ea2b28e3cd6e9246bcdd62bd6d6a3c
2017-04-03 19:38:25 -07:00
Charlie Tsai
f7fe5a7ff8 Fixed Intent parsing error of PreferenceScreen
When PreferenceScreen contains the Intent tag with
the extra tag, the parsing of xml file is failed and
causes the render problem on Layout editor.

Test: N/A
Bug: http://b.android.com/233302

Change-Id: I987de7aa125299d46fc1b7670f07f3dd4427ee21
2017-04-04 02:15:38 +01:00
Seigo Nonaka
ff55115121 Reorganize font enumeration API.
This CL cleans up APIs around font variation settings.
- Remove FontConfig and FontManager public API.
- Remove FontManagerService from system service.
- Extract inner class FontConfig.Axis as top-level class FontVariationAxis.
  This is used by Typeface.Builder public API to create new Typeface.
- Introduce and expose FontVariationAxis utility functions from/to string.
- Throws if the invalid font variation settings is passed.

Test: android.text.cts.FontVariationAxisTest passes
Test: android.graphics.cts.TypefaceTest passes
Test: android.graphics.cts.PaintTest passes
Change-Id: I9ccafe7a53935960566243e2856e166878ca59ae
2017-04-03 13:55:07 -07:00
Diego Perez
fdf453aa9d Fix broken perf tests
Do not dispose Bridge on tearDown. The concept of disposing the Bridge
only made sense when we were loading it dynamically. Some classes have
static initializers that will fail after the dispose (like Typeface).

Test: N/A
Change-Id: I9c934432232bda02a4d26425587096fb6dc957b0
(cherry picked from commit f1532e36e16e2b55f175a24f11df91cf344833ff)
2017-04-03 14:11:23 +00:00
TreeHugger Robot
28119285e8 Merge "Revert "Layoutlib changes to support the new ResourceUrl"" into oc-dev 2017-04-01 05:31:05 +00:00
Adam Lesinski
8049f3da71 AAPT2: Fix pseudolocalization (again)
Pseudolocalization didn't properly handle spans in
strings like "<small><small>Hello</small></small>".

The spans would be identical and when doing range checks
only one of them would be updated.

Switched to a more robust way of extracting the relevant
chunks of a styled string. This uses a stack, which is more
in line with the real representation in XML.

Bug: 34088357
Test: make aapt2_tests
Change-Id: Ia4e4501713e688c96a89e26e4e2b1384f4cd3889
2017-03-31 18:30:20 -07:00
Jungshik Shin
a36e869191 Merge "Use variable fonts for Noto Sans Khmer" into oc-dev am: f9f1f1c1c3
am: 0a25996c22

Change-Id: Icf3d95ae5763fe51913e98a91d5cf40840f08d4e
2017-04-01 00:18:13 +00:00
TreeHugger Robot
f9f1f1c1c3 Merge "Use variable fonts for Noto Sans Khmer" into oc-dev 2017-04-01 00:00:52 +00:00
Dianne Hackborn
cc88ddd7ea Merge "Implement issue #36590595: Add ability to associated a ClipData with JobInfo" into oc-dev am: 2d161b1d3f
am: 666fe849e3

Change-Id: I61afc96a01bc8bc5d637d65a3f9a84452babd3ed
2017-03-31 23:44:42 +00:00
Winson Chung
c0e2621910 Merge "Ensure we show the PiP menu in response to KEYCODE_WINDOW." into oc-dev am: 2af994ec03
am: da7ef8060d

Change-Id: I715e2e79b729d28b856a8eda42b099db56cb0184
2017-03-31 23:27:58 +00:00
TreeHugger Robot
2d161b1d3f Merge "Implement issue #36590595: Add ability to associated a ClipData with JobInfo" into oc-dev 2017-03-31 23:21:11 +00:00
Jungshik Shin
88b1114010 Use variable fonts for Noto Sans Khmer
Update fonts.xml to use NotoSansKhmer-VF.ttf.

The weight range of Khmer is also extended to have 9 weight instances
(three more than Roboto with 200, 600 and 800).

The width range for Khmer is left alone partly because of an apparent
lack of support in fonts.xml for non-normal width fallback fonts.

Note that Noto Sans Khmer UI is left alone because of a baseline issue.

BUG: 22667753
Test: See the QA instruction in comment 10 of the bug.
Test: fontchain_lint
Change-Id: Idf6d4fec86822663ac08feb8979edacbc6c709a0
2017-03-31 19:31:13 +00:00
Winson Chung
ac52f2892d Ensure we show the PiP menu in response to KEYCODE_WINDOW.
Bug: 36687605
Test: android.server.cts.ActivityManagerPinnedStackTests
Test: #testWindowButtonEntersPip
Change-Id: I0bb35fd666eb6a438e4676267f6726b44bffb3db
2017-03-31 10:42:53 -07:00
Dianne Hackborn
a47223f99b Implement issue #36590595: Add ability to associated a ClipData with JobInfo
Yum!

Also needed to have a Context.revokeUriPermission() variant that is sane,
so reasonable CTS tests can be written.

Test: new ClipDataJobTest added.

Change-Id: Ia3135ea788a6e32c971bae7dab3a844d0ef4139c
2017-03-31 10:41:50 -07:00
Diego Perez
51b4387ae0 Revert "Layoutlib changes to support the new ResourceUrl"
This reverts commit 9fb4d6876a78fb336cb3650aca84bce723f96ecb.

Test: N/A
Change-Id: I57a09c6f011b8d8c9c2d054b03536e0a6fcc5688
(cherry picked from commit a4e82144b26ee50fca2739abc4f6c7111dc2f3cb)
2017-03-31 13:46:26 +00:00
Christopher Tate
08992ac57e API refactor: context.startForegroundService()
Rather than require an a-priori Notification be supplied in order to
start a service directly into the foreground state, we adopt a two-stage
compound operation for undertaking ongoing service work even from a
background execution state.  Context#startForegroundService() is not
subject to background restrictions, with the requirement that the
service formally enter the foreground state via startForeground() within
5 seconds.  If the service does not do so, it is stopped by the OS and
the app is blamed with a service ANR.

We also introduce a new flavor of PendingIntent that starts a service
into this two-stage "promises to call startForeground()" sequence, so
that deferred and second-party launches can take advantage of it.

Bug 36130212
Test: CTS

Change-Id: I96d6b23fcfc27d8fa606827b7d48a093611b2345
(cherry picked from commit 79047c62b58fb0a0ddf28e2b90fe4d17e05bc528)
2017-03-30 18:31:24 +00:00