hwcomposer: Add secure intents to support Secure Playback

Add OPEN_SECURE_START, OPEN_SECURE_END, CLOSE_SECURE_START
   and CLOSE_SECURE_END secure intents for Securing/Unsecuring
   start and end notifications.

   1. On Open Secure Start and Close Secure End events, hwc_prepare
      close the current overlay state and composition will be
      done by GPU. This will teardown the exisiting Rotator session.
   2. On Open Secure End, secure configuration is enabled and
      subsequent hwc_prepare will allocate secure memory for Rotator.
   3. On Close Secure End, secure configuration is disabled and
      subsequent hwc_prepare calls will allocate non-secure memory
      for Rotator.

Change-Id: Ia81b21d19f8084f218ae16eb8e69bb62937afa26

Conflicts:
	libhwcomposer/hwc_utils.h
This commit is contained in:
Amara Venkata Mastan Manoj Kumar 2012-09-05 18:18:51 -07:00 committed by andrew.boren
parent c3dafd1e58
commit a4b0340e0f
7 changed files with 346 additions and 209 deletions

View File

@ -85,6 +85,11 @@ static int hwc_prepare(hwc_composer_device_t *dev, hwc_layer_list_t* list)
hwc_context_t* ctx = (hwc_context_t*)(dev);
ctx->overlayInUse = false;
if(ctx->mSecureConfig == true) {
// This will tear down External Display Device.
return 0;
}
if(ctx->mExtDisplay->getExternalDisplay())
ovutils::setExtType(ctx->mExtDisplay->getExternalDisplay());

View File

