OSDN Git Service

Eagerly serialize historical sessions
authorNarayan Kamath <narayan@google.com>
Mon, 12 Jun 2017 12:34:29 +0000 (13:34 +0100)
committerNarayan Kamath <narayan@google.com>
Tue, 13 Jun 2017 10:29:12 +0000 (10:29 +0000)
commita22a766ea3eb14466221ac5a29ac7c298446ca5e
tree7f506d295b7c7f454f7359224890ee2974b6d71e
parenta5b457b3bf6f61c482badf36858d7d278befcd70
Eagerly serialize historical sessions

mHistoricalSessions maintained a strong reference to a PackageInstallerSession,
which in turn kept references to Bitmaps and other heavy-weight objects around.

Since this field is primarily used for debugging, this change replaces it with
a String dump of the session in question. Each dump takes about 600bytes, which
is comparable to the sizes of the un-serialized raw objects.

Bug: 62485552
Test: Manual

Change-Id: I4949a64b538ab4a97384f4f8bc9a6ef155a4b128
services/core/java/com/android/server/pm/PackageInstallerService.java