4185 Commits

Author SHA1 Message Date
Diego Perez
365bd8f9b1 New path interpolation to paint vector drawables am: b9c48d8f49
am: 6952063e71

* commit '6952063e7166599f5300427019ca845bbaafa660':
  New path interpolation to paint vector drawables
2016-01-19 10:39:46 +00:00
Diego Perez
b9c48d8f49 New path interpolation to paint vector drawables
Before this CL, PathMeasure_Delegate would use Path_Delegate.approximate
to get a path segment to draw. Path_Delegate.approximate uses a
flattening iterator to do the path approximation.
Unfortunately, because we do not control the stroke mode while painting,
in some cases the approximation would draw unwanted artifacts caused by
the rough approximation and the use of wrong miter values.
This CL does a much better calculation of the path and interpolates the
segments of the curves instead of replacing them with line segments.

This also fixes an issue with the calculation of empty paths.

Bug: http://b.android.com/187256

Change-Id: I450f7aa4c3d9efcbf902a40c3b4d6d388546893f
2016-01-19 10:14:46 +00:00
Dan Albert
46736ec81c Merge "Make the appropriate cast to protect from mingw." am: dbf8c17bd2
am: 2edfa8c9b0

* commit '2edfa8c9b00cd0c0bd18738f75e0928394b99c76':
  Make the appropriate cast to protect from mingw.
2016-01-16 02:25:22 +00:00
Jorim Jaggi
0da43029fd Fix build
Change-Id: I6d4bebf90c11a4a00d259aac34bb9459d973da9b
2016-01-15 16:20:25 -08:00
Dan Albert
2edfa8c9b0 Merge "Make the appropriate cast to protect from mingw."
am: dbf8c17bd2

* commit 'dbf8c17bd20c3c5b4ba99242afa8b714841914d1':
  Make the appropriate cast to protect from mingw.
2016-01-15 21:02:29 +00:00
Dan Albert
ed811eeaea Make the appropriate cast to protect from mingw.
As the comment at the top of the file says:

    STATUST: mingw does seem to redefine UNKNOWN_ERROR from our enum
    value, so a cast is necessary.

Bug: http://b/26523949
Change-Id: I9d86cafdc47bbb9ce0e967cdde9315babc083432
2016-01-15 12:16:06 -08:00
Deepanshu Gupta
15cc7bba8d Merge "Fix custom font rendering" into mnc-ub-dev am: f5984d5fce
am: 14df39f9e5

* commit '14df39f9e5855caef8d272fb136abe17b225d971':
  Fix custom font rendering
2016-01-15 05:29:10 +00:00
Deepanshu Gupta
9757c933b0 LayoutLib: Fix device used comments in intensive tests am: 1665a621da
am: bbd0b324ba

* commit 'bbd0b324ba8e89bd51aad0a59b1a1c891383779f':
  LayoutLib: Fix device used comments in intensive tests
2016-01-15 00:23:33 +00:00
Deepanshu Gupta
4da12f19a6 Merge "Minor fix to wrong error message" 2016-01-14 23:54:14 +00:00
Tor Norbye
8b4a6981fd Minor fix to wrong error message
Change-Id: I3d34c90d37d35d0649a6ef8a73ca0d9320f975dd
2016-01-14 15:53:05 -08:00
Deepanshu Gupta
f5984d5fce Merge "Fix custom font rendering" into mnc-ub-dev 2016-01-14 23:48:17 +00:00
Deepanshu Gupta
2ea852541f Fix custom font rendering
The context was using the wrong asset manager.

Bug: http://b.android.com/198897
Change-Id: Id58473a4539ed93a9f338c730686128c7089fc92
2016-01-14 23:46:42 +00:00
Deepanshu Gupta
1665a621da LayoutLib: Fix device used comments in intensive tests
Change-Id: I65ee2f8bdf096ea991e72c99777c8981da7b5ae2
2016-01-14 23:19:29 +00:00
Adam Lesinski
656a577a34 AAPT2: Accept zip, jack, jar, and flata extensions as archives
Change-Id: I3a4db129998e2351e8221f9d72a4b40d2c7a8cf9
2016-01-14 15:17:41 -08:00
Adam Lesinski
52364f7ae3 AAPT2: Variety of small fixes to get the build working
- Add option to rename package in AndroidManifest.xml
- Support default versionName and versionCode
- Accept True and False as valid booleans

