diff options
author | Mike Lockwood <> | 2009-04-06 05:17:28 -0700 |
---|---|---|
committer | The Android Open Source Project <initial-contribution@android.com> | 2009-04-06 05:17:28 -0700 |
commit | f113fbe67b878b356fba11873276d7633ec1af22 (patch) | |
tree | dca146b6f0ab178365f4ee7e80dd976ae33e4e73 /location | |
parent | 66eb4acb89a5e54bdb5b9973e9a1c1b9853d154d (diff) | |
download | frameworks_base-f113fbe67b878b356fba11873276d7633ec1af22.zip frameworks_base-f113fbe67b878b356fba11873276d7633ec1af22.tar.gz frameworks_base-f113fbe67b878b356fba11873276d7633ec1af22.tar.bz2 |
AI 144620: Clean up interface between NetworkLocationProvider and LocationManagerService (part 1)
Move broadcast receivers for wifi scan results and battery status
from LocationManagerService to NetworkLocationProvider
Add a Service for the NetworkLocationProvider, so we can install it from its
own thread rather than from BOOT_COMPLETED or callback from LocationManagerService.
(this Service was also required for receiving Intents in NetworkLocationProvider)
BUG=1729031
Automated import of CL 144620
Diffstat (limited to 'location')
3 files changed, 0 insertions, 42 deletions
diff --git a/location/java/com/android/internal/location/ILocationCollector.java b/location/java/com/android/internal/location/ILocationCollector.java index 5c1f152..2196144 100644 --- a/location/java/com/android/internal/location/ILocationCollector.java +++ b/location/java/com/android/internal/location/ILocationCollector.java @@ -17,9 +17,6 @@ package com.android.internal.location; import android.location.Location; -import android.net.wifi.ScanResult; - -import java.util.List; /** * Listens for GPS and cell/wifi changes and anonymously uploads to server for @@ -35,21 +32,4 @@ public interface ILocationCollector { * @param location location object */ abstract public void updateLocation(Location location); - - /** - * Updates wifi scan results if collection is enabled - * - * @param currentScanResults scan results - */ - abstract public void updateWifiScanResults(List<ScanResult> currentScanResults); - - /** - * Updates the battery health. Battery level is healthy if there is greater than - * {@link #MIN_BATTERY_LEVEL} percentage left or if the device is plugged in - * - * @param scale maximum scale for battery - * @param level current level - * @param plugged true if device is plugged in - */ - abstract public void updateBatteryState(int scale, int level, boolean plugged); } diff --git a/location/java/com/android/internal/location/INetworkLocationManager.java b/location/java/com/android/internal/location/INetworkLocationManager.java index d85ff0a..e487556 100644 --- a/location/java/com/android/internal/location/INetworkLocationManager.java +++ b/location/java/com/android/internal/location/INetworkLocationManager.java @@ -25,13 +25,6 @@ import android.content.Context; * {@hide} */ public interface INetworkLocationManager { - - /* callback to allow installation to occur in Location Manager's thread */ - public interface InstallCallback { - void installNetworkLocationProvider(INetworkLocationManager manager); - } - - void setInstallCallback(InstallCallback callback); void setNetworkLocationProvider(INetworkLocationProvider provider); void setLocationCollector(ILocationCollector collector); }
\ No newline at end of file diff --git a/location/java/com/android/internal/location/INetworkLocationProvider.java b/location/java/com/android/internal/location/INetworkLocationProvider.java index f8947a6..11c6821 100644 --- a/location/java/com/android/internal/location/INetworkLocationProvider.java +++ b/location/java/com/android/internal/location/INetworkLocationProvider.java @@ -48,21 +48,6 @@ public interface INetworkLocationProvider { abstract public void updateCellLockStatus(boolean acquired); /** - * Notifies the provider if Wifi has been enabled or disabled - * by the user - * - * @param enabled true if wifi is enabled; false otherwise - */ - abstract public void updateWifiEnabledState(boolean enabled); - - /** - * Notifies the provider that there are scan results available. - * - * @param scanResults list of wifi scan results - */ - abstract public void updateWifiScanResults(List<ScanResult> scanResults); - - /** * Adds a list of application clients * Only used by the NetworkLocationProvider * |