Attempt to have a more robust IDevice property cache.

Create a new property fetch mechanism which:
a. exposes via the API the possibly asynchronous nature of property fetching
b. allows callers flexibility in how long to wait for the property
c. hides cache implementation details
d. attempts to repopulate cache in case of errors

Deprecate the existing prop fetch methods

Bug: 17004834
Change-Id: I9a02a01b627a9b30f3ff3d61286c736b941f44df
fixed some dependency issues.

moved kxml2 dependency to net.sf.kxml package.
added explicit import to properly generate pom.xml

Change-Id: I357a63652e563f0517cbea9b984d5aba56cc417e
Add asynchronous variant of Device.getBatteryLevel().

Bug: 17004834

Change-Id: Ifcef9b88e565b73340f40a553bab45f5b4c99727
Propagate getProperty exceptions to caller.

Bug: 17004834
Change-Id: I46b967a6b08c441bc09fb95cb06af509b7c3d6fb
Update code for gradle 2.1

Change-Id: I96dc7cc891b25419a75a1e46a86c772819bc0d2c
Move to Gradle 2.1

Change-Id: Idbc94994a785dfb5f54cd16a04e92d990346eff7
Merge "Update code for gradle 2.1" into idea133
Merge "Move to Gradle 2.1" into idea133
Improve hprof performance: dominators and retained sizes.

For the benchmark 25Mb hprof, dominator computation now takes 0.7s instead of
5.1s. Combined, parsing the hprof and computing retained sizes:
- was 6s, and 268Mb in the heap
- is 1.8s, ad 133Mb in the heap.

Changes included in this CL:
- eliminate Long boxing for retained sizes.
- compute dominators on top of the object model itself.
- prune more aggresively the affected nodes in each iteration: once a node's
 immediate dominator is SENTINEL_ROOT, no further updates are possible.
- eliminate the ClassObj lookup for Instance#getSize().

The added test showcases the worst-case behavior of our quadratic algorithm: the
doubly-linked list results in multiple rounds of refining the dominator tree. This
CL therefore sets the stage for the next optimization, to incrementalize
 Dominators#computeDominators such that it never takes an unbounded amount of time.

Change-Id: I008aaf4723dcb1f1f238a8380b541aa96762170f
Merge "Improve hprof performance: dominators and retained sizes." into idea133
Added a simple manifest merger invocation task.

This task can be used in build.gradle to simply merge AndroidManifest
files that have no common nodes.

Change-Id: Id2cc065d57115ac5ca5796432b9f72847a818e54
Added support for specifying maxSdkVersion on build flavors.

Only minSdkVersion and targetSdkVersion were supported up to now.
There is no implicit value set for maxSdkVersion, it must be
specified in the build.gradle.
Added unit test and build test.

Change-Id: Ibf4053ba8887cb0a6291cfc845b26123ed39b4a0
Move to newer version of Jacoco

Change-Id: Ic8f71bf6dac917b70abf463e2082e247d71143d4
Merge "Move to newer version of Jacoco" into idea133
Merge "Added support for specifying maxSdkVersion on build flavors." into idea133
Merge "Attempt to have a more robust IDevice property cache." into idea133
added a failOnMissingConfigEntry to aaptOptions.

Added a failOnMissingConfigEntry AAPT option (defaulted to false) to
add the --error-on-missing-config-entry parameter to aapt invocations.
This flag will trigger a build failure with some resources are missing for
a particular split.

Change-Id: Iedf1dcb7ea5ae6bad96ffc5207c1a1972e231590
Merge "Add asynchronous variant of Device.getBatteryLevel()." into idea133
Merge "Propagate getProperty exceptions to caller." into idea133
Revert "Add asynchronous variant of Device.getBatteryLevel()."

This reverts commit b01f5064e354ba6b7fb48ce3bc1fb773bb39f2e5.

Change-Id: Ia0326c9041f942a59b3e4412e0f9e17c1092f31b