Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit d1e514aa authored by android-build-team Robot's avatar android-build-team Robot
Browse files

release-request-01b39c26-bf86-40a5-a7bf-8eb15c488673-for-git_oc-mr1-release-40...

release-request-01b39c26-bf86-40a5-a7bf-8eb15c488673-for-git_oc-mr1-release-4080221 snap-temp-L23400000072087081

Change-Id: I223d535842be1af0ebb77e61588b2587dbc76df5
parents d5654369 b7a9ae9b
Loading
Loading
Loading
Loading
+7 −16
Original line number Diff line number Diff line
@@ -180,10 +180,6 @@ static std::string get_device_dev_path(libusb_device* device) {
    if (port_count < 0) return "";
    return StringPrintf("/dev/bus/usb/%03u/%03u", libusb_get_bus_number(device), ports[0]);
}

static bool is_device_accessible(libusb_device* device) {
    return access(get_device_dev_path(device).c_str(), R_OK | W_OK) == 0;
}
#endif

static bool endpoint_is_output(uint8_t endpoint) {
@@ -377,9 +373,10 @@ static void process_device(libusb_device* device) {
    {
        std::unique_lock<std::mutex> lock(usb_handles_mutex);
        usb_handles[device_address] = std::move(result);
    }

    register_usb_transport(usb_handle_raw, device_serial.c_str(), device_address.c_str(), writable);
        register_usb_transport(usb_handle_raw, device_serial.c_str(), device_address.c_str(),
                               writable);
    }
    LOG(INFO) << "registered new usb device '" << device_serial << "'";
}

