2457 Commits

Author SHA1 Message Date
Adam Lesinski
91306bccf1 Merge "Add FeatureGroup to PackageInfo" into lmp-dev 2014-08-15 18:56:10 +00:00
Adam Lesinski
d3edfde51b Add FeatureGroup to PackageInfo
FeatureGroups replace top-level FeatureInfo objects.
FeatureGroups inherit top-level FeatureInfos but override
them if the feature names are the same.

Bug:16822121

Change-Id: I80b2cb778a0fbcb4521efce986fba641e0914290
2014-08-15 15:53:35 -07:00
Adam Lesinski
2cb761e3dd Fix assumption about DynamicRefTable in aapt
Packages without any resources should not expect to have
a DynamicRefTable.

Bug:16895517
Bug:17056720
Change-Id: Id006f6bdbf08f30505f6ba5982bc9d1b09db0f0a
2014-08-15 14:01:43 -07:00
Chris Craik
47d8623082 Fix nine patch outline radius computation
bug:16852714
Change-Id: I475154c0f324fd2e2c8991415e0d8240c75663d8
2014-08-15 00:41:09 +00:00
Adam Lesinski
6240840387 Ensure that split names are valid
Generate valid split names for resource splits.
Validate split names for features.

Change-Id: I3040438af0156778c2bd66ddeffdf62fe9dcc9fc
2014-08-14 19:29:47 +00:00
Jorim Jaggi
84a3e7aacf Use different unlock animation when going to full shade
Also fixes a bug that the notify flag was not reset, and fix the
transition for the phone/camera affordance (in these cases, no
animation is needed).

Bug: 15991916
Change-Id: Idbb4fa40f86bda597cd66cc38da838ef4f75514d
2014-08-14 12:29:25 +00:00
Deepanshu Gupta
a3a3775599 Merge "Update intelliJ copyright profile" into lmp-dev 2014-08-14 00:12:29 +00:00
Deepanshu Gupta
aabf346d44 Merge "Add KitKat wifi and battery icons." into lmp-dev 2014-08-14 00:12:29 +00:00
Deepanshu Gupta
84cc05cacd Add KitKat wifi and battery icons.
This adds wifi and battery icons for Gingerbread and KitKat. This also
improves the icon resolution code by extracting it out in its own class.
The resources are now organized such that each API level resource
directory is used as a backup for all API levels lower than itself.

Change-Id: I937c83638adcc9fa8cd407e0a3023c3abe95530d
2014-08-13 23:13:33 +00:00
Deepanshu Gupta
2e7a0355b4 Update intelliJ copyright profile
Change-Id: Ib9386b686cb24e1f187d0b636b59b4b13d59bbcd
2014-08-13 22:52:02 +00:00
Deepanshu Gupta
497f6a1c98 Merge "Whitelist fonts instead of blacklist." into lmp-dev 2014-08-12 23:14:35 +00:00
Deepanshu Gupta
0e4be25409 Whitelist fonts instead of blacklist.
A list of all fonts bundled with the SDK is generated. Load this file to
know which fonts are missing from the SDK.

Change-Id: I1554f1baec842ccdde3b21a93008437e9bac9353
2014-08-12 15:00:58 -07:00
Adam Lesinski
25d35a9d68 AAPT: Dump an APK's split name attribute
Bug:16919497

Change-Id: I109e21bff9e4a64a10f48dce7f2d41102b32ee1d
2014-08-12 22:17:25 +00:00
Deepanshu Gupta
14690b0aa3 Merge "Improve error reporting when renaming fonts." into lmp-dev 2014-08-12 16:54:46 +00:00
Deepanshu Gupta
556f941f55 Merge "Don't show warnings for fonts not bundled." into lmp-dev 2014-08-12 16:54:46 +00:00
Deepanshu Gupta
93b1483e57 Improve error reporting when renaming fonts.
Log a better error in case of invalid input.

Change-Id: Ifb122c1cc624111769e650439aa24290155dbbc4
2014-08-11 18:48:53 -07:00
Deepanshu Gupta
e644ff8d92 Don't show warnings for fonts not bundled.
The extended font set, used on Nexus 5, new Nexus 7 etc., uses OpenType
CFF fonts which don't work well with Java. These fonts are deliberately
excluded from the SDK build.

This change skips the warnings for the missing fonts. However, we still
show warnings for other fonts that failed to load. If the set of fonts
bundled with the SDK changes, we will need to update the list of missing
fonts in FontFamily_Delegate.java.

Change-Id: I3197b5350d048daa09512e8024188909179b1799
2014-08-11 18:11:37 -07:00
Deepanshu Gupta
99d90a6210 Resolve color xml attributes properly.
Color attributes were not being converted to int properly. The
conversion to int was a simple string to int using base 16. This change
resolves the colors as per #RGB, #ARGB, #RRGGBB or #AARRGGBB format
depending on the length of the attribute. All values that begin with '#'
are treated as colors.

