Commit Graph

4690 Commits

Author SHA1 Message Date
Raph Levien
5370c72c51 Merge \\"Patch out part of the emoji tests.\\" into nyc-mr1-dev am: 2f39bc777c
am: a77343f873

Change-Id: I60cc91a65e818cb78663647bfa249c896a7cff2c
2016-07-14 22:37:50 +00:00
Doug Felt
a77343f873 Merge \"Patch out part of the emoji tests.\" into nyc-mr1-dev
am: 2f39bc777c

Change-Id: I90c3528cf6d85929114af94feb0ef2f36954ca9f
2016-07-14 22:30:09 +00:00
TreeHugger Robot
2ac434dfcc Merge "AAPT2: Remove usage of u16string" 2016-07-14 22:10:46 +00:00
Adam Lesinski
546de682d2 Merge "AAPT: Improve debuggability of aapt dump badging errors" 2016-07-14 02:57:40 +00:00
Adam Lesinski
10de3af152 AAPT: Improve debuggability of aapt dump badging errors
AAPT dump badging errors have been cryptic and difficult
to debug for app developers. Added some line info to the
error statements.

Change-Id: Ieeeb903a1274a91b77329b445e0248b1e67c9568
2016-07-13 17:55:36 -07:00
Adam Lesinski
d0f116b619 AAPT2: Remove usage of u16string
For legacy reasons, we kept around the use of UTF-16 internally
in AAPT2. We don't need this and this CL removes all instances of
std::u16string and StringPiece16. The only places still needed
are when interacting with the ResTable APIs that only operate in
UTF16.

Change-Id: I492475b84bb9014fa13bf992cff447ee7a5fe588
2016-07-13 17:45:28 -07:00
Doug Felt
4970cdac7e Patch out part of the emoji tests.
This is temporary, until we have proper attribution for additional
emoji data.

Bug: 29939737
Change-Id: I5b97c8e055fa2ccf44b13bf801f681b860d47286
(cherry picked from commit f874a1949a)
2016-07-13 18:44:45 +00:00
Zak Cohen
9dc28243c0 Merge \\"Adds a screenshot wallpaper method to WallpaperManagerService.\\" into nyc-mr1-dev am: b4d4ce31ab
am: ee2f46485e

Change-Id: Ia7b738db6f73c89e97537f9b1c0d5cb7fd161616
2016-07-13 10:26:47 +00:00
Zak Cohen
ee2f46485e Merge \"Adds a screenshot wallpaper method to WallpaperManagerService.\" into nyc-mr1-dev
am: b4d4ce31ab

Change-Id: I4737e4d758335240614d2d2b51c11b8c739160fc
2016-07-13 10:22:02 +00:00
Raph Levien
3ccee3a13e Merge "Patch out part of the emoji tests." 2016-07-12 23:26:00 +00:00
Zak Cohen
3683fb1e1d Adds a screenshot wallpaper method to WallpaperManagerService.
Bug: 29963541

Change-Id: If0a574004f8bddf1ba170587a8187253fe045ef4
2016-07-12 17:18:36 +00:00
Sergio Giro
fb5cfc3543 Merge \\"Add bound checks to utf16_to_utf8\\" into nyc-mr1-dev am: 49c410bc48
am: daad138428

Change-Id: I5a660dccb76e823736a59e50904a7279a97ef849
2016-07-12 01:46:30 +00:00
Sergio Giro
daad138428 Merge \"Add bound checks to utf16_to_utf8\" into nyc-mr1-dev
am: 49c410bc48

Change-Id: I9a226afc143db459184a279167f0dce66c0f32df
2016-07-11 12:22:30 +00:00
Sergio Giro
49c410bc48 Merge "Add bound checks to utf16_to_utf8" into nyc-mr1-dev 2016-07-11 12:11:31 +00:00
Doug Felt
f874a1949a Patch out part of the emoji tests.
This is temporary, until we have proper attribution for additional
emoji data.

Bug: 29939737
Change-Id: I5b97c8e055fa2ccf44b13bf801f681b860d47286
2016-07-09 01:10:42 +00:00
Adam Lesinski
71965e898e AAPT2: Fix fully qualified java class verification
Proguard rules would be ignored for components defined
in AndroidManifest.xml for android:name attributes if
they didn't start with '.'.

