miuicamera: Rework way to prevent adding duplicate dependencies

Change-Id: I2eb6484dbe3a9fddc883bf1290da1b76c4e1c54c
This commit is contained in:
LuK1337 2022-10-15 23:05:18 +02:00 committed by basamaryan
parent 27f73f9614
commit 495d37bc7d
No known key found for this signature in database
GPG Key ID: 707BA6C82329E8F9

View File

@ -56,7 +56,7 @@ fi
function blob_fixup() {
case "${1}" in
system/lib64/libcamera_algoup_jni.xiaomi.so|system/lib64/libcamera_mianode_jni.xiaomi.so)
"${PATCHELF}" --add-needed "libgui_shim_miuicamera.so" "${2}"
grep -q "libgui_shim_miuicamera.so" "${2}" || "${PATCHELF}" --add-needed "libgui_shim_miuicamera.so" "${2}"
;;
system/lib64/libmicampostproc_client.so)
"${PATCHELF}" --remove-needed "libhidltransport.so" "${2}"