Loading data/etc/Android.bp +12 −0 Original line number Diff line number Diff line Loading @@ -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", Loading include/android/display_luts.h +13 −4 Original line number Diff line number Diff line Loading @@ -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. Loading include/input/InputFlags.h +9 −0 Original line number Diff line number Diff line Loading @@ -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 include/input/PropertyMap.h +1 −1 Original line number Diff line number Diff line Loading @@ -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); Loading libs/adbd_auth/adbd_auth.cpp +57 −9 Original line number Diff line number Diff line Loading @@ -27,6 +27,7 @@ #include <chrono> #include <deque> #include <optional> #include <set> #include <string> #include <string_view> #include <tuple> Loading @@ -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; Loading Loading @@ -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"; Loading Loading @@ -116,6 +118,8 @@ public: } } virtual ~AdbdAuthContext(){} AdbdAuthContext(const AdbdAuthContext& copy) = delete; AdbdAuthContext(AdbdAuthContext&& move) = delete; AdbdAuthContext& operator=(const AdbdAuthContext& copy) = delete; Loading Loading @@ -502,7 +506,7 @@ public: } } void InitFrameworkHandlers() { virtual void InitFrameworkHandlers() { // Framework wants to disconnect from a secured wifi device framework_handlers_.emplace_back( FrameworkPktHandler{ Loading Loading @@ -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; Loading Loading @@ -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 Loading
data/etc/Android.bp +12 −0 Original line number Diff line number Diff line Loading @@ -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", Loading
include/android/display_luts.h +13 −4 Original line number Diff line number Diff line Loading @@ -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. Loading
include/input/InputFlags.h +9 −0 Original line number Diff line number Diff line Loading @@ -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
include/input/PropertyMap.h +1 −1 Original line number Diff line number Diff line Loading @@ -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); Loading
libs/adbd_auth/adbd_auth.cpp +57 −9 Original line number Diff line number Diff line Loading @@ -27,6 +27,7 @@ #include <chrono> #include <deque> #include <optional> #include <set> #include <string> #include <string_view> #include <tuple> Loading @@ -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; Loading Loading @@ -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"; Loading Loading @@ -116,6 +118,8 @@ public: } } virtual ~AdbdAuthContext(){} AdbdAuthContext(const AdbdAuthContext& copy) = delete; AdbdAuthContext(AdbdAuthContext&& move) = delete; AdbdAuthContext& operator=(const AdbdAuthContext& copy) = delete; Loading Loading @@ -502,7 +506,7 @@ public: } } void InitFrameworkHandlers() { virtual void InitFrameworkHandlers() { // Framework wants to disconnect from a secured wifi device framework_handlers_.emplace_back( FrameworkPktHandler{ Loading Loading @@ -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; Loading Loading @@ -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