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

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

Snap for 9754537 from 8ff83bc2 to udc-release

Change-Id: I0445dd104e6c5f7c797ccbb2ec0a2dc6e17da3b8
parents 43d232a5 8ff83bc2
Loading
Loading
Loading
Loading
+9 −8
Original line number Diff line number Diff line
@@ -19,6 +19,7 @@
#include <android-base/result.h>
#include <utils/Tokenizer.h>

#include <optional>
#include <string>
#include <unordered_map>
#include <unordered_set>
@@ -63,15 +64,15 @@ public:
    /* Returns a set of all property keys starting with the given prefix. */
    std::unordered_set<std::string> getKeysWithPrefix(const std::string& prefix) const;

    /* Gets the value of a property and parses it.
     * Returns true and sets outValue if the key was found and its value was parsed successfully.
     * Otherwise returns false and does not modify outValue.  (Also logs a warning.)
    /* Gets the value of a property and parses it. Returns nullopt if the key wasn't found or
     * couldn't be parsed as the requested type. (Warnings are also logged in the case of parsing
     * failures.)
     */
    bool tryGetProperty(const std::string& key, std::string& outValue) const;
    bool tryGetProperty(const std::string& key, bool& outValue) const;
    bool tryGetProperty(const std::string& key, int32_t& outValue) const;
    bool tryGetProperty(const std::string& key, float& outValue) const;
    bool tryGetProperty(const std::string& key, double& outValue) const;
    std::optional<std::string> getString(const std::string& key) const;
    std::optional<bool> getBool(const std::string& key) const;
    std::optional<int32_t> getInt(const std::string& key) const;
    std::optional<float> getFloat(const std::string& key) const;
    std::optional<double> getDouble(const std::string& key) const;

    /* Adds all values from the specified property map. */
    void addAll(const PropertyMap* map);
+1 −0
Original line number Diff line number Diff line
@@ -191,6 +191,7 @@ cc_defaults {
        "google-*",
        "misc-*",
        "performance*",
        "-performance-move-const-arg", // b/273486801
        "portability*",
    ],
}
+4 −4
Original line number Diff line number Diff line
@@ -32,7 +32,7 @@ __BEGIN_DECLS
 * Do not use this from a library. Apps setup their own threadpools, and otherwise, the main
 * function should be responsible for configuring the threadpool for the entire application.
 */
void ABinderProcess_startThreadPool();
void ABinderProcess_startThreadPool(void);
/**
 * This sets the maximum number of threads that can be started in the threadpool. By default, after
 * startThreadPool is called, this is 15. If it is called additional times, it will only prevent
@@ -48,7 +48,7 @@ bool ABinderProcess_setThreadPoolMaxThreadCount(uint32_t numThreads);
 * you should use this in a library to abort if the threadpool is not started.
 * Programs should configure binder threadpools once at the beginning.
 */
bool ABinderProcess_isThreadPoolStarted();
bool ABinderProcess_isThreadPoolStarted(void);
/**
 * This adds the current thread to the threadpool. This may cause the threadpool to exceed the
 * maximum size.
@@ -56,7 +56,7 @@ bool ABinderProcess_isThreadPoolStarted();
 * Do not use this from a library. Apps setup their own threadpools, and otherwise, the main
 * function should be responsible for configuring the threadpool for the entire application.
 */
void ABinderProcess_joinThreadPool();
void ABinderProcess_joinThreadPool(void);

/**
 * This gives you an fd to wait on. Whenever data is available on the fd,
@@ -79,6 +79,6 @@ __attribute__((weak)) binder_status_t ABinderProcess_setupPolling(int* fd) __INT
 *
 * \return STATUS_OK on success
 */
__attribute__((weak)) binder_status_t ABinderProcess_handlePolledCommands() __INTRODUCED_IN(31);
__attribute__((weak)) binder_status_t ABinderProcess_handlePolledCommands(void) __INTRODUCED_IN(31);

__END_DECLS
+4 −4
Original line number Diff line number Diff line
@@ -24,17 +24,17 @@
using ::android::IPCThreadState;
using ::android::ProcessState;