@ -1,133 +1,190 @@
/*
* Copyright (c) 2012, Code Aurora Forum. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
* met:
* * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* * Redistributions in binary form must reproduce the above
* copyright notice, this list of conditions and the following
* disclaimer in the documentation and/or other materials provided
* with the distribution.
* * Neither the name of Code Aurora Forum, Inc. nor the names of its
* contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS
* BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
* BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
* WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
* OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
* IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#include <hwc_service.h>
#include <hwc_utils.h>
#define HWC_SERVICE_DEBUG 0
using namespace android;
namespace hwcService {
HWComposerService* HWComposerService::sHwcService = NULL;
// ----------------------------------------------------------------------------
HWComposerService::HWComposerService():mHwcContext(0)
{
ALOGD_IF(HWC_SERVICE_DEBUG, "HWComposerService Constructor invoked");
}
HWComposerService::~HWComposerService()
{
ALOGD_IF(HWC_SERVICE_DEBUG,"HWComposerService Destructor invoked");
}
status_t HWComposerService::setHPDStatus(int hpdStatus) {
ALOGD_IF(HWC_SERVICE_DEBUG, "hpdStatus=%d", hpdStatus);
qhwc::ExternalDisplay *externalDisplay = mHwcContext->mExtDisplay;
externalDisplay->setHPDStatus(hpdStatus);
return NO_ERROR;
}
status_t HWComposerService::setResolutionMode(int resMode) {
ALOGD_IF(HWC_SERVICE_DEBUG, "resMode=%d", resMode);
qhwc::ExternalDisplay *externalDisplay = mHwcContext->mExtDisplay;
if(externalDisplay->getExternalDisplay()) {
externalDisplay->setEDIDMode(resMode);
} else {
ALOGE("External Display not connected");
}
return NO_ERROR;
}
status_t HWComposerService::setActionSafeDimension(int w, int h) {
ALOGD_IF(HWC_SERVICE_DEBUG, "w=%d h=%d", w, h);
qhwc::ExternalDisplay *externalDisplay = mHwcContext->mExtDisplay;
if((w > MAX_ACTIONSAFE_WIDTH) && (h > MAX_ACTIONSAFE_HEIGHT)) {
ALOGE_IF(HWC_SERVICE_DEBUG,
"ActionSafe Width and Height exceeded the limit! w=%d h=%d", w, h);
return NO_ERROR;
}
if(externalDisplay->getExternalDisplay()) {
externalDisplay->setActionSafeDimension(w, h);
} else {
ALOGE("External Display not connected");
}
return NO_ERROR;
}
status_t HWComposerService::getResolutionModeCount(int *resModeCount) {
qhwc::ExternalDisplay *externalDisplay = mHwcContext->mExtDisplay;
if(externalDisplay->getExternalDisplay()) {
*resModeCount = externalDisplay->getModeCount();
} else {
ALOGE("External Display not connected");
}
ALOGD_IF(HWC_SERVICE_DEBUG, "resModeCount=%d", *resModeCount);
return NO_ERROR;
}
status_t HWComposerService::getResolutionModes(int *resModes, int count) {
qhwc::ExternalDisplay *externalDisplay = mHwcContext->mExtDisplay;
if(externalDisplay->getExternalDisplay()) {
externalDisplay->getEDIDModes(resModes);
} else {
ALOGE("External Display not connected");
}
return NO_ERROR;
}
status_t HWComposerService::getExternalDisplay(int *dispType) {
qhwc::ExternalDisplay *externalDisplay = mHwcContext->mExtDisplay;
*dispType = externalDisplay->getExternalDisplay();
ALOGD_IF(HWC_SERVICE_DEBUG, "dispType=%d", *dispType);
return NO_ERROR;
}
HWComposerService* HWComposerService::getInstance()
{
if(!sHwcService) {
sHwcService = new HWComposerService();
sp<IServiceManager> sm = defaultServiceManager();
sm->addService(String16("display.hwcservice"), sHwcService);
if(sm->checkService(String16("display.hwcservice")) != NULL)
ALOGD_IF(HWC_SERVICE_DEBUG, "adding display.hwcservice succeeded");
else
ALOGD_IF(HWC_SERVICE_DEBUG, "adding display.hwcservice failed");
}
return sHwcService;
}
void HWComposerService::setHwcContext(hwc_context_t *hwcCtx) {
ALOGD_IF(HWC_SERVICE_DEBUG, "hwcCtx=0x%x", (int)hwcCtx);
if(hwcCtx) {
mHwcContext = hwcCtx;
}
}
}
/*
* Copyright (c) 2012, Code Aurora Forum. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
* met:
* * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* * Redistributions in binary form must reproduce the above
* copyright notice, this list of conditions and the following
* disclaimer in the documentation and/or other materials provided
* with the distribution.
* * Neither the name of Code Aurora Forum, Inc. nor the names of its
* contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS
* BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
* BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
* WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
* OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
* IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#include <hwc_service.h>
#include <hwc_utils.h>
#define HWC_SERVICE_DEBUG 0
using namespace android;
namespace hwcService {
HWComposerService* HWComposerService::sHwcService = NULL;
// ----------------------------------------------------------------------------
HWComposerService::HWComposerService():mHwcContext(0)
{
ALOGD_IF(HWC_SERVICE_DEBUG, "HWComposerService Constructor invoked");
}
HWComposerService::~HWComposerService()
{
ALOGD_IF(HWC_SERVICE_DEBUG,"HWComposerService Destructor invoked");
}
status_t HWComposerService::setHPDStatus(int hpdStatus) {
ALOGD_IF(HWC_SERVICE_DEBUG, "hpdStatus=%d", hpdStatus);
qhwc::ExternalDisplay *externalDisplay = mHwcContext->mExtDisplay;
externalDisplay->setHPDStatus(hpdStatus);
return NO_ERROR;
}
status_t HWComposerService::setResolutionMode(int resMode) {
ALOGD_IF(HWC_SERVICE_DEBUG, "resMode=%d", resMode);
qhwc::ExternalDisplay *externalDisplay = mHwcContext->mExtDisplay;
if(externalDisplay->getExternalDisplay()) {
externalDisplay->setEDIDMode(resMode);
} else {
ALOGE("External Display not connected");
}
return NO_ERROR;
}
status_t HWComposerService::setActionSafeDimension(int w, int h) {
ALOGD_IF(HWC_SERVICE_DEBUG, "w=%d h=%d", w, h);
qhwc::ExternalDisplay *externalDisplay = mHwcContext->mExtDisplay;
if((w > MAX_ACTIONSAFE_WIDTH) && (h > MAX_ACTIONSAFE_HEIGHT)) {
ALOGE_IF(HWC_SERVICE_DEBUG,
"ActionSafe Width and Height exceeded the limit! w=%d h=%d", w, h);
return NO_ERROR;
}
if(externalDisplay->getExternalDisplay()) {
externalDisplay->setActionSafeDimension(w, h);
} else {
ALOGE("External Display not connected");
}
return NO_ERROR;
}
status_t HWComposerService::setOpenSecureStart( ) {
mHwcContext->mSecureConfig = true;
//Invalidate
hwc_procs* proc = (hwc_procs*)mHwcContext->device.reserved_proc[0];
if(!proc) {
ALOGE("%s: HWC proc not registered", __FUNCTION__);
} else {
/* Trigger redraw */
ALOGD_IF(HWC_SERVICE_DEBUG, "%s: Invalidate !!", __FUNCTION__);
proc->invalidate(proc);
}
return NO_ERROR;
}
status_t HWComposerService::setOpenSecureEnd( ) {
mHwcContext->mSecure = true;
mHwcContext->mSecureConfig = false;
//Invalidate
hwc_procs* proc = (hwc_procs*)mHwcContext->device.reserved_proc[0];
if(!proc) {
ALOGE("%s: HWC proc not registered", __FUNCTION__);
} else {
/* Trigger redraw */
ALOGD_IF(HWC_SERVICE_DEBUG, "%s: Invalidate !!", __FUNCTION__);
proc->invalidate(proc);
}
return NO_ERROR;
}
status_t HWComposerService::setCloseSecureStart( ) {
mHwcContext->mSecureConfig = true;
//Invalidate
hwc_procs* proc = (hwc_procs*)mHwcContext->device.reserved_proc[0];
if(!proc) {
ALOGE("%s: HWC proc not registered", __FUNCTION__);
} else {
/* Trigger redraw */
ALOGD_IF(HWC_SERVICE_DEBUG, "%s: Invalidate !!", __FUNCTION__);
proc->invalidate(proc);
}
return NO_ERROR;
}
status_t HWComposerService::setCloseSecureEnd( ) {
mHwcContext->mSecure = false;
mHwcContext->mSecureConfig = false;
//Invalidate
hwc_procs* proc = (hwc_procs*)mHwcContext->device.reserved_proc[0];
if(!proc) {
ALOGE("%s: HWC proc not registered", __FUNCTION__);
} else {
/* Trigger redraw */
ALOGD_IF(HWC_SERVICE_DEBUG, "%s: Invalidate !!", __FUNCTION__);
proc->invalidate(proc);
}
return NO_ERROR;
}
status_t HWComposerService::getResolutionModeCount(int *resModeCount) {
qhwc::ExternalDisplay *externalDisplay = mHwcContext->mExtDisplay;
if(externalDisplay->getExternalDisplay()) {
*resModeCount = externalDisplay->getModeCount();
} else {
ALOGE("External Display not connected");
}
ALOGD_IF(HWC_SERVICE_DEBUG, "resModeCount=%d", *resModeCount);
return NO_ERROR;
}
status_t HWComposerService::getResolutionModes(int *resModes, int count) {
qhwc::ExternalDisplay *externalDisplay = mHwcContext->mExtDisplay;
if(externalDisplay->getExternalDisplay()) {
externalDisplay->getEDIDModes(resModes);
} else {
ALOGE("External Display not connected");
}
return NO_ERROR;
}
status_t HWComposerService::getExternalDisplay(int *dispType) {
qhwc::ExternalDisplay *externalDisplay = mHwcContext->mExtDisplay;
*dispType = externalDisplay->getExternalDisplay();
ALOGD_IF(HWC_SERVICE_DEBUG, "dispType=%d", *dispType);
return NO_ERROR;
}
HWComposerService* HWComposerService::getInstance()
{
if(!sHwcService) {
sHwcService = new HWComposerService();
sp<IServiceManager> sm = defaultServiceManager();
sm->addService(String16("display.hwcservice"), sHwcService);
if(sm->checkService(String16("display.hwcservice")) != NULL)
ALOGD_IF(HWC_SERVICE_DEBUG, "adding display.hwcservice succeeded");
else
ALOGD_IF(HWC_SERVICE_DEBUG, "adding display.hwcservice failed");
}
return sHwcService;
}
void HWComposerService::setHwcContext(hwc_context_t *hwcCtx) {
ALOGD_IF(HWC_SERVICE_DEBUG, "hwcCtx=0x%x", (int)hwcCtx);
if(hwcCtx) {
mHwcContext = hwcCtx;
}
}
}

