5358 Commits

Author SHA1 Message Date
Siyamed Sinir
a54b89e000 Merge "Update fontchain to read from additional sequences" into oc-dev 2017-04-25 17:48:29 +00:00
Siyamed Sinir
6e06ad055b Update fontchain to read from additional sequences
Test: make fontchain_lint

Bug: 37520224
Bug: 37169477
Change-Id: Ie01a2aca85314701654cc2397f0bcf8eafdbe608
2017-04-25 17:32:15 +00:00
TreeHugger Robot
b9dbee430d Merge "AAPT2: Add better error message when processing invalid files" into oc-dev 2017-04-25 15:26:24 +00:00
TreeHugger Robot
7beb895d75 Merge "AAPT2: Allow <path-permission> tag in <provider>" into oc-dev 2017-04-25 15:26:01 +00:00
TreeHugger Robot
76831f7e39 Merge changes I7d2b7e50,I784406a6 into oc-dev
* changes:
  AAPT2: Allow truncating of package names
  AAPT2: Make BinaryResourceParser more lenient
2017-04-24 23:26:06 +00:00
Adam Lesinski
776aa959c7 AAPT2: Add better error message when processing invalid files
Instead of showing a failed mmap error, show a better error when a file
being compiled is a directory or other unsupported file type.

Bug: 37626838
Test: manual
Change-Id: Ib9acf5f48ab5da37e79411c6a9f37c51f00f925f
2017-04-24 22:19:53 +00:00
Jeff Sharkey
57b999605c Merge "Bunch of new API lint rules." into oc-dev 2017-04-24 22:18:56 +00:00
Adam Lesinski
25783cab0b AAPT2: Allow <path-permission> tag in <provider>
Fix a typo where the wrong tag name was expected under <provider>
in AndroidManifest.xml.

Bug: 37627250
Test: manual
Change-Id: I45afd09b4ff25feb320f7991e16c4172e20dd417
2017-04-24 22:18:48 +00:00
Adam Lesinski
b522f04bc2 AAPT2: Allow truncating of package names
ResTable_package header only allows 127 UTF-16 characters, so AAPT
would truncate the real package name to fit. AAPT2 would error-out
on any package name longer than 127 UTF-16 characters. This strictness
is not required except when building shared libraries, which use the
full package name as a way of identifying the runtime assigned
package ID to package name mapping.

Bug: 36940145
Test: make aapt2_tests
Change-Id: I7d2b7e50c7ab30c6a6c4f15d310e711f68e35091
2017-04-21 17:02:09 -07:00
Adam Lesinski
9431c476f3 AAPT2: Make BinaryResourceParser more lenient
Trailing data after the main RES_TABLE_TYPE should be logged but not
cause an error.

Bug: 36945869
Test: (aapt2 dump apk/attached/in/bug.apk)
Change-Id: I784406a680b79630798fdb4b7ca81f9d1f2b96d1
2017-04-21 16:09:24 -07:00
Chad Brubaker
1f4e053aef Merge "Address API review comments for registerReceiver" into oc-dev 2017-04-20 19:52:51 +00:00
TreeHugger Robot
fb4fb03cc3 Merge "Address API council comments" into oc-dev 2017-04-20 03:53:37 +00:00
Jeff Sharkey
24bda1d6c8 Bunch of new API lint rules.
Test: manual verification
Fixes: 34709091
Fixes: 36699437
Fixes: 36737455
Fixes: 36737419
Fixes: 37279778
Fixes: 37283667
Fixes: 37473581
Fixes: 37505566
Fixes: 37509300
Change-Id: Ie5dbcc2932313225e5cbc1f4aa6961e4db2f3d45
2017-04-19 16:40:54 -06:00
Chad Brubaker
6d6015f652 Address API review comments for registerReceiver
Bug: 37465538
Test: manual; Verified that Instant Apps can send broadcasts to
receivers still via the changed API.

Change-Id: Ib0f3d0c8ee71234288ccecd07e621554eb9b70ac
2017-04-19 15:06:35 -07:00
Chad Brubaker
904e6cad28 Merge "Change ANDROID_ID for Instant Apps" into oc-dev 2017-04-19 21:00:55 +00:00
TreeHugger Robot
7844a34308 Merge "Fix issue with unresolved IDs in adaptive icons" into oc-dev 2017-04-19 20:54:10 +00:00
Chad Brubaker
0d277a7b18 Change ANDROID_ID for Instant Apps
ANDROID_ID for Instant Apps now has the following properties:
1) per-app scoped
2) reset if the user clears the Instant App
3) remains the same if the Instant App gets upgraded to an installed
app.

Note that if the user goes instant -> installed_1 -> uninstall ->
installed_2 the ANDROID_ID at installed_1 will not be the same as
installed_2. This was deemed better than the id changing on the upgrade
step.

