Skip to content
This repository has been archived by the owner on Jul 22, 2024. It is now read-only.

Commit

Permalink
Remove camera permission in Oculus Go and Quest builds (#1348)
Browse files Browse the repository at this point in the history
* Remove camera permission in Oculus Go and Quest builds
* Remove camera from privacy for oculus
* Prevent request for system camera permission
  • Loading branch information
keianhzo authored Jun 28, 2019
1 parent 3171325 commit b646db9
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,12 @@
import android.Manifest;
import android.content.Context;
import android.util.Pair;
import android.view.View;
import android.widget.ScrollView;
import android.widget.TextView;

import org.mozilla.geckoview.GeckoSession;
import org.mozilla.vrbrowser.BuildConfig;
import org.mozilla.vrbrowser.R;
import org.mozilla.vrbrowser.audio.AudioEngine;
import org.mozilla.vrbrowser.browser.SessionStore;
Expand Down Expand Up @@ -89,6 +91,9 @@ private void initialize(Context aContext) {
mPermissionButtons.add(Pair.create(findViewById(R.id.locationPermissionButton), Manifest.permission.ACCESS_FINE_LOCATION));
mPermissionButtons.add(Pair.create(findViewById(R.id.storagePermissionButton), Manifest.permission.READ_EXTERNAL_STORAGE));

if (BuildConfig.FLAVOR_platform == "oculusvr3dof" || BuildConfig.FLAVOR_platform == "oculusvr")
findViewById(R.id.cameraPermissionButton).setVisibility(View.GONE);

for (Pair<ButtonSetting, String> button: mPermissionButtons) {
if (mWidgetManager.isPermissionGranted(button.second)) {
button.first.setShowAsLabel(true);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,18 +6,19 @@
package org.mozilla.vrbrowser;

import android.app.NativeActivity;
import android.Manifest;
import android.os.Bundle;
import android.util.Log;
import android.view.InputDevice;
import android.view.KeyEvent;
import android.view.MotionEvent;
import android.view.View;
import android.view.WindowManager;

public class PlatformActivity extends NativeActivity {
static String LOGTAG = "VRB";

public static boolean filterPermission(final String aPermission) {
if (aPermission.equals(Manifest.permission.CAMERA)) {
return true;
}
return false;
}

Expand Down
3 changes: 2 additions & 1 deletion app/src/oculusvrArmDebug/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android" package="org.mozilla.vrbrowser">
<manifest xmlns:android="http://schemas.android.com/apk/res/android" package="org.mozilla.vrbrowser" xmlns:tools="http://schemas.android.com/tools">
<uses-feature android:glEsVersion="0x00030001"/>
<uses-feature android:name="android.hardware.vr.headtracking" android:version="1" android:required="${headtrackingRequired}" />
<uses-permission android:name="android.permission.CAMERA" tools:node="remove"/>
<application>
<meta-data android:name="com.samsung.android.vr.application.mode" android:value="vr_only"/>
<activity android:name=".VRBrowserActivity" android:screenOrientation="landscape">
Expand Down
1 change: 1 addition & 0 deletions app/src/oculusvrArmRelease/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
android:installLocation="auto">
<uses-feature android:glEsVersion="0x00030001"/>
<uses-feature android:name="android.hardware.vr.headtracking" android:version="1" android:required="${headtrackingRequired}" />
<uses-permission android:name="android.permission.CAMERA" tools:node="remove"/>
<application
android:name=".VRBrowserApplication"
android:allowBackup="true"
Expand Down

0 comments on commit b646db9

Please sign in to comment.