Skip to content

Commit 3484642

Browse files
kazerineEcrosoftXiao
authored andcommitted
cepheus: Get rid of megvii dependencies in camera.qcom.so
Change-Id: I97058c320d06819a468ebe38e2704360e9aa91db Signed-off-by: Arian <[email protected]>
1 parent 69597d7 commit 3484642

File tree

4 files changed

+48
-0
lines changed

4 files changed

+48
-0
lines changed

camera/Android.bp

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
//
2+
// Copyright (C) 2020 The LineageOS Project
3+
//
4+
// Licensed under the Apache License, Version 2.0 (the "License");
5+
// you may not use this file except in compliance with the License.
6+
// You may obtain a copy of the License at
7+
//
8+
// http://www.apache.org/licenses/LICENSE-2.0
9+
//
10+
// Unless required by applicable law or agreed to in writing, software
11+
// distributed under the License is distributed on an "AS IS" BASIS,
12+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
// See the License for the specific language governing permissions and
14+
// limitations under the License.
15+
16+
cc_library_shared {
17+
name: "libshim_megvii",
18+
19+
proprietary: true,
20+
srcs: ["megvii_shim.cpp"],
21+
}

camera/megvii_shim.cpp

+19
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
/*
2+
* Copyright (C) 2020 The LineageOS Project
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License");
5+
* you may not use this file except in compliance with the License.
6+
* You may obtain a copy of the License at
7+
*
8+
* http://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed to in writing, software
11+
* distributed under the License is distributed on an "AS IS" BASIS,
12+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
* See the License for the specific language governing permissions and
14+
* limitations under the License.
15+
*/
16+
17+
namespace android {
18+
extern "C" void mg_facepp() {}
19+
}

device.mk

+3
Original file line numberDiff line numberDiff line change
@@ -119,6 +119,9 @@ TARGET_SCREEN_WIDTH := 1080
119119
PRODUCT_PACKAGES += \
120120
libdng_sdk.vendor
121121

122+
PRODUCT_PACKAGES += \
123+
libshim_megvii
124+
122125
PRODUCT_COPY_FILES += \
123126
frameworks/native/data/etc/android.hardware.camera.flash-autofocus.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.camera.flash-autofocus.xml \
124127
frameworks/native/data/etc/android.hardware.camera.front.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.camera.front.xml \

extract-files.sh

+5
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,11 @@ function blob_fixup() {
6767
lib64/libfm-hci.so)
6868
patchelf --remove-needed "[email protected]" "${2}"
6969
;;
70+
vendor/lib64/hw/camera.qcom.so)
71+
patchelf --remove-needed "libMegviiFacepp-0.5.2.so" "${2}"
72+
patchelf --remove-needed "libmegface.so" "${2}"
73+
patchelf --add-needed "libshim_megvii.so" "${2}"
74+
;;
7075
esac
7176
}
7277

0 commit comments

Comments
 (0)