hwc/qdutils/qservice: Add dynamic idle timeout support

Add support for dynamically setting idle timeout values.
Move default idle timeout setting to IdleInvalidator.
Fix static var naming, handle errors from IdleInvalidator in hwc.
Property debug.hwc.idletime is removed with this change.

Example:
1) Set idle timeout to 100ms
adb shell service call display.qservice 16 i32 100
16 is the code for SET_IDLE_TIMEOUT, 100 is time in ms

2) Disable idle timeout
adb shell service call display.qservice 16 i32 0

Change-Id: I60e15a3ac869b4e9f4015b3be50a35c90d00d404
diff --git a/libhwcomposer/hwc_qclient.cpp b/libhwcomposer/hwc_qclient.cpp
index 8490058..6bde3d2 100644
--- a/libhwcomposer/hwc_qclient.cpp
+++ b/libhwcomposer/hwc_qclient.cpp
@@ -245,6 +245,13 @@
     }
 }
 
+static void setIdleTimeout(hwc_context_t* ctx, const Parcel* inParcel) {
+    uint32_t timeout = (uint32_t)inParcel->readInt32();
+    ALOGD("%s :%u ms", __FUNCTION__, timeout);
+    Locker::Autolock _sl(ctx->mDrawLock);
+    MDPComp::setIdleTimeout(timeout);
+}
+
 status_t QClient::notifyCallback(uint32_t command, const Parcel* inParcel,
         Parcel* outParcel) {
     status_t ret = NO_ERROR;
@@ -290,6 +297,9 @@
         case IQService::DYNAMIC_DEBUG:
             toggleDynamicDebug(mHwcContext, inParcel);
             break;
+        case IQService::SET_IDLE_TIMEOUT:
+            setIdleTimeout(mHwcContext, inParcel);
+            break;
         default:
             ret = NO_ERROR;
     }