3667 Commits

Author SHA1 Message Date
Deepanshu Gupta
c714501141 Revert "Replace infinite loop with foreach."
This reverts commit c77f9c76e4142db8dd76a28ad99b8f0395b82eba.

Class.getDeclaredClasses() doesn't return anonymous inner class and
hence the change was wrong.

The revert doesn't undo the typo fixed in the original change.

Change-Id: Id0595c4bc3db1185dd1ce39808a6b8c3610a1e11
2015-07-07 13:13:48 -07:00
Deepanshu Gupta
008e1fb9ed Update intellij project for tools-common sources.
Use the sources.jar for tools-common instead of the environment
variable.

Change-Id: Ia1a3e8c32f66610e761bacce08c7eb5915e7ed0f
2015-07-07 12:24:47 -07:00
Deepanshu Gupta
61f23e9bf7 Implement tools:list_item for RecyclerView.
It's now possible to use tools:list_item attribute for RecyclerView to
point to a default layout, rather than always using a TextView.

Change-Id: I5d522b2f0ca38b420fddfcb0f73a26d95707da79
2015-07-07 12:24:10 -07:00
Deepanshu Gupta
295ef6be08 Add roundess to configuration
Change-Id: Icc85b38dd091fc5aa13092d6abb06ac169f7b0b5
2015-07-06 18:27:00 -07:00
Deepanshu Gupta
d7b846c181 Update tests per new layoutlib_api
Change-Id: Idc89ffceaf171abcf2b579f4e934b514ef209210
2015-07-06 18:26:41 -07:00
Filip Gruszczynski
81f8cd92fa am 3ce79f6c: am 96496e2d: Merge "Build fix after changing IWindowSession." into cw-d-mr1-dev
* commit '3ce79f6c0c3435eca05ea34c5a8b34ac59bcb992':
  Build fix after changing IWindowSession.
2015-07-01 17:51:18 +00:00
Deepanshu Gupta
c77f9c76e4 Replace infinite loop with foreach.
A method call exists to find all inner classes. Use it instead of
manually enumerating the possibilities and checking.

Also fix a typo.

Change-Id: I2af678e92ea0c11b53617b247d8cda324391c185
2015-06-30 15:36:34 -07:00
Filip Gruszczynski
3ce79f6c0c am 96496e2d: Merge "Build fix after changing IWindowSession." into cw-d-mr1-dev
* commit '96496e2d17607a8bfa944461c2458b0dcdeee872':
  Build fix after changing IWindowSession.
2015-06-30 22:17:55 +00:00
Filip Gruszczynski
7e3b61e73d Build fix after changing IWindowSession.
Change-Id: I339fecb0138e8b8907fc53372b694021f6327260
2015-06-30 14:42:21 -07:00
Deepanshu Gupta
5d1eaf4a19 Add missing resolveResValue call.
Bug: http://b.android.com/178504
Change-Id: I7dde8094cf762893e4f7ea0d3de87a281c9602cd
2015-06-30 14:28:58 -07:00
Igor Viarheichyk
729ffa299c ICU format support for pseudolocalizes.
Custom parser can handle nested ICU messages even if they
are split into multiple fragments. Code reworked to encapsulate
all pseudolocalization logic in Pseudolocalizer and PseudoMethods
classes. To minimize a changelist size, some static functions
remained. Fake BiDi pseudolocalization method is reimplemented
to handle word boundaries correctly. Unit tests added.

(cherry picked from commit cbb1e676b56677ae3585c067f29646dddffb4857)

bug: 22060509

Change-Id: I11968d81984d99501a4d9334ff2e7453a1eb7a00
2015-06-25 09:49:43 +01:00
Adam Lesinski
c93f115486 Merge "AAPT2: Remove the need for specifying package name in compile phase" into mnc-dev 2015-06-18 17:29:31 +00:00
Dianne Hackborn
a750a63d63 Fix issue #21814207 and issue #21814212 (alarm manager)
Issue #21814207: AlarmManager.setAndAllowWhileIdle should also allow wake locks.

