Skip to content

Commit f607694

Browse files
committed
Apply spotless
1 parent f79b3ed commit f607694

File tree

3 files changed

+41
-9
lines changed

3 files changed

+41
-9
lines changed

xr/src/main/java/com/example/xr/compose/SpatialCapabilities.kt

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,10 +24,6 @@ import androidx.xr.compose.subspace.SpatialPanel
2424
import androidx.xr.compose.subspace.layout.SubspaceModifier
2525
import androidx.xr.compose.subspace.layout.fillMaxHeight
2626
import androidx.xr.compose.subspace.layout.width
27-
import androidx.xr.scenecore.Session
28-
import androidx.xr.scenecore.SpatialCapabilities
29-
import androidx.xr.scenecore.addSpatialCapabilitiesChangedListener
30-
import androidx.xr.scenecore.getSpatialCapabilities
3127

3228
@Composable
3329
private fun SupportingInfoPanel() {}

xr/src/main/java/com/example/xr/scenecore/GltfEntity.kt

Lines changed: 18 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,19 @@
1+
/*
2+
* Copyright 2025 The Android Open Source Project
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License");
5+
* you may not use this file except in compliance with the License.
6+
* You may obtain a copy of the License at
7+
*
8+
* https://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed to in writing, software
11+
* distributed under the License is distributed on an "AS IS" BASIS,
12+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
* See the License for the specific language governing permissions and
14+
* limitations under the License.
15+
*/
16+
117
package com.example.xr.scenecore
218

319
import android.content.Intent
@@ -19,7 +35,7 @@ private suspend fun loadGltfFile(session: Session) {
1935
private fun createModelEntity(session: Session, gltfModel: GltfModel) {
2036
// [START androidxr_scenecore_gltfmodelentity_create]
2137
if (session.getSpatialCapabilities()
22-
.hasCapability(SpatialCapabilities.SPATIAL_CAPABILITY_3D_CONTENT)
38+
.hasCapability(SpatialCapabilities.SPATIAL_CAPABILITY_3D_CONTENT)
2339
) {
2440
val gltfEntity = GltfModelEntity.create(session, gltfModel)
2541
}
@@ -45,4 +61,4 @@ private fun ComponentActivity.startSceneViewer() {
4561
sceneViewerIntent.setDataAndType(intentUri, "model/gltf-binary")
4662
startActivity(sceneViewerIntent)
4763
// [END androidxr_scenecore_sceneviewer]
48-
}
64+
}
Lines changed: 23 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,19 @@
1+
/*
2+
* Copyright 2025 The Android Open Source Project
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License");
5+
* you may not use this file except in compliance with the License.
6+
* You may obtain a copy of the License at
7+
*
8+
* https://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed to in writing, software
11+
* distributed under the License is distributed on an "AS IS" BASIS,
12+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
* See the License for the specific language governing permissions and
14+
* limitations under the License.
15+
*/
16+
117
package com.example.xr.scenecore
218

319
import androidx.xr.scenecore.Session
@@ -8,14 +24,18 @@ fun checkMultipleCapabilities(xrSession: Session) {
824
// [START androidxr_compose_checkMultipleCapabilities]
925
// Example 1: check if enabling passthrough mode is allowed
1026
if (xrSession.getSpatialCapabilities().hasCapability(
11-
SpatialCapabilities.SPATIAL_CAPABILITY_PASSTHROUGH_CONTROL)) {
27+
SpatialCapabilities.SPATIAL_CAPABILITY_PASSTHROUGH_CONTROL
28+
)
29+
) {
1230
xrSession.spatialEnvironment.setPassthroughOpacityPreference(0f)
1331
}
1432
// Example 2: multiple capability flags can be checked simultaneously:
1533
if (xrSession.getSpatialCapabilities().hasCapability(
1634
SpatialCapabilities.SPATIAL_CAPABILITY_PASSTHROUGH_CONTROL and
17-
SpatialCapabilities.SPATIAL_CAPABILITY_3D_CONTENT)) {
35+
SpatialCapabilities.SPATIAL_CAPABILITY_3D_CONTENT
36+
)
37+
) {
1838
// ...
1939
}
2040
// [END androidxr_compose_checkMultipleCapabilities]
21-
}
41+
}

0 commit comments

Comments
 (0)