frameworks/base: Support for LTE network modes

Change-Id: I93c102f92ff2d10856d91108bb50fe5c0f06ad66
Switch keystore to binder

Change-Id: I9fa1fc05068bee1eed3f618fb32f70cf3d4c05d4
AndroidKeyStore: fix tests

Change-Id: I65fd8ba27af57ea8fd27c8e08c9c1201f32c494d
AndroidKeyStore: return error code on error

Instead of blindly multiplying return value by 1000 to convert to
milliseconds, check to see if it's an error condition first.

Change-Id: I8eab1e7a86d78c13458fcbbc79d590e452fc9791
Track keystore binder changes

Change-Id: Id6133be059a8a0901d16355a9152e40e4a255454
KeyStore: stop using state()

Change-Id: I721974fd95f8d1ab06a3fd1bbb4c9b4d9d1d7752
KeyStore: add API to uid versions

In previous commits, we added the ability to specify which UID we want to
target on certain operations. This commit adds the ability to reach those
binder calls from the KeyStore class.

Also fix a problem where saw() was not reading all the values returned via
the Binder call. This changes the semantics to return a null instead of
failing silently when it's not possible to search.

Change-Id: I32098dc0eb42e09ace89f6b7455766842a72e9f4
KeyStore: add "migrate" command

To support the WiFi service, we need to support migration from the
system UID to the wifi UID. This adds a command to achieve the
migration.

Bug: 8122243
Change-Id: I65f7a91504c1d2a2aac22b9c3051adffd28d66c1
KeyStore: change migrate to duplicate

After discussion, it was determined that duplicate would be less
disruptive and it still fit in the current HAL model.

Change-Id: I2f9cae48d38ec7146511e876450fa39fc92cda55
KeyStore: add API to query storage type

Add an API to keystore daemon to query what kind of storage is currently
in use.

Change-Id: I5a83ae92250ca63b691dcf1beb8b3e1703797745
Remove keystore entries when package removed

Add a hook into PackageManagerService so that when app IDs are
completely removed, we erase all entries from keystore for those UIDs
that have gone away.

Bug: 3020069
Change-Id: Id4b1d51a5fa4c418865055635a84bebcf5b65ec8
keystore: Add flag for blobs to be unencrypted

In order to let apps use keystore more productively, make the blob
encryption optional. As more hardware-assisted keystores (i.e., hardware
that has a Keymaster HAL) come around, encrypting blobs start to make
less sense since the thing it's encrypting is usually a token and not
any raw key material.

(cherry picked from commit a3788b00bb221e20abdd42f747d2af419e0a088c)

Bug: 8122243
Change-Id: Ifc1c64743651b23a4eace208ade0176af47ea989