Release references to KeyguardRemotePreview after onDestroy
The process on the other side of the IPC can keep PreviewLifecycleObserver for any time - until the GC triggers or even longer if there's an accidental leak. This can clocks and other heavy objects on our side.
PreviewLifecycleObserver is moved outside the KeyguardRemotePreviewManager to prevent accidental capturing of the manager class via this references.
Flag: NONE
Bug: 315637349
Test: newly added unit test and verified with Studio profiler
Change-Id: If8515407aa75a754d94cff92965d9ee6b713001c
3 files changed