Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 174f6005 authored by Jiyong Park's avatar Jiyong Park
Browse files

Implement getInterfaceHash/Version for SoundTrigger

As the soundtrigger AIDL interface gets frozen for TM, java services
implementing the interface are required to implement getInterfaceHash
and getInterfaceVersion [1].

[1] https://source.android.com/devices/architecture/aidl/stable-aidl#new-meta-interface-methods

Bug: 225941299
Test: m
Change-Id: I5a7568cc081e6820b2041bc7ac34d1b0b4ff6009
parent c1942ad9
Loading
Loading
Loading
Loading
+20 −0
Original line number Diff line number Diff line
@@ -206,6 +206,16 @@ public class SoundTriggerHw3Compat implements ISoundTriggerHal {
        public void onResourcesAvailable() {
            mDelegate.onResourcesAvailable();
        }

        @Override
        public int getInterfaceVersion() {
            return ISoundTriggerHwGlobalCallback.VERSION;
        }

        @Override
        public String getInterfaceHash() {
            return ISoundTriggerHwGlobalCallback.HASH;
        }
    }

    private static class ModelCallbackAdaper extends ISoundTriggerHwCallback.Stub {
@@ -233,5 +243,15 @@ public class SoundTriggerHw3Compat implements ISoundTriggerHal {
            event.recognitionStillActive |= event.status == RecognitionStatus.FORCED;
            mDelegate.recognitionCallback(model, event);
        }

        @Override
        public int getInterfaceVersion() {
            return ISoundTriggerHwCallback.VERSION;
        }

        @Override
        public String getInterfaceHash() {
            return ISoundTriggerHwCallback.HASH;
        }
    }
}