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

Commit 2af169b1 authored by Samjith Sadasivan's avatar Samjith Sadasivan Committed by Steve Kondik
Browse files

frameworks/base : testNoManagedUsersIfLowRamDevice failure

Issue : testNoManagedUsersIfLowRamDevice verifies whether the
managed_users feature is disabled on low ram devices. Currently
the feature is enabled for all targets irrespective of RAM size

Fix : Sysconfig populates the preconfigured list of features
from handheld_core_hardware.xml.A check is added during parsing
of the xml to avoid adding managed_users feature on low ram devices.

CRs Fixed : 753340

Change-Id: Ib0448d6c39cccbe0567d3ad50b27c93ad5dd9618
parent dd83eac4
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -326,6 +326,8 @@ public class SystemConfig {
                    if (fname == null) {
                        Slog.w(TAG, "<feature> without name at "
                                + parser.getPositionDescription());
                    } else if (isLowRamDevice() && "android.software.managed_users".equals(fname)) {
                        Slog.w(TAG, "Feature not supported on low memory device "+fname);
                    } else {
                        //Log.i(TAG, "Got feature " + fname);
                        FeatureInfo fi = new FeatureInfo();
@@ -405,4 +407,8 @@ public class SystemConfig {
            XmlUtils.skipCurrentTag(parser);
        }
    }

    boolean isLowRamDevice() {
        return "true".equals(SystemProperties.get("ro.config.low_ram", "false"));
    }
}