#!/usr/bin/env bash
set -euo pipefail

out_adevtool_deps/host/linux-x86/bin/bpmodify -w -m hardware.google.bluetooth.ewp -parameter frozen -set-bool false hardware/google/interfaces/bluetooth/ewp/aidl/Android.bp
mkdir -p hardware/google/interfaces/bluetooth/ewp/aidl/aidl_api/hardware.google.bluetooth.ewp/current
rsync --recursive --update --delete-before out_adevtool_deps/soong/.intermediates/hardware/google/interfaces/bluetooth/ewp/aidl/hardware.google.bluetooth.ewp_interface/dump/* hardware/google/interfaces/bluetooth/ewp/aidl/aidl_api/hardware.google.bluetooth.ewp/current
out_adevtool_deps/host/linux-x86/bin/bpmodify -w -m hardware.google.bluetooth.ewp -parameter versions -remove-property hardware/google/interfaces/bluetooth/ewp/aidl/Android.bp
