Skip to content

GitLab

  • Menu
Projects Groups Snippets
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • briar briar
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 779
    • Issues 779
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 15
    • Merge requests 15
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • briar
  • briarbriar
  • Merge requests
  • !786

Clear the UI when memory is critically low

  • Review changes

  • Download
  • Email patches
  • Plain diff
Merged akwizgran requested to merge 1215-low-memory-hide-ui into master May 04, 2018
  • Overview 6
  • Commits 2
  • Pipelines 2
  • Changes 2

The onLowMemory() callback we've been using to detect low memory situations was superseded by onTrimMemory() in API level 14. The new callback provides more information about the situation.

This branch uses the new callback to clear the UI when system memory is critically low. This releases some memory at the cost of losing the back stack. By the time the system reaches this state, even apps with foreground services are at risk of being killed, so if we don't do something to release memory we may be killed soon.

Partial solution to #1215, but we should keep looking for ways to release memory.

Edited May 07, 2018 by akwizgran
Assignee
Assign to
Reviewer
Request review from
Time tracking
Source branch: 1215-low-memory-hide-ui