From 98d280bc293610a3e0a1640089cff59a46a475d8 Mon Sep 17 00:00:00 2001 From: Tomasz Wasilczyk Date: Wed, 13 Sep 2023 04:22:00 +0000 Subject: [PATCH] Don't depend on String8 cast to C string [audio] Bug: 295394788 Test: m checkbuild Change-Id: I73acbfad6da4f18566f6b11889e83679deeaa2b8 --- audio/core/all-versions/default/PrimaryDevice.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/audio/core/all-versions/default/PrimaryDevice.cpp b/audio/core/all-versions/default/PrimaryDevice.cpp index cf162f1463..13efbbc757 100644 --- a/audio/core/all-versions/default/PrimaryDevice.cpp +++ b/audio/core/all-versions/default/PrimaryDevice.cpp @@ -283,7 +283,7 @@ Return PrimaryDevice::getTtyMode(getTtyMode_cb _hidl_cb) { _hidl_cb(retval, TtyMode::OFF); return Void(); } - TtyMode mode = convertTtyModeToHIDL(halMode); + TtyMode mode = convertTtyModeToHIDL(halMode.c_str()); if (mode == TtyMode(-1)) { ALOGE("HAL returned invalid TTY value: %s", halMode.c_str()); _hidl_cb(Result::INVALID_STATE, TtyMode::OFF);