Introduce a whole new infrastructure for providing options when
sending broadcasts, much like ActivityOptions.  There is a single
option right now, asking the activity manager to apply a tempory
whitelist to each receiver of the broadcast.

Issue #21814212: Need to allow configuration of alarm manager parameters

The various alarm manager timing configurations are not modifiable
through settings, much like DeviceIdleController.  Also did a few
tweaks in the existing DeviceIdleController impl.

Change-Id: Ifd01013185acc4de668617b1e46e78e30ebed041
2015-06-17 11:41:45 -07:00
Diego Perez
898be8bc76 am fa794eb0: am 2f710356: am 13c06d6c: am 1f33bdad: am 5e50e00c: Merge "Fix for shadows on theme editor" into lmp-mr1-dev
* commit 'fa794eb0025dbec6c1b90135495081d42f06bdaf':
  Fix for shadows on theme editor
2015-06-15 15:48:29 +00:00
Diego Perez
dc929e28ac am 40a216d9: am df6f63ba: am 2422011d: am b2411c62: am ead59b0d: Merge "Fix GcSnapshot drawInLayer when clipping is used." into lmp-mr1-dev
* commit '40a216d95973bb897ee0d755ef260a616f176798':
  Fix GcSnapshot drawInLayer when clipping is used.
2015-06-15 15:48:24 +00:00
Diego Perez
b39e85afb1 am ce5a79da: am d717682d: am 5c597c1d: am a8854564: am ce4a9d91: Merge "New custom widgets library" into lmp-mr1-dev
* commit 'ce5a79dacfb152317429cb69c28fe8bb39c02f4c':
  New custom widgets library
2015-06-15 15:47:44 +00:00
Diego Perez
8df6d037be resolved conflicts for merge of 5a53816b to mnc-dev
Change-Id: Ice1ba8cb9793432e18635e77f4e3309f50bb7b3f
2015-06-15 16:17:08 +01:00
Diego Perez
fa794eb002 am 2f710356: am 13c06d6c: am 1f33bdad: am 5e50e00c: Merge "Fix for shadows on theme editor" into lmp-mr1-dev
* commit '2f7103565cf1732d6d1281195cfa49a1564751d7':
  Fix for shadows on theme editor
2015-06-15 10:14:30 +00:00
Diego Perez
40a216d959 am df6f63ba: am 2422011d: am b2411c62: am ead59b0d: Merge "Fix GcSnapshot drawInLayer when clipping is used." into lmp-mr1-dev
* commit 'df6f63badfe2572284dad8e34f152fd1c24a873e':
  Fix GcSnapshot drawInLayer when clipping is used.
2015-06-15 10:14:24 +00:00
Diego Perez
2f7103565c am 13c06d6c: am 1f33bdad: am 5e50e00c: Merge "Fix for shadows on theme editor" into lmp-mr1-dev
* commit '13c06d6c91e67962b7ffdf92c56e3b01125e4a8d':
  Fix for shadows on theme editor
2015-06-15 10:04:02 +00:00
Diego Perez
df6f63badf am 2422011d: am b2411c62: am ead59b0d: Merge "Fix GcSnapshot drawInLayer when clipping is used." into lmp-mr1-dev
* commit '2422011d867f4d4516605148641bbeb7d9c2501b':
  Fix GcSnapshot drawInLayer when clipping is used.
2015-06-15 10:03:58 +00:00
Diego Perez
13c06d6c91 am 1f33bdad: am 5e50e00c: Merge "Fix for shadows on theme editor" into lmp-mr1-dev
* commit '1f33bdad98dd5138f887642d39c9495e1d7df14b':
  Fix for shadows on theme editor
2015-06-15 09:50:58 +00:00
Diego Perez
2422011d86 am b2411c62: am ead59b0d: Merge "Fix GcSnapshot drawInLayer when clipping is used." into lmp-mr1-dev
* commit 'b2411c622cf9124f6af5f70d416adb179f9c88bb':
  Fix GcSnapshot drawInLayer when clipping is used.
