Commit 9d07e1c
authored
feat: inline user attribute removal in onRemoveUserAttribute (#687)
* Add BaseAttributeListener for shared supportsAttributeLists()
Introduce KitIntegration.BaseAttributeListener as the common superinterface
for AttributeListener and UserAttributeListener. Document it as a temporary
contract to enable incremental migration and smaller PRs.
Made-with: Cursor
* KitManagerImpl: call supportsAttributeLists once per provider
Resolve via BaseAttributeListener before AttributeListener/UserAttributeListener
branches in onUserAttributesReceived and setUserAttribute(list).
Made-with: Cursor
* Braze kit: delegate onRemoveUserAttribute to removeUserAttribute
UserAttributeListener.onRemoveUserAttribute now forwards to the existing
AttributeListener.removeUserAttribute implementation for braze-38 through braze-41.
Made-with: Cursor
* Move onRemoveUserAttribute to BaseAttributeListener
Declare onRemoveUserAttribute on KitIntegration.BaseAttributeListener so
AttributeListener and UserAttributeListener implementors must implement it.
KitManagerImpl now dispatches removal once via BaseAttributeListener.
AttributeListener-only kits delegate onRemoveUserAttribute to removeUserAttribute;
AttributeListenerTestKit updated accordingly.
Made-with: Cursor
* Remove removeUserAttribute from AttributeListener; keep kit helpers
Drop void removeUserAttribute(String) from KitIntegration.AttributeListener.
Kits keep the same logic as private-style helpers (fun removeUserAttribute
without override) and still satisfy BaseAttributeListener via
onRemoveUserAttribute. AdobeKitBase implements onRemoveUserAttribute by
delegating to removeUserAttribute.
Made-with: Cursor
* Inline remove-user-attribute logic into onRemoveUserAttribute
Move kit-specific handling from removed helper methods into
BaseAttributeListener.onRemoveUserAttribute implementations.
Rename AttributeListenerTestKit callback to removeUserAttributeListener.
Fix Braze custom-key branch for Kotlin smart-cast in Braze callback.
Made-with: Cursor
* chore: add no-op comments for Sonar empty-method rules
Document intentional empty overrides in Adobe, AppsFlyer, Branch, Braze,
and Kochava kits to satisfy SonarQube analysis.
Made-with: Cursor
* chore(kochava): Sonar no-op comment on onRemoveUserAttribute
Made-with: Cursor
* refactor(braze): use when in onRemoveUserAttribute success path
Replace if/else chain with when for standard vs custom user attribute removal; behavior unchanged across braze 38-41 kits.
Made-with: Cursor1 parent 61fcacf commit 9d07e1c
18 files changed
Lines changed: 234 additions & 185 deletions
File tree
- android-kit-base/src
- androidTest/kotlin/com/mparticle/kits
- testkits
- main/java/com/mparticle/kits
- kits
- adobemedia/adobemedia-5/src/main/kotlin/com/mparticle/kits
- adobe/adobe-5/src/main/kotlin/com/mparticle/kits
- appsflyer/appsflyer-6/src/main/kotlin/com/mparticle/kits
- apptimize/apptimize-3/src/main/kotlin/com/mparticle/kits
- branch/branch-5/src/main/kotlin/com/mparticle/kits
- braze
- braze-38/src/main/kotlin/com/mparticle/kits
- braze-39/src/main/kotlin/com/mparticle/kits
- braze-40/src/main/kotlin/com/mparticle/kits
- braze-41/src/main/kotlin/com/mparticle/kits
- comscore/comscore-6/src/main/kotlin/com/mparticle/kits
- kochava/kochava-5/src/main/kotlin/com/mparticle/kits
- localytics/localytics-6/src/main/kotlin/com/mparticle/kits
- singular/singular-12/src/main/kotlin/com/mparticle/kits
- urbanairship/urbanairship-20/src/main/kotlin/com/mparticle/kits
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
152 | 152 | | |
153 | 153 | | |
154 | 154 | | |
155 | | - | |
| 155 | + | |
156 | 156 | | |
157 | 157 | | |
158 | 158 | | |
| |||
Lines changed: 7 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
| 4 | + | |
4 | 5 | | |
5 | 6 | | |
6 | 7 | | |
| |||
15 | 16 | | |
16 | 17 | | |
17 | 18 | | |
18 | | - | |
| 19 | + | |
19 | 20 | | |
20 | 21 | | |
21 | 22 | | |
| |||
61 | 62 | | |
62 | 63 | | |
63 | 64 | | |
64 | | - | |
65 | | - | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
66 | 70 | | |
67 | 71 | | |
68 | 72 | | |
| |||
Lines changed: 26 additions & 18 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
361 | 361 | | |
362 | 362 | | |
363 | 363 | | |
364 | | - | |
365 | | - | |
| 364 | + | |
| 365 | + | |
| 366 | + | |
| 367 | + | |
| 368 | + | |
| 369 | + | |
366 | 370 | | |
367 | 371 | | |
368 | | - | |
369 | | - | |
370 | | - | |
371 | | - | |
372 | | - | |
| 372 | + | |
373 | 373 | | |
374 | 374 | | |
375 | | - | |
| 375 | + | |
376 | 376 | | |
377 | | - | |
378 | | - | |
| 377 | + | |
379 | 378 | | |
380 | | - | |
| 379 | + | |
381 | 380 | | |
382 | 381 | | |
383 | 382 | | |
384 | | - | |
| 383 | + | |
| 384 | + | |
| 385 | + | |
| 386 | + | |
| 387 | + | |
| 388 | + | |
| 389 | + | |
| 390 | + | |
385 | 391 | | |
386 | | - | |
| 392 | + | |
| 393 | + | |
| 394 | + | |
| 395 | + | |
| 396 | + | |
| 397 | + | |
| 398 | + | |
387 | 399 | | |
388 | 400 | | |
389 | 401 | | |
| |||
540 | 552 | | |
541 | 553 | | |
542 | 554 | | |
543 | | - | |
| 555 | + | |
544 | 556 | | |
545 | 557 | | |
546 | 558 | | |
547 | | - | |
548 | | - | |
549 | 559 | | |
550 | 560 | | |
551 | 561 | | |
| |||
554 | 564 | | |
555 | 565 | | |
556 | 566 | | |
557 | | - | |
558 | | - | |
559 | 567 | | |
560 | 568 | | |
561 | 569 | | |
| |||
Lines changed: 8 additions & 11 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
605 | 605 | | |
606 | 606 | | |
607 | 607 | | |
| 608 | + | |
608 | 609 | | |
609 | | - | |
| 610 | + | |
610 | 611 | | |
611 | 612 | | |
612 | 613 | | |
| |||
617 | 618 | | |
618 | 619 | | |
619 | 620 | | |
620 | | - | |
| 621 | + | |
621 | 622 | | |
622 | 623 | | |
623 | 624 | | |
| |||
683 | 684 | | |
684 | 685 | | |
685 | 686 | | |
| 687 | + | |
686 | 688 | | |
687 | | - | |
| 689 | + | |
688 | 690 | | |
689 | 691 | | |
690 | 692 | | |
691 | 693 | | |
692 | 694 | | |
693 | 695 | | |
694 | | - | |
| 696 | + | |
695 | 697 | | |
696 | 698 | | |
697 | 699 | | |
| |||
721 | 723 | | |
722 | 724 | | |
723 | 725 | | |
724 | | - | |
| 726 | + | |
725 | 727 | | |
726 | 728 | | |
727 | | - | |
728 | | - | |
729 | | - | |
730 | | - | |
731 | | - | |
732 | | - | |
| 729 | + | |
733 | 730 | | |
734 | 731 | | |
735 | 732 | | |
| |||
Lines changed: 7 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
71 | 71 | | |
72 | 72 | | |
73 | 73 | | |
74 | | - | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
75 | 78 | | |
76 | 79 | | |
77 | 80 | | |
| |||
93 | 96 | | |
94 | 97 | | |
95 | 98 | | |
96 | | - | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
97 | 102 | | |
98 | 103 | | |
99 | 104 | | |
| |||
Lines changed: 4 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
108 | 108 | | |
109 | 109 | | |
110 | 110 | | |
111 | | - | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
112 | 115 | | |
113 | 116 | | |
114 | 117 | | |
| |||
Lines changed: 4 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
277 | 277 | | |
278 | 278 | | |
279 | 279 | | |
| 280 | + | |
280 | 281 | | |
281 | 282 | | |
282 | 283 | | |
| |||
304 | 305 | | |
305 | 306 | | |
306 | 307 | | |
307 | | - | |
308 | | - | |
309 | | - | |
| 308 | + | |
| 309 | + | |
| 310 | + | |
310 | 311 | | |
311 | 312 | | |
312 | 313 | | |
| |||
Lines changed: 4 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
152 | 152 | | |
153 | 153 | | |
154 | 154 | | |
155 | | - | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
156 | 159 | | |
157 | 160 | | |
158 | 161 | | |
| |||
Lines changed: 9 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
191 | 191 | | |
192 | 192 | | |
193 | 193 | | |
194 | | - | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
195 | 200 | | |
196 | 201 | | |
197 | 202 | | |
198 | 203 | | |
199 | | - | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
200 | 207 | | |
201 | 208 | | |
202 | 209 | | |
| |||
Lines changed: 36 additions & 34 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
444 | 444 | | |
445 | 445 | | |
446 | 446 | | |
| 447 | + | |
| 448 | + | |
| 449 | + | |
| 450 | + | |
| 451 | + | |
| 452 | + | |
| 453 | + | |
| 454 | + | |
| 455 | + | |
| 456 | + | |
| 457 | + | |
| 458 | + | |
| 459 | + | |
| 460 | + | |
| 461 | + | |
| 462 | + | |
| 463 | + | |
| 464 | + | |
| 465 | + | |
| 466 | + | |
| 467 | + | |
| 468 | + | |
| 469 | + | |
| 470 | + | |
| 471 | + | |
| 472 | + | |
| 473 | + | |
| 474 | + | |
| 475 | + | |
| 476 | + | |
| 477 | + | |
447 | 478 | | |
448 | 479 | | |
449 | 480 | | |
| |||
457 | 488 | | |
458 | 489 | | |
459 | 490 | | |
| 491 | + | |
460 | 492 | | |
461 | 493 | | |
462 | 494 | | |
463 | 495 | | |
464 | 496 | | |
465 | 497 | | |
466 | 498 | | |
| 499 | + | |
467 | 500 | | |
468 | 501 | | |
469 | 502 | | |
| |||
626 | 659 | | |
627 | 660 | | |
628 | 661 | | |
629 | | - | |
630 | | - | |
631 | | - | |
632 | | - | |
633 | | - | |
634 | | - | |
635 | | - | |
636 | | - | |
637 | | - | |
638 | | - | |
639 | | - | |
640 | | - | |
641 | | - | |
642 | | - | |
643 | | - | |
644 | | - | |
645 | | - | |
646 | | - | |
647 | | - | |
648 | | - | |
649 | | - | |
650 | | - | |
651 | | - | |
652 | | - | |
653 | | - | |
654 | | - | |
655 | | - | |
656 | | - | |
657 | | - | |
658 | | - | |
659 | | - | |
660 | | - | |
661 | | - | |
662 | 662 | | |
663 | 663 | | |
664 | 664 | | |
665 | 665 | | |
666 | 666 | | |
667 | | - | |
| 667 | + | |
| 668 | + | |
| 669 | + | |
668 | 670 | | |
669 | 671 | | |
670 | 672 | | |
| |||
0 commit comments