Change-Id: I400e350b9dcd0fd1c197d1929144299c7823617d
2016-01-13 18:48:24 -08:00
Wale Ogunwale
b2d135694f Fix build breakage.
Bug: 22405482
Change-Id: I8fc522885801e9735544ec3820c8fdd4a4368d71
2016-01-13 15:08:29 -08:00
Adam Lesinski
04a424082b Merge "AAPT2: Warn when positional arguments exist and --legacy is on" 2016-01-11 18:44:58 +00:00
Adam Lesinski
979ccb2e6f AAPT2: Warn when positional arguments exist and --legacy is on
This is normally an error, but old AAPT didn't check for it correctly,
so many projects violate this. With --legacy, this becomes a warning.

Change-Id: I23647e029930e11b719591cd38609e1b43247e20
2016-01-11 10:42:19 -08:00
Deepanshu Gupta
0beaeadbe3 Merge "Fix ninepatch scaling." into mnc-ub-dev am: 0c08fc0fc5
am: 2aebcddf02

* commit '2aebcddf02383c84a8a21279d32fd00376b8c25e':
  Fix ninepatch scaling.
2016-01-11 18:23:50 +00:00
Jerome Gaillard
63ebf34d6d Merge "Get color state list file content from PSI instead of disk" into mnc-ub-dev am: 171a2a9322
am: 1bddf2b19d

* commit '1bddf2b19dbfc3f1edc540a5aaaacd84f8831412':
  Get color state list file content from PSI instead of disk
2016-01-11 18:20:35 +00:00
Deepanshu Gupta
0c08fc0fc5 Merge "Fix ninepatch scaling." into mnc-ub-dev 2016-01-11 18:09:45 +00:00
Jerome Gaillard
171a2a9322 Merge "Get color state list file content from PSI instead of disk" into mnc-ub-dev 2016-01-11 18:06:10 +00:00
Jerome Gaillard
b63da06a7a Get color state list file content from PSI instead of disk
Use new functionality from callback to get the content of state list files
from PSI instead of disks.

Bug: http://b.android.com/183767
Change-Id: Ic256d1e7787209d772ccd42c2e3c7f409cac2964
2016-01-11 11:37:19 +00:00
Jeff Sharkey
cd65448ccd Even more PackageManager caller triage.
Finish moving all UID/GID callers to single AIDL method that requires
callers to provide flags.

Triage AppWidgets and PrintServices, which currently can only live on
internal storage; we should revisit that later.

Fix two bugs where we'd drop pending install sessions and persisted
Uri grants for apps installed on external storage.

Bug: 26471205
Change-Id: I66fdfc737fda0042050d81ff8839de55c2b4effd
2016-01-08 18:35:54 -07:00
Andreas Gampe
63ea81ebf4 Merge "Frameworks/base: New preload tool" am: f2c7983de1
am: f2eb8b236f

* commit 'f2eb8b236fada3e7223617689776ef44c9403cfa':
  Frameworks/base: New preload tool
2016-01-08 17:48:44 +00:00
Andreas Gampe
f2eb8b236f Merge "Frameworks/base: New preload tool"
am: f2c7983de1

* commit 'f2c7983de141d008c7c02e3331fbde67e13ac46c':
  Frameworks/base: New preload tool
2016-01-08 17:44:54 +00:00
Deepanshu Gupta
80dc34e358 Merge "Java 8 in layoutlib-create" 2016-01-08 17:37:56 +00:00
Andreas Gampe
f2c7983de1 Merge "Frameworks/base: New preload tool" 2016-01-08 17:35:45 +00:00
Andreas Gampe
554d7ee0f5 Frameworks/base: New preload tool
Add a new preload tool based on hprof dumps. This means that only
a userdebug build (to adjust the pre-existing preloaded-classes
file) is required now, not a recompiled runtime.