View File

@ -1,70 +1,75 @@
/*
* Copyright (c) 2012, Code Aurora Forum. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
* met:
* * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* * Redistributions in binary form must reproduce the above
* copyright notice, this list of conditions and the following
* disclaimer in the documentation and/or other materials provided
* with the distribution.
* * Neither the name of Code Aurora Forum, Inc. nor the names of its
* contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS
* BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
* BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
* WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
* OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
* IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#ifndef ANDROID_HWCOMPOSER_SERVICE_H
#define ANDROID_HWCOMPOSER_SERVICE_H
#include <utils/Errors.h>
#include <sys/types.h>
#include <cutils/log.h>
#include <binder/IServiceManager.h>
#include <ihwc.h>
#include <hwc_external.h>
namespace hwcService {
// ----------------------------------------------------------------------------
class HWComposerService : public BnHWComposer {
enum {
MAX_ACTIONSAFE_WIDTH = 10,
MAX_ACTIONSAFE_HEIGHT = MAX_ACTIONSAFE_WIDTH,
};
private:
HWComposerService();
public:
~HWComposerService();
static HWComposerService* getInstance();
virtual android::status_t getResolutionModeCount(int *modeCount);
virtual android::status_t getResolutionModes(int *EDIDModes, int count = 1);
virtual android::status_t getExternalDisplay(int *extDisp);
virtual android::status_t setHPDStatus(int enable);
virtual android::status_t setResolutionMode(int resMode);
virtual android::status_t setActionSafeDimension(int w, int h);
void setHwcContext(hwc_context_t *hwcCtx);
private:
static HWComposerService *sHwcService;
hwc_context_t *mHwcContext;
};
}; // namespace hwcService
#endif // ANDROID_HWCOMPOSER_SERVICE_H
/*
* Copyright (c) 2012, Code Aurora Forum. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
* met:
* * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* * Redistributions in binary form must reproduce the above
* copyright notice, this list of conditions and the following
* disclaimer in the documentation and/or other materials provided
* with the distribution.
* * Neither the name of Code Aurora Forum, Inc. nor the names of its
* contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS
* BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
* BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
* WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
* OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
* IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#ifndef ANDROID_HWCOMPOSER_SERVICE_H
#define ANDROID_HWCOMPOSER_SERVICE_H
#include <utils/Errors.h>
#include <sys/types.h>
#include <cutils/log.h>
#include <binder/IServiceManager.h>
#include <ihwc.h>
#include <hwc_external.h>
namespace hwcService {
// ----------------------------------------------------------------------------
class HWComposerService : public BnHWComposer {
enum {
MAX_ACTIONSAFE_WIDTH = 10,
MAX_ACTIONSAFE_HEIGHT = MAX_ACTIONSAFE_WIDTH,
};
private:
HWComposerService();
public:
~HWComposerService();
static HWComposerService* getInstance();
virtual android::status_t getResolutionModeCount(int *modeCount);
virtual android::status_t getResolutionModes(int *EDIDModes, int count = 1);
virtual android::status_t getExternalDisplay(int *extDisp);
virtual android::status_t setHPDStatus(int enable);
virtual android::status_t setResolutionMode(int resMode);
virtual android::status_t setActionSafeDimension(int w, int h);
// Secure Intent Hooks
virtual android::status_t setOpenSecureStart();
virtual android::status_t setOpenSecureEnd();
virtual android::status_t setCloseSecureStart();
virtual android::status_t setCloseSecureEnd();
void setHwcContext(hwc_context_t *hwcCtx);
private:
static HWComposerService *sHwcService;
hwc_context_t *mHwcContext;
};
}; // namespace hwcService
#endif // ANDROID_HWCOMPOSER_SERVICE_H

View File

@ -78,12 +78,10 @@ bool UIMirrorOverlay::configure(hwc_context_t *ctx, hwc_layer_list_t *list)
}
ovutils::eMdpFlags mdpFlags = ovutils::OV_MDP_FLAGS_NONE;
/* - TODO: Secure content
if (hnd->flags & private_handle_t::PRIV_FLAGS_SECURE_BUFFER) {
ovutils::setMdpFlags(mdpFlags,
ovutils::OV_MDP_SECURE_OVERLAY_SESSION);
}
*/
if (ctx->mSecure == true) {
ovutils::setMdpFlags(mdpFlags,
ovutils::OV_MDP_SECURE_OVERLAY_SESSION);
}
ovutils::PipeArgs parg(mdpFlags,
info,

View File

@ -173,6 +173,11 @@ struct hwc_context_t {
//Vsync
struct vsync_state vstate;
// flag that indicate secure session status
bool mSecure;
// flag that indicate whether secure/desecure session in progress
bool mSecureConfig;
};
#endif //HWC_UTILS_H

View File

@ -72,6 +72,40 @@ public:
result = reply.readInt32();
return result;
}
virtual status_t setOpenSecureStart() {
Parcel data, reply;
data.writeInterfaceToken(IHWComposer::getInterfaceDescriptor());
status_t result = remote()->transact(SET_OPEN_SECURE_START,
data, &reply);
result = reply.readInt32();
return result;
}
virtual status_t setOpenSecureEnd() {
Parcel data, reply;
data.writeInterfaceToken(IHWComposer::getInterfaceDescriptor());
status_t result = remote()->transact(SET_OPEN_SECURE_END,
data, &reply);
result = reply.readInt32();
return result;
}
virtual status_t setCloseSecureStart() {
Parcel data, reply;
data.writeInterfaceToken(IHWComposer::getInterfaceDescriptor());
status_t result = remote()->transact(SET_CLOSE_SECURE_START,
data, &reply);
result = reply.readInt32();
return result;
}
virtual status_t setCloseSecureEnd() {
Parcel data, reply;
data.writeInterfaceToken(IHWComposer::getInterfaceDescriptor());
status_t result = remote()->transact(SET_CLOSE_SECURE_END,
data, &reply);
result = reply.readInt32();
return result;
}
virtual status_t getExternalDisplay(int *extDispType) {
Parcel data, reply;
@ -138,6 +172,30 @@ status_t BnHWComposer::onTransact(
reply->writeInt32(res);
return NO_ERROR;
} break;
case SET_OPEN_SECURE_START: {
CHECK_INTERFACE(IHWComposer, data, reply);
status_t res = setOpenSecureStart();
reply->writeInt32(res);
return NO_ERROR;
}break;
case SET_OPEN_SECURE_END: {
CHECK_INTERFACE(IHWComposer, data, reply);
status_t res = setOpenSecureEnd();
reply->writeInt32(res);
return NO_ERROR;
}break;
case SET_CLOSE_SECURE_START: {
CHECK_INTERFACE(IHWComposer, data, reply);
status_t res = setCloseSecureStart();
reply->writeInt32(res);
return NO_ERROR;
}break;
case SET_CLOSE_SECURE_END: {
CHECK_INTERFACE(IHWComposer, data, reply);
status_t res = setCloseSecureEnd();
reply->writeInt32(res);
return NO_ERROR;
}break;
case GET_EXT_DISPLAY_TYPE: {
CHECK_INTERFACE(IHWComposer, data, reply);
int extDispType;

View File

@ -36,6 +36,10 @@ enum {
SET_EXT_HPD_ENABLE = 0,
SET_EXT_DISPLAY_RESOLUTION_MODE,
SET_EXT_DISPLAY_ACTIONSAFE_DIMENSIONS,
SET_OPEN_SECURE_START,
SET_OPEN_SECURE_END,
SET_CLOSE_SECURE_START,
SET_CLOSE_SECURE_END,
GET_EXT_DISPLAY_TYPE,
GET_EXT_DISPLAY_RESOLUTION_MODES,
GET_EXT_DISPLAY_RESOLUTION_MODE_COUNT,
@ -54,6 +58,11 @@ public:
virtual android::status_t setHPDStatus(int enable) = 0;
virtual android::status_t setResolutionMode(int resMode) = 0;
virtual android::status_t setActionSafeDimension(int w, int h) = 0;
// Secure Intent Hooks
virtual android::status_t setOpenSecureStart() = 0;
virtual android::status_t setOpenSecureEnd() = 0;
virtual android::status_t setCloseSecureStart() = 0;
virtual android::status_t setCloseSecureEnd() = 0;
};
// ----------------------------------------------------------------------------