sdm: comply with treble guidelines

Modify the property names and use macros in place of them

CRs-Fixed: 2206249
Change-Id: I5ae790ca62a258b0d7c14931e0132727feed48a3
diff --git a/sdm/libs/hwc2/cpuhint.cpp b/sdm/libs/hwc2/cpuhint.cpp
index 551fa24..ca88ead 100644
--- a/sdm/libs/hwc2/cpuhint.cpp
+++ b/sdm/libs/hwc2/cpuhint.cpp
@@ -46,7 +46,7 @@
   }
 
   int pre_enable_window = -1;
-  debug_handler->GetProperty("sdm.perf_hint_window", &pre_enable_window);
+  debug_handler->GetProperty(PERF_HINT_WINDOW_PROP, &pre_enable_window);
   if (pre_enable_window <= 0) {
     DLOGI("Invalid CPU Hint Pre-enable Window %d", pre_enable_window);
     return kErrorNotSupported;
diff --git a/sdm/libs/hwc2/hwc_debugger.cpp b/sdm/libs/hwc2/hwc_debugger.cpp
index 39416c5..e92f170 100644
--- a/sdm/libs/hwc2/hwc_debugger.cpp
+++ b/sdm/libs/hwc2/hwc_debugger.cpp
@@ -29,6 +29,7 @@
 
 #include <utils/constants.h>
 #include <cutils/properties.h>
+#include <utils/debug.h>
 
 #include "hwc_debugger.h"
 
@@ -211,7 +212,7 @@
 
 int  HWCDebugHandler::GetIdleTimeoutMs() {
   int value = IDLE_TIMEOUT_DEFAULT_MS;
-  debug_handler_.GetProperty("sdm.idle_time", &value);
+  debug_handler_.GetProperty(IDLE_TIME_PROP, &value);
 
   return value;
 }
diff --git a/sdm/libs/hwc2/hwc_display.cpp b/sdm/libs/hwc2/hwc_display.cpp
index 6ae9532..695f93f 100644
--- a/sdm/libs/hwc2/hwc_display.cpp
+++ b/sdm/libs/hwc2/hwc_display.cpp
@@ -383,7 +383,7 @@
   client_target_ = new HWCLayer(id_, buffer_allocator_);
 
   int blit_enabled = 0;
-  HWCDebugHandler::Get()->GetProperty("persist.hwc.blit.comp", &blit_enabled);
+  HWCDebugHandler::Get()->GetProperty(DISABLE_BLIT_COMPOSITION_PROP, &blit_enabled);
   if (needs_blit_ && blit_enabled) {
     // TODO(user): Add blit engine when needed
   }
@@ -1534,7 +1534,7 @@
 
   // By default UBWC is enabled and below property is global enable/disable for all
   // buffers allocated through gralloc , including framebuffer targets.
-  HWCDebugHandler::Get()->GetProperty("debug.gralloc.gfx_ubwc_disable", &ubwc_disabled);
+  HWCDebugHandler::Get()->GetProperty(DISABLE_UBWC_PROP, &ubwc_disabled);
   if (!ubwc_disabled) {
     usage |= GRALLOC_USAGE_PRIVATE_ALLOC_UBWC;
     flags |= private_handle_t::PRIV_FLAGS_UBWC_ALIGNED;
diff --git a/sdm/libs/hwc2/hwc_display_external.cpp b/sdm/libs/hwc2/hwc_display_external.cpp
index 8e253de..998bedb 100644
--- a/sdm/libs/hwc2/hwc_display_external.cpp
+++ b/sdm/libs/hwc2/hwc_display_external.cpp
@@ -77,7 +77,7 @@
       external_height = primary_height;
     } else {
       int downscale_enabled = 0;
-      HWCDebugHandler::Get()->GetProperty("sdm.debug.downscale_external", &downscale_enabled);
+      HWCDebugHandler::Get()->GetProperty(ENABLE_EXTERNAL_DOWNSCALE_PROP, &downscale_enabled);
       if (downscale_enabled) {
         GetDownscaleResolution(primary_width, primary_height, &external_width, &external_height);
       }
@@ -267,8 +267,8 @@
 void HWCDisplayExternal::GetUnderScanConfig() {
   if (!display_intf_->IsUnderscanSupported()) {
     // Read user defined underscan width and height
-    HWCDebugHandler::Get()->GetProperty("sdm.external_action_safe_width", &underscan_width_);
-    HWCDebugHandler::Get()->GetProperty("sdm.external_action_safe_height", &underscan_height_);
+    HWCDebugHandler::Get()->GetProperty(EXTERNAL_ACTION_SAFE_WIDTH_PROP, &underscan_width_);
+    HWCDebugHandler::Get()->GetProperty(EXTERNAL_ACTION_SAFE_HEIGHT_PROP, &underscan_height_);
   }
 }
 
diff --git a/sdm/libs/hwc2/hwc_display_primary.cpp b/sdm/libs/hwc2/hwc_display_primary.cpp
index 8b98958..5b37298 100644
--- a/sdm/libs/hwc2/hwc_display_primary.cpp
+++ b/sdm/libs/hwc2/hwc_display_primary.cpp
@@ -62,8 +62,8 @@
 
   hwc_display_primary->GetMixerResolution(&primary_width, &primary_height);
   int width = 0, height = 0;
-  HWCDebugHandler::Get()->GetProperty("sdm.fb_size_width", &width);
-  HWCDebugHandler::Get()->GetProperty("sdm.fb_size_height", &height);
+  HWCDebugHandler::Get()->GetProperty(FB_WIDTH_PROP, &width);
+  HWCDebugHandler::Get()->GetProperty(FB_HEIGHT_PROP, &height);
   if (width > 0 && height > 0) {
     primary_width = UINT32(width);
     primary_height = UINT32(height);
@@ -102,7 +102,7 @@
 
   use_metadata_refresh_rate_ = true;
   int disable_metadata_dynfps = 0;
-  HWCDebugHandler::Get()->GetProperty("persist.metadata_dynfps.disable", &disable_metadata_dynfps);
+  HWCDebugHandler::Get()->GetProperty(DISABLE_METADATA_DYNAMIC_FPS_PROP, &disable_metadata_dynfps);
   if (disable_metadata_dynfps) {
     use_metadata_refresh_rate_ = false;
   }
@@ -362,7 +362,7 @@
 void HWCDisplayPrimary::SetMetaDataRefreshRateFlag(bool enable) {
   int disable_metadata_dynfps = 0;
 
-  HWCDebugHandler::Get()->GetProperty("persist.metadata_dynfps.disable", &disable_metadata_dynfps);
+  HWCDebugHandler::Get()->GetProperty(DISABLE_METADATA_DYNAMIC_FPS_PROP, &disable_metadata_dynfps);
   if (disable_metadata_dynfps) {
     return;
   }
diff --git a/sdm/libs/hwc2/hwc_session.cpp b/sdm/libs/hwc2/hwc_session.cpp
index ca04d40..ed34b6c 100644
--- a/sdm/libs/hwc2/hwc_session.cpp
+++ b/sdm/libs/hwc2/hwc_session.cpp
@@ -300,7 +300,7 @@
 
   int value = 0;
   bool disable_skip_validate = false;
-  if (Debug::Get()->GetProperty("sdm.debug.disable_skip_validate", &value) == kErrorNone) {
+  if (Debug::Get()->GetProperty(DISABLE_SKIP_VALIDATE_PROP, &value) == kErrorNone) {
     disable_skip_validate = (value == 1);
   }
   uint32_t count = 1 + (disable_skip_validate ? 0 : 1);