summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorandroid-build-prod (mdb) <android-build-team-robot@google.com>2019-05-28 22:29:53 +0000
committerGerrit Code Review <noreply-gerritcodereview@google.com>2019-05-28 22:29:53 +0000
commit18ad58bb810e278300652e8ee2a3efb5fac43959 (patch)
treecfd9a7952f20c3ecb63d9602cc9d07dd43194cb6
parent0b9e87f67869d29bd533c1e0bdb7786a612655bc (diff)
parenta6238d6e65bdc9451f7f538ced37de150cdd96a4 (diff)
downloadnative-18ad58bb810e278300652e8ee2a3efb5fac43959.tar.gz
Merge "Snap for 5611628 from 3dd44d197317394e1aef6ea6794fa6a6a73c4d41 to sdk-release" into sdk-releaseplatform-tools-29.0.1
-rw-r--r--cmds/dumpstate/tests/dumpstate_test.cpp9
-rw-r--r--libs/dumputils/dump_utils.cpp1
-rw-r--r--services/vr/virtual_touchpad/include/VirtualTouchpadClient.h6
-rw-r--r--vulkan/libvulkan/layers_extensions.cpp6
4 files changed, 9 insertions, 13 deletions
diff --git a/cmds/dumpstate/tests/dumpstate_test.cpp b/cmds/dumpstate/tests/dumpstate_test.cpp
index 71d15f4761..c5d01fdf25 100644
--- a/cmds/dumpstate/tests/dumpstate_test.cpp
+++ b/cmds/dumpstate/tests/dumpstate_test.cpp
@@ -664,7 +664,8 @@ TEST_F(DumpstateTest, RunCommandNoTitle) {
TEST_F(DumpstateTest, RunCommandWithTitle) {
EXPECT_EQ(0, RunCommand("I AM GROOT", {kSimpleCommand}));
EXPECT_THAT(err, StrEq("stderr\n"));
- // We don't know the exact duration, so we check the prefix and suffix
+ // The duration may not get output, depending on how long it takes,
+ // so we just check the prefix.
EXPECT_THAT(out,
StartsWith("------ I AM GROOT (" + kSimpleCommand + ") ------\nstdout\n"));
}
@@ -699,7 +700,8 @@ TEST_F(DumpstateTest, RunCommandWithMultipleArgs) {
TEST_F(DumpstateTest, RunCommandDryRun) {
SetDryRun(true);
EXPECT_EQ(0, RunCommand("I AM GROOT", {kSimpleCommand}));
- // We don't know the exact duration, so we check the prefix and suffix
+ // The duration may not get output, depending on how long it takes,
+ // so we just check the prefix.
EXPECT_THAT(out, StartsWith("------ I AM GROOT (" + kSimpleCommand +
") ------\n\t(skipped on dry run)\n"));
EXPECT_THAT(err, IsEmpty());
@@ -1037,7 +1039,8 @@ TEST_F(DumpstateTest, DumpFileNotFoundNoTitle) {
TEST_F(DumpstateTest, DumpFileNotFoundWithTitle) {
EXPECT_EQ(-1, DumpFile("Y U NO EXIST?", "/I/cant/believe/I/exist"));
EXPECT_THAT(err, IsEmpty());
- // We don't know the exact duration, so we check the prefix and suffix
+ // The duration may not get output, depending on how long it takes,
+ // so we just check the prefix.
EXPECT_THAT(out, StartsWith("*** Error dumping /I/cant/believe/I/exist (Y U NO EXIST?): No "
"such file or directory\n"));
}
diff --git a/libs/dumputils/dump_utils.cpp b/libs/dumputils/dump_utils.cpp
index d0cea0b2ce..f924863827 100644
--- a/libs/dumputils/dump_utils.cpp
+++ b/libs/dumputils/dump_utils.cpp
@@ -32,6 +32,7 @@ static const char* native_processes_to_dump[] = {
"/system/bin/mediametrics", // media.metrics
"/system/bin/mediaserver",
"/system/bin/netd",
+ "/system/bin/vold",
"/system/bin/sdcard",
"/system/bin/statsd",
"/system/bin/surfaceflinger",
diff --git a/services/vr/virtual_touchpad/include/VirtualTouchpadClient.h b/services/vr/virtual_touchpad/include/VirtualTouchpadClient.h
index 7d73f06f6b..268e4bde73 100644
--- a/services/vr/virtual_touchpad/include/VirtualTouchpadClient.h
+++ b/services/vr/virtual_touchpad/include/VirtualTouchpadClient.h
@@ -13,12 +13,6 @@ class VirtualTouchpadClient : public VirtualTouchpad {
public:
// VirtualTouchpad implementation:
static std::unique_ptr<VirtualTouchpad> Create();
- status_t Attach() override;
- status_t Detach() override;
- status_t Touch(int touchpad, float x, float y, float pressure) override;
- status_t ButtonState(int touchpad, int buttons) override;
- status_t Scroll(int touchpad, float x, float y) override;
- void dumpInternal(String8& result) override;
protected:
VirtualTouchpadClient() {}
diff --git a/vulkan/libvulkan/layers_extensions.cpp b/vulkan/libvulkan/layers_extensions.cpp
index 60bd65200c..a7b7a6f71a 100644
--- a/vulkan/libvulkan/layers_extensions.cpp
+++ b/vulkan/libvulkan/layers_extensions.cpp
@@ -395,11 +395,9 @@ void ForEachFileInZip(const std::string& zipname,
ALOGD("searching for layers in '%s!/%s'", zipname.c_str(),
dir_in_zip.c_str());
ZipEntry entry;
- ZipString name;
+ std::string name;
while (Next(iter_cookie, &entry, &name) == 0) {
- std::string filename(
- reinterpret_cast<const char*>(name.name) + prefix.length(),
- name.name_length - prefix.length());
+ std::string filename(name.substr(prefix.length()));
// only enumerate direct entries of the directory, not subdirectories
if (filename.find('/') != filename.npos)
continue;