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

Commit

Permalink
Re-enable RECEIVE_BOOT_COMPLETED permission on all platforms but Ques…
Browse files Browse the repository at this point in the history
…t. (#1359)

* Re-enable  RECEIVE_BOOT_COMPLETED permission on all platforms but Quest.

* Use different schedulers depending if RECEIVE_BOOT_COMPLETED permission is available.
  • Loading branch information
MortimerGoro authored and bluemarvin committed Jul 5, 2019
1 parent 38ea95f commit b9e4984
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 5 deletions.
6 changes: 3 additions & 3 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ android {
arguments "-DVR_SDK_LIB=oculusvr-lib", "-DVR_SDK_EXTRA_LIB=ovrplatform-lib", "-DOCULUSVR=ON"
}
}
manifestPlaceholders = [ headtrackingRequired:"false" ]
manifestPlaceholders = [ headtrackingRequired:"false", permissionToRemove:"android.permission.RECEIVE_BOOT_COMPLETED" ]
}

oculusvrStore {
Expand All @@ -141,7 +141,7 @@ android {
arguments "-DVR_SDK_LIB=oculusvr-lib", "-DVR_SDK_EXTRA_LIB=ovrplatform-lib", "-DOCULUSVR=ON"
}
}
manifestPlaceholders = [ headtrackingRequired:"true" ]
manifestPlaceholders = [ headtrackingRequired:"true", permissionToRemove:"android.permission.RECEIVE_BOOT_COMPLETED" ]
}

oculusvr3dofStore {
Expand All @@ -155,7 +155,7 @@ android {
arguments "-DVR_SDK_LIB=oculusvr-lib", "-DVR_SDK_EXTRA_LIB=ovrplatform-lib", "-DOCULUSVR=ON"
}
}
manifestPlaceholders = [ headtrackingRequired:"false" ]
manifestPlaceholders = [ headtrackingRequired:"false", permissionToRemove:"android.permission.CAMERA" ]
}

svr {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@
import org.mozilla.telemetry.net.TelemetryClient;
import org.mozilla.telemetry.ping.TelemetryCorePingBuilder;
import org.mozilla.telemetry.ping.TelemetryMobileEventPingBuilder;
import org.mozilla.telemetry.schedule.TelemetryScheduler;
import org.mozilla.telemetry.schedule.jobscheduler.JobSchedulerTelemetryScheduler;
import org.mozilla.telemetry.serialize.JSONPingSerializer;
import org.mozilla.telemetry.storage.FileTelemetryStorage;
import org.mozilla.vrbrowser.BuildConfig;
Expand Down Expand Up @@ -97,8 +99,13 @@ public static void init(Context aContext) {

final JSONPingSerializer serializer = new JSONPingSerializer();
final FileTelemetryStorage storage = new FileTelemetryStorage(configuration, serializer);
TelemetryScheduler scheduler;
if (BuildConfig.FLAVOR_platform.equals("oculusvr") || BuildConfig.FLAVOR_platform.equals("oculusvrStore")) {
scheduler = new FxRTelemetryScheduler();
} else {
scheduler = new JobSchedulerTelemetryScheduler();
}
final TelemetryClient client = new TelemetryClient(new HttpURLConnectionClient());
final FxRTelemetryScheduler scheduler = new FxRTelemetryScheduler();

TelemetryHolder.set(new Telemetry(configuration, storage, client, scheduler)
.addPingBuilder(new TelemetryCorePingBuilder(configuration))
Expand Down
1 change: 0 additions & 1 deletion app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
<uses-permission android:name="${applicationId}.CRASH_RECEIVER_PERMISSION"/>
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE"/>
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
<uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" tools:node="remove"/>

<permission android:name="${applicationId}.CRASH_RECEIVER_PERMISSION"
android:protectionLevel="signature"/>
Expand Down
1 change: 1 addition & 0 deletions app/src/oculusvrArmDebug/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
<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"/>
<uses-permission android:name="${permissionToRemove}" 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 @@ -6,6 +6,7 @@
<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"/>
<uses-permission android:name="${permissionToRemove}" tools:node="remove" />
<application
android:name=".VRBrowserApplication"
android:allowBackup="true"
Expand Down

0 comments on commit b9e4984

Please sign in to comment.