Bug: http://b.android.com/73845
Change-Id: I8ad089b821af1e290b9b95771b50213fe2fdd784
2014-08-12 09:57:27 -07:00
Adam Lesinski
ec64709ce0 Merge "AAPT support for feature splits" into lmp-dev 2014-08-09 00:40:15 +00:00
Adam Lesinski
e8e9192507 Have styleable indices be non-final for library projects
Invoking aapt after merging resources from a library project
may yield a different ordering to styleable arrays, so have
the indices be non-final too.

Bug:16842410

Change-Id: I0432bea03dc4312d5908a770fc70a11f0a1596ae
2014-08-07 22:37:12 +00:00
Deepanshu Gupta
c8f2d5e6dc Add font rename script to rename one font only.
This change adds a script that renames only font at a time. This helps
in writing better Makefile rules and passes the job for parallelization
to the make rather than doing it in python which doesn't support ctrl-c
properly.

Change-Id: Icd380e3cc5d744260d6a9f497aa65a1a6c829c2e
2014-08-07 21:41:11 +00:00
Deepanshu Gupta
7ec9d001a9 Create a copy of the build_font.py
The copy will be modified to support renaming only one font at a time.
This is done in two steps to improve the diffs.

Change-Id: I47283745c25882283f0464c17e603396a8c9141e
2014-08-07 21:40:34 +00:00
Adam Lesinski
833f3ccbc8 AAPT support for feature splits
This change allows the developer to add a base package for
which to build a feature split. The generated resource types
will begin after the base APK's defined types so as not
to collide or override resources.

Multiple features can be generated by first choosing an
arbitrary order for the features. Then for each feature,
the base APK and any preceding features are specified
with the --feature-of flags.

So with a base APK 'A' and features, 'B', and 'C',
'B' would be built with

aapt package [...] --feature-of A [...]

and 'C' would be built with

aapt package [...] --feature-of A --feature-of B [...]

Change-Id: I1be66e3f8df9a737b21c71f8a93685376c7e6780
2014-08-04 18:48:14 -07:00
Adam Lesinski
14e15fe4ab Merge "Modify base Configuration used for aapt dump badging" into lmp-dev 2014-08-06 21:46:55 +00:00
Svetoslav
4f6a6c48a4 Fix build
Change-Id: I96eec52472bec122074b0ec2ee051c1b55eaa8f4
2014-08-05 15:17:49 -07:00
Hui Shu
eb8ac25fe5 DO NOT MERGE: Revert "Update makefile for clang host build."
This CL is somehow merged to lmp-dev and breaking Mac builds.

This reverts commit 132ed0f2b45acf982bbd06616f14164b612661d1.

Change-Id: I5a3472c0e2924db5c605340d7abdd407b956dcc2
2014-08-05 21:38:03 +00:00
Deepanshu Gupta
70d1574db9 Get filename from File faster
Use the direct call from a File object to get the filename instead of
going through Path which depends on Java 7 making the LayoutLib tests
incompatible with Java 6.

Change-Id: I815895eedbc10245ee09bdb53b11e5548b076aad
2014-08-05 14:34:56 -07:00
Deepanshu Gupta
b0d767dcf1 Skip loading otf fonts on Java 6
Change-Id: I9668b84812e9be333d10603657dd911024fc292d
2014-08-05 14:19:27 -07:00
Deepanshu Gupta
0c5cd96522 Add SystemProperties native method implementations.
Bug: http://b.android.com/73046
Change-Id: Ia695e7beb81f426509b646cfd929201f7e0a4ade
2014-08-05 21:13:00 +00:00
Deepanshu Gupta
45aab0eb8f LayoutLib: Use ICU's line break algo.
Change-Id: I7e5b0ab7423a72f5a4b0e1163d0a537f0b03ba07
2014-08-05 21:12:16 +00:00
Adam Lesinski
c2dea8daea Modify base Configuration used for aapt dump badging
Some apps don't provide defaults when providing icons
for different screen sizes, so use a configuration
that has a screen size set to NORMAL.

Change-Id: If4b9eebd37e5d2e2991301d09ff5c39dd41c1565
2014-08-04 16:40:41 -07:00
Deepanshu Gupta
b80e42f93f Replace more Locale methods.
This change replaces some methods of java.util.Locale. Some of them were
added in 1.7 and some are not present in the Desktop VM.

Change-Id: Ifdf8451bb2acf55e01dce8b5e15c40c8160107cc
2014-08-04 23:02:02 +00:00
Deepanshu Gupta
1840e8f2c7 Fix Delegates
Change-Id: I2b6a6b679b7a5b2532b76b723155bc2763b70768
2014-08-04 23:00:43 +00:00
Deepanshu Gupta
d2a411840c Fix LayoutLib Create tests.
Change-Id: Ica3efe417d54da7dc74b21d28215199d37600744
2014-08-04 22:59:38 +00:00
Deepanshu Gupta
86eb8b4e29 Add testing framework to LayoutLib.
This change adds an end to end test which loads the framework resources
and a test app and ensures that no exceptions or warnings are thrown.

