Update NdkBuilder to find path of prebuilt base on host OS.

Change-Id: Icb6d59d2d19922c757030a335a266f22d7db45ab
74646: WebViewLayout lint check crashes with NPE

Change-Id: I705105c4312b61b1269b43f36967d0b10577f1bd
Merge "74646: WebViewLayout lint check crashes with NPE" into idea133
Merge "74646: WebViewLayout lint check crashes with NPE" into idea133
automerge: 4f0cada

* commit '4f0cada39de99b2a5245341c137097c84a8d8c2b':
  74646: WebViewLayout lint check crashes with NPE
Fix LocalSdkParserTest for broken packages

The comparison key needs to include the revision from the package
description, since without it the comparison keys for the two broken
build tools (5.0.1 and 5.0.2) both end up as just
   t:9|v:|r:0000.0000.0000.0|
which means it's arbitrary* which wins (which is why the test passes
on one machine and not the other.)

Change-Id: Iced7e732d395eeb8d3c3ab6a8706859ddac376ab
Merge "Fix LocalSdkParserTest for broken packages" into idea133
Merge "Fix LocalSdkParserTest for broken packages" into idea133
automerge: cc5b3f9

* commit 'cc5b3f9fd2e58de9f3e41e80c03a2596b1ee3c12':
  Fix LocalSdkParserTest for broken packages
Do not swallow XML parsing errors when parsing invalid manifest

Some gradle tasks need specific information from the AndroidManifest
like the minSdkVersion, targetSdkVersion. XPath queries are used
to fetch such fields. Up to now, the implementation was assuming the
XML is correct and would swallow XML parsing errors.

While at it, cached the fields value per Variant as it quite expensive
to calculate (parse the AndroidManifest.xml each time). This yielded
a 5% build time reduction on average.

Change-Id: I964876720e7374e639a469f2818a98416951a560
Separates Heap Segment from Heap Info updates.

Now heap info can be requested separate from heap segment data. There
is still a way of requesting both at the same time, and that is being
used by DDMS

Change-Id: I4d457d62b001e8aa80b866b6a9f8cde2a119b48a
Merge "Separates Heap Segment from Heap Info updates." into idea133
Merge "Separates Heap Segment from Heap Info updates." into idea133
automerge: 489e530

* commit '489e53090528a6f72dfbc78c73421ce2a1c28279':
  Separates Heap Segment from Heap Info updates.
Added support for sourcesets for NDK plugin

Change-Id: I4c56cbc49183f99e6c6c4cc146f05c02a2d39565
Support 64 bits target for ndk r10

Change-Id: I8f6c149d304c785826177478cd98496d0d26b750
Merge "Added support for sourcesets for NDK plugin" into idea133
Hprof performance: switch to memory-mapped files.

Setting the stage for more optimizations to follow, here we switch from
stream-based I/O to (seekable) byte buffers. As an example, this will allow
for lazier, on-demand reconstruction of field values for unreachable objects,
without storing more than an offset in the Java heap. Memory-mapped buffers
are not part of the Java heap.

A couple of parsing bugs were fixed while getting the parser to read a 2.4Gb
hprof sample: we don't care about the signed-ness of IDs because we never
interpret them, but we care about lengths and offsets.

Benchmarks: shaves off 10%-20% of wall-clock time for non-trivial heap dumps
 (tested with 25Mb, 325Mb).

Change-Id: I5fb061d781a332bd12e26807719d6cde3af34492
Merge "Hprof performance: switch to memory-mapped files." into idea133
Merge "Support 64 bits target for ndk r10" into idea133
Merge "Added support for sourcesets for NDK plugin" into idea133
automerge: 4a851cd

* commit '4a851cd2647ab97a642b7a9ac2afb25f65c35d11':
  Added support for sourcesets for NDK plugin
Merge "Support 64 bits target for ndk r10" into idea133
automerge: 345bce5

* commit '345bce597b61bfc59d073508fe66d096be65b1fb':
  Support 64 bits target for ndk r10
Merge "Hprof performance: switch to memory-mapped files." into idea133
automerge: 75706ef

* commit '75706eff5a44b558bab952ac6f894884bc8c640e':
  Hprof performance: switch to memory-mapped files.