4406 Commits

Author SHA1 Message Date
Adam Lesinski
d3caf46a85 Merge "AAPT2: Clean up R JavaDoc generation" into nyc-dev 2016-04-08 01:23:29 +00:00
Adam Lesinski
626b3dbf74 AAPT2: Clean up R JavaDoc generation
- Don't generate private attributes in public R.java
- Strip out @SystemApi from comment when generating @android.annotation.SystemApi
- Only emit a single line (up to the first period) of an attribute's comment within
  a styleable's attribute table.

Change-Id: Id6316a6861540325934133958939a12074ad4428
2016-04-07 16:26:14 -07:00
Diego Perez
2155ad8204 Merge "Fix NPE when runnin testActivity" into nyc-dev 2016-04-07 19:02:34 +00:00
Adam Lesinski
f22df48067 Merge "AAPT2: Enable windows build and make sure it builds" into nyc-dev 2016-04-07 17:03:55 +00:00
Adam Lesinski
c399df7a68 Merge "AAPT: Dump uses-feature version in dump badging" into nyc-dev 2016-04-07 17:03:23 +00:00
Diego Perez
8cdf61a02e Fix NPE when runnin testActivity
Change-Id: I7ac81cb286b8d5593ae7f5fedb99bfd0fda791c5
2016-04-07 18:00:17 +01:00
Diego Perez
8d35506e51 Merge "Fix rect shadow detection" into nyc-dev 2016-04-07 16:27:00 +00:00
Adam Lesinski
c728c3daba AAPT2: Allow <protected-broadcast> and <eat-comment> in AndroidManifest.xml
Change-Id: I38c49a2a31e560dec963d44d94e067035fd59150
2016-04-06 17:40:25 -07:00
Adam Lesinski
694d0a7dfd AAPT: Dump uses-feature version in dump badging
Bug:27162500
Change-Id: I4f82cdd8ef1801c92d4ea6b4bb982c6e7d91edb5
2016-04-06 16:40:23 -07:00
Adam Lesinski
803c7c8079 AAPT2: Enable windows build and make sure it builds
Mingw32 4.8 is kind of picky with macros and some complicated template
stuff. Luckily there was another way to represent the
SFINAE code that works on all platforms. Yay!

Change-Id: Idc2e38f47bfdc57b394550bfa0f53cc0b825df25
2016-04-06 16:24:02 -07:00
Adam Lesinski
ae3622a2f7 Merge "AAPT2: Implement XmlActionExecutor to verify manifest" into nyc-dev 2016-04-06 20:43:25 +00:00
Deepanshu Gupta
5b758bf272 Merge "Add missing setAccessible to Choreographer's threadInstance" into nyc-dev 2016-04-06 19:32:02 +00:00
Deepanshu Gupta
42c8bd1b4a Add missing setAccessible to Choreographer's threadInstance
Change-Id: I753660cf68ba5a9c375942222e32059d952739bb
2016-04-06 12:29:55 -07:00
Deepanshu Gupta
39f1311b54 Merge "Clear ThreadLocal storage from Choreographer" into nyc-dev 2016-04-06 19:04:00 +00:00
Adam Lesinski
cc5609d8e4 AAPT2: Implement XmlActionExecutor to verify manifest
Defines a set of actions to perform on XML elements defined by their
hierarchy, eg: manifest -> application -> activity.

This can be used to easily add rules to check more tags in AndroidManifest.xml

Change-Id: I76c6916a98b6403075a7e56e16230979dc6cbee1
2016-04-06 11:37:05 -07:00
Deepanshu Gupta
61ccc9198a Clear ThreadLocal storage from Choreographer
Change-Id: I5abb5c68a635e7808b0a036ba4d9971cd0139aa3
2016-04-06 11:32:36 -07:00
Diego Perez
a4d7ad8663 Fix rect shadow detection
ViewGroup_Delegate was trying to use a rect shadow even in cases where
we needed to use a path. This caused that using a ToggleButton would
throw an exception with radius < 0.
Also, changed the tests so we can detect certain render errors and
ignore other (like known fidelity warnings).

Change-Id: I900d45f9efa892ad0aebc8f4ef73fc9f21ab9d92
2016-04-06 12:33:26 +01:00
Deepanshu Gupta
bad02b0ec9 Merge "Add properties from textAppearance to property map" into nyc-dev 2016-04-05 23:59:02 +00:00
Deepanshu Gupta
91253ed046 Add properties from textAppearance to property map
The default property map is used to get the list of XML properties that
a view queried. For things like textAppearance, these are additional
attributes that the TextView queries, but wasn't added to  the property
map. Add them too.