The change also adds project configuration for intelliJ.

Change-Id: I7b67c0f1a2af2dac95df7f3231cab537b9826d7d
2014-08-04 22:58:39 +00:00
Chris Craik
8e554924c5 Merge "Add outline alpha" into lmp-dev 2014-07-31 21:44:36 +00:00
Chris Craik
77b5cad3ef Add outline alpha
bug:16140822
bug:16566746

This allows background drawables to alter the opacity of a shadow
being cast with their own alpha values.

Change-Id: I49698cc7c1bf4b2b55ffe2f82899543ca62bc61c
2014-07-31 12:29:57 -07:00
Sander Alewijnse
a87863a8bd Fix deadlock window manager and device policy manager.
Removed all communication from wm to device policy manager.
Added initialization of cache in wm by dpms.

Change-Id: Ifa0b8bfcd625464b156d5cc0fb66d342deda1c27
2014-07-31 09:16:46 +00:00
Deepanshu Gupta
72c60ab7d4 Fix classpath for AndroidLocale
Change-Id: I9af9ac05ec26f12529d51e566bf38789a2579390
2014-07-31 05:10:03 +00:00
Adam Lesinski
63e646eed5 Add shared library support to aapt dump
AAPT dump should be able to handle dynamic references
that often come with shared library resources.

Bug:16678251
Change-Id: I6c8cd943145aab20ca9db9694c8c433b3c64279b
2014-07-30 21:53:48 +00:00
Adam Lesinski
57079519f4 Fix large memory corruption in AAPT
When assigning a new string pool to a package, don't release the
reference to the old memory immediately, as the cleanup code that
is called after references the old memory.

Bug: 16155257
Change-Id: I3eaeb81191b71a282a0ef82856023f09707f1b17
2014-07-30 18:46:51 +00:00
Adam Lesinski
ae9e68a349 Merge "Have AEP GL feature depend on GLES 3.1 in badging" into lmp-dev 2014-07-28 22:45:16 +00:00
Adam Lesinski
d7a94da476 Have AEP GL feature depend on GLES 3.1 in badging
AAPT dump badging should output the uses-gl-es tag with
a version of 3.1 when android.hardware.opengles.aep is
declared as a feature.

Change-Id: I8affc6dad574c8303c6ba9810ad8e6e205ea9506
2014-07-25 22:45:33 +00:00
Adam Lesinski
d4bd75be4f Merge "Add <feature-group> tag and change aapt badging" into lmp-dev 2014-07-24 15:36:09 +00:00
Adam Lesinski
ec1fb4184e am eebc0d09: am 1038bf1d: am 94499248: Merge "Add <feature-group> tag and change aapt badging" into lmp-dev
* commit 'eebc0d090d36f8d00b841faea1bb75444963272a':
  Add <feature-group> tag and change aapt badging
2014-07-24 23:49:51 +00:00
Adam Lesinski
3d4be18bfb am 1038bf1d: am 94499248: Merge "Add <feature-group> tag and change aapt badging" into lmp-dev
* commit '1038bf1d7a592c74bcc48d729ccea1f56d8fce1d':
  Add <feature-group> tag and change aapt badging
2014-07-24 23:34:49 +00:00
Tim Murray
4ebfe4c127 am 884f5e14: am 638a2b2d: am 8224edb9: Merge "Update makefile for clang host build."
* commit '884f5e1411655f096f6d1f4c16399d15c6ce24ab':
  Update makefile for clang host build.
2014-07-24 21:12:47 +00:00
Tim Murray
7d8be89420 am 638a2b2d: am 8224edb9: Merge "Update makefile for clang host build."
* commit '638a2b2dac2e5a020693836d910789aee3c14795':
  Update makefile for clang host build.
2014-07-24 21:08:21 +00:00
Tim Murray
638a2b2dac am 8224edb9: Merge "Update makefile for clang host build."
* commit '8224edb94f6421a2d910362c56940dcf991847e6':
  Update makefile for clang host build.
2014-07-24 21:04:20 +00:00
Adam Lesinski
2c72b6822d Add <feature-group> tag and change aapt badging
A <feature-group> represents a set of features required
for an app to be compatible with a device. Multiple
<feature-group> elements represent a logical 'or'
of required features.

Features defined in the old way with <uses-feature> tags
under the <manifest> tag are automatically added to each
feature-group defined.

Defining a <feature-group> means that any default
features are not included (such as android.hardware.touchscreen)
and declared permissions do not imply any features.

Change-Id: I45626f0fdc546e47bcf2aead7ef05ebcca12b023
2014-07-23 14:11:46 -07:00