Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 0682809a authored by destradaa's avatar destradaa
Browse files

Add support in the platform for Flp Geofencing.

Change-Id: I0fb0e276d3a06322697bb5d46323779aca1f78c5
parent f464511a
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -355,6 +355,7 @@ aidl_files := \
	frameworks/base/core/java/android/content/SyncStats.aidl \
	frameworks/base/core/java/android/content/res/Configuration.aidl \
	frameworks/base/core/java/android/database/CursorWindow.aidl \
	frameworks/base/core/java/android/hardware/location/GeofenceHardwareRequestParcelable.aidl \
	frameworks/base/core/java/android/net/Uri.aidl \
	frameworks/base/core/java/android/nfc/NdefMessage.aidl \
	frameworks/base/core/java/android/nfc/NdefRecord.aidl \
+14 −8
Original line number Diff line number Diff line
@@ -15,16 +15,11 @@
 */
package android.hardware.location;

import android.content.Context;
import android.location.Location;
import android.os.RemoteException;
import android.util.Log;

import java.lang.ref.WeakReference;
import java.util.HashMap;
import java.util.Map;
import java.util.Set;


/**
 * This class handles geofences managed by various hardware subsystems. It contains
@@ -52,13 +47,20 @@ public final class GeofenceHardware {
    private IGeofenceHardware mService;

    // Hardware systems that do geofence monitoring.
    static final int NUM_MONITORS = 1;
    static final int NUM_MONITORS = 2;

    /**
     * Constant for geofence monitoring done by the GPS hardware.
     */
    public static final int MONITORING_TYPE_GPS_HARDWARE = 0;

    /**
     * Constant for geofence monitoring done by the Fused hardware.
     *
     * @hide
     */
    public static final int MONITORING_TYPE_FUSED_HARDWARE = 1;

    /**
     * Constant to indiciate that the monitoring system is currently
     * available for monitoring geofences.
@@ -124,8 +126,12 @@ public final class GeofenceHardware {
     */
    public static final int GEOFENCE_FAILURE = 5;

    static final int GPS_GEOFENCE_UNAVAILABLE = 1<<0L;
    static final int GPS_GEOFENCE_AVAILABLE = 1<<1L;
    /**
     * The constant used to indicate that the operation failed due to insufficient memory.
     *
     * @hide
     */
    public static final int GEOFENCE_ERROR_INSUFFICIENT_MEMORY = 6;

    private HashMap<GeofenceHardwareCallback, GeofenceHardwareCallbackWrapper>
            mCallbacks = new HashMap<GeofenceHardwareCallback, GeofenceHardwareCallbackWrapper>();
+206 −139

File changed.

Preview size limit exceeded, changes collapsed.

+19 −0
Original line number Diff line number Diff line
/*
 * Copyright (C) 2013, The Android Open Source Project
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package android.hardware.location;

parcelable GeofenceHardwareRequestParcelable;
+151 −0

File added.

Preview size limit exceeded, changes collapsed.

Loading