Change-Id: I029b5a2f224f4daf155b73a2a4dcd940dd43372e
2016-07-07 17:17:55 -07:00
Sergio Giro
4781057e78 Add bound checks to utf16_to_utf8
Test: ran libaapt2_tests64
Bug: 29250543
Change-Id: I1ebc017af623b6514cf0c493e8cd8e1d59ea26c3
2016-07-02 17:46:20 +01:00
TreeHugger Robot
45d8f8e463 Merge "AAPT2: Encode empty attribute string values" 2016-07-01 23:33:29 +00:00
Adam Lesinski
e1fda9aec4 AAPT2: Encode empty attribute string values
Due to another bug, empty strings in XML files
were encoded as NULLs. This was only needed for
encoding missing namespace URIs. Attribute
values should remain empty strings.

Bug:29939875
Bug:29462255
Change-Id: I3897661d85865c88bb2b7cf1495da16c30f7272e
2016-07-01 14:51:51 -07:00
Robert Carr
8942204d93 Merge changes I38cff63b,Id3739bbc,If052cd8c into nyc-mr1-dev am: 30efa24b11
am: 0dbe6db014

Change-Id: I3f0fd113bf9dc063f3bc60301f9a7ddf7d16581d
2016-07-01 19:41:33 +00:00
Robert Carr
0dbe6db014 Merge changes I38cff63b,Id3739bbc,If052cd8c into nyc-mr1-dev
am: 30efa24b11

Change-Id: I9ed6ae1f45221ff702162a1608bb8db7059058f5
2016-07-01 19:38:49 +00:00
Robert Carr
fd10cd1989 Force CROSSFADE rotation when launching from double tap gesture.
When activity transition triggers a rotation change, the starting
window will normally be the top window at the time we try
to select the window animation. However, these layout params won't
have the apps rotation animation set (as the client code will set that
on the real window, not the starting window). Eventually we would
like to add API to specify rotation animation via manifest to solve
this problem cleanly. In the mean time, we can force a specific rotation
animation from the double tap gesture, and clean up some camera
ugliness. We accomplish this by attaching an animation hint to
ActivityOptions.

Bug: 28838855
Change-Id: If052cd8cbae76651da43f3b4c590cd9dcc1afc0f
2016-07-01 11:05:40 -07:00
Diego Perez
f63ff008d5 Merge "Remove inspection_tool from inspectionProfiles" 2016-06-30 19:55:57 +00:00
Diego Perez
7d53410710 Merge "Updating unit tests so they match the expected output" 2016-06-30 19:55:40 +00:00
Adam Lesinski
5e8fa3a248 AAPT2: Improve diff command
Change-Id: Ia1e2f8482c7192ef50126b61bed7975297332767
2016-06-29 21:56:58 -07:00
Adam Lesinski
fb6312fe93 AAPT2: Add version collapsing
When an app specifies (or imports) resources with various
configurations for different SDK versions, specifying
a minSdk will make many of those resources unreachable.

Version collapsing will prune out the resources specified
for SDK versions less than the minSdk.

If, however, there is no exact matching resource for the
minSdk version, the next smallest SDK version is kept.

Change-Id: Ic7bcab6c59d65c97c67c8767358abb57cdec60a4
2016-06-29 17:02:19 -07:00
Jerome Gaillard
c796a98a60 Use a HashSet to store delegate references in layoutlib
More efficient than an ArrayList since we do a lot of remove operations.

Change-Id: Ic4c89df4560066f1a3ab0e71a3b180a9734f9cd6
(cherry picked from commit 12754d621b20e6a925999096ab6f21c4cbfe594a)
2016-06-29 14:57:15 +00:00
Diego Perez
3c4aed26e6 Remove inspection_tool from inspectionProfiles
Change-Id: I8aae3c2d6d46340fa3b4b27c9f217a7f1266d37d
(cherry picked from commit c5c7beca5292bfa248340059401f05e9d687bb2e)
2016-06-27 18:31:31 +00:00
Diego Perez
245e1be94b Updating unit tests so they match the expected output
Change-Id: Id9af601c00fc87f861adeed9f5aa99a3dc55b17e
(cherry picked from commit 768e4c952f335a825cd45b102556d5948ed09d0c)
2016-06-27 18:31:07 +00:00
Roozbeh Pournader
60b64a19f6 Merge "Remove LocaleValue::toDirName() from AAPT2" 2016-06-27 18:18:37 +00:00
Diego Perez
a540344b0a Merge "Avoid calling deepCopyNodes on null array" 2016-06-27 16:10:36 +00:00
Diego Perez
581fa36a13 Merge "Add support for AppCompat widgets" 2016-06-27 15:02:39 +00:00
Diego Perez
52053c9354 Merge "Add warning when RTL is used but not supported/enabled" 2016-06-27 10:40:56 +00:00
Diego Perez
d508639a58 Merge "Update layoutlib following platform change in VectorDrawable" 2016-06-27 10:40:32 +00:00
Diego Perez
e174f1431c Merge "Add tools attributes to set extreme values for NumberPicker" 2016-06-27 10:40:20 +00:00
Diego Perez
95842c887b Merge "Fix NPE when using "view" tag without class attribute" 2016-06-27 10:40:08 +00:00
Diego Perez
2292214a6a Merge "Always calculate default property values" 2016-06-27 10:39:56 +00:00
Diego Perez
721ca186f1 Merge "Fix Path_Delegate reset" 2016-06-27 10:39:41 +00:00
Roozbeh Pournader
112373006f Remove LocaleValue::toDirName() from AAPT2
There was no user, and the code was incorrect too.

