summaryrefslogtreecommitdiff
path: root/libqdutils/display_config.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'libqdutils/display_config.cpp')
-rw-r--r--libqdutils/display_config.cpp38
1 files changed, 37 insertions, 1 deletions
diff --git a/libqdutils/display_config.cpp b/libqdutils/display_config.cpp
index 8f27200d..0697c88c 100644
--- a/libqdutils/display_config.cpp
+++ b/libqdutils/display_config.cpp
@@ -1,5 +1,5 @@
/*
-* Copyright (c) 2013-2014, 2016, 2018-2020, The Linux Foundation. All rights reserved.
+* Copyright (c) 2013-2014, 2016, 2018-2021, The Linux Foundation. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
@@ -393,3 +393,39 @@ extern "C" int waitForComposerInit() {
return !status;
}
+
+extern "C" int setStandByMode(int mode, int is_twm = false) {
+ status_t err = (status_t) FAILED_TRANSACTION;
+ sp<IQService> binder = getBinder();
+ Parcel inParcel, outParcel;
+
+ if(binder != NULL) {
+ inParcel.writeInt32(mode);
+ inParcel.writeInt32(is_twm);
+ err = binder->dispatch(IQService::SET_STAND_BY_MODE,
+ &inParcel, &outParcel);
+ if(err) {
+ ALOGE("%s() failed with err %d", __FUNCTION__, err);
+ }
+ }
+ return err;
+}
+
+extern "C" int getPanelResolution(int *width, int *height) {
+ status_t err = (status_t) FAILED_TRANSACTION;
+ sp<IQService> binder = getBinder();
+ Parcel inParcel, outParcel;
+
+ if(binder != NULL) {
+ err = binder->dispatch(IQService::GET_PANEL_RESOLUTION,
+ &inParcel, &outParcel);
+ if(err != 0) {
+ ALOGE_IF(getBinder(), "%s() failed with err %d", __FUNCTION__, err);
+ } else {
+ *width = outParcel.readInt32();
+ *height = outParcel.readInt32();
+ }
+ }
+
+ return err;
+}