void ABinderProcess_startThreadPool() {
void ABinderProcess_startThreadPool(void) {
    ProcessState::self()->startThreadPool();
    ProcessState::self()->giveThreadPoolName();
}
bool ABinderProcess_setThreadPoolMaxThreadCount(uint32_t numThreads) {
    return ProcessState::self()->setThreadPoolMaxThreadCount(numThreads) == 0;
}
bool ABinderProcess_isThreadPoolStarted() {
bool ABinderProcess_isThreadPoolStarted(void) {
    return ProcessState::self()->isThreadPoolStarted();
}
void ABinderProcess_joinThreadPool() {
void ABinderProcess_joinThreadPool(void) {
    IPCThreadState::self()->joinThreadPool();
}

@@ -42,6 +42,6 @@ binder_status_t ABinderProcess_setupPolling(int* fd) {
    return IPCThreadState::self()->setupPolling(fd);
}

binder_status_t ABinderProcess_handlePolledCommands() {
binder_status_t ABinderProcess_handlePolledCommands(void) {
    return IPCThreadState::self()->handlePolledCommands();
}
+18 −6
Original line number Diff line number Diff line
@@ -771,7 +771,13 @@ impl<T: DeserializeOption> Deserialize for Option<T> {
#[macro_export]
macro_rules! impl_serialize_for_parcelable {
    ($parcelable:ident) => {
        impl $crate::binder_impl::Serialize for $parcelable {
        $crate::impl_serialize_for_parcelable!($parcelable < >);
    };
    ($parcelable:ident < $( $param:ident ),* , >) => {
        $crate::impl_serialize_for_parcelable!($parcelable < $($param),* >);
    };
    ($parcelable:ident < $( $param:ident ),* > ) => {
        impl < $($param),* > $crate::binder_impl::Serialize for $parcelable < $($param),* > {
            fn serialize(
                &self,
                parcel: &mut $crate::binder_impl::BorrowedParcel<'_>,
@@ -780,9 +786,9 @@ macro_rules! impl_serialize_for_parcelable {
            }
        }

        impl $crate::binder_impl::SerializeArray for $parcelable {}
        impl < $($param),* > $crate::binder_impl::SerializeArray for $parcelable < $($param),* > {}

        impl $crate::binder_impl::SerializeOption for $parcelable {
        impl < $($param),* > $crate::binder_impl::SerializeOption for $parcelable < $($param),* > {
            fn serialize_option(
                this: Option<&Self>,
                parcel: &mut $crate::binder_impl::BorrowedParcel<'_>,
@@ -808,7 +814,13 @@ macro_rules! impl_serialize_for_parcelable {
#[macro_export]
macro_rules! impl_deserialize_for_parcelable {
    ($parcelable:ident) => {
        impl $crate::binder_impl::Deserialize for $parcelable {
        $crate::impl_deserialize_for_parcelable!($parcelable < >);
    };
    ($parcelable:ident < $( $param:ident ),* , >) => {
        $crate::impl_deserialize_for_parcelable!($parcelable < $($param),* >);
    };
    ($parcelable:ident < $( $param:ident ),* > ) => {
        impl < $($param: Default),* > $crate::binder_impl::Deserialize for $parcelable < $($param),* > {
            fn deserialize(
                parcel: &$crate::binder_impl::BorrowedParcel<'_>,
            ) -> std::result::Result<Self, $crate::StatusCode> {
@@ -830,9 +842,9 @@ macro_rules! impl_deserialize_for_parcelable {
            }
        }

        impl $crate::binder_impl::DeserializeArray for $parcelable {}
        impl < $($param: Default),* > $crate::binder_impl::DeserializeArray for $parcelable < $($param),* > {}

        impl $crate::binder_impl::DeserializeOption for $parcelable {
        impl < $($param: Default),* > $crate::binder_impl::DeserializeOption for $parcelable < $($param),* > {
            fn deserialize_option(
                parcel: &$crate::binder_impl::BorrowedParcel<'_>,
            ) -> std::result::Result<Option<Self>, $crate::StatusCode> {
Loading