Bug: 25599046
Change-Id: I50d14f58995ac611385a6fb17661a357bf473687
2016-06-24 17:01:07 -07:00
Adam Lesinski
96d1db9416 Merge "AAPT2: accept argument file list for -R" 2016-06-24 22:02:41 +00:00
Adam Lesinski
1e21ff00b0 AAPT2: accept argument file list for -R
Bug:29462255
Change-Id: Ia83919a3e7de7fe2056a3f7613621972cccd49cb
2016-06-24 14:57:58 -07:00
Diego Perez
0cf6c930b2 Merge "Do not set default encoding to UTF-8 in KXmlParser" 2016-06-24 16:46:32 +00:00
Adam Lesinski
1f6cab321e Merge "AAPT2: Allow <meta-data> in <application> tag" 2016-06-23 22:13:20 +00:00
TreeHugger Robot
6c05d724da Merge "Fix pseudolocalizer at end of string" 2016-06-23 21:54:12 +00:00
Adam Lesinski
5d84ad5487 AAPT2: Allow <meta-data> in <application> tag
Change-Id: Ica3e7d5c1ce587eba58d8171e0f8d5cdb598e7b3
2016-06-23 13:18:16 -07:00
Adam Lesinski
b2106687e1 Fix pseudolocalizer at end of string
The accent pseudolocalizer would incorrectly process
the byte after the end of the string, which would end
up inserting null characters into the resulting
output.

Change-Id: I5cdabd6b0272d94073f06e180b8cbe7abafa3888
2016-06-23 13:03:15 -07:00
Yohei Yukawa
bf055ba658 Merge \\"Add InputMethodService#exposeContent()\\" into nyc-mr1-dev am: dc42d7dd13
am: d02470f5a8

Change-Id: Id551d53ae3d7c34157ddf166aa44bdef67d46853
2016-06-23 01:37:10 +00:00
Yohei Yukawa
d02470f5a8 Merge \"Add InputMethodService#exposeContent()\" into nyc-mr1-dev
am: dc42d7dd13

Change-Id: Icf3ca0403c7dee26a3083ca98ca1239887d471bc
2016-06-23 01:29:58 +00:00
Yohei Yukawa
dc42d7dd13 Merge "Add InputMethodService#exposeContent()" into nyc-mr1-dev 2016-06-23 01:25:39 +00:00
Yohei Yukawa
25e0813e6e Add InputMethodService#exposeContent()
This is a follow up CL to my previous CLs [1][2] that introduced
InputConnection#commitContent(InputContentInfo, Bundle) API to enable
IMEs to send a content to the target application.

With this CL, IME developers are able to temporarily expose
InputContentInfo object to the target package without permanently
granting URI permission.  Although calling IMS#exposeContent() is
allowed only for the IME that is currently selected, the client is able
to request a temporary read-only access even after the current IME is
switched to any other IME as long as the client keeps InputContentInfo
object.

Here is a sample code snippet about how to use this mechanism.

  [IME]
  InputContentInfo contentInfo = new InputContentInfo(
          contentUri,
          new ClipDescription(description, new String[]{mimeType}),
          linkUrl);
  exposeContent(contentInfo, getCurrentInputEditorInfo());
  getCurrentInputConnection().commitContent(inputContentInfo, null);

  [App]
  try {
      contentInfo.requestPermission();
      // Load inputContentInfo.getContentUri() here.
  } finally {
      contentInfo.releasePermission();
  }

 [1]: Iaadf934a997ffcd6000a516cc3c1873db56e60ad
      152944f490
 [2]: Ica1ba3154795c1bf44e140dfe639b299f83cd8af
      adebb52588

Bug: 29450031
Change-Id: I2772889ca01f2ecb2cdeed4e04a9319bdf7bc5a6
2016-06-22 16:31:41 -07:00