Camera3Device: Validate template ID

Validate template ID before creating a default request.

Bug: 26866110
Bug: 27568958
Change-Id: Ifda457024f1d5c2b1382f189c1a8d5fda852d30d

status_t Camera3Device::getInputBufferProducer(
        sp<IGraphicBufferProducer> *producer) {
 Mutex::Autolock il(mInterfaceLock);
 Mutex::Autolock l(mLock);

 if (producer == NULL) {
 return BAD_VALUE;
 } else if (mInputStream == NULL) {
 return INVALID_OPERATION;
 }

 return mInputStream->getInputBufferProducer(producer);
}

status_t Camera3Device::getInputBufferProducer(
        sp<IGraphicBufferProducer> *producer) {
 Mutex::Autolock il(mInterfaceLock);
 Mutex::Autolock l(mLock);

 if (producer == NULL) {
 return BAD_VALUE;
 } else if (mInputStream == NULL) {
 return INVALID_OPERATION;
 }

 return mInputStream->getInputBufferProducer(producer);
}