Test: manual
Change-Id: I532975c50049c94ff80902a897e001dd35a69f9f
2017-04-19 11:10:53 -07:00
TreeHugger Robot
26e1d91939 Merge "AAPT: Auto-alias application adaptive-icon" into oc-dev 2017-04-19 17:32:05 +00:00
Adam Lesinski
54b58ba5cc Fix issue with unresolved IDs in adaptive icons
Adaptive icons were versioned correctly, but skipped the compilation
/ resource ID assignment phase. This CL fixes the glitch.

Bug: 34829129
Test: manual
Change-Id: I93739a8b10fac53a048d95b330edf381684a807c
2017-04-18 18:05:02 -07:00
Svetoslav Ganov
345ffa5421 Address API council comments
Test: cookie CTS tests pass

bug:37327624
bug:37325276
bug:37323696

Change-Id: I52b10470759e471629ec6772e115df94482eb341
2017-04-18 16:44:43 -07:00
Adam Lesinski
99d36ee8a9 AAPT: Auto-alias application adaptive-icon
When a developer specifies an adaptive application icon,
and a non-adaptive round application icon, create an alias
from the round icon to the regular icon for v26 APIs and up.

We do this because certain devices prefer android:roundIcon over
android:icon regardless of the API levels of the drawables set for
either.

This auto-aliasing behaviour allows an app to prefer the
android:roundIcon on API 25 devices, and prefer the adaptive icon on
API 26 devices.

An app developer can override this behaviour by explicitly setting the
android:roundIcon to a drawable that has a v26 qualifier.

Bug: 34829129
Test: manual
Change-Id: Iaaaa5d8367e4f3f9e9f2e3b51c782d3be6a3bb71
2017-04-17 16:22:03 -07:00
Christopher Tate
242ba3e997 Turn down the preliminary foreground service API
The NotificationManager.startServiceInForeground() experiment is over,
and will not ship as API, so it's time to tidy up and get rid of it.

Bug 36130212
Test: manual

Change-Id: I834d1ce059aa464ff27f69f5e5d3625cc5e61d8a
2017-04-17 14:22:18 -07:00
TreeHugger Robot
676590d060 Merge "expose the instant app installer component" into oc-dev 2017-04-17 14:17:27 +00:00
Todd Kennedy
801e65905b expose the instant app installer component
Bug: 35873804
Test: TreeHugger
Change-Id: I4d962927587bb10833bfe3c3db27fdceab668fc3
2017-04-14 09:49:13 -07:00
TreeHugger Robot
b97d51a0d2 Merge "AAPT2: Allow the ';' separator on Windows for split args" into oc-dev 2017-04-14 00:58:08 +00:00
Adam Lesinski
db091577ff AAPT2: Allow the ';' separator on Windows for split args
Bug: 36870463
Test: manual (wine)
Change-Id: I8a38545a3cac9354b41858e1840b197b60925c03
2017-04-13 16:07:35 -07:00
Adam Lesinski
62b713ed73 Merge "AAPT2: Fix order-of-destruction crash" into oc-dev 2017-04-13 22:54:02 +00:00
Adam Lesinski
ea134e08d7 AAPT2: Fix order-of-destruction crash
Make sure that users of StringPool are destroyed before
the StringPool itself.

Test: valgrind aapt2 optimize -o opt.apk out/target/common/obj/APPS/framework-res_intermediates/package-export.apk
Change-Id: I140c2d32f8449028976795d5d6865d83e1409b53
2017-04-13 12:57:06 -07:00
TreeHugger Robot
d1a6e6740f Merge "AAPT2: Generate R.txt" into oc-dev 2017-04-13 06:54:21 +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
Adam Lesinski
418763ff54 AAPT2: Generate R.txt
In order to support a staged rollout of support for AAPT2,
libraries being built the old way (merged into a single resource
directory) still need to make use of the generated R.txt AAPT
emitted. Do the same as AAPT.

Test: manual
Change-Id: Iaac1e824ddbd67e4efbab7692cddc1e4aa052f5a
2017-04-11 17:40:02 -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
3f1febbedb Merge "AAPT2: expose return values through JNI." into oc-dev 2017-04-11 19:56:19 +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
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
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
43fed9afe4 Merge "Use additions/emoji-data.txt instead of hardcoded values" into oc-dev 2017-04-06 21:13:28 +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
TreeHugger Robot
7a7e415967 Merge "AAPT2: Allow multiple -c flags" into oc-dev 2017-04-04 19:14:47 +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
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
TreeHugger Robot
f9f1f1c1c3 Merge "Use variable fonts for Noto Sans Khmer" into oc-dev 2017-04-01 00:00:52 +00:00