summaryrefslogtreecommitdiffstats
path: root/services/camera/libcameraservice/CameraService.h
diff options
context:
space:
mode:
authorRuben Brunk <rubenbrunk@google.com>2015-04-10 17:26:56 -0700
committerRuben Brunk <rubenbrunk@google.com>2015-04-13 16:55:41 -0700
commit4f9576bf48c5909782c12490e8a9faa974ae68d6 (patch)
tree9392dc3ff4216fd7bfa4e41ea7838ec6570bfcf7 /services/camera/libcameraservice/CameraService.h
parenta8ca9157d21510fbd474bd31748f4fe0d4635dd7 (diff)
downloadframeworks_av-4f9576bf48c5909782c12490e8a9faa974ae68d6.zip
frameworks_av-4f9576bf48c5909782c12490e8a9faa974ae68d6.tar.gz
frameworks_av-4f9576bf48c5909782c12490e8a9faa974ae68d6.tar.bz2
camera: Fix client eviction/disconnect race.
- Add blocking wait in camera service connect call to prevent race when client has called disconnect while eviction of that client is taking place, resulting in early call of device initialization before all HAL resources are available. Bug: 20038135 Change-Id: I7afc5bfa23612ba7f83293fa542ff983a5991230
Diffstat (limited to 'services/camera/libcameraservice/CameraService.h')
-rw-r--r--services/camera/libcameraservice/CameraService.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/services/camera/libcameraservice/CameraService.h b/services/camera/libcameraservice/CameraService.h
index 9eda205..91c7d59 100644
--- a/services/camera/libcameraservice/CameraService.h
+++ b/services/camera/libcameraservice/CameraService.h
@@ -90,6 +90,9 @@ public:
// 3 second busy timeout when other clients are connecting
static const nsecs_t DEFAULT_CONNECT_TIMEOUT_NS = 3000000000;
+ // 1 second busy timeout when other clients are disconnecting
+ static const nsecs_t DEFAULT_DISCONNECT_TIMEOUT_NS = 1000000000;
+
// Default number of messages to store in eviction log
static const size_t DEFAULT_EVENT_LOG_LENGTH = 100;