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

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

Snap for 8107456 from 129a513d to tm-d1-release

Change-Id: Id34c5be685f7ff7ded6a8fbe0acad35952323fbb
parents 139e9053 129a513d
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -29,7 +29,8 @@ size_t StaticDisplayInfo::getFlattenedSize() const {
    return FlattenableHelpers::getFlattenedSize(connectionType) +
            FlattenableHelpers::getFlattenedSize(density) +
            FlattenableHelpers::getFlattenedSize(secure) +
            FlattenableHelpers::getFlattenedSize(deviceProductInfo);
            FlattenableHelpers::getFlattenedSize(deviceProductInfo) +
            FlattenableHelpers::getFlattenedSize(installOrientation);
}

status_t StaticDisplayInfo::flatten(void* buffer, size_t size) const {
@@ -40,6 +41,7 @@ status_t StaticDisplayInfo::flatten(void* buffer, size_t size) const {
    RETURN_IF_ERROR(FlattenableHelpers::flatten(&buffer, &size, density));
    RETURN_IF_ERROR(FlattenableHelpers::flatten(&buffer, &size, secure));
    RETURN_IF_ERROR(FlattenableHelpers::flatten(&buffer, &size, deviceProductInfo));
    RETURN_IF_ERROR(FlattenableHelpers::flatten(&buffer, &size, installOrientation));
    return OK;
}

@@ -48,6 +50,7 @@ status_t StaticDisplayInfo::unflatten(void const* buffer, size_t size) {
    RETURN_IF_ERROR(FlattenableHelpers::unflatten(&buffer, &size, &density));
    RETURN_IF_ERROR(FlattenableHelpers::unflatten(&buffer, &size, &secure));
    RETURN_IF_ERROR(FlattenableHelpers::unflatten(&buffer, &size, &deviceProductInfo));
    RETURN_IF_ERROR(FlattenableHelpers::unflatten(&buffer, &size, &installOrientation));
    return OK;
}

+2 −0
Original line number Diff line number Diff line
@@ -19,6 +19,7 @@
#include <optional>

#include <ui/DeviceProductInfo.h>
#include <ui/Rotation.h>
#include <utils/Flattenable.h>

namespace android::ui {
@@ -31,6 +32,7 @@ struct StaticDisplayInfo : LightFlattenable<StaticDisplayInfo> {
    float density = 0.f;
    bool secure = false;
    std::optional<DeviceProductInfo> deviceProductInfo;
    Rotation installOrientation = ROTATION_0;

    bool isFixedSize() const { return false; }
    size_t getFlattenedSize() const;
+3 −0
Original line number Diff line number Diff line
@@ -1020,6 +1020,9 @@ status_t SurfaceFlinger::getStaticDisplayInfo(const sp<IBinder>& displayToken,
    info->secure = display->isSecure();
    info->deviceProductInfo = display->getDeviceProductInfo();

    // TODO: Scale this to multiple displays.
    info->installOrientation = display->isPrimary() ? internalDisplayOrientation : ui::ROTATION_0;

    return NO_ERROR;
}