Search in sources :

Example 1 with IFusedLocationHardwareSink

use of android.hardware.location.IFusedLocationHardwareSink in project android_frameworks_base by ResurrectionRemix.

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");
    }
}
Also used : RemoteException(android.os.RemoteException) IFusedLocationHardwareSink(android.hardware.location.IFusedLocationHardwareSink)

Example 2 with IFusedLocationHardwareSink

use of android.hardware.location.IFusedLocationHardwareSink in project android_frameworks_base by DirtyUnicorns.

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");
    }
}
Also used : RemoteException(android.os.RemoteException) IFusedLocationHardwareSink(android.hardware.location.IFusedLocationHardwareSink)

Example 3 with IFusedLocationHardwareSink

use of android.hardware.location.IFusedLocationHardwareSink in project android_frameworks_base by DirtyUnicorns.

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");
    }
}
Also used : RemoteException(android.os.RemoteException) Location(android.location.Location) IFusedLocationHardwareSink(android.hardware.location.IFusedLocationHardwareSink)

Example 4 with IFusedLocationHardwareSink

use of android.hardware.location.IFusedLocationHardwareSink in project android_frameworks_base by crdroidandroid.

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");
    }
}
Also used : RemoteException(android.os.RemoteException) Location(android.location.Location) IFusedLocationHardwareSink(android.hardware.location.IFusedLocationHardwareSink)

Example 5 with IFusedLocationHardwareSink

use of android.hardware.location.IFusedLocationHardwareSink in project android_frameworks_base by crdroidandroid.

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");
    }
}
Also used : RemoteException(android.os.RemoteException) IFusedLocationHardwareSink(android.hardware.location.IFusedLocationHardwareSink)

Aggregations

IFusedLocationHardwareSink (android.hardware.location.IFusedLocationHardwareSink)10 RemoteException (android.os.RemoteException)10 Location (android.location.Location)5