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

Commit 1e44d1a7 authored by Android Build Coastguard Worker's avatar Android Build Coastguard Worker
Browse files

Snap for 13513381 from d8326192 to 25Q4-release

Change-Id: I89df9457e28dfc514354be8a9ec98f7bd0f039bd
parents 0d439234 d8326192
Loading
Loading
Loading
Loading
+12 −0
Original line number Diff line number Diff line
@@ -334,6 +334,18 @@ prebuilt_etc {
    defaults: ["frameworks_native_data_etc_defaults"],
}

prebuilt_etc {
    name: "android.hardware.telephony.euicc.prebuilt.xml",
    src: "android.hardware.telephony.euicc.xml",
    defaults: ["frameworks_native_data_etc_defaults"],
}

prebuilt_etc {
    name: "android.hardware.telephony.euicc.mep.prebuilt.xml",
    src: "android.hardware.telephony.euicc.mep.xml",
    defaults: ["frameworks_native_data_etc_defaults"],
}

prebuilt_etc {
    name: "android.hardware.thread_network.prebuilt.xml",
    src: "android.hardware.thread_network.xml",
+13 −4
Original line number Diff line number Diff line
@@ -68,11 +68,20 @@ typedef struct ADisplayLuts ADisplayLuts;
 * \a ADisplayLutsEntry_create.
 *
 * 1D Lut(s) are treated as gain curves.
 *
 * 3D Lut(s) are used for direct color manipulations.
 * The values of 3D Lut(s) data should be normalized to the range 0.0f
 * to 1.0f, inclusive. And 1.0f is the maximum panel luminance.
 * And 3D Lut(s) data is organized in RGB order
 * (R0, R1, R2, ..., RN, G0, G1, G2, ..., GN, B0, B1, B2, ..., BN) if N is the dimension.
 * For 3D Lut(s), the values should be normalized to the range 0.0
 * to 1.0 , inclusive. And 1.0 is the maximum panel luminance.
 * And If N is the size of each dimension, the data is arranged in RGB order:
 * R(0, 0, 0), R(0, 0, 1), ..., R(0, 0, N - 1),
 * R(0, 1, 0), ..., R(0, 1, N - 1), ..., R(0, N - 1, N - 1),
 * R(1, 0, 0), ..., R(1, 0, N - 1), ..., R(1, N - 1, N - 1), ..., R(N - 1, N - 1, N - 1),
 * G(0, 0, 0), ..., G(N - 1, N - 1, N - 1),
 * B(0, 0, 0), ..., B(N - 1, N - 1, N - 1).
 *
 * When a GPU shader samples 3D Lut data, it's accessed in a flat, one-dimensional arrangement.
 * Assuming that we have a 3D array ORIGINAL[N][N][N],
 * then ORIGINAL[x][y][z] is mapped to FLAT[z + N * (y + N * x)].
 *
 * @param buffer The lut raw buffer. The function creates a copy of it and does not need to
 * outlive the life of the ADisplayLutsEntry.
+9 −0
Original line number Diff line number Diff line
@@ -53,6 +53,15 @@ public:
     * connectedDisplaysCursorEnabled flag.
     */
    static bool scaleCursorSpeedWithDisplayDensity();

    /**
     * This is a temporary fix that removes the SKIP_SCREENSHOT flag for the Mouse cursor. This is
     * only intended to be temporarily used as workaround only when connected displays dev option
     * is enabled.
     *
     * This will make mouse cursor visible on recordings and screenshots of secure windows.
     */
    static bool doNotUseSkipScreenshotFlagForMouseCursor();
};

} // namespace android
+1 −1
Original line number Diff line number Diff line
@@ -75,7 +75,7 @@ public:
    std::optional<double> getDouble(const std::string& key) const;

    /* Adds all values from the specified property map. */
    void addAll(const PropertyMap* map);
    void addAll(const PropertyMap& map);

    /* Loads a property map from a file. */
    static android::base::Result<std::unique_ptr<PropertyMap>> load(const char* filename);
+57 −9
Original line number Diff line number Diff line
@@ -27,6 +27,7 @@
#include <chrono>
#include <deque>
#include <optional>
#include <set>
#include <string>
#include <string_view>
#include <tuple>
@@ -45,7 +46,9 @@

