summaryrefslogtreecommitdiff
path: root/tools/aapt2/java/JavaClassGenerator.cpp
diff options
context:
space:
mode:
authorTYM Tsai <tymtsai@google.com>2020-06-19 10:38:02 +0800
committerTYM Tsai <tymtsai@google.com>2020-06-19 12:09:54 +0800
commitc9f0c232ae6247af96a38776965c3c7a5d27bef2 (patch)
tree574ace57b359cb235dea16284e50cb61869df07f /tools/aapt2/java/JavaClassGenerator.cpp
parent4fdd3c8e34bfd675f7be3cf74faf3d6020737acf (diff)
Fix the context leak in the ContentCapture
Activity cannot be released because the context be holded by multiple objects. * Activity holds ContentCaptureManager. * ContentCaptureManager holds the context and MainContextCaptureSession. * MainContextCaptureSession holds the context and ContentCaptureManager. * The system server holds some binder references to MainContentCaptureSession. If the system service never released the binder references, then the activity is also never GC'd. To avoid the issue, 1. Make the session state receiver of MainContextCaptureSession to be static and uses weak reference to MainContextCaptureSession. 2. The direct service vulture may miss to do unlinkToDeath(), do a checking while the session destory. Bug: 143210612 Test: manual check Objects on the meminfo Test: Activities should be released after a period of time Test: adb shell dumpsys meminfo com.google.android.dialer Change-Id: I12037483addb1efe444c74fa189ef6afd15821dd
Diffstat (limited to 'tools/aapt2/java/JavaClassGenerator.cpp')
0 files changed, 0 insertions, 0 deletions