From acdabcae2f24e9b04c3cba01b67220ddf2994701 Mon Sep 17 00:00:00 2001
From: Michael Bestas <mkbestas@lineageos.org>
Date: Tue, 8 Oct 2019 21:47:36 +0300
Subject: [PATCH] sm8350-common: Remove android.hidl.base@1.0 shims

* Patch the 2 remaining blobs that depend on it.
* They already need libhidltransport.so so there's
  no real need for the shims anymore.

Change-Id: I00f185fd4d1d8798893cf82abf9d64fcb68c3301
---
 common.mk          |  5 -----
 extract-files.sh   |  6 ++++++
 libhidl/Android.bp | 20 --------------------
 3 files changed, 6 insertions(+), 25 deletions(-)
 delete mode 100644 libhidl/Android.bp

diff --git a/common.mk b/common.mk
index 97c55c4..462503a 100644
--- a/common.mk
+++ b/common.mk
@@ -201,11 +201,6 @@ PRODUCT_PACKAGES += \
     android.hardware.health@2.1-impl-qti \
     android.hardware.health@2.1-service
 
-# HIDL
-PRODUCT_PACKAGES += \
-    android.hidl.base@1.0 \
-    android.hidl.base@1.0.vendor
-
 PRODUCT_PACKAGES += \
     libhidltransport.vendor \
     libhwbinder.vendor
diff --git a/extract-files.sh b/extract-files.sh
index c99671e..4d9df6d 100755
--- a/extract-files.sh
+++ b/extract-files.sh
@@ -60,6 +60,9 @@ fi
 
 function blob_fixup() {
     case "${1}" in
+        system_ext/lib64/libwfdnative.so)
+            "${PATCHELF}" --remove-needed "android.hidl.base@1.0.so" "${2}"
+            ;;
         vendor/etc/camera/pureShot_parameter.xml)
             sed -i 's/=\([0-9]\+\)>/="\1">/g' "${2}"
             ;;
@@ -67,6 +70,9 @@ function blob_fixup() {
             sed -ni '/ozoaudio/!p' "${2}"
             sed -ni '/dolby/!p' "${2}"
             ;;
+        vendor/lib64/android.hardware.secure_element@1.0-impl.so)
+            "${PATCHELF}" --remove-needed "android.hidl.base@1.0.so" "${2}"
+            ;;
     esac
 }
 
diff --git a/libhidl/Android.bp b/libhidl/Android.bp
deleted file mode 100644
index 3df0382..0000000
--- a/libhidl/Android.bp
+++ /dev/null
@@ -1,20 +0,0 @@
-//
-// Copyright (C) 2020 The LineageOS Project
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//      http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-cc_library_shared {
-    name: "android.hidl.base@1.0",
-    shared_libs: ["libhidlbase"],
-    vendor_available: true,
-}
-- 
GitLab