using android::base::unique_fd;

static constexpr uint32_t kAuthVersion = 1;
static constexpr uint32_t kAuthVersion = 2;

static std::set<AdbdAuthFeature> supported_features = {AdbdAuthFeature::WifiLifeCycle};

struct AdbdAuthPacketAuthenticated {
    std::string public_key;
@@ -87,7 +90,6 @@ struct AdbdAuthContext {

public:
  explicit AdbdAuthContext(AdbdAuthCallbacksV1* callbacks) : next_id_(0), callbacks_(*callbacks) {
        InitFrameworkHandlers();
        epoll_fd_.reset(epoll_create1(EPOLL_CLOEXEC));
        if (epoll_fd_ == -1) {
            PLOG(FATAL) << "adbd_auth: failed to create epoll fd";
@@ -116,6 +118,8 @@ public:
        }
    }

    virtual ~AdbdAuthContext(){}

    AdbdAuthContext(const AdbdAuthContext& copy) = delete;
    AdbdAuthContext(AdbdAuthContext&& move) = delete;
    AdbdAuthContext& operator=(const AdbdAuthContext& copy) = delete;
@@ -502,7 +506,7 @@ public:
        }
    }

    void InitFrameworkHandlers() {
    virtual void InitFrameworkHandlers() {
        // Framework wants to disconnect from a secured wifi device
        framework_handlers_.emplace_back(
                FrameworkPktHandler{
@@ -547,15 +551,60 @@ public:
    std::vector<FrameworkPktHandler> framework_handlers_;
};

class AdbdAuthContextV2 : public AdbdAuthContext {
 public:
  explicit AdbdAuthContextV2(AdbdAuthCallbacksV2* callbacks) : AdbdAuthContext(callbacks),
                                                               callbacks_v2_(*callbacks) {}

  virtual void InitFrameworkHandlers() {
        AdbdAuthContext::InitFrameworkHandlers();
        // Framework requires ADB Wifi to start
        framework_handlers_.emplace_back(
                FrameworkPktHandler{
                    .code = "W1",
                    .cb = std::bind(&AdbdAuthContextV2::StartAdbWifi, this, std::placeholders::_1)});

        // Framework requires ADB Wifi to stop
        framework_handlers_.emplace_back(
                FrameworkPktHandler{
                     .code = "W0",
                     .cb = std::bind(&AdbdAuthContextV2::StopAdbWifi, this, std::placeholders::_1)});
  }


  void StartAdbWifi(std::string_view buf) EXCLUDES(mutex_) {
        CHECK(buf.empty());
        callbacks_v2_.start_adbd_wifi();
    }

    void StopAdbWifi(std::string_view buf) EXCLUDES(mutex_) {
        CHECK(buf.empty());
        callbacks_v2_.stop_adbd_wifi();
    }

 private:
  AdbdAuthCallbacksV2 callbacks_v2_;
};

AdbdAuthContext* adbd_auth_new(AdbdAuthCallbacks* callbacks) {
    if (callbacks->version == 1) {
        return new AdbdAuthContext(reinterpret_cast<AdbdAuthCallbacksV1*>(callbacks));
    } else {
    switch (callbacks->version) {
      case 1: {
        AdbdAuthContext* ctx = new AdbdAuthContext (reinterpret_cast<AdbdAuthCallbacksV1*>(callbacks));
        ctx->InitFrameworkHandlers();
        return ctx;
      }
      case kAuthVersion: {
        AdbdAuthContextV2* ctx2 = new AdbdAuthContextV2(reinterpret_cast<AdbdAuthCallbacksV2*>(callbacks));
        ctx2->InitFrameworkHandlers();
        return ctx2;
      }
      default : {
        LOG(ERROR) << "adbd_auth: received unknown AdbdAuthCallbacks version "
                   << callbacks->version;
        return nullptr;
      }
    }
}

void adbd_auth_delete(AdbdAuthContext* ctx) {
    delete ctx;
@@ -607,8 +656,7 @@ uint32_t adbd_auth_get_max_version() {
}

bool adbd_auth_supports_feature(AdbdAuthFeature f) {
    UNUSED(f);
    return false;
  return supported_features.contains(f);
}

void adbd_auth_send_tls_server_port(AdbdAuthContext* ctx, uint16_t port) {
Loading