2015-06-15 09:50:51 +00:00
Diego Perez
5e50e00c66 Merge "Fix for shadows on theme editor" into lmp-mr1-dev 2015-06-15 08:35:00 +00:00
Diego Perez
ead59b0d47 Merge "Fix GcSnapshot drawInLayer when clipping is used." into lmp-mr1-dev 2015-06-15 08:34:04 +00:00
Adam Lesinski
6cc479b76e AAPT2: Remove the need for specifying package name in compile phase
The compile phase doesn't use the AndroidManifest, so we had to specify the
package name on the command line.

We can omit the package name, since we don't resolve external references
in the compile phase. Packages that reference the current package will be encoded
with no package name. When loaded by the link phase, the package name will be supplied
and all the references with no package name will use that one.

Change-Id: I9fe4902b747b06899b45c968f30ba1aa05c5cd69
2015-06-12 17:12:04 -07:00
Diego Perez
ce5a79dacf am d717682d: am 5c597c1d: am a8854564: am ce4a9d91: Merge "New custom widgets library" into lmp-mr1-dev
* commit 'd717682df97e812d4a25f93b0c9e84548767d8e1':
  New custom widgets library
2015-06-12 16:29:59 +00:00
Diego Perez
5a53816b0d am c051c556: am e10e8005: am 68155986: am f5a99437: Merge "Fix crash when shadowSize is 0" into lmp-mr1-dev
* commit 'c051c556669f88e284f2922f8d28fad2138598ae':
  Fix crash when shadowSize is 0
2015-06-12 16:29:54 +00:00
Diego Perez
d717682df9 am 5c597c1d: am a8854564: am ce4a9d91: Merge "New custom widgets library" into lmp-mr1-dev
* commit '5c597c1d89c529675096c2d326c452145403979d':
  New custom widgets library
2015-06-12 15:10:18 +00:00
Diego Perez
c051c55666 am e10e8005: am 68155986: am f5a99437: Merge "Fix crash when shadowSize is 0" into lmp-mr1-dev
* commit 'e10e8005903572158cbb9c7f869508a247ff51ad':
  Fix crash when shadowSize is 0
2015-06-12 15:10:14 +00:00
Diego Perez
5c597c1d89 am a8854564: am ce4a9d91: Merge "New custom widgets library" into lmp-mr1-dev
* commit 'a885456426ec267d37c6a527285d965f81e14f9d':
  New custom widgets library
2015-06-12 14:57:35 +00:00
Diego Perez
e10e800590 am 68155986: am f5a99437: Merge "Fix crash when shadowSize is 0" into lmp-mr1-dev
* commit '68155986508ef8b497228f8e60346d317e87991d':
  Fix crash when shadowSize is 0
2015-06-12 14:57:27 +00:00
Diego Perez
ce4a9d9110 Merge "New custom widgets library" into lmp-mr1-dev 2015-06-12 14:34:50 +00:00
Jens Ole Lauridsen
3f6bd481c2 Merge "Support AppBar from Material Design." into mnc-dev 2015-06-12 04:48:51 +00:00
Jeff Brown
e97c9a244b Configure auto-rotation tilt tolerance in config.xml.
This allows for the thresholds to be tuned differently for different
products as needed.

Bug: 18276856
Change-Id: I6c87e683dea6a17cf606203a894c8419e20d3658
2015-06-11 18:53:14 -07:00
Jens Ole Lauridsen
4dfe4d43ce Support AppBar from Material Design.
This CL is a start for making the design able to render the AppBar.
We are still missing support for: system menu and the app icon.

Change-Id: I19600f8ee1e7e6492186a0b7ae7fb38c82e15c02
2015-06-11 13:50:22 -07:00
Adam Lesinski
a1ad4a812a AAPT2: Proguard rules generation added.
Change-Id: Ifbe79516cd9a1ade471e211a259301c63b62ac67
2015-06-09 11:14:24 -07:00
Adam Lesinski
8c831ca87b AAPT2: Add manifest merging
Now that AAPT2 is library-aware, it needs to take care of
all library related work, including merging manifests.
The logic was taken from the current Java ManifestMerger.

