2699 Commits

Author SHA1 Message Date
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
Deepanshu Gupta
4e01c59e6c am 6ebeefa0: am 904d7711: am 7b561be3: am 09c3c2ed: am ba31d628: am db94ea9e: am f970d2c2: am 79c3f678: am 206c691b: am 72cf03a2: am 3a544a81: resolved conflicts for merge of a232a68d to jb-mr1.1-docs
* commit '6ebeefa04cb3c360d8028eb77e60bacf8a800cb1':
  Fix SystemProperties in LayoutLib.
2014-08-06 22:59:08 +00:00
Deepanshu Gupta
6ebeefa04c am 904d7711: am 7b561be3: am 09c3c2ed: am ba31d628: am db94ea9e: am f970d2c2: am 79c3f678: am 206c691b: am 72cf03a2: am 3a544a81: resolved conflicts for merge of a232a68d to jb-mr1.1-docs
* commit '904d77118bab63139174470ef728ca9a53e75a15':
  Fix SystemProperties in LayoutLib.
2014-08-06 22:51:47 +00:00
Deepanshu Gupta
904d77118b am 7b561be3: am 09c3c2ed: am ba31d628: am db94ea9e: am f970d2c2: am 79c3f678: am 206c691b: am 72cf03a2: am 3a544a81: resolved conflicts for merge of a232a68d to jb-mr1.1-docs
* commit '7b561be3a6fedebfce412cecd8c36d6686f6576c':
  Fix SystemProperties in LayoutLib.
2014-08-06 22:45:23 +00:00
Deepanshu Gupta
7b561be3a6 am 09c3c2ed: am ba31d628: am db94ea9e: am f970d2c2: am 79c3f678: am 206c691b: am 72cf03a2: am 3a544a81: resolved conflicts for merge of a232a68d to jb-mr1.1-docs
* commit '09c3c2edb2391d3ffed9a07ec360b9f75b9f7637':
  Fix SystemProperties in LayoutLib.
2014-08-06 22:37:10 +00:00
Deepanshu Gupta
09c3c2edb2 am ba31d628: am db94ea9e: am f970d2c2: am 79c3f678: am 206c691b: am 72cf03a2: am 3a544a81: resolved conflicts for merge of a232a68d to jb-mr1.1-docs
* commit 'ba31d628621f3d49195d141dabff30a7665f3b50':
  Fix SystemProperties in LayoutLib.
2014-08-06 22:30:06 +00:00
Deepanshu Gupta
db94ea9ed0 am f970d2c2: am 79c3f678: am 206c691b: am 72cf03a2: am 3a544a81: resolved conflicts for merge of a232a68d to jb-mr1.1-docs
* commit 'f970d2c201649843b8d51d094b865f16b15bc0bc':
  Fix SystemProperties in LayoutLib.
2014-08-06 22:21:54 +00:00
Deepanshu Gupta
f970d2c201 am 79c3f678: am 206c691b: am 72cf03a2: am 3a544a81: resolved conflicts for merge of a232a68d to jb-mr1.1-docs
* commit '79c3f678d21f6b3c058623217cbe5dd57a553fe8':
  Fix SystemProperties in LayoutLib.
2014-08-06 22:18:04 +00:00
Deepanshu Gupta
79c3f678d2 am 206c691b: am 72cf03a2: am 3a544a81: resolved conflicts for merge of a232a68d to jb-mr1.1-docs
* commit '206c691bfdb3a6b78d35c7481365980dd387b8c9':
  Fix SystemProperties in LayoutLib.
2014-08-06 22:13:18 +00:00
Deepanshu Gupta
72cf03a27a am 3a544a81: resolved conflicts for merge of a232a68d to jb-mr1.1-docs
* commit '3a544a81b3d2d529b2995f4b5db2077760d440b5':
  Fix SystemProperties in LayoutLib.
2014-08-06 22:05:38 +00:00
Deepanshu Gupta
3a544a81b3 resolved conflicts for merge of a232a68d to jb-mr1.1-docs
Change-Id: I1ea220e3e0a81880db68abab87beab56dc4a336c
2014-08-06 15:00:14 -07:00
Deepanshu Gupta
a232a68d4c resolved conflicts for merge of 5476cfee to jb-mr1-dev
Change-Id: I5197271e6fdd36fed9ca9f9b7221d9a99141a4b4
2014-08-06 14:41:02 -07:00
Deepanshu Gupta
5476cfee6b am 505c675c: Fix SystemProperties in LayoutLib.
* commit '505c675c3a536ac7c6ad264eb62542537532119c':
  Fix SystemProperties in LayoutLib.
2014-08-06 21:28:24 +00:00
Deepanshu Gupta
505c675c3a Fix SystemProperties in LayoutLib.
Not all System Properties were used via Build class. Also, properties
like SDK_INT which called SystemProperties directly were not initialized
properly.

This change is essentially cherry picking of the relevant parts from the
following commits:
984749bf75c9ce9d3401b8410ea7d6276544b6ee
167bc25bceea9280bbe4858db4cb8233f86ce325

Bug: http://b.android.com/73046
Change-Id: Ia0fb467ee6d5fdedda500d57d02be20006f115df
2014-08-05 17:47:30 -07: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
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
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
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
Sander Alewijnse
549d39e549 am f3c523e0: am ce1088a6: am fcb490a2: Merge "Add Device Policy API to disable screen capture." into lmp-dev
* commit 'f3c523e06217b19ae8389f9ca8be71ed2cd9fe7b':
  Add Device Policy API to disable screen capture.
2014-07-23 17:18:27 +00:00
Sander Alewijnse
d2a1eec400 Add Device Policy API to disable screen capture.
WindowManager will set secure flag on SurfaceControl for
all windows of a flagged user to prevent screen capture.
API is consistent with the camera disable API.

Change-Id: Ib180f67f1ad827b6f4aca2af615274256cce58f4
2014-07-23 13:44:28 +00:00
Deepanshu Gupta
aa474ff0f3 am 9a61270d: Merge "LayoutLib: Fix EditText rendering [DO NOT MERGE]" into klp-modular-dev
* commit '9a61270d67f654f3558b29f6b3e78c0b2fbe0178':
  LayoutLib: Fix EditText rendering [DO NOT MERGE]
2014-07-22 01:04:00 +00:00