Change-Id: I1e03fbeced224866de1dcc51b93d5aa5d5886ade
2016-04-05 16:58:00 -07:00
Diego Perez
4ce88b10ab Merge "Separate inflate from render step" into nyc-dev 2016-04-05 08:17:46 +00:00
Adam Lesinski
b12c2601f4 Merge "AAPT2: Add option to add JavaDoc annotations to Java classes" into nyc-dev 2016-04-04 22:25:56 +00:00
Adam Lesinski
3524a23edb AAPT2: Add option to add JavaDoc annotations to Java classes
Change-Id: I7ee8c20cdd91380927a65c41097ffd3a6ffa2df5
2016-04-04 12:42:05 -07:00
Diego Perez
2605f91f70 Separate inflate from render step
Up until now, createSession will always do a first render. With the new
embedded layoutlib we might want to actually call objects from the
inflated view before doing a render or even do it between renders.
This allows to avoid the first initial render unless needed.

This CL also fixes a bug that would only happen when multiple render
calls are issued. When scrolling, use scrollTo since we likely want
absolute positions, not relative.

Change-Id: I4b1d8388d7218a8de33e25cd546fd965fcb07dc7
2016-04-04 19:43:48 +01:00
Wonsik Kim
e8c5480ba6 Merge "Don't try to compress .mkv resources" into nyc-dev 2016-04-04 14:46:10 +00:00
Diego Perez
18e7e10f67 Merge "Update Path and RenderNode delegates to new API" into nyc-dev 2016-04-04 12:22:21 +00:00
Diego Perez
8f43dfef2b Update Path and RenderNode delegates to new API
RenderNode_Delegate nCreate now takes a reference to this. In the
Path_Delegate, the native_offset call with a destination path has been
removed.

Change-Id: I6332bb4733974b817e8a29eab82e2218fcf942c4
2016-04-04 10:18:55 +01:00
Wonsik Kim
6e452f9e8a Don't try to compress .mkv resources
Bug: 27987970
Change-Id: I58e920e81d1e79b7fbba479d8fb34afb3911f97d
2016-04-04 15:39:40 +09:00
Chong Zhang
d19342a83d fix build break
bug: 27834014
Change-Id: Ib5d03818d285c50d220c45ebace635faf6771ff3
2016-04-01 15:31:46 -07:00
Chong Zhang
fbe10f175f Merge "Avoid extra relaunch when rotating side-by-side apps" into nyc-dev 2016-04-01 21:56:45 +00:00
Chong Zhang
167bbfac24 Avoid extra relaunch when rotating side-by-side apps
Update configuration with WM first and check if the stacks need to be
resized due to the update. If so, let activity manager resize the stacks
inline, instead of letting WM schedule another pass of resizeStack. This
way the configuration will be updated to the latest before ensureActivity-
ConfigurationLocked, and we don't need another relaunch there.

bug: 27834014

Change-Id: Ib761a96cada0c3247b0480f18370670c593159da
2016-04-01 13:58:41 -07:00
Adam Lesinski
30906ad2d6 Merge "AAPT2: Change how we generate Java classes" into nyc-dev 2016-04-01 00:44:21 +00:00
Adam Lesinski
6cbfb1de49 AAPT2: Change how we generate Java classes
Previously we would be writing out the Manifest.java file as we
processed the AndroidManifest.xml. This would lead to empty
Manifest classes if there were no permissions or permission groups
defined in the AndroidManifest.xml.

This would pose problems for processes that checked for public classes
and considered them part of the API (support lib).

Now we collect the structure of the Java class in memory before deciding
if a file should be created.

Change-Id: I6b909f28d74356414c6ef5ad005180d6ea5e44ca
2016-03-31 16:43:04 -07:00
Roozbeh Pournader
27ec3ace18 Re-enable emoji font tests
This re-enables the emoji font tests, but doesn't run the tests if
SMALLER_FONT_FOOTPRINT is set.

Additionally, we test that there's one and only one emoji font in the
fallback chain.

Bug: 26187231
Bug: 27785690
Change-Id: I2e6d467e3f54ee3d41737170d7c2492a0f6b30f0
2016-03-31 13:23:15 -07:00
Vladislav Kaznacheev
0d50d8660d Add wallpaper input consumer to WindowManagerService
This is an input consumer similar to the one used when hiding the navbar,
but placed above wallpapers. It might be useful for processing touch
events over "desktop" in freeform MW mode.

Re-landing I9d6d28a624f750ad48fc39f9b149dd1f989cceba after fixing build.

