diff options
author | juwei <juwei@codeaurora.org> | 2016-12-30 18:15:33 +0800 |
---|---|---|
committer | Gerrit - the friendly Code Review server <code-review@localhost> | 2017-01-05 17:28:56 -0800 |
commit | ef0bdb7d10a0f0b6c0d8e022e6b557030dcfda3b (patch) | |
tree | 28fd2efd6bf80f804b5bb304396440e10be2f2e4 | |
parent | 15f6d966c807c371a12f68bf9f5f4e7447a9ba8e (diff) | |
download | android_packages_apps_Snap-ef0bdb7d10a0f0b6c0d8e022e6b557030dcfda3b.tar.gz android_packages_apps_Snap-ef0bdb7d10a0f0b6c0d8e022e6b557030dcfda3b.tar.bz2 android_packages_apps_Snap-ef0bdb7d10a0f0b6c0d8e022e6b557030dcfda3b.zip |
SnapdragonCamera: Fix crash during UI stress test
CaptureModule and CaptureUI have register listeners in
SettingsManager, but forget unregiseter when UI destroy.
This makes the too many RenderNode objects exist and never GC.
At last, the weak reference of RenderNode at native layer exceed
the 51200 limitation and crash.
Unregister the listener of SettingsManager will fix it.
Change-Id: I881b47f8f062c366e028db59a8cf6983c1d99f5a
CRs-Fixed: 1103907
-rw-r--r-- | src/com/android/camera/CaptureModule.java | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/com/android/camera/CaptureModule.java b/src/com/android/camera/CaptureModule.java index 26613786f..4b71f9b09 100644 --- a/src/com/android/camera/CaptureModule.java +++ b/src/com/android/camera/CaptureModule.java @@ -2358,6 +2358,8 @@ public class CaptureModule implements CameraModule, PhotoController, if(mFrameProcessor != null){ mFrameProcessor.onDestory(); } + mSettingsManager.unregisterListener(this); + mSettingsManager.unregisterListener(mUI); } @Override |