hardware/qcom/display: Add events for secure session setup
Change-Id: I0c0b5b7ae70d7ea8b341285479cd92750e1f6274 Conflicts: libgralloc/framebuffer.cpp libqcomui/qcom_ui.h
This commit is contained in:
parent
5875b20445
commit
1e2be7b5b0
@ -405,6 +405,54 @@ static int fb_orientationChanged(struct framebuffer_device_t* dev, int orientati
|
||||
pthread_mutex_unlock(&m->overlayLock);
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int handle_open_secure_start(private_module_t* m) {
|
||||
pthread_mutex_lock(&m->overlayLock);
|
||||
m->hdmiMirroringState = HDMI_NO_MIRRORING;
|
||||
m->secureVideoOverlay = true;
|
||||
closeHDMIChannel(m);
|
||||
pthread_mutex_unlock(&m->overlayLock);
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int handle_open_secure_end(private_module_t* m) {
|
||||
pthread_mutex_lock(&m->overlayLock);
|
||||
if (m->enableHDMIOutput) {
|
||||
if (m->trueMirrorSupport) {
|
||||
m->hdmiMirroringState = HDMI_UI_MIRRORING;
|
||||
} else if(!m->videoOverlay) {
|
||||
m->hdmiMirroringState = HDMI_UI_MIRRORING;
|
||||
}
|
||||
m->hdmiStateChanged = true;
|
||||
pthread_cond_signal(&(m->overlayPost));
|
||||
}
|
||||
pthread_mutex_unlock(&m->overlayLock);
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int handle_close_secure_start(private_module_t* m) {
|
||||
pthread_mutex_lock(&m->overlayLock);
|
||||
m->hdmiMirroringState = HDMI_NO_MIRRORING;
|
||||
m->secureVideoOverlay = false;
|
||||
closeHDMIChannel(m);
|
||||
pthread_mutex_unlock(&m->overlayLock);
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int handle_close_secure_end(private_module_t* m) {
|
||||
pthread_mutex_lock(&m->overlayLock);
|
||||
if (m->enableHDMIOutput) {
|
||||
if (m->trueMirrorSupport) {
|
||||
m->hdmiMirroringState = HDMI_UI_MIRRORING;
|
||||
} else if(!m->videoOverlay) {
|
||||
m->hdmiMirroringState = HDMI_UI_MIRRORING;
|
||||
}
|
||||
m->hdmiStateChanged = true;
|
||||
pthread_cond_signal(&(m->overlayPost));
|
||||
}
|
||||
pthread_mutex_unlock(&m->overlayLock);
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
//Wait until framebuffer content is displayed.
|
||||
@ -450,6 +498,18 @@ static int fb_perform(struct framebuffer_device_t* dev, int event, int value)
|
||||
case EVENT_ORIENTATION_CHANGE:
|
||||
fb_orientationChanged(dev, value);
|
||||
break;
|
||||
case EVENT_OPEN_SECURE_START:
|
||||
handle_open_secure_start(m);
|
||||
break;
|
||||
case EVENT_OPEN_SECURE_END:
|
||||
handle_open_secure_end(m);
|
||||
break;
|
||||
case EVENT_CLOSE_SECURE_START:
|
||||
handle_close_secure_start(m);
|
||||
break;
|
||||
case EVENT_CLOSE_SECURE_END:
|
||||
handle_close_secure_end(m);
|
||||
break;
|
||||
#endif
|
||||
case EVENT_RESET_POSTBUFFER:
|
||||
fb_resetBufferPostStatus(dev);
|
||||
|
Loading…
Reference in New Issue
Block a user