Remove dependency on persist.hal.binderization.

Test: Manual use of Camera, Movies, Photos and YouTube apps.

Test: With CtsMediaTestCases.apk installed,
adb shell am instrument -e size small -w
'android.media.cts/android.support.test.runner.AndroidJUnitRunner'

Bug: 34274385
Change-Id: I5251fea337f33460d1f0db174cedc465822f2a47
diff --git a/cmds/stagefright/stagefright.cpp b/cmds/stagefright/stagefright.cpp
index 4d8dd3c..80aad2f 100644
--- a/cmds/stagefright/stagefright.cpp
+++ b/cmds/stagefright/stagefright.cpp
@@ -908,9 +908,7 @@
 
     if (listComponents) {
         sp<IOMX> omx;
-        int32_t trebleOmx = property_get_int32("persist.media.treble_omx", -1);
-        if ((trebleOmx == 1) || ((trebleOmx == -1) &&
-                property_get_bool("persist.hal.binderization", 0))) {
+        if (property_get_bool("persist.media.treble_omx", true)) {
             using namespace ::android::hardware::media::omx::V1_0;
             sp<IOmx> tOmx = IOmx::getService();
 
diff --git a/media/libmediaplayerservice/MediaPlayerService.cpp b/media/libmediaplayerservice/MediaPlayerService.cpp
index f3fc924..b082654 100644
--- a/media/libmediaplayerservice/MediaPlayerService.cpp
+++ b/media/libmediaplayerservice/MediaPlayerService.cpp
@@ -736,9 +736,7 @@
     mExtractorDeathListener = new ServiceDeathNotifier(binder, p, MEDIAEXTRACTOR_PROCESS_DEATH);
     binder->linkToDeath(mExtractorDeathListener);
 
-    int32_t trebleOmx = property_get_int32("persist.media.treble_omx", -1);
-    if ((trebleOmx == 1) || ((trebleOmx == -1) &&
-            property_get_bool("persist.hal.binderization", 0))) {
+    if (property_get_bool("persist.media.treble_omx", true)) {
         // Treble IOmx
         sp<IOmx> omx = IOmx::getService();
         if (omx == nullptr) {
diff --git a/media/libmediaplayerservice/MediaRecorderClient.cpp b/media/libmediaplayerservice/MediaRecorderClient.cpp
index 638eec3..6400481 100644
--- a/media/libmediaplayerservice/MediaRecorderClient.cpp
+++ b/media/libmediaplayerservice/MediaRecorderClient.cpp
@@ -450,9 +450,7 @@
     }
     sCameraChecked = true;
 
-    int32_t trebleOmx = property_get_int32("persist.media.treble_omx", -1);
-    if ((trebleOmx == 1) || ((trebleOmx == -1) &&
-            property_get_bool("persist.hal.binderization", 0))) {
+    if (property_get_bool("persist.media.treble_omx", true)) {
         // Treble IOmx
         sp<IOmx> omx = IOmx::getService();
         if (omx == nullptr) {
diff --git a/media/libstagefright/OMXClient.cpp b/media/libstagefright/OMXClient.cpp
index 1706221..02d275b 100644
--- a/media/libstagefright/OMXClient.cpp
+++ b/media/libstagefright/OMXClient.cpp
@@ -38,9 +38,7 @@
 }
 
 status_t OMXClient::connect(bool* trebleFlag) {
-    int32_t trebleOmx = property_get_int32("persist.media.treble_omx", -1);
-    if ((trebleOmx == 1) || ((trebleOmx == -1) &&
-            property_get_bool("persist.hal.binderization", 0))) {
+    if (property_get_bool("persist.media.treble_omx", true)) {
         if (trebleFlag != nullptr) {
             *trebleFlag = true;
         }
diff --git a/media/libstagefright/omx/tests/OMXHarness.cpp b/media/libstagefright/omx/tests/OMXHarness.cpp
index cbca461..fcc44d8 100644
--- a/media/libstagefright/omx/tests/OMXHarness.cpp
+++ b/media/libstagefright/omx/tests/OMXHarness.cpp
@@ -78,9 +78,7 @@
 }
 
 status_t Harness::initOMX() {
-    int32_t trebleOmx = property_get_int32("persist.media.treble_omx", -1);
-    if ((trebleOmx == 1) || ((trebleOmx == -1) &&
-            property_get_bool("persist.hal.binderization", 0))) {
+    if (property_get_bool("persist.media.treble_omx", true)) {
         using namespace ::android::hardware::media::omx::V1_0;
         sp<IOmx> tOmx = IOmx::getService();
         if (tOmx == nullptr) {
diff --git a/services/mediacodec/main_codecservice.cpp b/services/mediacodec/main_codecservice.cpp
index 38717b5..3a4546b 100644
--- a/services/mediacodec/main_codecservice.cpp
+++ b/services/mediacodec/main_codecservice.cpp
@@ -54,9 +54,7 @@
     ::android::hardware::configureRpcThreadpool(64, false);
     sp<ProcessState> proc(ProcessState::self());
 
-    int32_t trebleOmx = property_get_int32("persist.media.treble_omx", -1);
-    if ((trebleOmx == 1) || ((trebleOmx == -1) &&
-            property_get_bool("persist.hal.binderization", 0))) {
+    if (property_get_bool("persist.media.treble_omx", true)) {
         using namespace ::android::hardware::media::omx::V1_0;
         sp<IOmx> omx = new implementation::Omx();
         if (omx == nullptr) {