Skip to content
Commit 4c9c7a58 authored by Eino-Ville Talvala's avatar Eino-Ville Talvala
Browse files

CameraManager: Separate service listener into a singleton

Currently, every CameraManager instance adds itself as a camera service
listener, which has the unfortunate side effect of keeping them all alive
indefinitely.

This is doubly unfortunate since every CameraManager keeps the Context it
was constructed with, and therefore may be leaking whole Activities along
with the CameraManager itself.

Break out a global per-process CameraManager which handles service
connection keepalive and availability listeners, so that local camera
manager instances can go out of scope as expected.

Bug: 18077200

Change-Id: I1be5fb8d3492131e98bb4a84121400d4abb2b9e1
parent 77e25331
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