Loading services/core/java/com/android/server/location/AbstractLocationProvider.java +25 −4 Original line number Diff line number Diff line Loading @@ -18,6 +18,7 @@ package com.android.server.location; import android.content.Context; import android.location.Location; import android.os.Binder; import android.os.Bundle; import android.os.WorkSource; Loading Loading @@ -80,7 +81,12 @@ public abstract class AbstractLocationProvider { * any thread. */ protected void setEnabled(boolean enabled) { long identity = Binder.clearCallingIdentity(); try { mLocationProviderManager.onSetEnabled(enabled); } finally { Binder.restoreCallingIdentity(identity); } } /** Loading @@ -88,21 +94,36 @@ public abstract class AbstractLocationProvider { * any thread. */ protected void setProperties(ProviderProperties properties) { long identity = Binder.clearCallingIdentity(); try { mLocationProviderManager.onSetProperties(properties); } finally { Binder.restoreCallingIdentity(identity); } } /** * Call this method to report a new location. May be called from any thread. */ protected void reportLocation(Location location) { long identity = Binder.clearCallingIdentity(); try { mLocationProviderManager.onReportLocation(location); } finally { Binder.restoreCallingIdentity(identity); } } /** * Call this method to report a new location. May be called from any thread. */ protected void reportLocation(List<Location> locations) { long identity = Binder.clearCallingIdentity(); try { mLocationProviderManager.onReportLocation(locations); } finally { Binder.restoreCallingIdentity(identity); } } /** Loading Loading
services/core/java/com/android/server/location/AbstractLocationProvider.java +25 −4 Original line number Diff line number Diff line Loading @@ -18,6 +18,7 @@ package com.android.server.location; import android.content.Context; import android.location.Location; import android.os.Binder; import android.os.Bundle; import android.os.WorkSource; Loading Loading @@ -80,7 +81,12 @@ public abstract class AbstractLocationProvider { * any thread. */ protected void setEnabled(boolean enabled) { long identity = Binder.clearCallingIdentity(); try { mLocationProviderManager.onSetEnabled(enabled); } finally { Binder.restoreCallingIdentity(identity); } } /** Loading @@ -88,21 +94,36 @@ public abstract class AbstractLocationProvider { * any thread. */ protected void setProperties(ProviderProperties properties) { long identity = Binder.clearCallingIdentity(); try { mLocationProviderManager.onSetProperties(properties); } finally { Binder.restoreCallingIdentity(identity); } } /** * Call this method to report a new location. May be called from any thread. */ protected void reportLocation(Location location) { long identity = Binder.clearCallingIdentity(); try { mLocationProviderManager.onReportLocation(location); } finally { Binder.restoreCallingIdentity(identity); } } /** * Call this method to report a new location. May be called from any thread. */ protected void reportLocation(List<Location> locations) { long identity = Binder.clearCallingIdentity(); try { mLocationProviderManager.onReportLocation(locations); } finally { Binder.restoreCallingIdentity(identity); } } /** Loading