Make system read only show no matter what on first TWRP boot

Initial value for tw_mount_system_ro is now 2. If the value of
tw_mount_system_ro is 2 during boot, then we will show the system
read only prompt and ignore the value from the lifetime writes
check.

Note: Changed the value of FILE_VERSION which will trigger the
data manager to throw out previous settings and start with default
values so that existing TWRP users will get the prompt at least
once.

Change-Id: I447767b64617f855156a19a5dc15c4ece6dff7b8
This commit is contained in:
Ethan Yonker
2015-07-14 16:53:43 +02:00
committed by Dees Troy
parent ec009e8cd4
commit 961d20e09c
5 changed files with 13 additions and 14 deletions
+2 -2
View File
@@ -65,7 +65,7 @@ extern "C"
void gui_notifyVarChange(const char *name, const char* value);
}
#define FILE_VERSION 0x00010001
#define FILE_VERSION 0x00010010
using namespace std;
@@ -881,7 +881,7 @@ void DataManager::SetDefaultValues()
mConstValues.insert(make_pair("tw_has_mtp", "0"));
mConstValues.insert(make_pair("tw_mtp_enabled", "0"));
#endif
mValues.insert(make_pair("tw_mount_system_ro", make_pair("1", 1)));
mValues.insert(make_pair("tw_mount_system_ro", make_pair("2", 1)));
mValues.insert(make_pair("tw_never_show_system_ro_page", make_pair("0", 1)));
pthread_mutex_unlock(&m_valuesLock);