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

Commit d6bf7ffe authored by Bernie Innocenti's avatar Bernie Innocenti
Browse files

Relax APF version check in ApfGenerator

Instead of requiring an *exact* version, we now require a minimum
version. This is necessary if we wish to upgrade the APF interpreter in
vendor firmware independently of the framework code. Adding new opcodes
without changing the semantics of the old ones is always possible and
usually easy, so we can at least have a backwards-compatibility horizon
wider than a single version.

Change-Id: I4f1ed661afb2ede193188eb8086fbf2a8b45b33d
Test: Change extracted from aosp/647079 and tested there
parent e2e7b28c
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -367,7 +367,7 @@ public class ApfGenerator {
     */
    public boolean setApfVersion(int version) {
        // This version number syncs up with APF_VERSION in hardware/google/apf/apf_interpreter.h
        return version == 2;
        return version >= 2;
    }

    private void addInstruction(Instruction instruction) {