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

Commit 7de39f26 authored by Treehugger Robot's avatar Treehugger Robot Committed by Gerrit Code Review
Browse files

Merge "Migrate String8|16.setTo to assignment operator [sensors]" into main

parents 4d322774 596b44b8
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -631,7 +631,7 @@ bool Sensor::unflattenString8(void const*& buffer, size_t& size, String8& output
    if (size < len) {
        return false;
    }
    outputString8.setTo(static_cast<char const*>(buffer), len);
    outputString8 = String8(static_cast<char const*>(buffer), len);

    if (size < FlattenableUtils::align<4>(len)) {
        ALOGE("Malformed Sensor String8 field. Should be in a 4-byte aligned buffer but is not.");
+2 −2
Original line number Diff line number Diff line
@@ -472,7 +472,7 @@ status_t SensorService::dump(int fd, const Vector<String16>& args) {
            mCurrentOperatingMode = RESTRICTED;
            // temporarily stop all sensor direct report and disable sensors
            disableAllSensorsLocked(&connLock);
            mWhiteListedPackage.setTo(String8(args[1]));
            mWhiteListedPackage = String8(args[1]);
            return status_t(NO_ERROR);
        } else if (args.size() == 1 && args[0] == String16("enable")) {
            // If currently in restricted mode, reset back to NORMAL mode else ignore.
@@ -496,7 +496,7 @@ status_t SensorService::dump(int fd, const Vector<String16>& args) {
                    // Re-enable sensors.
                    dev.enableAllSensors();
                }
                mWhiteListedPackage.setTo(String8(args[1]));
                mWhiteListedPackage = String8(args[1]);
                return NO_ERROR;
            } else if (mCurrentOperatingMode == DATA_INJECTION) {
                // Already in DATA_INJECTION mode. Treat this as a no_op.