Skip to content
Commit f507d562 authored by Andriy Kozachuk's avatar Andriy Kozachuk
Browse files

Make "Recycle" Android Lint rule blocking for PackageInstaller

"Recycle" Android Lint rule checks the code for unclosed Cursor
objects, as well as other unclosed resources. Cursors which are
not closed as soon as they are not used anymore may lead to
Android performance issues:

* if Cursor was created by querying ContentProvider, then it
  will hold an active binding to the process that hosts
  ContentProvider, which will prevent this process from being
  cached or unloaded
* each Cursor can hold an up to 2 MB CursorWindow memory buffer

Changing "Recycle" rule severity to "error" will block the code
with unclosed Cursors from being submitted.

Bug: 266775648
Test: m PackageInstaller
Test: m lint-check
Merged-In: Ice7f02158259e1c2f899d43e8de8dd318fec1016
Change-Id: Ic062d53c26cb67e2b6c7070c96ab51bd44c3d824
parent 4811f1da
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment