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. setSuplEs(bool enable)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 setSuplVersion(uint32_t)35Return<bool> GnssConfiguration::setSuplVersion(uint32_t) { 36 return true; 37 } 38 setSuplMode(hidl_bitfield<SuplMode>)39Return<bool> GnssConfiguration::setSuplMode(hidl_bitfield<SuplMode>) { 40 return true; 41 } 42 setGpsLock(hidl_bitfield<GpsLock> gpsLock)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 setLppProfile(hidl_bitfield<LppProfile>)49Return<bool> GnssConfiguration::setLppProfile(hidl_bitfield<LppProfile>) { 50 return true; 51 } 52 setGlonassPositioningProtocol(hidl_bitfield<GlonassPosProtocol>)53Return<bool> GnssConfiguration::setGlonassPositioningProtocol(hidl_bitfield<GlonassPosProtocol>) { 54 return true; 55 } 56 setEmergencySuplPdn(bool)57Return<bool> GnssConfiguration::setEmergencySuplPdn(bool) { 58 return true; 59 } 60 61 // Methods from ::android::hardware::gnss::V1_1::IGnssConfiguration follow. setBlacklist(const hidl_vec<V1_1::IGnssConfiguration::BlacklistedSource> &)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. setEsExtensionSec(uint32_t emergencyExtensionSeconds)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