diff options
author | Danke Xie <dankex@qualcomm.com> | 2009-08-18 18:28:45 -0400 |
---|---|---|
committer | Mike Lockwood <lockwood@android.com> | 2009-08-27 14:18:30 -0700 |
commit | 22d1f9fb23015471de6af1a70e40fb5c82ecb665 (patch) | |
tree | 0952ea04b5b0059aa48812f76e26599946e605c2 /services/java/com/android | |
parent | 0409cde3601131caf14c88d132c65d74774bbd79 (diff) | |
download | frameworks_base-22d1f9fb23015471de6af1a70e40fb5c82ecb665.zip frameworks_base-22d1f9fb23015471de6af1a70e40fb5c82ecb665.tar.gz frameworks_base-22d1f9fb23015471de6af1a70e40fb5c82ecb665.tar.bz2 |
gps: Network initiated SUPL
Initial contribution from Qualcomm.
Signed-off-by: Mike Lockwood <lockwood@android.com>
Diffstat (limited to 'services/java/com/android')
-rw-r--r-- | services/java/com/android/server/LocationManagerService.java | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/services/java/com/android/server/LocationManagerService.java b/services/java/com/android/server/LocationManagerService.java index c65c2be..cb6c168 100644 --- a/services/java/com/android/server/LocationManagerService.java +++ b/services/java/com/android/server/LocationManagerService.java @@ -49,6 +49,7 @@ import android.location.IGpsStatusProvider; import android.location.ILocationListener; import android.location.ILocationManager; import android.location.ILocationProvider; +import android.location.INetInitiatedListener; import android.location.Location; import android.location.LocationManager; import android.location.LocationProvider; @@ -71,6 +72,7 @@ import android.util.PrintWriterPrinter; import com.android.internal.location.GpsLocationProvider; import com.android.internal.location.LocationProviderProxy; import com.android.internal.location.MockProvider; +import com.android.internal.location.GpsNetInitiatedHandler; /** * The service class that manages LocationProviders and issues location @@ -118,6 +120,7 @@ public class LocationManagerService extends ILocationManager.Stub implements Run private final Context mContext; private IGeocodeProvider mGeocodeProvider; private IGpsStatusProvider mGpsStatusProvider; + private INetInitiatedListener mNetInitiatedListener; private LocationWorkerHandler mLocationHandler; // Cache the real providers for use in addTestProvider() and removeTestProvider() @@ -541,6 +544,7 @@ public class LocationManagerService extends ILocationManager.Stub implements Run // Create a gps location provider GpsLocationProvider provider = new GpsLocationProvider(mContext, this); mGpsStatusProvider = provider.getGpsStatusProvider(); + mNetInitiatedListener = provider.getNetInitiatedListener(); LocationProviderProxy proxy = new LocationProviderProxy(LocationManager.GPS_PROVIDER, provider); addProvider(proxy); mGpsLocationProvider = proxy; @@ -1131,6 +1135,18 @@ public class LocationManagerService extends ILocationManager.Stub implements Run } } + public boolean sendNiResponse(int notifId, int userResponse) + { + try { + return mNetInitiatedListener.sendNiResponse(notifId, userResponse); + } + catch (RemoteException e) + { + Log.e(TAG, "RemoteException in LocationManagerService.sendNiResponse"); + return false; + } + } + class ProximityAlert { final int mUid; final double mLatitude; |