blob: 44e096ebd345958ccfcec29115408697cb23a36d [file] [log] [blame]
Yu-Han Yang3fcb7bf2020-06-10 14:59:50 -07001/*
2 * Copyright (C) 2020 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 "GnssPsds"
18
19#include "GnssPsds.h"
20
21#include <log/log.h>
22
23namespace android::hardware::gnss::V3_0::implementation {
24
25sp<V3_0::IGnssPsdsCallback> GnssPsds::sCallback_3_0 = nullptr;
26
27// Methods from V1_0::IGnssXtra follow.
28Return<bool> GnssPsds::setCallback(const sp<V1_0::IGnssXtraCallback>&) {
29 // TODO implement
30 return bool{};
31}
32
33Return<bool> GnssPsds::injectXtraData(const hidl_string&) {
34 // TODO implement
35 return bool{};
36}
37
38// Methods from V3_0::IGnssPsds follow.
39Return<bool> GnssPsds::setCallback_3_0(const sp<V3_0::IGnssPsdsCallback>& callback) {
40 ALOGD("setCallback_3_0");
41 std::unique_lock<std::mutex> lock(mMutex);
42 sCallback_3_0 = callback;
43 return true;
44}
45
46Return<bool> GnssPsds::injectPsdsData_3_0(int32_t psdsType, const hidl_string& psdsData) {
47 ALOGD("injectPsdsData_3_0. psdsType: %d, psdsData: %s", psdsType, psdsData.c_str());
48 return true;
49}
50} // namespace android::hardware::gnss::V3_0::implementation