Loading services/core/java/com/android/server/location/AbstractLocationProvider.java +1 −0 Original line number Diff line number Diff line Loading @@ -310,6 +310,7 @@ public abstract class AbstractLocationProvider { * Sets a new request and worksource for the provider. */ public final void setRequest(ProviderRequest request) { // TODO: do we want to hold a wakelock until onSetRequest is run? // all calls into the provider must be moved onto the provider thread to prevent deadlock mExecutor.execute(() -> onSetRequest(request)); } Loading services/core/java/com/android/server/location/LocationManagerService.java +2 −0 Original line number Diff line number Diff line Loading @@ -324,6 +324,8 @@ public class LocationManagerService extends ILocationManager.Stub { } void onSystemThirdPartyAppsCanStart() { // network provider should always be initialized before the gps provider since the gps // provider has unfortunate hard dependencies on the network provider ProxyLocationProvider networkProvider = ProxyLocationProvider.createAndRegister( mContext, NETWORK_LOCATION_SERVICE_ACTION, Loading services/core/java/com/android/server/location/gnss/GnssLocationProvider.java +147 −284 File changed.Preview size limit exceeded, changes collapsed. Show changes services/core/java/com/android/server/location/util/LocationEventLog.java +9 −4 Original line number Diff line number Diff line Loading @@ -22,6 +22,8 @@ import static android.os.PowerManager.LOCATION_MODE_GPS_DISABLED_WHEN_SCREEN_OFF import static android.os.PowerManager.LOCATION_MODE_NO_CHANGE; import static android.os.PowerManager.LOCATION_MODE_THROTTLE_REQUESTS_WHEN_SCREEN_OFF; import static com.android.server.location.LocationManagerService.D; import android.annotation.Nullable; import android.location.LocationRequest; import android.location.util.identity.CallerIdentity; Loading @@ -29,14 +31,13 @@ import android.os.Build; import android.os.PowerManager.LocationPowerSaveMode; import com.android.internal.location.ProviderRequest; import com.android.server.location.LocationManagerService; import com.android.server.utils.eventlog.LocalEventLog; /** In memory event log for location events. */ public class LocationEventLog extends LocalEventLog { private static int getLogSize() { if (Build.IS_DEBUGGABLE || LocationManagerService.D) { if (Build.IS_DEBUGGABLE || D) { return 500; } else { return 200; Loading Loading @@ -91,14 +92,18 @@ public class LocationEventLog extends LocalEventLog { /** Logs a new incoming location for a location provider. */ public synchronized void logProviderReceivedLocations(String provider, int numLocations) { if (Build.IS_DEBUGGABLE || D) { addLogEvent(EVENT_PROVIDER_RECEIVE_LOCATION, provider, numLocations); } } /** Logs a location deliver for a client of a location provider. */ public synchronized void logProviderDeliveredLocations(String provider, int numLocations, CallerIdentity identity) { if (Build.IS_DEBUGGABLE || D) { addLogEvent(EVENT_PROVIDER_DELIVER_LOCATION, provider, numLocations, identity); } } /** Logs that the location power save mode has changed. */ public synchronized void logLocationPowerSaveMode( Loading Loading
services/core/java/com/android/server/location/AbstractLocationProvider.java +1 −0 Original line number Diff line number Diff line Loading @@ -310,6 +310,7 @@ public abstract class AbstractLocationProvider { * Sets a new request and worksource for the provider. */ public final void setRequest(ProviderRequest request) { // TODO: do we want to hold a wakelock until onSetRequest is run? // all calls into the provider must be moved onto the provider thread to prevent deadlock mExecutor.execute(() -> onSetRequest(request)); } Loading
services/core/java/com/android/server/location/LocationManagerService.java +2 −0 Original line number Diff line number Diff line Loading @@ -324,6 +324,8 @@ public class LocationManagerService extends ILocationManager.Stub { } void onSystemThirdPartyAppsCanStart() { // network provider should always be initialized before the gps provider since the gps // provider has unfortunate hard dependencies on the network provider ProxyLocationProvider networkProvider = ProxyLocationProvider.createAndRegister( mContext, NETWORK_LOCATION_SERVICE_ACTION, Loading
services/core/java/com/android/server/location/gnss/GnssLocationProvider.java +147 −284 File changed.Preview size limit exceeded, changes collapsed. Show changes
services/core/java/com/android/server/location/util/LocationEventLog.java +9 −4 Original line number Diff line number Diff line Loading @@ -22,6 +22,8 @@ import static android.os.PowerManager.LOCATION_MODE_GPS_DISABLED_WHEN_SCREEN_OFF import static android.os.PowerManager.LOCATION_MODE_NO_CHANGE; import static android.os.PowerManager.LOCATION_MODE_THROTTLE_REQUESTS_WHEN_SCREEN_OFF; import static com.android.server.location.LocationManagerService.D; import android.annotation.Nullable; import android.location.LocationRequest; import android.location.util.identity.CallerIdentity; Loading @@ -29,14 +31,13 @@ import android.os.Build; import android.os.PowerManager.LocationPowerSaveMode; import com.android.internal.location.ProviderRequest; import com.android.server.location.LocationManagerService; import com.android.server.utils.eventlog.LocalEventLog; /** In memory event log for location events. */ public class LocationEventLog extends LocalEventLog { private static int getLogSize() { if (Build.IS_DEBUGGABLE || LocationManagerService.D) { if (Build.IS_DEBUGGABLE || D) { return 500; } else { return 200; Loading Loading @@ -91,14 +92,18 @@ public class LocationEventLog extends LocalEventLog { /** Logs a new incoming location for a location provider. */ public synchronized void logProviderReceivedLocations(String provider, int numLocations) { if (Build.IS_DEBUGGABLE || D) { addLogEvent(EVENT_PROVIDER_RECEIVE_LOCATION, provider, numLocations); } } /** Logs a location deliver for a client of a location provider. */ public synchronized void logProviderDeliveredLocations(String provider, int numLocations, CallerIdentity identity) { if (Build.IS_DEBUGGABLE || D) { addLogEvent(EVENT_PROVIDER_DELIVER_LOCATION, provider, numLocations, identity); } } /** Logs that the location power save mode has changed. */ public synchronized void logLocationPowerSaveMode( Loading