diff options
| -rw-r--r-- | cmds/dumpsys/tests/dumpsys_test.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/cmds/dumpsys/tests/dumpsys_test.cpp b/cmds/dumpsys/tests/dumpsys_test.cpp index a61cb009b0..66beb6d4e0 100644 --- a/cmds/dumpsys/tests/dumpsys_test.cpp +++ b/cmds/dumpsys/tests/dumpsys_test.cpp @@ -23,6 +23,7 @@ #include <android-base/file.h> #include <utils/String16.h> +#include <utils/String8.h> #include <utils/Vector.h> using namespace android; @@ -95,7 +96,7 @@ MATCHER_P(AndroidElementsAre, expected, "") { int i = 0; std::ostringstream actual_stream, expected_stream; for (String16 actual : arg) { - std::string actual_str = String16::std_string(actual); + std::string actual_str = String8(actual).c_str(); std::string expected_str = expected[i]; actual_stream << "'" << actual_str << "' "; expected_stream << "'" << expected_str << "' "; |