Repository navigation
Commit 23a194a
ref(android): Make AndroidElapsedRealtimeClock a singleton
It took a public constructor to match `new SentryAndroidDateProvider()`
on the line beside it in AndroidOptionsInitializer. That line is gone
now that SentryAndroidOptions overrides the getter, so the odd one out
was the clock rather than the neighbour.
With getInstance() it matches the two JVM clocks, and the field it was
stored in disappears: both overrides are now the same single line
returning a singleton.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>1 parent 9e2122d commit 23a194a
2 files changed
Lines changed: 10 additions & 4 deletions
File tree
- sentry-android-core/src/main/java/io/sentry/android/core
- internal/time
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
283 | 283 | | |
284 | 284 | | |
285 | 285 | | |
286 | | - | |
287 | | - | |
288 | | - | |
289 | 286 | | |
290 | 287 | | |
291 | 288 | | |
| |||
872 | 869 | | |
873 | 870 | | |
874 | 871 | | |
875 | | - | |
| 872 | + | |
876 | 873 | | |
877 | 874 | | |
878 | 875 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
| 6 | + | |
6 | 7 | | |
7 | 8 | | |
8 | 9 | | |
| |||
13 | 14 | | |
14 | 15 | | |
15 | 16 | | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
16 | 25 | | |
17 | 26 | | |
18 | 27 | | |
| |||
0 commit comments