From 11a55db7c94defbf422b70ed7de17cfac00998f9 Mon Sep 17 00:00:00 2001 From: Tomasz Wasilczyk Date: Wed, 13 Sep 2023 04:22:26 +0000 Subject: [PATCH] Don't depend on String8 cast to C string [cas] Bug: 295394788 Test: m checkbuild Change-Id: I82c94f0a720957c443f92b030214c6d2c47bf009 --- cas/1.0/default/DescramblerImpl.cpp | 2 +- cas/1.1/default/DescramblerImpl.cpp | 2 +- cas/1.2/default/DescramblerImpl.cpp | 2 +- cas/aidl/default/DescramblerImpl.cpp | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/cas/1.0/default/DescramblerImpl.cpp b/cas/1.0/default/DescramblerImpl.cpp index 6b730ebf80..6d7c304fc0 100644 --- a/cas/1.0/default/DescramblerImpl.cpp +++ b/cas/1.0/default/DescramblerImpl.cpp @@ -79,7 +79,7 @@ Return DescramblerImpl::requiresSecureDecoderComponent( return false; } - return holder->requiresSecureDecoderComponent(String8(mime.c_str())); + return holder->requiresSecureDecoderComponent(mime.c_str()); } static inline bool validateRangeForSize( diff --git a/cas/1.1/default/DescramblerImpl.cpp b/cas/1.1/default/DescramblerImpl.cpp index 9d2ead776e..237d56be16 100644 --- a/cas/1.1/default/DescramblerImpl.cpp +++ b/cas/1.1/default/DescramblerImpl.cpp @@ -75,7 +75,7 @@ Return DescramblerImpl::requiresSecureDecoderComponent(const hidl_string& return false; } - return holder->requiresSecureDecoderComponent(String8(mime.c_str())); + return holder->requiresSecureDecoderComponent(mime.c_str()); } static inline bool validateRangeForSize(uint64_t offset, uint64_t length, uint64_t size) { diff --git a/cas/1.2/default/DescramblerImpl.cpp b/cas/1.2/default/DescramblerImpl.cpp index 9d2ead776e..237d56be16 100644 --- a/cas/1.2/default/DescramblerImpl.cpp +++ b/cas/1.2/default/DescramblerImpl.cpp @@ -75,7 +75,7 @@ Return DescramblerImpl::requiresSecureDecoderComponent(const hidl_string& return false; } - return holder->requiresSecureDecoderComponent(String8(mime.c_str())); + return holder->requiresSecureDecoderComponent(mime.c_str()); } static inline bool validateRangeForSize(uint64_t offset, uint64_t length, uint64_t size) { diff --git a/cas/aidl/default/DescramblerImpl.cpp b/cas/aidl/default/DescramblerImpl.cpp index d658887a38..0f4e99b315 100644 --- a/cas/aidl/default/DescramblerImpl.cpp +++ b/cas/aidl/default/DescramblerImpl.cpp @@ -71,7 +71,7 @@ ScopedAStatus DescramblerImpl::requiresSecureDecoderComponent(const string& in_m *_aidl_return = false; } - *_aidl_return = holder->requiresSecureDecoderComponent(String8(in_mime.c_str())); + *_aidl_return = holder->requiresSecureDecoderComponent(in_mime.c_str()); return ScopedAStatus::ok(); }