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

Commit 01d647f9 authored by Anton Hansson's avatar Anton Hansson
Browse files

Make getExtensionVersion a little more forward-proof

R_EXTENSION_INT is 0 now, but if bumped we don't want to bump
the other return values of this method.

Bug: 154486201
Test: SdkExtensionsTest
Change-Id: I36855ba1881da4056276f4a5626ca64d2129353b
parent 4cc1d1a8
Loading
Loading
Loading
Loading
+5 −1
Original line number Diff line number Diff line
@@ -62,7 +62,11 @@ public class SdkExtensions {
        if (sdk < VERSION_CODES.R) {
            throw new IllegalArgumentException(String.valueOf(sdk) + " does not have extensions");
        }

        if (sdk == VERSION_CODES.R) {
            return R_EXTENSION_INT;
        }
        return 0;
    }

}