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

Commit 4ff8fb00 authored by Changyeon Jo's avatar Changyeon Jo
Browse files

Update CarWindowService



This change rename CarWindowService as AutomotiveDisplayProxyService.

Bug: 148993064
Test: m -j
Change-Id: Icae6264b878ce46c030f9bf2dbfb5d1d9a84c76b
Signed-off-by: default avatarChangyeon Jo <changyeon@google.com>
parent 390af803
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -18,8 +18,8 @@ cc_binary {
    name: "android.frameworks.automotive.display@1.0-service",
    defaults: ["hidl_defaults"],
    srcs: [
        "main_automotivedisplay.cpp",
        "CarWindowService.cpp",
        "main_automotivedisplayproxy.cpp",
        "AutomotiveDisplayProxyService.cpp",
    ],
    init_rc: ["android.frameworks.automotive.display@1.0-service.rc"],

+4 −4
Original line number Diff line number Diff line
@@ -18,7 +18,7 @@

#include <gui/bufferqueue/2.0/B2HGraphicBufferProducer.h>

#include "CarWindowService.h"
#include "AutomotiveDisplayProxyService.h"

namespace android {
namespace frameworks {
@@ -28,7 +28,7 @@ namespace V1_0 {
namespace implementation {

Return<sp<IGraphicBufferProducer>>
    CarWindowService::getIGraphicBufferProducer() {
AutomotiveDisplayProxyService::getIGraphicBufferProducer() {
    if (mSurface == nullptr) {
        status_t err;
        mSurfaceComposerClient = new SurfaceComposerClient();
@@ -86,7 +86,7 @@ Return<sp<IGraphicBufferProducer>>
                        mSurface->getIGraphicBufferProducer());
}

Return<bool> CarWindowService::showWindow() {
Return<bool> AutomotiveDisplayProxyService::showWindow() {
    status_t status = NO_ERROR;

    if (mSurfaceControl != nullptr) {
@@ -103,7 +103,7 @@ Return<bool> CarWindowService::showWindow() {
    return status == NO_ERROR;
}

Return<bool> CarWindowService::hideWindow() {
Return<bool> AutomotiveDisplayProxyService::hideWindow() {
    status_t status = NO_ERROR;

    if (mSurfaceControl != nullptr) {
+2 −2
Original line number Diff line number Diff line
@@ -15,7 +15,7 @@
//
#pragma once

#include <android/frameworks/automotive/display/1.0/ICarWindowService.h>
#include <android/frameworks/automotive/display/1.0/IAutomotiveDisplayProxyService.h>
#include <gui/ISurfaceComposer.h>
#include <gui/IGraphicBufferProducer.h>
#include <gui/Surface.h>
@@ -34,7 +34,7 @@ using ::android::hardware::Return;
using ::android::sp;
using ::android::hardware::graphics::bufferqueue::V2_0::IGraphicBufferProducer;

class CarWindowService : public ICarWindowService {
class AutomotiveDisplayProxyService : public IAutomotiveDisplayProxyService {
public:
    Return<sp<IGraphicBufferProducer>> getIGraphicBufferProducer() override;
    Return<bool> showWindow() override;
+3 −3
Original line number Diff line number Diff line
@@ -23,14 +23,14 @@
#include <utils/Errors.h>
#include <utils/StrongPointer.h>

#include "CarWindowService.h"
#include "AutomotiveDisplayProxyService.h"

// libhidl:
using android::hardware::configureRpcThreadpool;
using android::hardware::joinRpcThreadpool;

// Generated HIDL files
using android::frameworks::automotive::display::V1_0::ICarWindowService;
using android::frameworks::automotive::display::V1_0::IAutomotiveDisplayProxyService;

// The namespace in which all our implementation code lives
using namespace android::frameworks::automotive::display::V1_0::implementation;
@@ -41,7 +41,7 @@ const static char kServiceName[] = "default";
int main() {
    ALOGI("Car Window Service is starting");

    android::sp<ICarWindowService> service = new CarWindowService();
    android::sp<IAutomotiveDisplayProxyService> service = new AutomotiveDisplayProxyService();

    configureRpcThreadpool(1, true /* callerWillJoin */);