OSDN Git Service

Check ro.treble.enabled for legacy devices
authorDaichi Hirono <hirono@google.com>
Tue, 29 Oct 2019 08:33:01 +0000 (17:33 +0900)
committerJiyong Park <jiyong@google.com>
Tue, 29 Oct 2019 09:57:18 +0000 (18:57 +0900)
If ro.treble.enabled is "false", the device should use legacy config.

Bug: 143495511
Test: None
Change-Id: I913df5b9feedffa6474527a3ca17d4852e631cb5

modules/environment.cc

index 198e1e9..db9c501 100644 (file)
@@ -21,8 +21,9 @@ namespace android {
 namespace linkerconfig {
 namespace modules {
 bool IsLegacyDevice() {
-  return !Variables::GetValue("ro.vndk.version").has_value() &&
-         !Variables::GetValue("ro.vndk.lite").has_value();
+  return (!Variables::GetValue("ro.vndk.version").has_value() &&
+          !Variables::GetValue("ro.vndk.lite").has_value()) ||
+         Variables::GetValue("ro.treble.enabled") == "false";
 }
 
 bool IsVndkLiteDevice() {