From 1308d53e248d0c9e5ae416ddff5f07b290e4711e Mon Sep 17 00:00:00 2001 From: Ethan Yonker Date: Thu, 14 Jan 2016 22:21:49 -0600 Subject: Add theme version checking Add a themeversion value to the ui.xml details section. Check this value against a define during early theme loading. If we are loading a custom theme, then reject the custom theme if the version does not match (or not defined) and load the stock theme. If it is the stock theme, show a warning but continue loading. Also fix an issue with changing overlays. Not sure how it ever worked before, but it works now. TLDR: Use the stock theme if the custom theme version does not match. Change-Id: I0277cbe035cbec7e16b6327500762dadf9c1c5c8 --- gui/theme/common/languages/en.xml | 1 + gui/theme/landscape_hdpi/ui.xml | 1 + gui/theme/landscape_mdpi/ui.xml | 1 + gui/theme/portrait_hdpi/ui.xml | 1 + gui/theme/portrait_mdpi/ui.xml | 1 + gui/theme/watch_mdpi/ui.xml | 1 + 6 files changed, 6 insertions(+) (limited to 'gui/theme') diff --git a/gui/theme/common/languages/en.xml b/gui/theme/common/languages/en.xml index c77d3a2e1..47c7e76cc 100755 --- a/gui/theme/common/languages/en.xml +++ b/gui/theme/common/languages/en.xml @@ -667,5 +667,6 @@ This device does not have a real SD Card! Aborting! Cancelling ADB sideload... Error changing file system. + Custom theme version does not match TWRP version. Using stock theme. diff --git a/gui/theme/landscape_hdpi/ui.xml b/gui/theme/landscape_hdpi/ui.xml index c3bb96fd4..73ccdf147 100644 --- a/gui/theme/landscape_hdpi/ui.xml +++ b/gui/theme/landscape_hdpi/ui.xml @@ -6,6 +6,7 @@ Backup Naowz Default basic theme preview.jpg + 1 diff --git a/gui/theme/landscape_mdpi/ui.xml b/gui/theme/landscape_mdpi/ui.xml index ae4068394..293742ede 100644 --- a/gui/theme/landscape_mdpi/ui.xml +++ b/gui/theme/landscape_mdpi/ui.xml @@ -6,6 +6,7 @@ Backup Naowz Default basic theme preview.jpg + 1 diff --git a/gui/theme/portrait_hdpi/ui.xml b/gui/theme/portrait_hdpi/ui.xml index cb92b9fac..917e93bb5 100644 --- a/gui/theme/portrait_hdpi/ui.xml +++ b/gui/theme/portrait_hdpi/ui.xml @@ -6,6 +6,7 @@ Backup Naowz Default basic theme preview.jpg + 1 diff --git a/gui/theme/portrait_mdpi/ui.xml b/gui/theme/portrait_mdpi/ui.xml index 450860eef..19f199e88 100644 --- a/gui/theme/portrait_mdpi/ui.xml +++ b/gui/theme/portrait_mdpi/ui.xml @@ -6,6 +6,7 @@ Backup Naowz Default basic theme preview.jpg + 1 diff --git a/gui/theme/watch_mdpi/ui.xml b/gui/theme/watch_mdpi/ui.xml index 4e4cc1fcb..163a82b1c 100644 --- a/gui/theme/watch_mdpi/ui.xml +++ b/gui/theme/watch_mdpi/ui.xml @@ -7,6 +7,7 @@ Backup Naowz Default basic theme preview.jpg + 1 -- cgit v1.2.3