mirror of
https://github.com/Evolution-X/hardware_interfaces
synced 2026-02-01 16:50:18 +00:00
audio: Update ChildInterface to set scheduler policy lazily
Since the client may end up never retrieving the interface instance for sending it over Binder, postpone setting of the scheduler policy to until that very moment. Rename 'ChildInterface::getPtr' to 'getInstance' for clarity. Bug: 264712385 Test: atest VtsHalAudioCoreTargetTest Change-Id: I31f9dd832c7f85f9632d1d389a8b1063d237d4c1
This commit is contained in:
@@ -37,7 +37,7 @@ ndk::ScopedAStatus ModulePrimary::getTelephony(std::shared_ptr<ITelephony>* _aid
|
||||
if (!mTelephony) {
|
||||
mTelephony = ndk::SharedRefBase::make<Telephony>();
|
||||
}
|
||||
*_aidl_return = mTelephony.getPtr();
|
||||
*_aidl_return = mTelephony.getInstance();
|
||||
LOG(DEBUG) << __func__
|
||||
<< ": returning instance of ITelephony: " << _aidl_return->get()->asBinder().get();
|
||||
return ndk::ScopedAStatus::ok();
|
||||
|
||||
Reference in New Issue
Block a user