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

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

Snap for 6799200 from 42af3fa6 to rvc-qpr1-release

Change-Id: I12af41684ef2f7ad7ee74d639adf210c704e532c
parents b1ee3a99 42af3fa6
Loading
Loading
Loading
Loading
+10 −15
Original line number Diff line number Diff line
@@ -45,6 +45,7 @@
#include <vector>

#include <android-base/stringprintf.h>
#include <android-base/strings.h>
#include <gtest/gtest.h>

#include "fastboot_driver.h"
@@ -76,8 +77,7 @@ int FastBootTest::MatchFastboot(usb_ifc_info* info, const std::string& local_ser
}

bool FastBootTest::IsFastbootOverTcp() {
    // serial contains ":" is treated as host ip and port number
    return (device_serial.find(":") != std::string::npos);
    return android::base::StartsWith(device_serial, "tcp:");
}

bool FastBootTest::UsbStillAvailible() {
@@ -182,21 +182,16 @@ void FastBootTest::TearDownSerial() {
}

void FastBootTest::ConnectTcpFastbootDevice() {
    std::size_t found = device_serial.find(":");
    if (found != std::string::npos) {
    for (int i = 0; i < MAX_TCP_TRIES && !transport; i++) {
        std::string error;
        std::unique_ptr<Transport> tcp(
                    tcp::Connect(device_serial.substr(0, found), tcp::kDefaultPort, &error)
                            .release());
                tcp::Connect(device_serial.substr(4), tcp::kDefaultPort, &error).release());
        if (tcp)
                transport =
                        std::unique_ptr<TransportSniffer>(new TransportSniffer(std::move(tcp), 0));
            transport = std::unique_ptr<TransportSniffer>(new TransportSniffer(std::move(tcp), 0));
        if (transport != nullptr) break;
        std::this_thread::sleep_for(std::chrono::milliseconds(10));
    }
}
}

void FastBootTest::ReconnectFastbootDevice() {
    fb.reset();
+1 −1
Original line number Diff line number Diff line
@@ -79,7 +79,7 @@ static void initHealthInfo(HealthInfo_2_1* health_info_2_1) {

    // HIDL enum values are zero initialized, so they need to be initialized
    // properly.
    health_info_2_1->batteryCapacityLevel = BatteryCapacityLevel::UNKNOWN;
    health_info_2_1->batteryCapacityLevel = BatteryCapacityLevel::UNSUPPORTED;
    health_info_2_1->batteryChargeTimeToFullNowSeconds =
            (int64_t)Constants::BATTERY_CHARGE_TIME_TO_FULL_NOW_SECONDS_UNSUPPORTED;
    auto* props = &health_info_2_1->legacy.legacy;
+13 −11
Original line number Diff line number Diff line
@@ -39,19 +39,21 @@
      "Mode": "0755",
      "UID": "system",
      "GID": "system"
    },
    }
  ],
  "Cgroups2": {
    "Path": "/sys/fs/cgroup",
    "Mode": "0755",
    "UID": "system",
    "GID": "system",
    "Controllers": [
      {
        "Controller": "freezer",
      "Path": "/dev/freezer",
        "Path": "freezer",
        "Mode": "0755",
        "UID": "system",
        "GID": "system"
      }
  ],
  "Cgroups2": {
    "Path": "/dev/cg2_bpf",
    "Mode": "0600",
    "UID": "root",
    "GID": "root"
    ]
  }
}
+7 −2
Original line number Diff line number Diff line
@@ -24,19 +24,24 @@ message Cgroups {
    Cgroups2 cgroups2 = 2 [json_name = "Cgroups2"];
}

// Next: 6
// Next: 7
message Cgroup {
    string controller = 1 [json_name = "Controller"];
    string path = 2 [json_name = "Path"];
    string mode = 3 [json_name = "Mode"];
    string uid = 4 [json_name = "UID"];
    string gid = 5 [json_name = "GID"];
// Booleans default to false when not specified. File reconstruction fails
// when a boolean is specified as false, so leave unspecified in that case
// https://developers.google.com/protocol-buffers/docs/proto3#default
    bool needs_activation = 6 [json_name = "NeedsActivation"];
}

// Next: 5
// Next: 6
message Cgroups2 {
    string path = 1 [json_name = "Path"];
    string mode = 2 [json_name = "Mode"];
    string uid = 3 [json_name = "UID"];
    string gid = 4 [json_name = "GID"];
    repeated Cgroup controllers = 5 [json_name = "Controllers"];
}
+7 −7
Original line number Diff line number Diff line
@@ -53,7 +53,7 @@
    {
      "Name": "FreezerState",
      "Controller": "freezer",
      "File": "frozen/freezer.state"
      "File": "cgroup.freeze"
    }
  ],

@@ -79,7 +79,7 @@
          "Params":
          {
            "Controller": "freezer",
            "Path": "frozen"
            "Path": ""
          }
        }
      ]
@@ -92,7 +92,7 @@
          "Params":
          {
            "Controller": "freezer",
            "Path": ""
            "Path": "../"
          }
        }
      ]
@@ -538,27 +538,27 @@
      ]
    },
    {
      "Name": "FreezerThawed",
      "Name": "FreezerDisabled",
      "Actions": [
        {
          "Name": "SetAttribute",
          "Params":
          {
            "Name": "FreezerState",
            "Value": "THAWED"
            "Value": "0"
          }
        }
      ]
    },
    {
      "Name": "FreezerFrozen",
      "Name": "FreezerEnabled",
      "Actions": [
        {
          "Name": "SetAttribute",
          "Params":
          {
            "Name": "FreezerState",
            "Value": "FROZEN"
            "Value": "1"
          }
        }
      ]
Loading