Bug:26688904
Change-Id: I89fdabd9c72cdd4a1d7ca626c33ddc99ddea97f9
2016-03-31 18:42:22 +00:00
Andrew Johnson
08a3fa7dea Merge "Removing assignments to localeScriptWasComputed in aapt." into nyc-dev 2016-03-31 13:52:10 +00:00
Diego Perez
9d1a69ff55 Merge "Implement VirtualRefBasePtr native methods" into nyc-dev 2016-03-31 08:14:26 +00:00
Jeff Sharkey
2c0ae91f2d Merge changes Ifecff4f1,Ia302de46 into nyc-dev
* changes:
  Make preferred activities direct-boot aware.
  Make Parcelable classes final, API cleanup.
2016-03-31 06:48:55 +00:00
Jeff Sharkey
70168dde6e Make Parcelable classes final, API cleanup.
Remove some Context methods that leaked through.  Add lint rule to
recommend using List<? extends Parcelable> instead of Parcelable[].

Bug: 27932224, 27930145, 27932911
Change-Id: Ia302de46cdb0c5101fa175a09316df91aeefcf0d
2016-03-30 23:31:39 -06:00
Andrew Johnson
299e488ee2 Removing assignments to localeScriptWasComputed in aapt.
On certain devices running Android M with unknown vendor
modifications. Setting the localeScriptWasComputed bit in
the resource parameters struct causes the translations
for many languages to fail to load. The app then
defaults to English.

This has been reported on the following devices:
Motorola XT1086, XT1096, and XT1586, HTC One, and Huawei
MediaPad 10 LINK.

This change works around the issue by never setting
localeScriptWasComputed in aapt and instead always
writing the default value of false.

Bug: 27872476
Change-Id: Id638d1d0e5f9dcb1c02e65d67667d76174c69b9e
2016-03-30 20:24:48 -04:00
Diego Perez
fc970ab65a Implement VirtualRefBasePtr native methods
The VirtualRefBasePtr is used to track the usage of native objects from
the java side by reference counting. Implementing the class delegate to
make sure we dispose the objects correctly.

Change-Id: I3dd4717944b0dbe79f30e49b3083bf65c6e5276d
2016-03-30 17:53:23 +00:00
Ying Wang
5e92c429ec Fix compilation using javac.
We still need to be able to compile all the Java source code in the tree
using javac, though the compiled code never ends up running on device.

Bug: 25958912
Change-Id: Id76663cdf768db579517515d7b7f51519b515fa8
2016-03-30 10:33:47 -07:00
Robert Carr
0b10c335c7 Ensure we change SurfaceView size from UI thread.
We need to change the SurfaceView size from the UI thread
so that we can appropriately deliver the SurfaceChanged
callback. We also need to not preserve geometry
in this case, as if we don't update the surface
and layout size together we could get scaling. This still has
some potential for holes, as transactions are not synced with
the parent renderer, but we have other methods to avoid
these in the case of resizing. This fixes the remaining
issues with content sizing and surface view "out of sync".

Bug: 27780983
Bug: 27687126
Bug: 27676101

Change-Id: Idd7864f00e5cf7a4eb32dd66c0b389292a788069
2016-03-29 13:42:06 -07:00
Deepanshu Gupta
83b9db029b Merge "Fix menu popup rendering" into nyc-dev 2016-03-28 17:07:13 +00:00
Deepanshu Gupta
97c0679b1a Fix menu popup rendering
Change-Id: I3394866d72af7fd1762ac477529a4a1bc473b7dc
2016-03-28 09:57:24 -07:00
Deepanshu Gupta
3646f5591f Merge "LayoutLib intellij codestyle: line wrap" into nyc-dev 2016-03-25 20:53:15 +00:00
Deepanshu Gupta
3b7abd33f9 Merge "Add tests for getResource*Name()" into nyc-dev 2016-03-25 20:52:52 +00:00
Jungshik Shin
fe952f3a0b Merge "Add Lang-to-Script entries for languages with new hyph patterns" into nyc-dev 2016-03-25 00:30:45 +00:00
Deepanshu Gupta
60dc3a9917 LayoutLib intellij codestyle: line wrap
Force line wrap (do not exceed right margin) and allow shorter lines to
merge.

Change-Id: I06f3689bff710c8dec023edb842595eacd745c17
2016-03-24 14:27:27 -07:00
Deepanshu Gupta
ceb1ab1d2a Add tests for getResource*Name()
Change-Id: I02170b2b68c76f817aa0771a5333abf2aee456c0
2016-03-24 14:27:21 -07:00
Deepanshu Gupta
618ca261f3 Support getResource*Name() methods for Resources
The following methods are now supported:
getResourceEntryName
getResourcePackageName
getResourceTypeName
getResourceName

Bug: http://b.android.com/181872
Change-Id: If06b5e0687ab6f8cb20ab77f339870dd08a84ce1
2016-03-24 12:02:17 -07:00