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

Commit 2ca2c56e authored by Anil Admal's avatar Anil Admal Committed by Android (Google) Code Review
Browse files

Merge "Add emergency session extension duration (HAL)"

parents eb48ad19 4e50a4cd
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -13,6 +13,7 @@ hidl_interface {
        "IAGnssRil.hal",
        "IGnss.hal",
        "IGnssCallback.hal",
        "IGnssConfiguration.hal",
        "IGnssMeasurement.hal",
        "IGnssMeasurementCallback.hal",
    ],
+9 −1
Original line number Diff line number Diff line
@@ -20,6 +20,7 @@ import android.hardware.gnss.measurement_corrections@1.0::IMeasurementCorrection
import @1.1::IGnss;

import IGnssCallback;
import IGnssConfiguration;
import IGnssMeasurement;
import IAGnss;
import IAGnssRil;
@@ -36,6 +37,13 @@ interface IGnss extends @1.1::IGnss {
     */
    setCallback_2_0(IGnssCallback callback) generates (bool success);

    /**
     * This method returns the IGnssConfiguration interface.
     *
     * @return gnssConfigurationIface Handle to the IGnssConfiguration interface.
     */
    getExtensionGnssConfiguration_2_0() generates (IGnssConfiguration gnssConfigurationIface);

    /**
     * This method returns the IAGnss Interface.
     *
+45 −0
Original line number Diff line number Diff line
/*
 * Copyright (C) 2018 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.gnss@2.0;

import @1.1::IGnssConfiguration;

/**
 * Extended interface for GNSS Configuration support.
 *
 * Due to the introduction of new GNSS HAL package android.hardware.gnss.visibility_control@1.0
 * the following methods in @1.0::IGnssConfiguration are deprecated in this version and not
 * called by the framework.
 *
 * setGpsLock(bitfield<GpsLock> lock) generates (bool success);
 * setSuplEs(bool enabled) generates (bool success);
 */
interface IGnssConfiguration extends @1.1::IGnssConfiguration {
    /**
     * This method sets the emergency session extension duration. The GNSS HAL
     * implementation must serve emergency SUPL and Control Plane network initiated
     * location requests for this extra duration after the user initiated emergency
     * session ends.
     *
     * @param emergencyExtensionSeconds Number of seconds to extend the emergency
     * session duration post emergency call.
     *
     * @return success True if the GNSS HAL implementation accepts and supports the
     * extended duration for emergency SUPL and Control Plane location requests.
     */
    setEsExtensionSec(uint32_t emergencyExtensionSeconds) generates (bool success);
};
 No newline at end of file
+1 −0
Original line number Diff line number Diff line
@@ -21,6 +21,7 @@ cc_binary {
    vendor: true,
    vintf_fragments: ["android.hardware.gnss@2.0-service.xml"],
    srcs: [
        "GnssConfiguration.cpp",
        "AGnss.cpp",
        "AGnssRil.cpp",
        "Gnss.cpp",
+5 −0
Original line number Diff line number Diff line
@@ -20,6 +20,7 @@
#include <log/log.h>
#include "AGnss.h"
#include "AGnssRil.h"
#include "GnssConfiguration.h"
#include "GnssMeasurement.h"

using ::android::hardware::Status;
@@ -181,6 +182,10 @@ Return<bool> Gnss::injectBestLocation(const V1_0::GnssLocation&) {
}

// Methods from V2_0::IGnss follow.
Return<sp<V2_0::IGnssConfiguration>> Gnss::getExtensionGnssConfiguration_2_0() {
    return new GnssConfiguration{};
}

Return<sp<V2_0::IAGnss>> Gnss::getExtensionAGnss_2_0() {
    return new AGnss{};
}
Loading