gps: fixed singleshot session that doesn't stop

When a single shot location is requested and a
location is returned, the location request is
not stopped and so it continues even when the
requestor has stopped listening. This can cause
gps tracking to continue in the backgroud and eat
up battery.

This is fixed by stoping the provider if there
are no more update record associated with it
when a location is returned.

Change-Id: Ie437732ff06231a46724843af30e21ca3a1694ab
ConnectivtyService : Execute connectivityCheck in thread pool

Since this async task takes long when doing things like waiting for
network connectivity...etc, rather than holding up the single executor
of async task for the framework (app_process), run it on a thread from
the pool so other tasks can execute in parallel.

Change-Id: I7b88a4837c7e117ef47014a20c57f828b811edfb
server: Treat non-default route as host route

When constructing ip route command in addRouteWithMetric,
we used to check whether the given route is a host route.
In some cases, the isHostRoute() check can return false for
non-default routes. To make this check more foolproof,
check whether a route is non-default in order to treat it
as a host route.

Change-Id: I5e396e67e1c82bbe22600c47f1e52cc7c750cdc6
Fixed retrieving non-initialized wallpaper information

When an attempt is made to retrieve wallpaper information such
as getWidthHint during user switching, the wallpaper may be
uninitialized and therefore throw NullPointerException.

Resolved by initializing wallpaper for current active user
if not yet initialized or returning null if applicable.

Change-Id: I1d3931379cbf4ea82cd25bc813898bbe4fb65a67
Fix RIL_UNSOL_CDMA_PRL_CHANGED constant typo (1/2)

Change-Id: I6eef9350fa62857cb5fd133a385cb09150cb6d1b
Fix indirect misuse of $(my-dir).

Change-Id: I20a98a8e1378da3a53e6a6d599c8fc0100f7f87a
Fix Aapt so that duplicate package ID errors are not incorrectly reported.

Aapt falsely reports package ID conflicts unless base packages are included
in strictly ascending order based on their package IDs. This fix addresses
that issue while still detecting and reporting conflicts correctly when they
actually exist.

Change-Id: Ic8059b87f919641d086df88d1556f5fa0063739f
bless python versions newer than 2.6

Change-Id: Ic4bfb857586f1fd4aa9cfddf5984341a89b0cd4a
Signed-off-by: Li Li <lli5@nvidia.com>
Reviewed-on: http://git-master/r/347711
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Peter Zu <pzu@nvidia.com>
p2p: Display P2P peer MAC address if device name is empty.

Display MAC address of a P2P peer in an invitation prompt
message on receiving invitation request from the P2P peer
with empty device name.

Change-Id: Icabeb91d666437746eb5a733ec582849eb7295a5
CRs-Fixed: 506109
wlan: Do not disable the network on Assoc Reject/Authentication Failure.

A failed network, if disabled, would result in no further connection
attempts for the same.Thus, do not disable the network rather enable
all the disabled networks, as supplicant shall disable the networks
temporarily on subsequent failures and would give fair chance to
select the prioritized networks.

Change-Id: I27bfdfed420e935c1bc21fb968d6a5ba75ca92aa
CRs-fixed: 582883
Wifi: wifi not connecting, once the APN gets disabled state

APNs are disabled on select network and they are enabled on
receiving connected event. But forgetting an APN before the
connected event is received,will result all the remaining APN
to be in disabled state and they never connect.
So, Enabling all the disabled APN on forget network will help
to connect automatically to a saved APN.

Change-Id: I0aec08f118c3f33fceea60f5a6b44622717d93ed
CRs-fixed: 567655
Removed android.debug.JNITest from preloaded-classes

android.debug.JNITest class no longer exists in this
project. This patch updates preloaded-classes accordingly
to avoid spurious warning during boot.

Change-Id: Ia4a5a1858f6c87fbc594a623adb95454334361ea
Signed-off-by: Ashok Bhat <ashok.bhat@arm.com>
decouple SW FLP and HW FLP overlay flags

currently there is only overlay flag shared by SW FLP and HW FLP. This
change allows having different overlay setting for sw / hw FLPs.

Change-Id: I643fa70380e7568ae851d23e87917a5b4b599fe8
CRs-Fixed: 622338
geofence: Low power geofence HW implementation

HW implemntation overwrites the SW implementation

Change-Id: Id738f2808691c35e5507e1d557bc5351456953ad
(cherry picked from commit 8bf22473ed32b2b54698ed7f5ab57c32402cb0f1)
(cherry picked from commit 9f8539ff017acce6de46923377730e8475452aa8)
(cherry picked from commit 335ee83dd9651f9fd8a0d32a78b08890da77ebb6)
Remove derp from location manager service
Combo Provider: Get the package name from resource

Get the package name for combo provider from resouce
instead of hardcoding the name. Also, geofence services
provider is renamed to differentiate from the hal
geofence provider

CRs-fixed: 608477

Change-Id: I84739e440d688d6e1784aa5ab4e2074eaa740bab

Conflicts:
	services/java/com/android/server/LocationManagerService.java
Combo Provider: Specific location screening

Only screen network locations if Combo provider is
the connected network location provider.

CRs-fixed: 608477

Change-Id: I513bddae9cff493dd9aac4460168864548e4bfb4
Fix for crash in LocationManagerService

Resolved issue where MockProvider was being cast to
LocationProviderProxy and would cause a fatal exception.

Change-Id: I7c8c83961dd03d59292e773b01995ed6b3ac04c7
CRs-fixed: 619882
Fix setSurfaceTexture to handle surface caching

Changed the TextureView.setSurfaceTexture to apply the
existing listener to the surface provided in the method.
This is done to allow surface caching to work.
Whenever a new SurfaceTexture gets created, its listener is
created as well, so when the setSurfaceTexture is called
we should be attaching the listener to the new surface.

Change-Id: I4c1a704c587e977ab7a6b1fe3a7d3e0d20d00218
CRs-Fixed: 639136
fix WRITE_SETTINGS to be "dangerous"

(see http://www.fireeye.com/blog/technical/2014/04/occupy_your_icons_silently_on_android.html for an explanation why this is dangerous)

Change-Id: I8f938dc4f528aa2ccbca3d4cec235feb0299c0bd