Change-Id: Ib0c00de3b248e49fa8271cbace67c5d4a50170a1
2016-01-08 09:25:15 -08:00
Deepanshu Gupta
23e47f5621 Java 8 in layoutlib-create
Upgrade to ASM 5 and diamond operators.

Also minor fixes here and there.

Bug: 26442940
Change-Id: I5611ed0889aa94cca8655fec47799e1ddccb0150
2016-01-08 08:03:06 -08:00
Alex Klyubin
e7565ad959 Merge "[1/3] Remove unnecessary throws statement in ServiceManager" am: d1240219aa
am: 4a06b7ea7e

* commit '4a06b7ea7e493bf7b575da5219429e2cbeb5b3e8':
  [1/3] Remove unnecessary throws statement in ServiceManager
2016-01-07 19:21:59 +00:00
Alex Klyubin
4a06b7ea7e Merge "[1/3] Remove unnecessary throws statement in ServiceManager"
am: d1240219aa

* commit 'd1240219aadedc867b50158c67d1737a27fa7c6f':
  [1/3] Remove unnecessary throws statement in ServiceManager
2016-01-07 19:18:01 +00:00
Jeff Sharkey
6190d9cf17 Merge "Add flags to requests for package UID/GIDs." 2016-01-07 18:31:53 +00:00
Matt Sarett
3b1b68d6c7 Allow ninepatches to be encoded using non-RGBA modes
The original intention for forcing ninepatches to be encoded as
RGBA (with alpha) was to avoid the possibility of the decoder
producing 565 output.

565 output is bad for ninepatches because dithering tiny images
that we intend to scale later leads to bad results.  I would
argue that, since the new BitmapFactory does not dither, we might
now be ok to allow 565 decodes for ninepatches.  However, we
will maintain the old behavior by disabling 565 decodes for
ninepatch.

There are two changes to PNG encodings:
(1) Allows ninepatch images to be encoded in any mode.  Forcing
    them to RGBA makes things awkward for the decoder.  Currently,
    BitmapFactory's png decoder checks every pixel for alpha.
    That way, RGBA images that are actually opaque can be marked
    as opaque, in order to optimize drawing.  We want to remove
    this complexity from the decoder.
(2) Make sure ninepatch chunks are stored in the png header.  That
    way we know immediately that the png is a ninepatch, and can
    refuse to decode to 565 (if we feel this is best).

Change-Id: I724f5dbefb1be7b412f9b362dff83cbc0603f0bf
2016-01-07 18:17:33 +00:00
Jeff Sharkey
8588bc1ef1 Add flags to requests for package UID/GIDs.
This gives callers the ability to request details for missing
packages.  Also add annotations for userId and appId variables and
start tagging their usage.

Change-Id: I63d5d7f870ac4b7ebae501e0ba4f40e08b14f3f6
2016-01-07 10:33:26 -07:00
Umair Khan
9ccebbfc37 [1/3] Remove unnecessary throws statement in ServiceManager
The exception is already caught by the try-catch block.

Change-Id: I0c10fe51d12a10cbc02a25c719d03a4ba6497767
Signed-off-by: Umair Khan <omerjerk@gmail.com>
2016-01-07 15:08:27 +05:30
Adam Lesinski
7751afc796 AAPT2: Fix product support
Previously the default product wasn't tried if 'default' wasn't specified on the command line.
Also adds support for multiple products.

Change-Id: I1e4872b34bb8d609b6444841a4e7e4dbb3bbb76b
2016-01-06 16:18:40 -08:00
Adam Lesinski
198ce1a5e6 Merge "AAPT2: Port AAPT pseudolocalization to AAPT2" 2016-01-06 23:55:06 +00:00
Adam Lesinski
f68f066cdf Merge "AAPT2: Fix references to private parent" 2016-01-06 23:50:50 +00:00
Adam Lesinski
457a7e74be Merge "AAPT2: Respect format attribute of <item> tag" 2016-01-06 23:50:10 +00:00
Jeff Sharkey
e06b4d1d9f Consistent naming for PackageManager methods.
When hidden PackageManager methods take a userId argument, they
should be named explicitly with the "AsUser" suffix.  This fixes
several lagging examples so that we can pave the way to safely
start passing flags to new methods without scary overloading.