@@ -388,18 +385,12 @@ static std::atomic<int> connecting_devices(0);
static void device_connected(libusb_device* device) {
#if defined(__linux__)
    // Android's host linux libusb uses netlink instead of udev for device hotplug notification,
    // which means we can get hotplug notifications before udev has updated ownership/perms on
    // the device. Since we're not going to be able to link against the system's libudev any
    // time soon, hack around this by checking for accessibility in a loop.
    // which means we can get hotplug notifications before udev has updated ownership/perms on the
    // device. Since we're not going to be able to link against the system's libudev any time soon,
    // hack around this by inserting a sleep.
    auto thread = std::thread([device]() {
        std::string device_path = get_device_dev_path(device);
        auto start = std::chrono::steady_clock::now();
        while (std::chrono::steady_clock::now() - start < 500ms) {
            if (is_device_accessible(device)) {
                break;
            }
            std::this_thread::sleep_for(10ms);
        }
        std::this_thread::sleep_for(1s);

        process_device(device);
        if (--connecting_devices == 0) {
+1 −0
Original line number Diff line number Diff line
@@ -14,6 +14,7 @@
     limitations under the License.
-->
<configuration description="Config for CTS Logging Library test cases">
    <option name="config-descriptor:metadata" key="component" value="systems" />
    <target_preparer class="com.android.compatibility.common.tradefed.targetprep.FilePusher">
        <option name="cleanup" value="true" />
        <option name="push" value="CtsLiblogTestCases->/data/local/tmp/CtsLiblogTestCases" />
+1 −0
Original line number Diff line number Diff line
@@ -14,6 +14,7 @@
     limitations under the License.
-->
<configuration description="Config for CTS Logging Daemon test cases">
    <option name="config-descriptor:metadata" key="component" value="systems" />
    <target_preparer class="com.android.compatibility.common.tradefed.targetprep.FilePusher">
        <option name="cleanup" value="true" />
        <option name="push" value="CtsLogdTestCases->/data/local/tmp/CtsLogdTestCases" />
+4 −4
Original line number Diff line number Diff line
@@ -63,7 +63,7 @@ namespace.sphal.links = default,vndk,rs
namespace.sphal.link.default.shared_libs = libc.so:libm.so:libdl.so:libstdc++.so:liblog.so:libnativewindow.so:libEGL.so:libsync.so:libGLESv1_CM.so:libGLESv2.so:libvndksupport.so

# WARNING: only VNDK-SP libs can be listed here. DO NOT EDIT this line.
namespace.sphal.link.vndk.shared_libs = android.hardware.renderscript@1.0.so:android.hardware.graphics.allocator@2.0.so:android.hardware.graphics.mapper@2.0.so:android.hardware.graphics.common@1.0.so:libhwbinder.so:libbase.so:libcutils.so:libhardware.so:libhidlbase.so:libhidltransport.so:libutils.so:libc++.so:libz.so
namespace.sphal.link.vndk.shared_libs = android.hardware.renderscript@1.0.so:android.hardware.graphics.allocator@2.0.so:android.hardware.graphics.mapper@2.0.so:android.hardware.graphics.common@1.0.so:libhwbinder.so:libbase.so:libcutils.so:libhardware.so:libhidlbase.so:libhidltransport.so:libion.so:libutils.so:libc++.so:libz.so

# Renderscript gets separate namespace
namespace.sphal.link.rs.shared_libs = libRS_internal.so
@@ -85,7 +85,7 @@ namespace.rs.asan.permitted.paths = /data/asan/vendor/${LIB}:/vendor/${LIB}:/dat

namespace.rs.links = default,vndk
namespace.rs.link.default.shared_libs = libc.so:libm.so:libdl.so:libstdc++.so:liblog.so:libnativewindow.so:libEGL.so:libsync.so:libGLESv1_CM.so:libGLESv2.so:libmediandk.so:libui.so:libvndksupport.so
namespace.rs.link.vndk.shared_libs = android.hardware.renderscript@1.0.so:android.hardware.graphics.allocator@2.0.so:android.hardware.graphics.mapper@2.0.so:android.hardware.graphics.common@1.0.so:libhwbinder.so:libbase.so:libcutils.so:libhardware.so:libhidlbase.so:libhidltransport.so:libutils.so:libc++.so:libz.so
namespace.rs.link.vndk.shared_libs = android.hardware.renderscript@1.0.so:android.hardware.graphics.allocator@2.0.so:android.hardware.graphics.mapper@2.0.so:android.hardware.graphics.common@1.0.so:libhwbinder.so:libbase.so:libcutils.so:libhardware.so:libhidlbase.so:libhidltransport.so:libion.so:libutils.so:libc++.so:libz.so

###############################################################################
# "vndk" namespace
@@ -93,10 +93,10 @@ namespace.rs.link.vndk.shared_libs = android.hardware.renderscript@1.0.so:androi
# This namespace is exclusively for vndk-sp libs.
###############################################################################
namespace.vndk.isolated = true
namespace.vndk.search.paths = /vendor/${LIB}/vndk-sp:/system/${LIB}/vndk-sp:/vendor/${LIB}
namespace.vndk.search.paths = /vendor/${LIB}/vndk-sp:/system/${LIB}/vndk-sp
namespace.vndk.permitted.paths = /vendor/${LIB}/hw:/vendor/${LIB}/egl

namespace.vndk.asan.search.paths = /data/asan/vendor/${LIB}/vndk-sp:/vendor/${LIB}/vndk-sp:/data/asan/system/${LIB}/vndk-sp:/system/${LIB}/vndk-sp:/data/asan/vendor/${LIB}:/vendor/${LIB}
namespace.vndk.asan.search.paths = /data/asan/vendor/${LIB}/vndk-sp:/vendor/${LIB}/vndk-sp:/data/asan/system/${LIB}/vndk-sp:/system/${LIB}/vndk-sp
namespace.vndk.asan.permitted.paths = /data/asan/vendor/${LIB}/hw:/vendor/${LIB}/hw:/data/asan/vendor/${LIB}/egl:/vendor/${LIB}/egl

# When these NDK libs are required inside this namespace, then it is redirected