Index: chrome/android/java/src/org/chromium/chrome/browser/preferences/website/Website.java |
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/preferences/website/Website.java b/chrome/android/java/src/org/chromium/chrome/browser/preferences/website/Website.java |
index ab0045984bdb12551a6972b7299aa5fd3b0e7506..1c30a4590bf3abaf5552d5e0dcf10542ae4bd605 100644 |
--- a/chrome/android/java/src/org/chromium/chrome/browser/preferences/website/Website.java |
+++ b/chrome/android/java/src/org/chromium/chrome/browser/preferences/website/Website.java |
@@ -326,31 +326,25 @@ public class Website implements Serializable { |
public int getMediaAccessType() { |
ContentSetting voice = getVoiceCapturePermission(); |
ContentSetting video = getVideoCapturePermission(); |
- if (video != null) { |
- if (voice == null) { |
- if (video == ContentSetting.ALLOW) { |
- return CAMERA_ACCESS_ALLOWED; |
- } else { |
- return CAMERA_ACCESS_DENIED; |
- } |
- } else { |
- if (video != voice) { |
- return INVALID_CAMERA_OR_MICROPHONE_ACCESS; |
- } |
- if (video == ContentSetting.ALLOW && voice == ContentSetting.ALLOW) { |
- return MICROPHONE_AND_CAMERA_ACCESS_ALLOWED; |
- } else { |
- return MICROPHONE_AND_CAMERA_ACCESS_DENIED; |
- } |
- } |
- } else { |
- if (voice == null) return INVALID_CAMERA_OR_MICROPHONE_ACCESS; |
- if (voice == ContentSetting.ALLOW) { |
- return MICROPHONE_ACCESS_ALLOWED; |
- } else { |
- return MICROPHONE_ACCESS_DENIED; |
- } |
+ if (video == ContentSetting.ALLOW && voice == ContentSetting.ALLOW) { |
+ return MICROPHONE_AND_CAMERA_ACCESS_ALLOWED; |
+ } |
+ if (video == ContentSetting.BLOCK && voice == ContentSetting.BLOCK) { |
+ return MICROPHONE_AND_CAMERA_ACCESS_DENIED; |
+ } |
+ if (video == ContentSetting.ALLOW) { |
+ return CAMERA_ACCESS_ALLOWED; |
+ } |
+ if (voice == ContentSetting.ALLOW) { |
+ return MICROPHONE_ACCESS_ALLOWED; |
+ } |
+ if (video == ContentSetting.BLOCK) { |
+ return CAMERA_ACCESS_DENIED; |
+ } |
+ if (voice == ContentSetting.BLOCK) { |
+ return MICROPHONE_ACCESS_DENIED; |
} |
+ return INVALID_CAMERA_OR_MICROPHONE_ACCESS; |
newt (away)
2015/04/16 17:11:20
as soon as we allow users to toggle these individu
Finnur
2015/04/22 16:01:38
No, lines 335 through 346 handle the case where on
|
} |
public void setLocalStorageInfo(LocalStorageInfo info) { |