diff options
author | Elliott Hughes <enh@google.com> | 2015-02-10 16:20:53 -0800 |
---|---|---|
committer | Elliott Hughes <enh@google.com> | 2015-02-10 16:20:53 -0800 |
commit | dcbf4fc571236bf5aa5286294b3c727be725db70 (patch) | |
tree | 05f42afb7d801d2ff3c6b7a3ac0e05949f710b69 /recovery.cpp | |
parent | ec5c1c1e291062576925b80b532d36df118103f5 (diff) | |
parent | 35efcd275f90f5ffea371bb228a14b36c50e61d3 (diff) | |
download | bootable_recovery-dcbf4fc571236bf5aa5286294b3c727be725db70.zip bootable_recovery-dcbf4fc571236bf5aa5286294b3c727be725db70.tar.gz bootable_recovery-dcbf4fc571236bf5aa5286294b3c727be725db70.tar.bz2 |
resolved conflicts for merge of 35efcd27 to lmp-mr1-dev-plus-aosp
Change-Id: I6f2ea07df2ab80a44301d9c3a2a8841c40a46002
Diffstat (limited to 'recovery.cpp')
-rw-r--r-- | recovery.cpp | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/recovery.cpp b/recovery.cpp index 1d22b24..e42474e 100644 --- a/recovery.cpp +++ b/recovery.cpp @@ -169,6 +169,11 @@ fopen_path(const char *path, const char *mode) { return fp; } +bool is_ro_debuggable() { + char value[PROPERTY_VALUE_MAX+1]; + return (property_get("ro.debuggable", value, NULL) == 1 && value[0] == '1'); +} + static void redirect_stdio(const char* filename) { // If these fail, there's not really anywhere to complain... freopen(filename, "a", stdout); setbuf(stdout, NULL); @@ -1111,9 +1116,7 @@ main(int argc, char **argv) { // If this is an eng or userdebug build, then automatically // turn the text display on if the script fails so the error // message is visible. - char buffer[PROPERTY_VALUE_MAX+1]; - property_get("ro.build.fingerprint", buffer, ""); - if (strstr(buffer, ":userdebug/") || strstr(buffer, ":eng/")) { + if (is_ro_debuggable()) { ui->ShowText(true); } } |