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

Commit 39a927f0 authored by Samjith Sadasivan's avatar Samjith Sadasivan Committed by Maunik Shah
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: 776709

Change-Id: Ib0448d6c39cccbe0567d3ad50b27c93ad5dd9618
parent 7dc0e392
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -281,6 +281,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();
@@ -360,4 +362,8 @@ public class SystemConfig {
            XmlUtils.skipCurrentTag(parser);
        }
    }

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