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

Commit 15d790a2 authored by Tomasz Wasilczyk's avatar Tomasz Wasilczyk
Browse files

Migrate String8|16.setTo to assignment operator [sensors]

Bug: 295394788
Test: make checkbuild
Change-Id: I63b97b573f6b182ba36c4eb933b695d7a6ed59d0
(cherry picked from commit d89f609d)
parent 0ef15887
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -627,7 +627,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
@@ -2341,7 +2341,7 @@ status_t SensorService::changeOperatingMode(const Vector<String16>& args,
        mCurrentOperatingMode = RESTRICTED;
        // temporarily stop all sensor direct report and disable sensors
        disableAllSensorsLocked(&connLock);
        mAllowListedPackage.setTo(String8(args[1]));
        mAllowListedPackage = String8(args[1]);
        return status_t(NO_ERROR);
      case REPLAY_DATA_INJECTION:
        if (SensorServiceUtil::isUserBuild()) {
@@ -2361,7 +2361,7 @@ status_t SensorService::changeOperatingMode(const Vector<String16>& args,
                // Re-enable sensors.
                dev.enableAllSensors();
            }
            mAllowListedPackage.setTo(String8(args[1]));
            mAllowListedPackage = String8(args[1]);
            return NO_ERROR;
        } else {
            // Transition to data injection mode supported only from NORMAL mode.