summaryrefslogtreecommitdiff
path: root/broadcastradio/2.0/default/service.cpp
diff options
context:
space:
mode:
authorTreeHugger Robot <treehugger-gerrit@google.com>2019-07-02 07:41:24 +0000
committerAndroid (Google) Code Review <android-gerrit@google.com>2019-07-02 07:41:24 +0000
commit26f1b51bfbd5e8d2d2e55247a8bae49ccd52872d (patch)
tree0d99225e22e2956cf075fcf48527d0e17e872c0f /broadcastradio/2.0/default/service.cpp
parent3adfddb29552dbf79387c23e10a9960d1f9c2f79 (diff)
parent8b76f6692c718c21272d3585541b72fed7ac93f0 (diff)
Merge "DO NOT MERGE - Merge qt-dev-plus-aosp-without-vendor (5699924) into stage-aosp-master" into stage-aosp-master
Diffstat (limited to 'broadcastradio/2.0/default/service.cpp')
-rw-r--r--broadcastradio/2.0/default/service.cpp16
1 files changed, 11 insertions, 5 deletions
diff --git a/broadcastradio/2.0/default/service.cpp b/broadcastradio/2.0/default/service.cpp
index 7e677a1323..349aba28e0 100644
--- a/broadcastradio/2.0/default/service.cpp
+++ b/broadcastradio/2.0/default/service.cpp
@@ -13,8 +13,6 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-#define LOG_TAG "BcRadioDef.service"
-
#include <android-base/logging.h>
#include <hidl/HidlTransportSupport.h>
@@ -25,13 +23,21 @@ using android::hardware::configureRpcThreadpool;
using android::hardware::joinRpcThreadpool;
using android::hardware::broadcastradio::V2_0::implementation::BroadcastRadio;
using android::hardware::broadcastradio::V2_0::implementation::gAmFmRadio;
+using android::hardware::broadcastradio::V2_0::implementation::gDabRadio;
-int main(int /* argc */, char** /* argv */) {
+int main() {
+ android::base::SetDefaultTag("BcRadioDef");
+ android::base::SetMinimumLogSeverity(android::base::VERBOSE);
configureRpcThreadpool(4, true);
BroadcastRadio broadcastRadio(gAmFmRadio);
- auto status = broadcastRadio.registerAsService();
- CHECK_EQ(status, android::OK) << "Failed to register Broadcast Radio HAL implementation";
+ auto amFmStatus = broadcastRadio.registerAsService("amfm");
+ CHECK_EQ(amFmStatus, android::OK)
+ << "Failed to register Broadcast Radio AM/FM HAL implementation";
+
+ BroadcastRadio dabRadio(gDabRadio);
+ auto dabStatus = dabRadio.registerAsService("dab");
+ CHECK_EQ(dabStatus, android::OK) << "Failed to register Broadcast Radio DAB HAL implementation";
joinRpcThreadpool();
return 1; // joinRpcThreadpool shouldn't exit