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

Commit 2f61f914 authored by Christopher Tate's avatar Christopher Tate
Browse files

Make "low ram device" a readonly system property

This lets components outside the Zygote / Android resource regime
know whether this is considered a "low ram" device.

Set the property [ro.config.low_ram] to "true" if the device is to be
considered low-ram.  Any other property string (or its absence) will
be interpreted as meaning this is a normal larger-ram device.  The
"true" string must be all lower case.

Bug 10131789

Change-Id: I15332d169b4aa4eaa0a6c1952787af0b03d23a6b
parent fd952994
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -438,7 +438,7 @@ public class ActivityManager {

    /** @hide */
    public static boolean isLowRamDeviceStatic() {
        return Resources.getSystem().getBoolean(com.android.internal.R.bool.config_lowRamDevice);
        return "true".equals(SystemProperties.get("ro.config.low_ram", "false"));
    }

    /**
+1 −5
Original line number Diff line number Diff line
@@ -123,12 +123,8 @@
         of them.  This should not normally be modified. -->
    <bool name="config_closeDialogWhenTouchOutside">true</bool>

    <!-- Device configuration indicating this is a device with limited RAM, so heavier-weight
         features should be turned off. -->
    <bool name="config_lowRamDevice">false</bool>

    <!-- Device configuration indicating whether we should avoid using accelerated graphics
         in certain places to reduce RAM footprint.  This is ignored if config_lowRamDevice
         in certain places to reduce RAM footprint.  This is ignored if ro.config.low_ram
         is true (in that case this is assumed true as well).  It can allow you to tune down
         your device's memory use without going to the point of causing applications to turn
         off features. -->
+0 −1
Original line number Diff line number Diff line
@@ -252,7 +252,6 @@
  <java-symbol type="bool" name="config_duplicate_port_omadm_wappush" />
  <java-symbol type="bool" name="config_enable_emergency_call_while_sim_locked" />
  <java-symbol type="bool" name="config_enable_puk_unlock_screen" />
  <java-symbol type="bool" name="config_lowRamDevice" />
  <java-symbol type="bool" name="config_mms_content_disposition_support" />
  <java-symbol type="bool" name="config_showMenuShortcutsWhenKeyboardPresent" />
  <java-symbol type="bool" name="config_sip_wifi_only" />