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

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

Snap for 7444394 from c2baccc4 to sc-d1-release

Change-Id: I384d37058687880f78f996b5815340151ef171f1
parents ff11c9db c2baccc4
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -342,7 +342,8 @@ static int restorecon_app_data_lazy(const std::string& path, const std::string&

    // If the initial top-level restorecon above changed the label, then go
    // back and restorecon everything recursively
    if (strcmp(before, after)) {
    // TODO(b/190567190, b/188141923) Remove recursive fixup of com.google.android.gsf.
    if (strcmp(before, after) || (path.find("com.google.android.gsf") != std::string::npos)) {
        if (existing) {
            LOG(DEBUG) << "Detected label change from " << before << " to " << after << " at "
                    << path << "; running recursive restorecon";
+2 −6
Original line number Diff line number Diff line
@@ -257,13 +257,9 @@ public:
        return mMotionRanges;
    }

    const InputDeviceSensorInfo* getSensorInfo(InputDeviceSensorType type);
    std::vector<InputDeviceSensorInfo> getSensors();

    const std::vector<InputDeviceSensorType> getSensorTypes();

    const std::vector<int32_t> getLightIds();

    const InputDeviceLightInfo* getLightInfo(int32_t id);
    std::vector<InputDeviceLightInfo> getLights();

private:
    int32_t mId;
+4 −0
Original line number Diff line number Diff line
@@ -156,6 +156,10 @@ cc_test {
    ],
    test_suites: ["general-tests"],
    require_root: true,
    // Prevent the unit test target from running on sc-dev as it's not ready.
    test_options: {
        unit_test: false,
    },
}

cc_benchmark {
+10 −24
Original line number Diff line number Diff line
@@ -247,36 +247,22 @@ void InputDeviceInfo::addLightInfo(const InputDeviceLightInfo& info) {
    mLights.insert_or_assign(info.id, info);
}

const std::vector<InputDeviceSensorType> InputDeviceInfo::getSensorTypes() {
    std::vector<InputDeviceSensorType> types;
std::vector<InputDeviceSensorInfo> InputDeviceInfo::getSensors() {
    std::vector<InputDeviceSensorInfo> infos;
    infos.reserve(mSensors.size());
    for (const auto& [type, info] : mSensors) {
        types.push_back(type);
        infos.push_back(info);
    }
    return types;
    return infos;
}

const InputDeviceSensorInfo* InputDeviceInfo::getSensorInfo(InputDeviceSensorType type) {
    auto it = mSensors.find(type);
    if (it == mSensors.end()) {
        return nullptr;
    }
    return &it->second;
}

const std::vector<int32_t> InputDeviceInfo::getLightIds() {
    std::vector<int32_t> ids;
std::vector<InputDeviceLightInfo> InputDeviceInfo::getLights() {
    std::vector<InputDeviceLightInfo> infos;
    infos.reserve(mLights.size());
    for (const auto& [id, info] : mLights) {
        ids.push_back(id);
    }
    return ids;
}

const InputDeviceLightInfo* InputDeviceInfo::getLightInfo(int32_t id) {
    auto it = mLights.find(id);
    if (it == mLights.end()) {
        return nullptr;
        infos.push_back(info);
    }
    return &it->second;
    return infos;
}

} // namespace android
+2 −2
Original line number Diff line number Diff line
@@ -113,9 +113,9 @@ public:
    /* Get battery status of a particular input device. */
    virtual std::optional<int32_t> getBatteryStatus(int32_t deviceId) = 0;

    virtual std::vector<int32_t> getLightIds(int32_t deviceId) = 0;
    virtual std::vector<InputDeviceLightInfo> getLights(int32_t deviceId) = 0;

    virtual const InputDeviceLightInfo* getLightInfo(int32_t deviceId, int32_t lightId) = 0;
    virtual std::vector<InputDeviceSensorInfo> getSensors(int32_t deviceId) = 0;

    /* Return true if the device can send input events to the specified display. */
    virtual bool canDispatchToDisplay(int32_t deviceId, int32_t displayId) = 0;
Loading