Change-Id: Id93f713f27ae8617922bf89e325e45be9f863c06
2015-06-04 18:00:33 -07:00
Adam Lesinski
581cc1ee59 Merge "AAPT2: Change xml file parsing to DOM based" into mnc-dev 2015-06-04 19:40:34 +00:00
Adam Lesinski
75f3a55cc5 AAPT2: Change xml file parsing to DOM based
We modify the XML of layouts and AndroidManifest enough
that it warrants we operate on the tree in memory.
These files are never very large so this should be fine.

Change-Id: I5d597abdb3fca2a203cf7c0b40fcd926aecb3137
2015-06-04 11:37:05 -07:00
Adrian Roos
1ea14d6696 Merge "aapt: add option for stricter symbol generation" into mnc-dev 2015-06-02 19:52:32 +00:00
Diego Perez
4362443cd9 Render to measured size when using expand mode
When using RenderingMode.V_SCROLL or RenderingMode.H_SCROLL, if the
screen size is smaller than the measured size but as large as the
desired size, the layout will render incorrectly and won't expand.
This changes that to expand to at least the size of the screen.

Added tests for the V_SCROLL and H_SCROLL modes.

Bug: http://b.android.com/174928
Change-Id: I22686903560775e2e4f362af1d7b50c9b985467d
2015-06-02 17:09:45 +01:00
Diego Perez
e5be1d7a39 Fix for shadows on theme editor
If the preferred ColorModel doesn't support alpha, the shadows are
incorrectly rendered. In the theme editor on Linux, the graphics device
object doesn't support alpha so we need to use a different color model.
We default to ARGB which works fine.

Change-Id: I3e71e3d086fa4975a9149d36792e574813f37dfd
2015-06-02 11:14:53 +01:00
Adrian Roos
5892248580 aapt: add option for stricter symbol generation
Adds an option that prevents generating java symbols for string
resources that don't have a default localization.

Bug: 21537397
Change-Id: Ifafa942b24d5cdbed93651cde363e859be13d395
2015-06-02 02:55:52 +00:00
Deepanshu Gupta
86caef1892 LayoutLib: Skip classes from java package.
Classes in "java" package can't be defined at runtime anyway. No use
including them in LayoutLib.

Change-Id: I7e7c46f0d74e32c893b23093828569b4fa5e3a73
2015-06-01 14:43:28 -07:00
Deepanshu Gupta
b3e872be9e Skip warnings for some unresolved references.
Some applications rename the newer RTL attributes to the older
attributes in order to target RTL locales, but not need to include two
attributes everywhere it's needed. For example, iosched renames
paddingStart to paddingLeft (among other attributes) for API 17 and
above. This leads to hundreds of warnings about missing attributes.
This change suppresses such warnings.

Also, skip adding unresolved attributes to the typed array. This is more
in line with the actual implementation on device, and prevents
unexpected warnings/errors/crashes later.

Change-Id: Iee616fa6295aa9731ede0cf9dcd6dd2bd1fe8f20
2015-06-01 14:41:38 -07:00
Filip Gruszczynski
8825de1751 Merge "Revert "Revert "Fix build.""" into mnc-dev 2015-06-01 16:07:48 +00:00
Filip Gruszczynski
919f93265d Revert "Revert "Fix build.""
This reverts commit 944a6c937cd3576ecae5c3fdd0dcf265329e6bcf.

Change-Id: I7daa255f331a1e39308eb626580aa00c63c5cb3e
2015-06-01 16:07:36 +00:00
Filip Gruszczynski
99bcc3eee2 Merge "Revert "Revert "resolved conflicts for merge of 47249f2a to mnc-dev""" into mnc-dev 2015-06-01 15:42:42 +00:00
Deepanshu Gupta
996458b76c Fix ParserFactory not initialized error.
Bug: http://b.android.com/175129
Change-Id: I2111673767e0f62ee910560022b559a177d55abd
2015-05-30 01:25:34 +00:00