Commit 6b2c9326 authored by Kuo Jen Wei's avatar Kuo Jen Wei Committed by Commit Bot

[CCA] Fix check unplugged external camera logic in resolution setting.

While CCA will maintain which video device id of the resolution settings
is opened, but the logic for judging whether the device id of opened
settings still exists is broken. This CL fix this logic.

Bug: 1030622
Test: Unplugged external camera while open resolution settings of
built-in camera, the settings should be closed.

Change-Id: I660f439221ab57b4c72f4b8cd4488d74f1a0f055
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1950106
Auto-Submit: Kuo Jen Wei <inker@chromium.org>
Commit-Queue: Shik Chen <shik@chromium.org>
Reviewed-by: default avatarShik Chen <shik@chromium.org>
Cr-Commit-Position: refs/heads/master@{#721829}
parent 303d0ac0
......@@ -492,7 +492,7 @@ cca.views.ResolutionSettings.prototype.updateResolutions_ = function() {
if ((cca.state.get('photoresolutionsettings') ||
cca.state.get('videoresolutionsettings')) &&
this.openedSettingDeviceId_ !== null &&
this.getDeviceSetting_(this.openedSettingDeviceId_) !== undefined) {
this.getDeviceSetting_(this.openedSettingDeviceId_) === null) {
cca.nav.close(
cca.state.get('photoresolutionsettings') ? 'photoresolutionsettings' :
'videoresolutionsettings');
......@@ -512,7 +512,7 @@ cca.views.ResolutionSettings.prototype.updateSelectedPhotoResolution_ =
let /** !HTMLElement */ photoItem;
if (this.frontSetting_ && this.frontSetting_.deviceId === deviceId) {
photoItem = this.frontPhotoItem_;
} else if (this.backsetting_ && this.backsetting_.deviceId === deviceId) {
} else if (this.backSetting_ && this.backSetting_.deviceId === deviceId) {
photoItem = this.backPhotoItem_;
} else {
photoItem = /** @type {!HTMLElement} */ (this.resMenu_.querySelector(
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment