Camera3Device: Validate template ID

Validate template ID before creating a default request.

Bug: 26866110
Bug: 27568958
Change-Id: Ifda457024f1d5c2b1382f189c1a8d5fda852d30d

void Camera3Device::notifyStatus(bool idle) {
 {
 Mutex::Autolock l(mLock);
 if (mStatus != STATUS_ACTIVE && mStatus != STATUS_CONFIGURED) {
 return;
 }
        ALOGV("%s: Camera %d: Now %s", __FUNCTION__, mId,
                idle ? "idle" : "active");
        internalUpdateStatusLocked(idle ? STATUS_CONFIGURED : STATUS_ACTIVE);

 if (mPauseStateNotify) return;
 }
 NotificationListener *listener;
 {
 Mutex::Autolock l(mOutputLock);
        listener = mListener;
 }
 if (idle && listener != NULL) {
        listener->notifyIdle();
 }
}

void Camera3Device::notifyStatus(bool idle) {
 {
 Mutex::Autolock l(mLock);
 if (mStatus != STATUS_ACTIVE && mStatus != STATUS_CONFIGURED) {
 return;
 }
        ALOGV("%s: Camera %d: Now %s", __FUNCTION__, mId,
                idle ? "idle" : "active");
        internalUpdateStatusLocked(idle ? STATUS_CONFIGURED : STATUS_ACTIVE);

 if (mPauseStateNotify) return;
 }
 NotificationListener *listener;
 {
 Mutex::Autolock l(mOutputLock);
        listener = mListener;
 }
 if (idle && listener != NULL) {
        listener->notifyIdle();
 }
}
