Commit 5f85707
refactor(distribution): Use interface pattern for distribution API
Address PR feedback from #4712:
- Refactor Sentry.distribution() to follow existing replay() pattern
- Create IDistributionApi interface with core methods (checkForUpdateBlocking, checkForUpdate, downloadUpdate)
- Add distributionController to SentryOptions with NoOp default
- Use getCurrentScopes().getScope().getOptions().getDistributionController() access pattern
- Remove reflection-based implementation for type safety
- Provide NoOpDistributionApi fallback when module not available
This follows the established architecture pattern used by replay API,
allowing distribution integrations to register real implementations
via options.setDistributionController() during integration registration.
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>1 parent 8547005 commit 5f85707
File tree
8 files changed
+138
-56
lines changed- sentry-android-distribution/src/main
- java/io/sentry/android/distribution
- internal
- sentry
- api
- src/main/java/io/sentry
8 files changed
+138
-56
lines changedThis file was deleted.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
4 | | - | |
5 | | - | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
6 | 7 | | |
7 | 8 | | |
8 | 9 | | |
| |||
11 | 12 | | |
12 | 13 | | |
13 | 14 | | |
14 | | - | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
15 | 35 | | |
16 | 36 | | |
17 | 37 | | |
| |||
32 | 52 | | |
33 | 53 | | |
34 | 54 | | |
35 | | - | |
| 55 | + | |
36 | 56 | | |
37 | 57 | | |
38 | 58 | | |
| |||
57 | 77 | | |
58 | 78 | | |
59 | 79 | | |
60 | | - | |
| 80 | + | |
61 | 81 | | |
62 | 82 | | |
63 | | - | |
| 83 | + | |
64 | 84 | | |
65 | 85 | | |
66 | 86 | | |
67 | 87 | | |
68 | 88 | | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
69 | 102 | | |
70 | 103 | | |
71 | 104 | | |
| |||
74 | 107 | | |
75 | 108 | | |
76 | 109 | | |
77 | | - | |
78 | | - | |
79 | | - | |
80 | | - | |
81 | | - | |
82 | | - | |
83 | | - | |
84 | | - | |
85 | | - | |
| 110 | + | |
86 | 111 | | |
87 | 112 | | |
Lines changed: 0 additions & 28 deletions
This file was deleted.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
767 | 767 | | |
768 | 768 | | |
769 | 769 | | |
| 770 | + | |
| 771 | + | |
| 772 | + | |
| 773 | + | |
| 774 | + | |
| 775 | + | |
770 | 776 | | |
771 | 777 | | |
772 | 778 | | |
| |||
1469 | 1475 | | |
1470 | 1476 | | |
1471 | 1477 | | |
| 1478 | + | |
| 1479 | + | |
| 1480 | + | |
| 1481 | + | |
| 1482 | + | |
| 1483 | + | |
| 1484 | + | |
1472 | 1485 | | |
1473 | 1486 | | |
1474 | 1487 | | |
| |||
2551 | 2564 | | |
2552 | 2565 | | |
2553 | 2566 | | |
2554 | | - | |
| 2567 | + | |
2555 | 2568 | | |
2556 | 2569 | | |
2557 | 2570 | | |
| |||
3306 | 3319 | | |
3307 | 3320 | | |
3308 | 3321 | | |
| 3322 | + | |
3309 | 3323 | | |
3310 | 3324 | | |
3311 | 3325 | | |
| |||
3440 | 3454 | | |
3441 | 3455 | | |
3442 | 3456 | | |
| 3457 | + | |
3443 | 3458 | | |
3444 | 3459 | | |
3445 | 3460 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1307 | 1307 | | |
1308 | 1308 | | |
1309 | 1309 | | |
1310 | | - | |
1311 | | - | |
1312 | | - | |
1313 | | - | |
1314 | | - | |
1315 | | - | |
1316 | | - | |
1317 | | - | |
1318 | | - | |
| 1310 | + | |
| 1311 | + | |
| 1312 | + | |
1319 | 1313 | | |
1320 | 1314 | | |
1321 | 1315 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
531 | 531 | | |
532 | 532 | | |
533 | 533 | | |
| 534 | + | |
| 535 | + | |
534 | 536 | | |
535 | 537 | | |
536 | 538 | | |
| |||
2822 | 2824 | | |
2823 | 2825 | | |
2824 | 2826 | | |
| 2827 | + | |
| 2828 | + | |
| 2829 | + | |
| 2830 | + | |
| 2831 | + | |
| 2832 | + | |
| 2833 | + | |
| 2834 | + | |
| 2835 | + | |
2825 | 2836 | | |
2826 | 2837 | | |
2827 | 2838 | | |
| |||
0 commit comments