/*
 * Copyright (C) 2021 The Android Open Source Project
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
#define LOG_TAG "GnssNavMsgCallback"

#include "GnssNavigationMessageCallback.h"
#include <log/log.h>

android::binder::Status GnssNavigationMessageCallback::gnssNavigationMessageCb(
        const android::hardware::gnss::IGnssNavigationMessageCallback::GnssNavigationMessage& msg) {
    ALOGD("gnssNavigationMessageCb. svid=%d, type=%d, status=%d, msgId=%d, subMsgId=%d, "
          "data.size=%d",
          msg.svid, (int)msg.type, (int)msg.status, msg.messageId, msg.submessageId,
          (int)msg.data.size());
    return android::binder::Status::ok();
}
