Skip to content

Commit 1e8fd79

Browse files
romtsnclaude
andcommitted
license: Attribute vendored AndroidX Compose UI code in Session Replay
sentry-android-replay's Nodes.kt vendors code from AndroidX Compose UI (Apache 2.0, The Android Open Source Project) without attribution: - boundsInWindow is a faster copy of LayoutCoordinates.boundsInWindow - fastMinOf/fastMaxOf/fastCoerceIn/fastCoerceAtLeast/fastCoerceAtMost are copied from androidx.compose.ui.util.MathHelpers Add the required source-file attribution header and a THIRD_PARTY_NOTICES.md entry covering both source files. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
1 parent b936425 commit 1e8fd79

2 files changed

Lines changed: 51 additions & 0 deletions

File tree

THIRD_PARTY_NOTICES.md

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -315,6 +315,35 @@ limitations under the License.
315315

316316
---
317317

318+
## Android Open Source Project — Jetpack Compose UI (Apache 2.0)
319+
320+
**Source:** https://github.com/androidx/androidx/blob/fc7df0dd68466ac3bb16b1c79b7a73dd0bfdd4c1/compose/ui/ui/src/commonMain/kotlin/androidx/compose/ui/layout/LayoutCoordinates.kt#L187<br>
321+
**Source:** https://github.com/androidx/androidx/blob/androidx-main/compose/ui/ui-util/src/commonMain/kotlin/androidx/compose/ui/util/MathHelpers.kt<br>
322+
**License:** Apache License 2.0<br>
323+
**Copyright:** Copyright (C) 2019, 2020 The Android Open Source Project
324+
325+
### Scope
326+
327+
The Sentry Android Replay SDK includes code adapted from Jetpack Compose UI, used to compute Compose node bounds while traversing the view hierarchy for masking. The code resides in `io.sentry.android.replay.util.Nodes`: the `boundsInWindow` extension function (a faster copy of `LayoutCoordinates.boundsInWindow`) and the `fastMinOf`, `fastMaxOf`, `fastCoerceIn`, `fastCoerceAtLeast`, and `fastCoerceAtMost` numeric helpers (copied from `androidx.compose.ui.util.MathHelpers`).
328+
329+
```
330+
Copyright (C) 2019, 2020 The Android Open Source Project
331+
332+
Licensed under the Apache License, Version 2.0 (the "License");
333+
you may not use this file except in compliance with the License.
334+
You may obtain a copy of the License at
335+
336+
http://www.apache.org/licenses/LICENSE-2.0
337+
338+
Unless required by applicable law or agreed to in writing, software
339+
distributed under the License is distributed on an "AS IS" BASIS,
340+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
341+
See the License for the specific language governing permissions and
342+
limitations under the License.
343+
```
344+
345+
---
346+
318347
## OpenTelemetry (Apache 2.0)
319348

320349
**Source:** https://github.com/open-telemetry/opentelemetry-java (Commit: 0aacc55d1e3f5cc6dbb4f8fa26bcb657b01a7bc9)<br>

sentry-android-replay/src/main/java/io/sentry/android/replay/util/Nodes.kt

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,25 @@
1+
/*
2+
* Portions of this file are adapted from AndroidX Compose UI:
3+
* - the `boundsInWindow` extension is a faster copy of `LayoutCoordinates.boundsInWindow`
4+
* - the `fastMinOf`, `fastMaxOf`, `fastCoerceIn`, `fastCoerceAtLeast` and `fastCoerceAtMost`
5+
* helpers are copied from `androidx.compose.ui.util.MathHelpers`
6+
*
7+
* Adapted from:
8+
* https://github.com/androidx/androidx/blob/fc7df0dd68466ac3bb16b1c79b7a73dd0bfdd4c1/compose/ui/ui/src/commonMain/kotlin/androidx/compose/ui/layout/LayoutCoordinates.kt
9+
* https://github.com/androidx/androidx/blob/androidx-main/compose/ui/ui-util/src/commonMain/kotlin/androidx/compose/ui/util/MathHelpers.kt
10+
*
11+
* Copyright (C) 2019, 2020 The Android Open Source Project
12+
*
13+
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
14+
* in compliance with the License. You may obtain a copy of the License at
15+
*
16+
* http://www.apache.org/licenses/LICENSE-2.0
17+
*
18+
* Unless required by applicable law or agreed to in writing, software distributed under the License
19+
* is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
20+
* or implied. See the License for the specific language governing permissions and limitations under
21+
* the License.
22+
*/
123
@file:Suppress("INVISIBLE_MEMBER", "INVISIBLE_REFERENCE") // to access internal vals and classes
224

325
package io.sentry.android.replay.util

0 commit comments

Comments
 (0)