Loading tv/mediaquality/aidl/default/hal/media_quality_hal_impl.rs +6 −6 Original line number Diff line number Diff line Loading @@ -62,15 +62,15 @@ impl MediaQualityService { pub fn new() -> Self { Self { callback: Arc::new(Mutex::new(None)), ambient_backlight_supported: Arc::new(Mutex::new(false)), ambient_backlight_enabled: Arc::new(Mutex::new(true)), ambient_backlight_supported: Arc::new(Mutex::new(true)), ambient_backlight_enabled: Arc::new(Mutex::new(false)), ambient_backlight_detector_settings: Arc::new(Mutex::new(AmbientBacklightSettings::default())), auto_pq_supported: Arc::new(Mutex::new(false)), auto_pq_supported: Arc::new(Mutex::new(true)), auto_pq_enabled: Arc::new(Mutex::new(false)), auto_sr_supported: Arc::new(Mutex::new(false)), auto_sr_supported: Arc::new(Mutex::new(true)), auto_sr_enabled: Arc::new(Mutex::new(false)), auto_aq_supported: Arc::new(Mutex::new(false)), auto_aq_supported: Arc::new(Mutex::new(true)), auto_aq_enabled: Arc::new(Mutex::new(false)), picture_profile_adjustment_listener: Arc::new(Mutex::new(None)), sound_profile_adjustment_listener: Arc::new(Mutex::new(None)), Loading Loading @@ -236,7 +236,7 @@ impl IMediaQuality for MediaQualityService { fn getPictureProfileListener(&self) -> binder::Result<binder::Strong<dyn IPictureProfileChangedListener>> { println!("getPictureProfileListener"); let listener = self.picture_profile_changed_listener.lock().unwrap(); listener.clone().ok_or(binder::StatusCode::UNKNOWN_ERROR.into()) Ok(listener.clone().expect("NONE")) } fn setPictureProfileAdjustmentListener( Loading tv/mediaquality/aidl/vts/functional/VtsHalMediaQualityTest.cpp +12 −0 Original line number Diff line number Diff line Loading @@ -578,6 +578,18 @@ TEST_P(MediaQualityAidl, TestSetMediaQualityCallback) { ASSERT_OK(mediaquality->setAmbientBacklightCallback(callback)); } TEST_P(MediaQualityAidl, TestGetPictureProfileChangedListener) { std::shared_ptr<::aidl::android::hardware::tv::mediaquality::IPictureProfileChangedListener> aidlListener; mediaquality->getPictureProfileListener(&aidlListener); } TEST_P(MediaQualityAidl, TestGetSoundProfileChangedListener) { std::shared_ptr<::aidl::android::hardware::tv::mediaquality::ISoundProfileChangedListener> aidlListener; mediaquality->getSoundProfileListener(&aidlListener); } TEST_P(MediaQualityAidl, TestSetPictureProfileAdjustmentListener) { std::shared_ptr<PictureProfileAdjustmentListener> listener = ndk::SharedRefBase::make<PictureProfileAdjustmentListener>( Loading Loading
tv/mediaquality/aidl/default/hal/media_quality_hal_impl.rs +6 −6 Original line number Diff line number Diff line Loading @@ -62,15 +62,15 @@ impl MediaQualityService { pub fn new() -> Self { Self { callback: Arc::new(Mutex::new(None)), ambient_backlight_supported: Arc::new(Mutex::new(false)), ambient_backlight_enabled: Arc::new(Mutex::new(true)), ambient_backlight_supported: Arc::new(Mutex::new(true)), ambient_backlight_enabled: Arc::new(Mutex::new(false)), ambient_backlight_detector_settings: Arc::new(Mutex::new(AmbientBacklightSettings::default())), auto_pq_supported: Arc::new(Mutex::new(false)), auto_pq_supported: Arc::new(Mutex::new(true)), auto_pq_enabled: Arc::new(Mutex::new(false)), auto_sr_supported: Arc::new(Mutex::new(false)), auto_sr_supported: Arc::new(Mutex::new(true)), auto_sr_enabled: Arc::new(Mutex::new(false)), auto_aq_supported: Arc::new(Mutex::new(false)), auto_aq_supported: Arc::new(Mutex::new(true)), auto_aq_enabled: Arc::new(Mutex::new(false)), picture_profile_adjustment_listener: Arc::new(Mutex::new(None)), sound_profile_adjustment_listener: Arc::new(Mutex::new(None)), Loading Loading @@ -236,7 +236,7 @@ impl IMediaQuality for MediaQualityService { fn getPictureProfileListener(&self) -> binder::Result<binder::Strong<dyn IPictureProfileChangedListener>> { println!("getPictureProfileListener"); let listener = self.picture_profile_changed_listener.lock().unwrap(); listener.clone().ok_or(binder::StatusCode::UNKNOWN_ERROR.into()) Ok(listener.clone().expect("NONE")) } fn setPictureProfileAdjustmentListener( Loading
tv/mediaquality/aidl/vts/functional/VtsHalMediaQualityTest.cpp +12 −0 Original line number Diff line number Diff line Loading @@ -578,6 +578,18 @@ TEST_P(MediaQualityAidl, TestSetMediaQualityCallback) { ASSERT_OK(mediaquality->setAmbientBacklightCallback(callback)); } TEST_P(MediaQualityAidl, TestGetPictureProfileChangedListener) { std::shared_ptr<::aidl::android::hardware::tv::mediaquality::IPictureProfileChangedListener> aidlListener; mediaquality->getPictureProfileListener(&aidlListener); } TEST_P(MediaQualityAidl, TestGetSoundProfileChangedListener) { std::shared_ptr<::aidl::android::hardware::tv::mediaquality::ISoundProfileChangedListener> aidlListener; mediaquality->getSoundProfileListener(&aidlListener); } TEST_P(MediaQualityAidl, TestSetPictureProfileAdjustmentListener) { std::shared_ptr<PictureProfileAdjustmentListener> listener = ndk::SharedRefBase::make<PictureProfileAdjustmentListener>( Loading