diff options
Diffstat (limited to 'broadcastradio/2.0/default/BroadcastRadio.cpp')
-rw-r--r-- | broadcastradio/2.0/default/BroadcastRadio.cpp | 22 |
1 files changed, 7 insertions, 15 deletions
diff --git a/broadcastradio/2.0/default/BroadcastRadio.cpp b/broadcastradio/2.0/default/BroadcastRadio.cpp index 0148fecc48..28a0dd504a 100644 --- a/broadcastradio/2.0/default/BroadcastRadio.cpp +++ b/broadcastradio/2.0/default/BroadcastRadio.cpp @@ -13,15 +13,12 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -#define LOG_TAG "BcRadioDef.module" -#define LOG_NDEBUG 0 - #include "BroadcastRadio.h" -#include <log/log.h> - #include "resources.h" +#include <android-base/logging.h> + namespace android { namespace hardware { namespace broadcastradio { @@ -66,7 +63,6 @@ BroadcastRadio::BroadcastRadio(const VirtualRadio& virtualRadio) mAmFmConfig(gDefaultAmFmConfig) {} Return<void> BroadcastRadio::getProperties(getProperties_cb _hidl_cb) { - ALOGV("%s", __func__); _hidl_cb(mProperties); return {}; } @@ -77,8 +73,6 @@ AmFmRegionConfig BroadcastRadio::getAmFmConfig() const { } Return<void> BroadcastRadio::getAmFmRegionConfig(bool full, getAmFmRegionConfig_cb _hidl_cb) { - ALOGV("%s(%d)", __func__, full); - if (full) { AmFmRegionConfig config = {}; config.ranges = hidl_vec<AmFmBandRange>({ @@ -96,8 +90,6 @@ Return<void> BroadcastRadio::getAmFmRegionConfig(bool full, getAmFmRegionConfig_ } Return<void> BroadcastRadio::getDabRegionConfig(getDabRegionConfig_cb _hidl_cb) { - ALOGV("%s", __func__); - hidl_vec<DabTableEntry> config = { {"5A", 174928}, {"7D", 194064}, {"8A", 195936}, {"8B", 197648}, {"9A", 202928}, {"9B", 204640}, {"9C", 206352}, {"10B", 211648}, {"10C", 213360}, {"10D", 215072}, @@ -111,7 +103,7 @@ Return<void> BroadcastRadio::getDabRegionConfig(getDabRegionConfig_cb _hidl_cb) Return<void> BroadcastRadio::openSession(const sp<ITunerCallback>& callback, openSession_cb _hidl_cb) { - ALOGV("%s", __func__); + LOG(DEBUG) << "opening new session..."; /* For the needs of default implementation it's fine to instantiate new session object * out of the lock scope. If your implementation needs it, use reentrant lock. @@ -122,7 +114,7 @@ Return<void> BroadcastRadio::openSession(const sp<ITunerCallback>& callback, auto oldSession = mSession.promote(); if (oldSession != nullptr) { - ALOGI("Closing previously opened tuner"); + LOG(INFO) << "closing previously opened tuner"; oldSession->close(); mSession = nullptr; } @@ -134,14 +126,14 @@ Return<void> BroadcastRadio::openSession(const sp<ITunerCallback>& callback, } Return<void> BroadcastRadio::getImage(uint32_t id, getImage_cb _hidl_cb) { - ALOGV("%s(%x)", __func__, id); + LOG(DEBUG) << "fetching image " << std::hex << id; if (id == resources::demoPngId) { _hidl_cb(std::vector<uint8_t>(resources::demoPng, std::end(resources::demoPng))); return {}; } - ALOGI("Image %x doesn't exists", id); + LOG(INFO) << "image " << std::hex << id << " doesn't exists"; _hidl_cb({}); return {}; } @@ -149,7 +141,7 @@ Return<void> BroadcastRadio::getImage(uint32_t id, getImage_cb _hidl_cb) { Return<void> BroadcastRadio::registerAnnouncementListener( const hidl_vec<AnnouncementType>& enabled, const sp<IAnnouncementListener>& /* listener */, registerAnnouncementListener_cb _hidl_cb) { - ALOGV("%s(%s)", __func__, toString(enabled).c_str()); + LOG(DEBUG) << "registering announcement listener for " << toString(enabled); _hidl_cb(Result::NOT_SUPPORTED, nullptr); return {}; |