sdm: add check for disabling external animation
In current design the flag passed from clients is used to
disable external animation. Refine this flag to two parts,
one is to indicate whether animation is present, another
is to check the system property and disable external
animation. So other functions can know the presence of
animation layers if necessary.
CRs-fixed: 1019601
Change-Id: Ib6ffb7a28d6935b86bc93abc82049b77b3ddcd08
diff --git a/sdm/libs/utils/debug.cpp b/sdm/libs/utils/debug.cpp
index 62a8b70..cf60a37 100644
--- a/sdm/libs/utils/debug.cpp
+++ b/sdm/libs/utils/debug.cpp
@@ -154,6 +154,13 @@
return (value == 1);
}
+bool Debug::IsExtAnimDisabled() {
+ int value = 0;
+ debug_.debug_handler_->GetProperty("sys.disable_ext_animation", &value);
+
+ return (value == 1);
+}
+
bool Debug::GetProperty(const char* property_name, char* value) {
if (debug_.debug_handler_->GetProperty(property_name, value) != kErrorNone) {
return false;