sm7125: overlay: Don't pin camera & launcher app in memory

The default camera app can be *huge* in some cases, e.g. when the app in
question is Google Camera. The system will only pin up to the first 80
MiB of the APK file, as well as the first 80 MiB of its odex. There are
several problems with this:

  - We could easily end up with 160 MiB of camera app files pinned,
    which is a somewhat tall order with the ~5.3 GiB of usable RAM that
    we have
  - The data that gets pinned may not even be the most critical data for
    launching the camera

Disable pinning of the camera app to save precious RAM on this device.

NB: The value has been changed to false instead of removing it entirely
because we need to override the config set by overlays in the prebuilt
vendor image.

Similar to what we did for the camera app, unpin the launcher app from
memory as well. While the default launcher (Launcher3) isn't
particularly big, it doesn't make much sense to pin because the launcher
does not typically load new resources much. Most of its resources should
already be loaded in memory after it starts, so pinning the APK is
redundant.

NB: The value has been changed to false instead of removing it entirely
because we need to override the config set by overlays in the prebuilt
vendor image.
urubino-microg
Danny Lin 2 years ago committed by Ruchit
parent 131ffa63fb
commit 025bd7fe7d
  1. 4
      overlay/frameworks/base/core/res/res/values/config.xml

@ -1286,9 +1286,9 @@
<item>"/system/bin/surfaceflinger"</item>
</string-array>
<!-- True if camera app should be pinned via Pinner Service -->
<bool name="config_pinnerCameraApp">true</bool>
<bool name="config_pinnerCameraApp">false</bool>
<!-- Should the pinner service pin the Home application? -->
<bool name="config_pinnerHomeApp">true</bool>
<bool name="config_pinnerHomeApp">false</bool>
<!-- List supported color modes. -->
<integer-array name="config_availableColorModes">

Loading…
Cancel
Save