tri-state-key: Add support for system variants

* SDM845 family of OnePlus devices on LineageOS use a prebuilt vendor.

Change-Id: I0bbb1ac2d97e49fcc2aa5d78138ae97cf6b536b8
This commit is contained in:
Daniel Jacob Chittoor
2021-09-18 11:53:00 +02:00
committed by LuK1337
parent 7c8c176fd7
commit 60811b3df4
3 changed files with 29 additions and 6 deletions

View File

@@ -13,9 +13,9 @@
// See the License for the specific language governing permissions and // See the License for the specific language governing permissions and
// limitations under the License. // limitations under the License.
cc_binary { cc_defaults {
name: "tri-state-key_daemon", name: "tri-state-key_defaults",
init_rc: ["tri-state-key_daemon.rc"], stem: "tri-state-key_daemon",
srcs: [ srcs: [
"main.cpp", "main.cpp",
"uevent_listener.cpp", "uevent_listener.cpp",
@@ -24,7 +24,6 @@ cc_binary {
"-Wall", "-Wall",
"-Werror", "-Werror",
], ],
vendor: true,
shared_libs: [ shared_libs: [
"libbase", "libbase",
"liblog", "liblog",
@@ -32,3 +31,17 @@ cc_binary {
"libutils", "libutils",
], ],
} }
cc_binary {
name: "tri-state-key_daemon",
defaults: ["tri-state-key_defaults"],
init_rc: ["tri-state-key_daemon.rc"],
system_ext_specific: true,
}
cc_binary {
name: "tri-state-key_daemon.vendor",
defaults: ["tri-state-key_defaults"],
init_rc: ["vendor.tri-state-key_daemon.rc"],
vendor: true,
}

View File

@@ -2,9 +2,9 @@ on fs
chown system system /sys/devices/platform/soc/soc:tri_state_key/hall_data_calib chown system system /sys/devices/platform/soc/soc:tri_state_key/hall_data_calib
chown system system /mnt/vendor/persist/engineermode/tri_state_hall_data chown system system /mnt/vendor/persist/engineermode/tri_state_hall_data
start vendor.tri-state-key_daemon start tri-state-key_daemon
service vendor.tri-state-key_daemon /vendor/bin/tri-state-key_daemon service tri-state-key_daemon /system_ext/bin/tri-state-key_daemon
class late_start class late_start
user system user system
group system uhid group system uhid

View File

@@ -0,0 +1,10 @@
on fs
chown system system /sys/devices/platform/soc/soc:tri_state_key/hall_data_calib
chown system system /mnt/vendor/persist/engineermode/tri_state_hall_data
start vendor.tri-state-key_daemon
service vendor.tri-state-key_daemon /vendor/bin/tri-state-key_daemon
class late_start
user system
group system uhid