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

Skip to content

Resolve "OnePlus Version warning"

Frank Preel requested to merge 461-add-warning into master

Description

Temporarily: not offering flash on OnePlus if the currently installed ROM version is different from Android 11

Issue(s)

Closes #461

Tests

The whole logic is in this function from DeviceDetectedController.java.
It will have to be replaced in the short term by something more evolutionary than static code, probably server side in an API for more flexibility.

    private boolean isIncompatibleVersion(Phone phone) {
        try {
            if (phone.getManufacturer().toLowerCase().equals("oneplus") &&
                phone.getAndroidVersion() != 11) {
                    return true;
            }
        } catch (Exception e) {}
        return false;
    }

getManufacturer comes from => "ro.product.manufacturer"

getAndroidVersion comes from => "ro.build.version.release"

Edited by Frank Preel

Merge request reports

Loading