Also fix spacing issues in various logging statements.

Change-Id: I1e42f7f66427410275df713bea04f6e0445fba28
2016-01-06 15:21:06 -07:00
Adam Lesinski
393b5f0d61 AAPT2: Port AAPT pseudolocalization to AAPT2
Pseudolocalization happens at the compile phase. Pseudolocalized
values are weak, such that manually specified values will take precedence.

Change-Id: I5e064ce0d270c9f4f9022f75aecedab9d45bc980
2016-01-06 12:05:41 -08:00
Alex Klyubin
4f6d400b0f Merge "No need to pass digest of AndroidManifest.xml around." 2016-01-05 21:19:41 +00:00
Jorim Jaggi
2a37455a28 Fix build
Change-Id: Ifd69818ca6d5dbf129f6c956c1a7dfae760e30d6
2016-01-05 14:31:50 +00:00
Jerome Gaillard
a65ebea1ad Create new Navigation Bar for the Theme Editor Preview am: 3b90b74cf9
am: 968ee5368b

* commit '968ee5368b7d626e7ac64b0befd212a04e9533cf':
  Create new Navigation Bar for the Theme Editor Preview
2016-01-05 14:21:04 +00:00
Wale Ogunwale
66d2dd686e Fix build breakage.
Change-Id: I694a885e705d2543e671fd2809bbb518176c3804
2016-01-04 17:54:26 -08:00
Alex Klyubin
31ffb44241 No need to pass digest of AndroidManifest.xml around.
When an APK is being installed, the full path to the file is
occasionally passed between processes. To detect changes to the file
during these handovers, the digest of the AndroidManifest.xml entry
could be passed around as well.

This security feature is no longer used and is no longer needed. APKs
should be installed using the modern Package Installer API
(android.content.pm.PackageInstaller).

Bug: 24542768
Change-Id: I2762634c85448e7adcd47ffc9a5294c021e127bd
2016-01-04 12:31:29 -08:00
Jerome Gaillard
3b90b74cf9 Create new Navigation Bar for the Theme Editor Preview
The standard navigation bar was not working well in the Theme Editor preview
when in a wide configuration. The bar then did not fit entirely inside the display.
So we created a new Navigation Bar to use in the Theme Editor preview, that fixes
the size problem.

Bug: http://b.android.com/198179
Change-Id: Ifb1fa7b8f399f17392934de89078696337eca3e1
2016-01-04 15:38:12 +00:00
Narayan Kamath
f59c02a65e Merge changes from topic \'aosp-merge-24-12\'
am: e0e81bf407

* commit 'e0e81bf407508ec096c752948f8794af5fd480ca':
  Special case system_server to not create the JIT code cache.
  Don't use IntegralToString
  Track libcore commit 85d69e16fe1e59e50c1ad228e754abf325088362.
  Track API changes to java.lang.ref.Reference.
  Remove merge markers from preloaded-classes
  Move StrictJarFile from libcore to framework
  Switch RecoverySystem impl to use sun.security.pkcs
  API update for OpenJdk based libcore
  Use libcore/known_oj_tags for the javadoc stage.
  Stop preloading fortress classes
  Use HexDump instead of java.lang.IntegralToString
  Add core-oj to the list of core library jars.
2015-12-24 04:07:42 -08:00
Dan Willemsen
1b1f1b14ee AAPT2: Fix compiler error in 32-bit host test
We now default host native tests to build both 32-bit and 64-bit
versions.

The 32-bit version of libaapt2_test was broken because it was comparing
an unsigned int to the result from std::count(std::vector), which is a
signed int. The 64-bit version compiled fine, since
std::count(std::vector) returns a long.

Change-Id: I786fcd8a54d9f78b76b19ef82ab8dda6f5c42197
2015-12-22 13:44:56 -08:00