Skip to content

Commit

Permalink
Fix for getting invalid media requests for rejected permissions (#2937)
Browse files Browse the repository at this point in the history
* Fix for getting invalid media requests for rejected permissions

* Block all platforms requesting camera permission

Co-authored-by: Randall E. Barker <simstorm@mac.com>
  • Loading branch information
keianhzo and bluemarvin committed Mar 10, 2020
1 parent b6c763f commit 324719f
Showing 1 changed file with 8 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
import org.mozilla.vrbrowser.browser.engine.SessionStore;
import org.mozilla.vrbrowser.ui.widgets.WidgetManagerDelegate;
import org.mozilla.vrbrowser.ui.widgets.dialogs.PermissionWidget;
import org.mozilla.vrbrowser.utils.DeviceType;
import org.mozilla.vrbrowser.utils.SystemUtils;

import java.util.ArrayList;
Expand Down Expand Up @@ -172,6 +173,13 @@ public void reject() {
}
};

// Temporary fix for https://bugzilla.mozilla.org/show_bug.cgi?id=1621380
if ((type == PermissionWidget.PermissionType.Camera ||
type == PermissionWidget.PermissionType.CameraAndMicrophone)) {
callback.reject();
return;
}

handlePermission(aUri, type, callback);
}

Expand Down

0 comments on commit 324719f

Please sign in to comment.