diff options
author | Namit Solanki <nsolanki@codeaurora.org> | 2016-11-02 15:53:43 +0530 |
---|---|---|
committer | Gerrit - the friendly Code Review server <code-review@localhost> | 2016-12-13 03:24:03 -0800 |
commit | 03d567945ceb596b65b6482c3cc5e358b39332a9 (patch) | |
tree | f38b8ed02393017657648f3b2ae858cbd4ec30a0 | |
parent | 766ae8675eea85a392bbe00f3f912c8ef3087873 (diff) | |
download | display-03d567945ceb596b65b6482c3cc5e358b39332a9.tar.gz |
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
-rw-r--r-- | libqdutils/display_config.cpp | 8 | ||||
-rw-r--r-- | libqservice/IQService.cpp | 3 |
2 files changed, 6 insertions, 5 deletions
diff --git a/libqdutils/display_config.cpp b/libqdutils/display_config.cpp index c1335b1d..ceb11b49 100644 --- a/libqdutils/display_config.cpp +++ b/libqdutils/display_config.cpp @@ -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); diff --git a/libqservice/IQService.cpp b/libqservice/IQService.cpp index e1c5219c..2d0cbfbd 100644 --- a/libqservice/IQService.cpp +++ b/libqservice/IQService.cpp @@ -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); |