theme: move TW_THEME_VERSION to variables.h

Automatically add the current theme version to the
splash and ui xmls during the build

Change-Id: I52f8cb41fabe34a8849ecc54ece3c0fb645dcd74
(cherry picked from commit a1317fc7bbba9b26bb65d207bd48f7f79b7e98fd)
diff --git a/Android.mk b/Android.mk
index 2f2520a..1608e44 100755
--- a/Android.mk
+++ b/Android.mk
@@ -557,6 +557,12 @@
 
 LOCAL_REQUIRED_MODULES += $(TWRP_REQUIRED_MODULES)
 
+TW_THEME_VERSION := $(shell echo "`grep TW_THEME_VERSION bootable/recovery/variables.h | cut -d ' ' -f 3`")
+
+LOCAL_POST_INSTALL_CMD += \
+    sed -i "s/{themeversion}/$(TW_THEME_VERSION)/" $(TARGET_RECOVERY_ROOT_OUT)/twres/splash.xml; \
+    sed -i "s/{themeversion}/$(TW_THEME_VERSION)/" $(TARGET_RECOVERY_ROOT_OUT)/twres/ui.xml;
+
 include $(BUILD_EXECUTABLE)
 
 # Symlink for file_contexts