use of android.hardware.location.IFusedLocationHardwareSink in project platform_frameworks_base by android.
the class FlpHardwareProvider method onLocationReport.
/**
* Private callback functions used by FLP HAL.
*/
// FlpCallbacks members
private void onLocationReport(Location[] locations) {
for (Location location : locations) {
location.setProvider(LocationManager.FUSED_PROVIDER);
// set the elapsed time-stamp just as GPS provider does
location.setElapsedRealtimeNanos(SystemClock.elapsedRealtimeNanos());
}
IFusedLocationHardwareSink sink;
synchronized (mLocationSinkLock) {
sink = mLocationSink;
}
try {
if (sink != null) {
sink.onLocationAvailable(locations);
}
} catch (RemoteException e) {
Log.e(TAG, "RemoteException calling onLocationAvailable");
}
}
use of android.hardware.location.IFusedLocationHardwareSink in project platform_frameworks_base by android.
the class FlpHardwareProvider method maybeSendCapabilities.
private void maybeSendCapabilities() {
IFusedLocationHardwareSink sink;
boolean haveBatchingCapabilities;
int batchingCapabilities;
synchronized (mLocationSinkLock) {
sink = mLocationSink;
haveBatchingCapabilities = mHaveBatchingCapabilities;
batchingCapabilities = mBatchingCapabilities;
}
try {
if (sink != null && haveBatchingCapabilities) {
sink.onCapabilities(batchingCapabilities);
}
} catch (RemoteException e) {
Log.e(TAG, "RemoteException calling onLocationAvailable");
}
}
use of android.hardware.location.IFusedLocationHardwareSink in project android_frameworks_base by AOSPA.
the class FlpHardwareProvider method onLocationReport.
/**
* Private callback functions used by FLP HAL.
*/
// FlpCallbacks members
private void onLocationReport(Location[] locations) {
for (Location location : locations) {
location.setProvider(LocationManager.FUSED_PROVIDER);
// set the elapsed time-stamp just as GPS provider does
location.setElapsedRealtimeNanos(SystemClock.elapsedRealtimeNanos());
}
IFusedLocationHardwareSink sink;
synchronized (mLocationSinkLock) {
sink = mLocationSink;
}
try {
if (sink != null) {
sink.onLocationAvailable(locations);
}
} catch (RemoteException e) {
Log.e(TAG, "RemoteException calling onLocationAvailable");
}
}
use of android.hardware.location.IFusedLocationHardwareSink in project android_frameworks_base by AOSPA.
the class FlpHardwareProvider method maybeSendCapabilities.
private void maybeSendCapabilities() {
IFusedLocationHardwareSink sink;
boolean haveBatchingCapabilities;
int batchingCapabilities;
synchronized (mLocationSinkLock) {
sink = mLocationSink;
haveBatchingCapabilities = mHaveBatchingCapabilities;
batchingCapabilities = mBatchingCapabilities;
}
try {
if (sink != null && haveBatchingCapabilities) {
sink.onCapabilities(batchingCapabilities);
}
} catch (RemoteException e) {
Log.e(TAG, "RemoteException calling onLocationAvailable");
}
}
use of android.hardware.location.IFusedLocationHardwareSink in project android_frameworks_base by ResurrectionRemix.
the class FlpHardwareProvider method onLocationReport.
/**
* Private callback functions used by FLP HAL.
*/
// FlpCallbacks members
private void onLocationReport(Location[] locations) {
for (Location location : locations) {
location.setProvider(LocationManager.FUSED_PROVIDER);
// set the elapsed time-stamp just as GPS provider does
location.setElapsedRealtimeNanos(SystemClock.elapsedRealtimeNanos());
}
IFusedLocationHardwareSink sink;
synchronized (mLocationSinkLock) {
sink = mLocationSink;
}
try {
if (sink != null) {
sink.onLocationAvailable(locations);
}
} catch (RemoteException e) {
Log.e(TAG, "RemoteException calling onLocationAvailable");
}
}
Aggregations