diff options
| -rw-r--r-- | cmds/dumpstate/dumpstate.cpp | 134 | ||||
| -rw-r--r-- | cmds/dumpstate/tests/dumpstate_test.cpp | 9 | ||||
| -rw-r--r-- | cmds/installd/Android.bp | 3 | ||||
| -rw-r--r-- | cmds/installd/otapreopt_chroot.cpp | 3 | ||||
| -rw-r--r-- | libs/binder/Android.bp | 1 | ||||
| -rw-r--r-- | libs/dumputils/dump_utils.cpp | 1 | ||||
| -rw-r--r-- | opengl/libs/Android.bp | 4 | ||||
| -rw-r--r-- | services/gpuservice/OWNERS | 3 | ||||
| -rw-r--r-- | services/surfaceflinger/Android.bp | 4 | ||||
| -rw-r--r-- | services/surfaceflinger/layerproto/Android.bp | 2 | ||||
| -rw-r--r-- | services/thermalservice/Android.bp | 31 | ||||
| -rw-r--r-- | services/thermalservice/aidl/Android.bp | 26 | ||||
| -rw-r--r-- | services/vr/hardware_composer/Android.bp | 281 | ||||
| -rw-r--r-- | services/vr/hardware_composer/aidl/Android.bp | 27 | ||||
| -rw-r--r-- | services/vr/virtual_touchpad/Android.bp | 10 | ||||
| -rw-r--r-- | services/vr/virtual_touchpad/include/VirtualTouchpadClient.h | 6 | ||||
| -rw-r--r-- | vulkan/libvulkan/layers_extensions.cpp | 6 |
17 files changed, 226 insertions, 325 deletions
diff --git a/cmds/dumpstate/dumpstate.cpp b/cmds/dumpstate/dumpstate.cpp index 0c4691e828..6e99f1d7eb 100644 --- a/cmds/dumpstate/dumpstate.cpp +++ b/cmds/dumpstate/dumpstate.cpp @@ -91,7 +91,6 @@ using android::os::IDumpstateListener; using android::os::dumpstate::CommandOptions; using android::os::dumpstate::DumpFileToFd; using android::os::dumpstate::DumpstateSectionReporter; -using android::os::dumpstate::GetPidByName; using android::os::dumpstate::PropertiesHelper; typedef Dumpstate::ConsentCallback::ConsentResult UserConsentResult; @@ -394,108 +393,6 @@ static void dump_dev_files(const char *title, const char *driverpath, const char closedir(d); } - - -// dump anrd's trace and add to the zip file. -// 1. check if anrd is running on this device. -// 2. send a SIGUSR1 to its pid which will dump anrd's trace. -// 3. wait until the trace generation completes and add to the zip file. -static bool dump_anrd_trace() { - int pid; - char buf[50], path[PATH_MAX]; - struct dirent *trace; - struct stat st; - DIR *trace_dir; - int retry = 5; - long max_ctime = 0, old_mtime; - long long cur_size = 0; - const char *trace_path = "/data/misc/anrd/"; - - if (!ds.IsZipping()) { - MYLOGE("Not dumping anrd trace because it's not a zipped bugreport\n"); - return false; - } - - // find anrd's pid if it is running. - pid = GetPidByName("/system/bin/anrd"); - - if (pid > 0) { - if (stat(trace_path, &st) == 0) { - old_mtime = st.st_mtime; - } else { - MYLOGE("Failed to find: %s\n", trace_path); - return false; - } - - // send SIGUSR1 to the anrd to generate a trace. - sprintf(buf, "%d", pid); - if (RunCommand("ANRD_DUMP", {"kill", "-SIGUSR1", buf}, - CommandOptions::WithTimeout(1).Build())) { - MYLOGE("anrd signal timed out. Please manually collect trace\n"); - return false; - } - - while (retry-- > 0 && old_mtime == st.st_mtime) { - sleep(1); - stat(trace_path, &st); - } - - if (retry < 0 && old_mtime == st.st_mtime) { - MYLOGE("Failed to stat %s or trace creation timeout\n", trace_path); - return false; - } - - // identify the trace file by its creation time. - if (!(trace_dir = opendir(trace_path))) { - MYLOGE("Can't open trace file under %s\n", trace_path); - } - while ((trace = readdir(trace_dir))) { - if (strcmp(trace->d_name, ".") == 0 - || strcmp(trace->d_name, "..") == 0) { - continue; - } - sprintf(path, "%s%s", trace_path, trace->d_name); - if (stat(path, &st) == 0) { - if (st.st_ctime > max_ctime) { - max_ctime = st.st_ctime; - sprintf(buf, "%s", trace->d_name); - } - } - } - closedir(trace_dir); - - // Wait until the dump completes by checking the size of the trace. - if (max_ctime > 0) { - sprintf(path, "%s%s", trace_path, buf); - while(true) { - sleep(1); - if (stat(path, &st) == 0) { - if (st.st_size == cur_size) { - break; - } else if (st.st_size > cur_size) { - cur_size = st.st_size; - } else { - return false; - } - } else { - MYLOGE("Cant stat() %s anymore\n", path); - return false; - } - } - // Add to the zip file. - if (!ds.AddZipEntry("anrd_trace.txt", path)) { - MYLOGE("Unable to add anrd_trace file %s to zip file\n", path); - } else { - android::os::UnlinkAndLogOnError(path); - return true; - } - } else { - MYLOGE("Can't stats any trace file under %s\n", trace_path); - } - } - return false; -} - static bool skip_not_stat(const char *path) { static const char stat[] = "/stat"; size_t len = strlen(path); @@ -1349,7 +1246,7 @@ static Dumpstate::RunStatus dumpstate() { /* Dump Bluetooth HCI logs */ ds.AddDir("/data/misc/bluetooth/logs", true); - if (!ds.do_early_screenshot_) { + if (ds.options_->do_fb && !ds.do_early_screenshot_) { MYLOGI("taking late screenshot\n"); ds.TakeScreenshot(); } @@ -1501,9 +1398,6 @@ static Dumpstate::RunStatus dumpstate() { * with the caller. */ static Dumpstate::RunStatus DumpstateDefault() { - // Try to dump anrd trace if the daemon is running. - dump_anrd_trace(); - // Invoking the following dumpsys calls before DumpTraces() to try and // keep the system stats as close to its initial state as possible. RUN_SLOW_FUNCTION_WITH_CONSENT_CHECK(RunDumpsysCritical); @@ -1865,22 +1759,21 @@ void Dumpstate::DumpstateBoard() { static void ShowUsage() { fprintf(stderr, - "usage: dumpstate [-h] [-b soundfile] [-e soundfile] [-o file] [-d] [-p] " + "usage: dumpstate [-h] [-b soundfile] [-e soundfile] [-d] [-p] " "[-z]] [-s] [-S] [-q] [-B] [-P] [-R] [-V version]\n" " -h: display this help message\n" " -b: play sound file instead of vibrate, at beginning of job\n" " -e: play sound file instead of vibrate, at end of job\n" - " -o: write to file (instead of stdout)\n" - " -d: append date to filename (requires -o)\n" - " -p: capture screenshot to filename.png (requires -o)\n" - " -z: generate zipped file (requires -o)\n" + " -d: append date to filename\n" + " -p: capture screenshot to filename.png\n" + " -z: generate zipped file\n" " -s: write output to control socket (for init)\n" - " -S: write file location to control socket (for init; requires -o and -z)\n" + " -S: write file location to control socket (for init; requires -z)\n" " -q: disable vibrate\n" - " -B: send broadcast when finished (requires -o)\n" + " -B: send broadcast when finished\n" " -P: send broadcast when started and update system properties on " - "progress (requires -o and -B)\n" - " -R: take bugreport in remote mode (requires -o, -z, -d and -B, " + "progress (requires -B)\n" + " -R: take bugreport in remote mode (requires -z, -d and -B, " "shouldn't be used with -P)\n" " -w: start binder service and make it wait for a call to startBugreport\n" " -v: prints the dumpstate header and exit\n"); @@ -2588,13 +2481,8 @@ Dumpstate::RunStatus Dumpstate::RunInternal(int32_t calling_uid, } if (options_->do_fb && do_early_screenshot_) { - if (screenshot_path_.empty()) { - // should not have happened - MYLOGE("INTERNAL ERROR: skipping early screenshot because path was not set\n"); - } else { - MYLOGI("taking early screenshot\n"); - TakeScreenshot(); - } + MYLOGI("taking early screenshot\n"); + TakeScreenshot(); } if (options_->do_zip_file && zip_file != nullptr) { 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/cmds/installd/Android.bp b/cmds/installd/Android.bp index 4619427e2a..3ecfc9503c 100644 --- a/cmds/installd/Android.bp +++ b/cmds/installd/Android.bp @@ -146,6 +146,7 @@ cc_binary { shared_libs: [ "libbase", "libbinder", + "libcrypto", "liblog", "libprotobuf-cpp-full", "libselinux", @@ -158,6 +159,7 @@ cc_binary { "lib_apex_manifest_proto", "libavb", "libdm", + "libverity_tree", "libvold_binder", ], } @@ -167,6 +169,7 @@ filegroup { srcs: [ "binder/android/os/IInstalld.aidl", ], + path: "binder", } // diff --git a/cmds/installd/otapreopt_chroot.cpp b/cmds/installd/otapreopt_chroot.cpp index 2e2cc182ec..e8f513aebb 100644 --- a/cmds/installd/otapreopt_chroot.cpp +++ b/cmds/installd/otapreopt_chroot.cpp @@ -64,7 +64,8 @@ static std::vector<apex::ApexFile> ActivateApexPackages() { // system/apex/apexd/apexd_main.cpp. // // Only scan the APEX directory under /system (within the chroot dir). - apex::scanPackagesDirAndActivate(apex::kApexPackageSystemDir); + // Cast call to void to suppress warn_unused_result. + static_cast<void>(apex::scanPackagesDirAndActivate(apex::kApexPackageSystemDir)); return apex::getActivePackages(); } diff --git a/libs/binder/Android.bp b/libs/binder/Android.bp index da10687476..c02b88a6f0 100644 --- a/libs/binder/Android.bp +++ b/libs/binder/Android.bp @@ -142,6 +142,7 @@ filegroup { srcs: [ "aidl/android/content/pm/IPackageManagerNative.aidl", ], + path: "aidl", } subdirs = ["tests"] 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/opengl/libs/Android.bp b/opengl/libs/Android.bp index d43c1648be..75dda6dc61 100644 --- a/opengl/libs/Android.bp +++ b/opengl/libs/Android.bp @@ -201,6 +201,10 @@ cc_library_shared { defaults: ["gles_libs_defaults"], srcs: ["GLES2/gl2.cpp"], cflags: ["-DLOG_TAG=\"libGLESv2\""], + + // Bug: http://b/133874658 Disable native_coverage as we investigate a + // crash in surfaceflinger on coverage-enabled cuttlefish builds. + native_coverage: false, } //############################################################################## diff --git a/services/gpuservice/OWNERS b/services/gpuservice/OWNERS new file mode 100644 index 0000000000..5d028393f6 --- /dev/null +++ b/services/gpuservice/OWNERS @@ -0,0 +1,3 @@ +chrisforbes@google.com +lpy@google.com +zzyiwei@google.com diff --git a/services/surfaceflinger/Android.bp b/services/surfaceflinger/Android.bp index 5d4ac23eae..c8b2d91627 100644 --- a/services/surfaceflinger/Android.bp +++ b/services/surfaceflinger/Android.bp @@ -152,6 +152,10 @@ cc_library_shared { lto: { thin: true, }, + // TODO(b/131771163): Fix broken fuzzer support with LTO. + sanitize: { + fuzzer: false, + }, } cc_binary { diff --git a/services/surfaceflinger/layerproto/Android.bp b/services/surfaceflinger/layerproto/Android.bp index ac147fe182..172f5acdef 100644 --- a/services/surfaceflinger/layerproto/Android.bp +++ b/services/surfaceflinger/layerproto/Android.bp @@ -43,7 +43,7 @@ java_library_static { type: "nano", }, srcs: ["*.proto"], - no_framework_libs: true, + sdk_version: "core_platform", target: { android: { jarjar_rules: "jarjar-rules.txt", diff --git a/services/thermalservice/Android.bp b/services/thermalservice/Android.bp index d754560ea5..1519618344 100644 --- a/services/thermalservice/Android.bp +++ b/services/thermalservice/Android.bp @@ -1,34 +1,3 @@ -subdirs = [ - "libthermalcallback" -] - -cc_library { - name: "libthermalservice", - - srcs: [ - "aidl/android/os/IThermalEventListener.aidl", - "aidl/android/os/IThermalService.aidl", - "aidl/android/os/Temperature.cpp", - ], - aidl: { - include_dirs: ["frameworks/native/services/thermalservice/aidl"], - export_aidl_headers: true, - }, - export_include_dirs: ["aidl"], - - shared_libs: [ - "libbinder", - "libutils", - ], - - cflags: [ - "-Wall", - "-Werror", - "-Wunused", - "-Wunreachable-code", - ], -} - cc_binary { name: "thermalserviced", diff --git a/services/thermalservice/aidl/Android.bp b/services/thermalservice/aidl/Android.bp new file mode 100644 index 0000000000..f1ec656d3a --- /dev/null +++ b/services/thermalservice/aidl/Android.bp @@ -0,0 +1,26 @@ +cc_library { + name: "libthermalservice", + + srcs: [ + "android/os/IThermalEventListener.aidl", + "android/os/IThermalService.aidl", + "android/os/Temperature.cpp", + ], + aidl: { + local_include_dirs: ["."], + export_aidl_headers: true, + }, + export_include_dirs: ["."], + + shared_libs: [ + "libbinder", + "libutils", + ], + + cflags: [ + "-Wall", + "-Werror", + "-Wunused", + "-Wunreachable-code", + ], +} diff --git a/services/vr/hardware_composer/Android.bp b/services/vr/hardware_composer/Android.bp index 90edf69697..dddbc764d1 100644 --- a/services/vr/hardware_composer/Android.bp +++ b/services/vr/hardware_composer/Android.bp @@ -1,174 +1,147 @@ cc_library_shared { - name: "libvr_hwc-hal", + name: "libvr_hwc-hal", - srcs: [ - "impl/vr_hwc.cpp", - "impl/vr_composer_client.cpp", - ], + srcs: [ + "impl/vr_hwc.cpp", + "impl/vr_composer_client.cpp", + ], - static_libs: [ - "libbroadcastring", - "libdisplay", - ], + static_libs: [ + "libbroadcastring", + "libdisplay", + ], - shared_libs: [ - "android.frameworks.vr.composer@1.0", - "android.hardware.graphics.composer@2.1", - "android.hardware.graphics.mapper@2.0", - "libbase", - "libbufferhubqueue", - "libbinder", - "libcutils", - "libfmq", - "libhardware", - "libhidlbase", - "libhidltransport", - "liblog", - "libsync", - "libui", - "libutils", - "libpdx_default_transport", - ], + shared_libs: [ + "android.frameworks.vr.composer@1.0", + "android.hardware.graphics.composer@2.1", + "android.hardware.graphics.mapper@2.0", + "libbase", + "libbufferhubqueue", + "libbinder", + "libcutils", + "libfmq", + "libhardware", + "libhidlbase", + "libhidltransport", + "liblog", + "libsync", + "libui", + "libutils", + "libpdx_default_transport", + ], - header_libs: [ - "android.hardware.graphics.composer@2.1-command-buffer", - "android.hardware.graphics.composer@2.1-hal", - ], + header_libs: [ + "android.hardware.graphics.composer@2.1-command-buffer", + "android.hardware.graphics.composer@2.1-hal", + ], - export_header_lib_headers: [ - "android.hardware.graphics.composer@2.1-hal", - ], + export_header_lib_headers: [ + "android.hardware.graphics.composer@2.1-hal", + ], - export_shared_lib_headers: [ - "android.frameworks.vr.composer@1.0", - "android.hardware.graphics.composer@2.1", - ], + export_shared_lib_headers: [ + "android.frameworks.vr.composer@1.0", + "android.hardware.graphics.composer@2.1", + ], - export_include_dirs: ["."], + export_include_dirs: ["."], - cflags: [ - "-DLOG_TAG=\"vr_hwc\"", - "-Wall", - "-Werror", - // mVrClient unused in vr_composer_client.cpp - "-Wno-error=unused-private-field", - // Warnings in vr_hwc.cpp to be fixed after sync of goog/master. - "-Wno-sign-compare", - "-Wno-unused-parameter", - ], + cflags: [ + "-DLOG_TAG=\"vr_hwc\"", + "-Wall", + "-Werror", + // mVrClient unused in vr_composer_client.cpp + "-Wno-error=unused-private-field", + // Warnings in vr_hwc.cpp to be fixed after sync of goog/master. + "-Wno-sign-compare", + "-Wno-unused-parameter", + ], } cc_library_static { - name: "libvr_hwc-binder", - srcs: [ - "aidl/android/dvr/IVrComposer.aidl", - "aidl/android/dvr/IVrComposerCallback.aidl", - "aidl/android/dvr/parcelable_composer_frame.cpp", - "aidl/android/dvr/parcelable_composer_layer.cpp", - "aidl/android/dvr/parcelable_unique_fd.cpp", - ], - aidl: { - include_dirs: ["frameworks/native/services/vr/hardware_composer/aidl"], - export_aidl_headers: true, - }, - export_include_dirs: ["aidl"], - - cflags: [ - "-Wall", - "-Werror", - ], - - shared_libs: [ - "libbinder", - "libui", - "libutils", - "libvr_hwc-hal", - ], -} - -cc_library_static { - name: "libvr_hwc-impl", - srcs: [ - "vr_composer.cpp", - ], - static_libs: [ - "libvr_hwc-binder", - ], - shared_libs: [ - "libbase", - "libbinder", - "liblog", - "libui", - "libutils", - "libvr_hwc-hal", - ], - export_shared_lib_headers: [ - "libvr_hwc-hal", - ], - cflags: [ - "-DLOG_TAG=\"vr_hwc\"", - "-Wall", - "-Werror", - ], + name: "libvr_hwc-impl", + srcs: [ + "vr_composer.cpp", + ], + static_libs: [ + "libvr_hwc-binder", + ], + shared_libs: [ + "libbase", + "libbinder", + "liblog", + "libui", + "libutils", + "libvr_hwc-hal", + ], + export_shared_lib_headers: [ + "libvr_hwc-hal", + ], + cflags: [ + "-DLOG_TAG=\"vr_hwc\"", + "-Wall", + "-Werror", + ], } cc_binary { - name: "vr_hwc", - srcs: [ - "vr_hardware_composer_service.cpp" - ], - static_libs: [ - "libvr_hwc-impl", - // NOTE: This needs to be included after the *-impl lib otherwise the - // symbols in the *-binder library get optimized out. - "libvr_hwc-binder", - ], - shared_libs: [ - "android.frameworks.vr.composer@1.0", - "android.hardware.graphics.composer@2.1", - "libbase", - "libbinder", - "liblog", - "libhardware", - "libhwbinder", - "libui", - "libutils", - "libvr_hwc-hal", - ], - cflags: [ - "-DLOG_TAG=\"vr_hwc\"", - "-Wall", - "-Werror", - ], - init_rc: [ - "vr_hwc.rc", - ], + name: "vr_hwc", + srcs: [ + "vr_hardware_composer_service.cpp", + ], + static_libs: [ + "libvr_hwc-impl", + // NOTE: This needs to be included after the *-impl lib otherwise the + // symbols in the *-binder library get optimized out. + "libvr_hwc-binder", + ], + shared_libs: [ + "android.frameworks.vr.composer@1.0", + "android.hardware.graphics.composer@2.1", + "libbase", + "libbinder", + "liblog", + "libhardware", + "libhwbinder", + "libhidlbase", + "libui", + "libutils", + "libvr_hwc-hal", + ], + cflags: [ + "-DLOG_TAG=\"vr_hwc\"", + "-Wall", + "-Werror", + ], + init_rc: [ + "vr_hwc.rc", + ], } cc_test { - name: "vr_hwc_test", - gtest: true, - srcs: ["tests/vr_composer_test.cpp"], - static_libs: [ - "libgtest", - "libvr_hwc-impl", - // NOTE: This needs to be included after the *-impl lib otherwise the - // symbols in the *-binder library get optimized out. - "libvr_hwc-binder", - ], - cflags: [ - "-Wall", - "-Werror", - // warnings in vr_composer_test.cpp to be fixed after merge of goog/master - "-Wno-sign-compare", - "-Wno-unused-parameter", - ], - shared_libs: [ - "libbase", - "libbinder", - "liblog", - "libui", - "libutils", - ], + name: "vr_hwc_test", + gtest: true, + srcs: ["tests/vr_composer_test.cpp"], + static_libs: [ + "libgtest", + "libvr_hwc-impl", + // NOTE: This needs to be included after the *-impl lib otherwise the + // symbols in the *-binder library get optimized out. + "libvr_hwc-binder", + ], + cflags: [ + "-Wall", + "-Werror", + // warnings in vr_composer_test.cpp to be fixed after merge of goog/master + "-Wno-sign-compare", + "-Wno-unused-parameter", + ], + shared_libs: [ + "libbase", + "libbinder", + "liblog", + "libui", + "libutils", + ], } diff --git a/services/vr/hardware_composer/aidl/Android.bp b/services/vr/hardware_composer/aidl/Android.bp new file mode 100644 index 0000000000..a1d5392071 --- /dev/null +++ b/services/vr/hardware_composer/aidl/Android.bp @@ -0,0 +1,27 @@ +cc_library_static { + name: "libvr_hwc-binder", + srcs: [ + "android/dvr/IVrComposer.aidl", + "android/dvr/IVrComposerCallback.aidl", + "android/dvr/parcelable_composer_frame.cpp", + "android/dvr/parcelable_composer_layer.cpp", + "android/dvr/parcelable_unique_fd.cpp", + ], + aidl: { + local_include_dirs: ["."], + export_aidl_headers: true, + }, + export_include_dirs: ["."], + + cflags: [ + "-Wall", + "-Werror", + ], + + shared_libs: [ + "libbinder", + "libui", + "libutils", + "libvr_hwc-hal", + ], +} diff --git a/services/vr/virtual_touchpad/Android.bp b/services/vr/virtual_touchpad/Android.bp index 131a306c08..dcaa663160 100644 --- a/services/vr/virtual_touchpad/Android.bp +++ b/services/vr/virtual_touchpad/Android.bp @@ -62,7 +62,7 @@ cc_test { service_src = [ "main.cpp", "VirtualTouchpadService.cpp", - "aidl/android/dvr/IVirtualTouchpadService.aidl", + ":virtualtouchpad_aidl", ] service_static_libs = [ @@ -99,7 +99,7 @@ cc_binary { client_src = [ "VirtualTouchpadClient.cpp", "DvrVirtualTouchpadClient.cpp", - "aidl/android/dvr/IVirtualTouchpadService.aidl", + ":virtualtouchpad_aidl", ] client_shared_libs = [ @@ -122,3 +122,9 @@ cc_library { name: "libvirtualtouchpadclient", export_include_dirs: ["include"], } + +filegroup { + name: "virtualtouchpad_aidl", + srcs: ["aidl/android/dvr/IVirtualTouchpadService.aidl"], + path: "aidl", +} 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; |