blob: 6bf1712affe481eae67ff765829359e431545656 [file] [log] [blame]
Anil Admal4e50a4c2018-12-19 15:22:13 -08001/*
2 * Copyright (C) 2018 The Android Open Source Project
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16
17#define LOG_TAG "GnssConfiguration"
18
19#include "GnssConfiguration.h"
20#include <log/log.h>
21
22namespace android {
23namespace hardware {
24namespace gnss {
25namespace V2_0 {
26namespace implementation {
27
28// Methods from ::android::hardware::gnss::V1_0::IGnssConfiguration follow.
29Return<bool> GnssConfiguration::setSuplEs(bool enable) {
30 ALOGD("setSuplEs enable: %d", enable);
31 // Method deprecated in 2.0 and not expected to be called by the framework.
32 return false;
33}
34
35Return<bool> GnssConfiguration::setSuplVersion(uint32_t) {
Anil Admal704bc612019-03-21 18:45:30 +000036 return true;
Anil Admal4e50a4c2018-12-19 15:22:13 -080037}
38
39Return<bool> GnssConfiguration::setSuplMode(hidl_bitfield<SuplMode>) {
Anil Admal704bc612019-03-21 18:45:30 +000040 return true;
Anil Admal4e50a4c2018-12-19 15:22:13 -080041}
42
43Return<bool> GnssConfiguration::setGpsLock(hidl_bitfield<GpsLock> gpsLock) {
44 ALOGD("setGpsLock gpsLock: %hhu", static_cast<GpsLock>(gpsLock));
45 // Method deprecated in 2.0 and not expected to be called by the framework.
46 return false;
47}
48
49Return<bool> GnssConfiguration::setLppProfile(hidl_bitfield<LppProfile>) {
Anil Admal704bc612019-03-21 18:45:30 +000050 return true;
Anil Admal4e50a4c2018-12-19 15:22:13 -080051}
52
53Return<bool> GnssConfiguration::setGlonassPositioningProtocol(hidl_bitfield<GlonassPosProtocol>) {
Anil Admal704bc612019-03-21 18:45:30 +000054 return true;
Anil Admal4e50a4c2018-12-19 15:22:13 -080055}
56
57Return<bool> GnssConfiguration::setEmergencySuplPdn(bool) {
Anil Admal704bc612019-03-21 18:45:30 +000058 return true;
Anil Admal4e50a4c2018-12-19 15:22:13 -080059}
60
61// Methods from ::android::hardware::gnss::V1_1::IGnssConfiguration follow.
62Return<bool> GnssConfiguration::setBlacklist(
63 const hidl_vec<V1_1::IGnssConfiguration::BlacklistedSource>&) {
64 // TODO (b/122463906): Reuse 1.1 implementation.
65 return bool{};
66}
67
68// Methods from ::android::hardware::gnss::V2_0::IGnssConfiguration follow.
69Return<bool> GnssConfiguration::setEsExtensionSec(uint32_t emergencyExtensionSeconds) {
70 ALOGD("setEsExtensionSec emergencyExtensionSeconds: %d", emergencyExtensionSeconds);
71 return true;
72}
73
74} // namespace implementation
75} // namespace V2_0
76} // namespace gnss
77} // namespace hardware
78} // namespace android