4169 Commits

Author SHA1 Message Date
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
Piotr Jastrzebski
62ed63185c Add core-oj to the list of core library jars.
With some core classes moved to separate core-oj jar
we need to use the new jar.

(cherry picked from commit cfa292e1dad184648bf673167f3f35b4fb34fc93)

Change-Id: Iba481c3df029902a2bd0f9661d0819f4a191b2aa
2015-12-22 13:10:55 +00:00
Adam Lesinski
24b8ff0faf AAPT2: Fix references to private parent
Change-Id: Id4697551b6c8cb6167f562de593006ae3c6158c0
2015-12-17 11:01:55 -08:00
Adam Lesinski
7ff3ee19f4 AAPT2: Respect format attribute of <item> tag
An <item> is a general tag that can override certain behavior. For
instance, this is allowed:

    <item name="foo" type="integer" format="float">0.4</item>

Even though without the format attribute, this would be illegal.

Change-Id: I8133ce59e14719a70d7476a1464c3f564c435289
2015-12-17 11:01:55 -08:00
Adam Lesinski
087e0fcba6 DO NOT MERGE: AAPT: Dump uses-permission-sdk-23 am: b2c5155638 am: 40d1ab91d2 am: 8c9209183f am: 7f5ad22330
am: 1f7a36b8e6

* commit '1f7a36b8e6aa55dcb22a63c250fb318260ac349f':
  DO NOT MERGE: AAPT: Dump uses-permission-sdk-23
2015-12-16 23:44:25 +00:00
Adam Lesinski
1f7a36b8e6 DO NOT MERGE: AAPT: Dump uses-permission-sdk-23 am: b2c5155638 am: 40d1ab91d2 am: 8c9209183f
am: 7f5ad22330

* commit '7f5ad223306a482bdf33d213971af041e9fba590':
  DO NOT MERGE: AAPT: Dump uses-permission-sdk-23
2015-12-16 23:35:17 +00:00
Adam Lesinski
7f5ad22330 DO NOT MERGE: AAPT: Dump uses-permission-sdk-23 am: b2c5155638 am: 40d1ab91d2
am: 8c9209183f

* commit '8c9209183fa67953bebe1adb5dfb529c1b6273f0':
  DO NOT MERGE: AAPT: Dump uses-permission-sdk-23
2015-12-16 23:25:45 +00:00
Adam Lesinski
b2c5155638 DO NOT MERGE: AAPT: Dump uses-permission-sdk-23
Include <uses-permission-sdk-23> permissions in dump badging and dump permissions.

This will also add implied features for that permission, marked as -sdk-23 features.

Ex:

uses-permission: name='android.permission.ACCESS_FINE_LOCATION'
uses-permission-sdk-23: name='android.permission.CAMERA'

feature-group: label=''
  uses-feature: name='android.hardware.location'
  uses-implied-feature: name='android.hardware.location' reason='...'
  uses-feature-sdk-23: name='android.hardware.camera'
  uses-implied-feature-sdk-23: name='android.hardware.camera' reason='...'

Bug:24939655
Change-Id: Ifb374696ed4760b0ba2f1cc3516f3bf08e6cb6a3
(cherry picked from commit 5f3b2ecb3e9d27e77bd59c7b9006a6239b773944)
2015-12-16 22:43:07 +00:00
Andrei Stingaceanu
1e2839188f Wire call to suspend a package
Adds APIs in DevicePolicyManager and PackageManager for allowing
a device admin to suspend a package. PackageManagerService sets
or unsets a new PackageUserState 'suspended' setting. Terminal
command to suspend/unsuspend has been added via
PackageManagerShellCommand (as root).

Next steps:
* use the new 'suspended' setting for denying access to start app
(probably in ActivityStackSupervisor)
* broadcast a PACKAGE_(UN)SUSPENDED intent for launchers to pick up
* remove app from recents (go further and kill it if it is running)
* erase existing notifications for this app

Bug: 22776576
Change-Id: I718b3498f6a53cc0c6fdfb6d15031e53ddca4353
2015-12-16 18:14:14 +00:00
Jerome Gaillard
48748c5d5b Use RenderDrawable to render mipmaps am: 4b0fe7f14b
am: e298bcf755

* commit 'e298bcf7552d95475ab3ca9195e12bc14768fdb5':
  Use RenderDrawable to render mipmaps
2015-12-11 07:52:27 -08:00
Jerome Gaillard
4b0fe7f14b Use RenderDrawable to render mipmaps
Bug: http://b.android.com/179714
Change-Id: If05e71b33ee3a95590eb892f4fffbff4cfca1867
2015-12-11 15:05:46 +00:00
Adam Lesinski
a6fe345be9 AAPT2: Fix overlay support
Supports the <add-resource> tag and mimics old AAPT behavior of
not allowing new resources defined unless <add-resource> was used
or --auto-add-overlay was specified.

Change-Id: I9b461137357617ade37fd7045b418b8e6450b9c4
2015-12-10 16:24:15 -08:00
Adam Lesinski
0165523237 Merge "AAPT: Dump uses-permission-sdk-23" 2015-12-10 22:36:29 +00:00
Adam Lesinski
5f3b2ecb3e AAPT: Dump uses-permission-sdk-23
Include <uses-permission-sdk-23> permissions in dump badging and dump permissions.

This will also add implied features for that permission, marked as -sdk-23 features.

Ex:

uses-permission: name='android.permission.ACCESS_FINE_LOCATION'
uses-permission-sdk-23: name='android.permission.CAMERA'

feature-group: label=''
  uses-feature: name='android.hardware.location'
  uses-implied-feature: name='android.hardware.location' reason='...'
  uses-feature-sdk-23: name='android.hardware.camera'
  uses-implied-feature-sdk-23: name='android.hardware.camera' reason='...'

Bug:24939655
Change-Id: Ifb374696ed4760b0ba2f1cc3516f3bf08e6cb6a3
2015-12-10 14:17:52 -08:00
Dianne Hackborn
0c6cc308cf Merge "Add new target SDK filtering feature to BroadcastOptions." 2015-12-10 20:13:29 +00:00
Dianne Hackborn
e0e413e2b1 Add new target SDK filtering feature to BroadcastOptions.
You can now control the range of target SDKs that receivers
will be need to have in order to receive your broadcast.

Use this for CONNECTIVITY_ACTION to not allow N+ applications
to receive these broadcasts through their manifest.

Also tweak the broadcast debug output code to now include the
disposition of each receiver in the list.  This is becoming
important as skipping receivers is becoming a more common
thing to have happen.

Change-Id: I251daf68575c07cbb447536286ab4e68b7015148
2015-12-10 12:12:00 -08:00
Jeff Sharkey
98cb23dccf Merge "Slight API renaming, better behavior." 2015-12-09 22:51:43 +00:00