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

Commit da8c037c authored by Torne (Richard Coles)'s avatar Torne (Richard Coles)
Browse files

Avoid supported ABI list containing "unknown".

If one of the ABI list system properties is undefined/empty (as
ro.product.cpu.abilist64 is on a 32-bit only device), getString returns
"unknown", which ends up creating a 1-element array with "unknown" as a
member. Fix this to instead just get the empty string and split that
into a 0-element array.

Change-Id: I0d0a54eb06bb04427bcf0487e2a16d4180b81116
parent b7d7cbc9
Loading
Loading
Loading
Loading
+6 −5
Original line number Diff line number Diff line
@@ -83,7 +83,8 @@ public class Build {
     *
     * @hide
     */
    public static final String[] SUPPORTED_ABIS = getString("ro.product.cpu.abilist").split(",");
    public static final String[] SUPPORTED_ABIS = SystemProperties.get("ro.product.cpu.abilist")
            .split(",");

    /**
     * An ordered list of <b>32 bit</b> ABIs supported by this device. The most preferred ABI
@@ -93,8 +94,8 @@ public class Build {
     *
     * @hide
     */
    public static final String[] SUPPORTED_32_BIT_ABIS = getString("ro.product.cpu.abilist32")
            .split(",");
    public static final String[] SUPPORTED_32_BIT_ABIS =
            SystemProperties.get("ro.product.cpu.abilist32").split(",");

    /**
     * An ordered list of <b>64 bit</b> ABIs supported by this device. The most preferred ABI
@@ -104,8 +105,8 @@ public class Build {
     *
     * @hide
     */
    public static final String[] SUPPORTED_64_BIT_ABIS = getString("ro.product.cpu.abilist64")
            .split(",");
    public static final String[] SUPPORTED_64_BIT_ABIS =
            SystemProperties.get("ro.product.cpu.abilist64").split(",");


    /** Various version strings. */