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

Commit a989e89

Browse files
authored
Picovr suffix (#3380)
1 parent eda7d95 commit a989e89

File tree

5 files changed

+46
-5
lines changed

5 files changed

+46
-5
lines changed

app/build.gradle

Lines changed: 28 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,7 @@ android {
168168
arguments "-DVR_SDK_LIB=wavevr-lib", "-DWAVEVR=ON"
169169
}
170170
}
171-
applicationIdSuffix ".wavevr"
171+
applicationIdSuffix ".internal"
172172
}
173173

174174
wavevrStore {
@@ -191,6 +191,17 @@ android {
191191
arguments "-DPICOVR=ON"
192192
}
193193
}
194+
applicationIdSuffix ".internal"
195+
}
196+
197+
picovrStore {
198+
dimension "platform"
199+
externalNativeBuild {
200+
cmake {
201+
cppFlags " -DPICOVR"
202+
arguments "-DPICOVR=ON"
203+
}
204+
}
194205
}
195206

196207
noapi {
@@ -229,6 +240,8 @@ android {
229240
'oculusvr3dofStoreArm64Release',
230241
'picovrArm64Debug',
231242
'picovrArm64Release',
243+
'picovrStoreArm64Debug',
244+
'picovrStoreArm64Release',
232245
'wavevrArm64Debug',
233246
'wavevrArm64Release',
234247
'wavevrStoreArm64Debug',
@@ -345,6 +358,19 @@ android {
345358
jniLibs.srcDirs = ["${project.rootDir}/third_party/picovr"]
346359
}
347360

361+
picovrStore {
362+
java.srcDirs = [
363+
'src/picovr/java'
364+
]
365+
assets.srcDirs = [
366+
'src/picovr/assets'
367+
]
368+
res.srcDirs = [
369+
'src/picovr/res'
370+
]
371+
jniLibs.srcDirs = ["${project.rootDir}/third_party/picovr"]
372+
}
373+
348374
noapi {
349375
java.srcDirs = [
350376
'src/noapi/java'
@@ -438,6 +464,7 @@ dependencies {
438464

439465
// Pico
440466
picovrImplementation fileTree(dir: "${project.rootDir}/third_party/picovr/", include: ['*.aar'])
467+
picovrStoreImplementation fileTree(dir: "${project.rootDir}/third_party/picovr/", include: ['*.aar'])
441468
}
442469

443470
if (findProject(':servo')) {

app/src/common/shared/org/mozilla/vrbrowser/telemetry/GleanMetricsService.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,7 @@ public static void newWindowOpenEvent() {
157157
}
158158

159159
private static void setStartupMetrics() {
160-
Distribution.INSTANCE.channelName().set(DeviceType.isOculusBuild() ? "oculusvr" : BuildConfig.FLAVOR_platform);
160+
Distribution.INSTANCE.channelName().set(DeviceType.getDeviceTypeId());
161161
}
162162

163163
@VisibleForTesting

app/src/common/shared/org/mozilla/vrbrowser/telemetry/TelemetryWrapper.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,7 @@ public static void init(Context aContext) {
145145
final boolean telemetryEnabled = SettingsStore.getInstance(aContext).isTelemetryEnabled();
146146
final TelemetryConfiguration configuration = new TelemetryConfiguration(aContext)
147147
.setServerEndpoint("https://incoming.telemetry.mozilla.org")
148-
.setAppName(APP_NAME + "_" + (DeviceType.isOculusBuild() ? "oculusvr" : BuildConfig.FLAVOR_platform))
148+
.setAppName(APP_NAME + "_" + DeviceType.getDeviceTypeId())
149149
.setUpdateChannel(BuildConfig.BUILD_TYPE)
150150
.setPreferencesImportantForTelemetry(resources.getString(R.string.settings_key_locale))
151151
.setCollectionEnabled(telemetryEnabled)

app/src/common/shared/org/mozilla/vrbrowser/utils/DeviceType.java

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,4 +66,17 @@ public static boolean isWaveBuild() {
6666
public static boolean isPicoVR() {
6767
return BuildConfig.FLAVOR_platform.toLowerCase().contains("picovr");
6868
}
69+
70+
public static String getDeviceTypeId() {
71+
String type = BuildConfig.FLAVOR_platform;
72+
if (DeviceType.isOculusBuild()) {
73+
type = "oculusvr";
74+
} else if (DeviceType.isPicoVR()) {
75+
type = "picovr";
76+
} else if (DeviceType.isWaveBuild()) {
77+
type = "wavevrStore";
78+
}
79+
80+
return type;
81+
}
6982
}

tools/taskcluster/build_targets.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,15 +12,15 @@
1212
This is the default behaviour with no options. Only the Release build of each
1313
architecture for each supported platform is built:
1414
$ python build_targets.py 1.1.4a
15-
assembleNoapiArm64Release assembleNoapiX86_64Release assembleOculusvrArm64Release assembleWavevrstoreArm64Release assemblePicovrArm64Release assembleOculusvrstoreArm64Release assembleWavevrArm64Release assembleOculusvr3dofstoreArm64Release
15+
assembleNoapiArm64Release assembleNoapiX86_64Release assembleOculusvrArm64Release assembleWavevrstoreArm64Release assemblePicovrArm64Release assemblePicovrStoreArm64Release assembleOculusvrstoreArm64Release assembleWavevrArm64Release assembleOculusvr3dofstoreArm64Release
1616
1717
Specifies only build the OculusVR platform:
1818
$ python build_targets.py 1.1.4b+oculusvr
1919
assembleOculusvrArm64Release
2020
2121
Specifies all build types including Release and Debug:
2222
$ python build_targets.py 1.1.4c=all
23-
assembleNoapiArm64 assembleNoapiX86_64 assembleOculusvrArm64 assembleWavevrstoreArm64 assemblePicovrArm64 assembleOculusvrstoreArm64 assembleWavevrArm64 assembleOculusvr3dofstoreArm64
23+
assembleNoapiArm64 assembleNoapiX86_64 assembleOculusvrArm64 assembleWavevrstoreArm64 assemblePicovrArm64 assemblePicovrStoreArm64 assembleOculusvrstoreArm64 assembleWavevrArm64 assembleOculusvr3dofstoreArm64
2424
2525
Specifies Release builds of Arm64 OculusVR, Arm64 WaveVR, and x86_64 NoAPI:
2626
$ python build_targets.py 1.1.4d+oculusvr+wavevr+noapi=x86_64
@@ -39,6 +39,7 @@
3939
'wavevr': ['arm64'],
4040
'wavevrStore': ['arm64'],
4141
'picovr': ['arm64'],
42+
'picovrStore': ['arm64'],
4243
'noapi': ['arm64', 'x86_64'],
4344
}
4445

0 commit comments

Comments
 (0)