blob: 02e71676909dda2af9854d8f2f9079fa754cde7a [file] [log] [blame]
Zhijun He046205c2015-01-08 17:40:00 -08001/*
2 * Copyright (C) 2015 The Android Open Source Project
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16
17//#define LOG_NDEBUG 0
18#define LOG_TAG "HotplugThread"
19#include <cutils/log.h>
20
21#include "HotplugThread.h"
22
23namespace usb_camera_hal {
24
25HotplugThread::HotplugThread(CameraHAL *hal)
26 : mModule(hal) {
27
28}
29
30HotplugThread::~HotplugThread() {
31
32}
33
34void HotplugThread::requestExit() {
35 // Call parent to set up shutdown
36 Thread::requestExit();
37
38 // Cleanup other states?
39}
40
41bool HotplugThread::threadLoop() {
Greg Kaiser7a915ef2016-06-30 16:59:38 -070042 (void)mModule; // silence warning about unused member.
Zhijun He046205c2015-01-08 17:40:00 -080043
44 /**
45 * Check camera connection status change, if connected, do below:
46 * 1. Create camera device, add to mCameras.
47 * 2. Init static info (mCameras[id]->initStaticInfo())
48 * 3. Notify on_status_change callback
49 *
50 * If unconnected, similarly, do below:
51 * 1. Destroy camera device and remove it from mCameras.
52 * 2. Notify on_status_change callback
53 *
54 * DO NOT have a tight polling loop here, to avoid excessive CPU utilization.
55 */
56
57 return true;
58}
59
60} // namespace usb_camera_hal