mirror of
https://github.com/Evolution-X/hardware_interfaces
synced 2026-02-02 02:42:35 +00:00
Fix stack-pointer constructed sp<>. am: e951f2a640
am: 2a2a43cb11
Change-Id: I9c89462a37ebd4cf7befbf4729905963e286f3b0
This commit is contained in:
@@ -20,6 +20,7 @@
|
||||
|
||||
#include "BroadcastRadioFactory.h"
|
||||
|
||||
using android::sp;
|
||||
using android::hardware::configureRpcThreadpool;
|
||||
using android::hardware::joinRpcThreadpool;
|
||||
using android::hardware::broadcastradio::V1_1::implementation::BroadcastRadioFactory;
|
||||
@@ -27,8 +28,8 @@ using android::hardware::broadcastradio::V1_1::implementation::BroadcastRadioFac
|
||||
int main(int /* argc */, char** /* argv */) {
|
||||
configureRpcThreadpool(4, true);
|
||||
|
||||
BroadcastRadioFactory broadcastRadioFactory;
|
||||
auto status = broadcastRadioFactory.registerAsService();
|
||||
sp<BroadcastRadioFactory> broadcastRadioFactory(new BroadcastRadioFactory());
|
||||
auto status = broadcastRadioFactory->registerAsService();
|
||||
CHECK_EQ(status, android::OK) << "Failed to register Broadcast Radio HAL implementation";
|
||||
|
||||
joinRpcThreadpool();
|
||||
|
||||
@@ -19,6 +19,7 @@
|
||||
#include "BroadcastRadio.h"
|
||||
#include "VirtualRadio.h"
|
||||
|
||||
using android::sp;
|
||||
using android::hardware::configureRpcThreadpool;
|
||||
using android::hardware::joinRpcThreadpool;
|
||||
using android::hardware::broadcastradio::V2_0::implementation::BroadcastRadio;
|
||||
@@ -30,13 +31,13 @@ int main() {
|
||||
android::base::SetMinimumLogSeverity(android::base::VERBOSE);
|
||||
configureRpcThreadpool(4, true);
|
||||
|
||||
BroadcastRadio broadcastRadio(gAmFmRadio);
|
||||
auto amFmStatus = broadcastRadio.registerAsService("amfm");
|
||||
sp<BroadcastRadio> broadcastRadio(new BroadcastRadio(gAmFmRadio));
|
||||
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");
|
||||
sp<BroadcastRadio> dabRadio(new BroadcastRadio(gDabRadio));
|
||||
auto dabStatus = dabRadio->registerAsService("dab");
|
||||
CHECK_EQ(dabStatus, android::OK) << "Failed to register Broadcast Radio DAB HAL implementation";
|
||||
|
||||
joinRpcThreadpool();
|
||||
|
||||
Reference in New Issue
Block a user