display: Add HDMI support in APIs exposed by display.
- Remove hardcoded primary display from getActiveConfig() and getDisplayAttributes() for video decoder to query the secondary display resolution. - Add permission for Video decoder UID to call these APIs. Change-Id: I1ec1e19dda76f2e0e085c52450449bdc13a739fa CRs-Fixed: 1100704
This commit is contained in:
committed by
Gerrit - the friendly Code Review server
parent
766ae8675e
commit
03d567945c
@@ -198,12 +198,12 @@ int getConfigCount(int /*dpy*/) {
|
||||
return numConfigs;
|
||||
}
|
||||
|
||||
int getActiveConfig(int /*dpy*/) {
|
||||
int getActiveConfig(int dpy) {
|
||||
int configIndex = -1;
|
||||
sp<IQService> binder = getBinder();
|
||||
if(binder != NULL) {
|
||||
Parcel inParcel, outParcel;
|
||||
inParcel.writeInt32(DISPLAY_PRIMARY);
|
||||
inParcel.writeInt32(dpy);
|
||||
status_t err = binder->dispatch(IQService::GET_ACTIVE_CONFIG,
|
||||
&inParcel, &outParcel);
|
||||
if(!err) {
|
||||
@@ -236,13 +236,13 @@ int setActiveConfig(int configIndex, int /*dpy*/) {
|
||||
return err;
|
||||
}
|
||||
|
||||
DisplayAttributes getDisplayAttributes(int configIndex, int /*dpy*/) {
|
||||
DisplayAttributes getDisplayAttributes(int configIndex, int dpy) {
|
||||
DisplayAttributes dpyattr = {};
|
||||
sp<IQService> binder = getBinder();
|
||||
if(binder != NULL) {
|
||||
Parcel inParcel, outParcel;
|
||||
inParcel.writeInt32(configIndex);
|
||||
inParcel.writeInt32(DISPLAY_PRIMARY);
|
||||
inParcel.writeInt32(dpy);
|
||||
status_t err = binder->dispatch(
|
||||
IQService::GET_DISPLAY_ATTRIBUTES_FOR_CONFIG, &inParcel,
|
||||
&outParcel);
|
||||
|
||||
@@ -93,7 +93,8 @@ status_t BnQService::onTransact(
|
||||
callerUid == AID_ROOT ||
|
||||
callerUid == AID_CAMERASERVER ||
|
||||
callerUid == AID_AUDIO ||
|
||||
callerUid == AID_SYSTEM);
|
||||
callerUid == AID_SYSTEM ||
|
||||
callerUid == AID_MEDIA_CODEC);
|
||||
|
||||
if (code == CONNECT_HWC_CLIENT) {
|
||||
CHECK_INTERFACE(IQService, data, reply);
|
||||
|
||||
Reference in New Issue
Block a user