blob: 4389dd28f3adfb9ef13780ca202c56706e42dee1 [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) {
36 // TODO implement
37 return bool{};
38}
39
40Return<bool> GnssConfiguration::setSuplMode(hidl_bitfield<SuplMode>) {
41 // TODO implement
42 return bool{};
43}
44
45Return<bool> GnssConfiguration::setGpsLock(hidl_bitfield<GpsLock> gpsLock) {
46 ALOGD("setGpsLock gpsLock: %hhu", static_cast<GpsLock>(gpsLock));
47 // Method deprecated in 2.0 and not expected to be called by the framework.
48 return false;
49}
50
51Return<bool> GnssConfiguration::setLppProfile(hidl_bitfield<LppProfile>) {
52 // TODO implement
53 return bool{};
54}
55
56Return<bool> GnssConfiguration::setGlonassPositioningProtocol(hidl_bitfield<GlonassPosProtocol>) {
57 // TODO implement
58 return bool{};
59}
60
61Return<bool> GnssConfiguration::setEmergencySuplPdn(bool) {
62 // TODO implement
63 return bool{};
64}
65
66// Methods from ::android::hardware::gnss::V1_1::IGnssConfiguration follow.
67Return<bool> GnssConfiguration::setBlacklist(
68 const hidl_vec<V1_1::IGnssConfiguration::BlacklistedSource>&) {
69 // TODO (b/122463906): Reuse 1.1 implementation.
70 return bool{};
71}
72
73// Methods from ::android::hardware::gnss::V2_0::IGnssConfiguration follow.
74Return<bool> GnssConfiguration::setEsExtensionSec(uint32_t emergencyExtensionSeconds) {
75 ALOGD("setEsExtensionSec emergencyExtensionSeconds: %d", emergencyExtensionSeconds);
76 return true;
77}
78
79} // namespace implementation
80} // namespace V2_0
81} // namespace gnss
82} // namespace hardware
83} // namespace android