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
Add warning message for user of new NDK plugin.

Change-Id: Idbfacf49696030955c4ea717100915f55355c531
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
Allow lint's field and method lookup to include inherited members

This CL adds an "includeInherited" parameter to the getMethod and
getField methods on resolved classes. This is necessary such that
clients can deliberately decide whether they want these to be
included; prior to this change, the ECJ based lookup methods did not
include them, and the IntelliJ ones did. Furthermore, the next lint CL
requires inherited methods to be included.

Change-Id: I8610282d2f17161cf977dea80d045d905c8b5073
Add lint check which enforces previously-abstract methods to be overridden

From the issue explanation:
To improve the usability of some APIs, some methods that used to be `abstract` have
been made concrete by adding default implementations. This means that when compiling
with new versions of the SDK, your code does not have to override these methods.

However, if your code is also targeting older versions of the platform where these
methods were still `abstract`, the code will crash. You must override all methods
that used to be abstract in any versions targeted by your application's
`minSdkVersion`.

Change-Id: Ie3e70a28a60d527aa850d6d6ab8350f46c79c131
Merge "Allow lint's field and method lookup to include inherited members" into idea133
Merge "Add lint check which enforces previously-abstract methods to be overridden" into idea133
Merge "Add warning message for user of new NDK plugin." into idea133
Removes final so SyncService can be mocked in tests.

Change-Id: I47a513ad16278a68415f2587f9559174ccd29bea
Merge "Removes final so SyncService can be mocked in tests." into idea133
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