Loading Android.mk +3 −1 Original line number Diff line number Diff line Loading @@ -43,7 +43,7 @@ LOCAL_SRC_FILES := $(filter-out \ ## READ ME: ######################################################## ## ## When updading this list of aidl files, consider if that aidl is ## When updating this list of aidl files, consider if that aidl is ## part of the SDK API. If it is, also add it to the list below that ## is preprocessed and distributed with the SDK. This list should ## not contain any aidl files for parcelables, but the one below should Loading Loading @@ -113,8 +113,10 @@ LOCAL_SRC_FILES += \ core/java/com/android/internal/view/IInputMethodSession.aidl \ im/java/android/im/IImPlugin.aidl \ location/java/android/location/IGpsStatusListener.aidl \ location/java/android/location/ILocationCollector.aidl \ location/java/android/location/ILocationListener.aidl \ location/java/android/location/ILocationManager.aidl \ location/java/android/location/ILocationProvider.aidl \ media/java/android/media/IAudioService.aidl \ media/java/android/media/IMediaScannerListener.aidl \ media/java/android/media/IMediaScannerService.aidl \ Loading location/java/com/android/internal/location/ILocationCollector.java→location/java/android/location/ILocationCollector.aidl +7 −6 Original line number Diff line number Diff line Loading @@ -14,22 +14,23 @@ * limitations under the License. */ package com.android.internal.location; package android.location; import android.location.Location; /** * Listens for GPS and cell/wifi changes and anonymously uploads to server for * improving quality of service of NetworkLocationProvider. This service is only enabled when * the user has enabled the network location provider. * Listens for GPS and cell/wifi changes and anonymously uploads to server * for improving quality of service of NetworkLocationProvider. * This service is only enabled when the user has enabled the * network location provider. * * {@hide} */ public interface ILocationCollector { oneway interface ILocationCollector { /** * Updates GPS location if collection is enabled * * @param location location object */ abstract public void updateLocation(Location location); void updateLocation(in Location location); } location/java/android/location/ILocationManager.aidl +6 −0 Original line number Diff line number Diff line Loading @@ -19,7 +19,9 @@ package android.location; import android.app.PendingIntent; import android.location.Address; import android.location.IGpsStatusListener; import android.location.ILocationCollector; import android.location.ILocationListener; import android.location.ILocationProvider; import android.location.Location; import android.os.Bundle; Loading Loading @@ -74,4 +76,8 @@ interface ILocationManager void clearTestProviderEnabled(String provider); void setTestProviderStatus(String provider, int status, in Bundle extras, long updateTime); void clearTestProviderStatus(String provider); /* for installing Network Location Provider */ void setNetworkLocationProvider(ILocationProvider provider); void setLocationCollector(ILocationCollector collector); } location/java/com/android/internal/location/INetworkLocationProvider.java→location/java/android/location/ILocationProvider.aidl +61 −0 Original line number Diff line number Diff line Loading @@ -14,51 +14,48 @@ * limitations under the License. */ package com.android.internal.location; package android.location; import android.location.Address; import android.location.Location; import android.net.wifi.ScanResult; import java.util.List; import android.os.Bundle; /** * Interface for network location provider * An interface for location providers implemented outside of the system process. * * {@hide} */ public interface INetworkLocationProvider { /** * Updates the current cell lock status. * * @param acquired true if a cell lock has been acquired */ abstract public void updateCellLockStatus(boolean acquired); /** * Adds a list of application clients * Only used by the NetworkLocationProvider * * @param applications list of package names */ abstract public void addListener(String[] applications); /** * Removes a list of application clients * Only used by the NetworkLocationProvider * * @param applications list of package names */ abstract public void removeListener(String[] applications); abstract public String getFromLocation(double latitude, double longitude, int maxResults, String language, String country, String variant, String appName, List<Address> addrs); abstract public String getFromLocationName(String locationName, interface ILocationProvider { /* for LocationProvider */ boolean requiresNetwork(); boolean requiresSatellite(); boolean requiresCell(); boolean hasMonetaryCost(); boolean supportsAltitude(); boolean supportsSpeed(); boolean supportsBearing(); int getPowerRequirement(); int getAccuracy(); /* for LocationProviderImpl */ void enable(); void disable(); boolean isEnabled(); int getStatus(out Bundle extras); long getStatusUpdateTime(); void enableLocationTracking(boolean enable); void setMinTime(long minTime); void updateNetworkState(int state); boolean sendExtraCommand(String command, inout Bundle extras); /* the following are only used for NetworkLocationProvider */ void updateCellLockStatus(boolean acquired); void addListener(in String[] applications); void removeListener(in String[] applications); String getFromLocation(double latitude, double longitude, int maxResults, String language, String country, String variant, String appName, out List<Address> addrs); String getFromLocationName(String locationName, double lowerLeftLatitude, double lowerLeftLongitude, double upperRightLatitude, double upperRightLongitude, int maxResults, String language, String country, String variant, String appName, List<Address> addrs); String language, String country, String variant, String appName, out List<Address> addrs); } location/java/android/location/LocationProviderImpl.java +1 −1 Original line number Diff line number Diff line Loading @@ -119,7 +119,7 @@ public abstract class LocationProviderImpl extends LocationProvider { try { mLocationManager.setLocation(location); } catch (RemoteException e) { Log.e(TAG, "RemoteException calling ILocationManager.onLocationChanged"); Log.e(TAG, "RemoteException calling ILocationManager.setLocation"); } } Loading Loading
Android.mk +3 −1 Original line number Diff line number Diff line Loading @@ -43,7 +43,7 @@ LOCAL_SRC_FILES := $(filter-out \ ## READ ME: ######################################################## ## ## When updading this list of aidl files, consider if that aidl is ## When updating this list of aidl files, consider if that aidl is ## part of the SDK API. If it is, also add it to the list below that ## is preprocessed and distributed with the SDK. This list should ## not contain any aidl files for parcelables, but the one below should Loading Loading @@ -113,8 +113,10 @@ LOCAL_SRC_FILES += \ core/java/com/android/internal/view/IInputMethodSession.aidl \ im/java/android/im/IImPlugin.aidl \ location/java/android/location/IGpsStatusListener.aidl \ location/java/android/location/ILocationCollector.aidl \ location/java/android/location/ILocationListener.aidl \ location/java/android/location/ILocationManager.aidl \ location/java/android/location/ILocationProvider.aidl \ media/java/android/media/IAudioService.aidl \ media/java/android/media/IMediaScannerListener.aidl \ media/java/android/media/IMediaScannerService.aidl \ Loading
location/java/com/android/internal/location/ILocationCollector.java→location/java/android/location/ILocationCollector.aidl +7 −6 Original line number Diff line number Diff line Loading @@ -14,22 +14,23 @@ * limitations under the License. */ package com.android.internal.location; package android.location; import android.location.Location; /** * Listens for GPS and cell/wifi changes and anonymously uploads to server for * improving quality of service of NetworkLocationProvider. This service is only enabled when * the user has enabled the network location provider. * Listens for GPS and cell/wifi changes and anonymously uploads to server * for improving quality of service of NetworkLocationProvider. * This service is only enabled when the user has enabled the * network location provider. * * {@hide} */ public interface ILocationCollector { oneway interface ILocationCollector { /** * Updates GPS location if collection is enabled * * @param location location object */ abstract public void updateLocation(Location location); void updateLocation(in Location location); }
location/java/android/location/ILocationManager.aidl +6 −0 Original line number Diff line number Diff line Loading @@ -19,7 +19,9 @@ package android.location; import android.app.PendingIntent; import android.location.Address; import android.location.IGpsStatusListener; import android.location.ILocationCollector; import android.location.ILocationListener; import android.location.ILocationProvider; import android.location.Location; import android.os.Bundle; Loading Loading @@ -74,4 +76,8 @@ interface ILocationManager void clearTestProviderEnabled(String provider); void setTestProviderStatus(String provider, int status, in Bundle extras, long updateTime); void clearTestProviderStatus(String provider); /* for installing Network Location Provider */ void setNetworkLocationProvider(ILocationProvider provider); void setLocationCollector(ILocationCollector collector); }
location/java/com/android/internal/location/INetworkLocationProvider.java→location/java/android/location/ILocationProvider.aidl +61 −0 Original line number Diff line number Diff line Loading @@ -14,51 +14,48 @@ * limitations under the License. */ package com.android.internal.location; package android.location; import android.location.Address; import android.location.Location; import android.net.wifi.ScanResult; import java.util.List; import android.os.Bundle; /** * Interface for network location provider * An interface for location providers implemented outside of the system process. * * {@hide} */ public interface INetworkLocationProvider { /** * Updates the current cell lock status. * * @param acquired true if a cell lock has been acquired */ abstract public void updateCellLockStatus(boolean acquired); /** * Adds a list of application clients * Only used by the NetworkLocationProvider * * @param applications list of package names */ abstract public void addListener(String[] applications); /** * Removes a list of application clients * Only used by the NetworkLocationProvider * * @param applications list of package names */ abstract public void removeListener(String[] applications); abstract public String getFromLocation(double latitude, double longitude, int maxResults, String language, String country, String variant, String appName, List<Address> addrs); abstract public String getFromLocationName(String locationName, interface ILocationProvider { /* for LocationProvider */ boolean requiresNetwork(); boolean requiresSatellite(); boolean requiresCell(); boolean hasMonetaryCost(); boolean supportsAltitude(); boolean supportsSpeed(); boolean supportsBearing(); int getPowerRequirement(); int getAccuracy(); /* for LocationProviderImpl */ void enable(); void disable(); boolean isEnabled(); int getStatus(out Bundle extras); long getStatusUpdateTime(); void enableLocationTracking(boolean enable); void setMinTime(long minTime); void updateNetworkState(int state); boolean sendExtraCommand(String command, inout Bundle extras); /* the following are only used for NetworkLocationProvider */ void updateCellLockStatus(boolean acquired); void addListener(in String[] applications); void removeListener(in String[] applications); String getFromLocation(double latitude, double longitude, int maxResults, String language, String country, String variant, String appName, out List<Address> addrs); String getFromLocationName(String locationName, double lowerLeftLatitude, double lowerLeftLongitude, double upperRightLatitude, double upperRightLongitude, int maxResults, String language, String country, String variant, String appName, List<Address> addrs); String language, String country, String variant, String appName, out List<Address> addrs); }
location/java/android/location/LocationProviderImpl.java +1 −1 Original line number Diff line number Diff line Loading @@ -119,7 +119,7 @@ public abstract class LocationProviderImpl extends LocationProvider { try { mLocationManager.setLocation(location); } catch (RemoteException e) { Log.e(TAG, "RemoteException calling ILocationManager.onLocationChanged"); Log.e(TAG, "RemoteException calling ILocationManager.setLocation"); } } Loading