Improver new theme engine compatibility with low mem legacy device

base on vanir's commit : https://github.com/VanirAOSP/frameworks_native/commit/00ee07635254a65f8a271d80f2fe96a46e14c8f3