Anil Admal | 4e50a4c | 2018-12-19 15:22:13 -0800 | [diff] [blame] | 1 | /* |
| 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 | |
| 22 | namespace android { |
| 23 | namespace hardware { |
| 24 | namespace gnss { |
| 25 | namespace V2_0 { |
| 26 | namespace implementation { |
| 27 | |
| 28 | // Methods from ::android::hardware::gnss::V1_0::IGnssConfiguration follow. |
| 29 | Return<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 | |
| 35 | Return<bool> GnssConfiguration::setSuplVersion(uint32_t) { |
| 36 | // TODO implement |
| 37 | return bool{}; |
| 38 | } |
| 39 | |
| 40 | Return<bool> GnssConfiguration::setSuplMode(hidl_bitfield<SuplMode>) { |
| 41 | // TODO implement |
| 42 | return bool{}; |
| 43 | } |
| 44 | |
| 45 | Return<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 | |
| 51 | Return<bool> GnssConfiguration::setLppProfile(hidl_bitfield<LppProfile>) { |
| 52 | // TODO implement |
| 53 | return bool{}; |
| 54 | } |
| 55 | |
| 56 | Return<bool> GnssConfiguration::setGlonassPositioningProtocol(hidl_bitfield<GlonassPosProtocol>) { |
| 57 | // TODO implement |
| 58 | return bool{}; |
| 59 | } |
| 60 | |
| 61 | Return<bool> GnssConfiguration::setEmergencySuplPdn(bool) { |
| 62 | // TODO implement |
| 63 | return bool{}; |
| 64 | } |
| 65 | |
| 66 | // Methods from ::android::hardware::gnss::V1_1::IGnssConfiguration follow. |
| 67 | Return<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. |
| 74 | Return<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 |