Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

### Removed

- Remove deprecated `KitIntegration.getAllUserAttributes()`. Custom kits must use `getCurrentUser().getUserAttributes()` (or other `FilteredMParticleUser` APIs) and `AttributeListener` callbacks instead ([#682](https://github.com/mParticle/mparticle-android-sdk/pull/682))
- Remove deprecated `KitIntegration.getUserIdentities()`. Custom kits must use identity data from kit callbacks and request objects instead ([#681](https://github.com/mParticle/mparticle-android-sdk/pull/681)) ([8d3a23c8](https://github.com/mParticle/mparticle-android-sdk/commit/8d3a23c84c96d11f0ee1f80763adacc4f964b544))

## [5.78.2](https://github.com/mParticle/mparticle-android-sdk/compare/v5.78.1...v5.78.2) (2026-02-27)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ class DataplanBlockingUserTests : BaseKitOptionsTest() {
AccessUtils.awaitMessageHandler()

kitIntegrationTestKits.forEach { kit ->
assertEquals(kit.name, allowedAttributes, kit.allUserAttributes)
assertEquals(kit.name, allowedAttributes, kit.getCurrentUser()?.userAttributes)
}
// sanity check to make sure the non-filtered User has the blocked identities
assertEquals(
Expand Down Expand Up @@ -174,7 +174,7 @@ class DataplanBlockingUserTests : BaseKitOptionsTest() {
assertEquals(count, allowedAttributes.size * 4)

kitIntegrationTestKits.forEach {
assertEquals(0, it.allUserAttributes.size)
assertEquals(0, it.getCurrentUser()?.userAttributes?.size ?: 0)
}
// sanity check to make sure the non-filtered User has the blocked identities
assertEquals(
Expand Down Expand Up @@ -241,8 +241,9 @@ class DataplanBlockingUserTests : BaseKitOptionsTest() {

assertEquals(count, allowedAttributes.size * 4)
kitIntegrationTestKits.forEach { kit ->
assertEquals(allowedAttributes.size, kit.allUserAttributes.size)
assertEquals(allowedAttributes.keys, kit.allUserAttributes.keys)
val filtered = kit.getCurrentUser()?.userAttributes
assertEquals(allowedAttributes.size, filtered?.size ?: 0)
assertEquals(allowedAttributes.keys, filtered?.keys)
}
// sanity check to make sure the non-filtered User has the blocked attributes
assertEquals(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@
import java.lang.ref.WeakReference;
import java.math.BigDecimal;
import java.util.Collections;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

Expand Down Expand Up @@ -119,46 +118,6 @@ public boolean isDisabled(boolean isOptOutEvent) {
(getConfiguration().shouldHonorOptOut() && kitManager.isOptedOut() && !isOptOutEvent);
}

/**
* Retrieve filtered user attributes. Use this method to retrieve user attributes at any time.
* To ensure that filtering is respected, kits must use this method rather than the public API.
* <p>
* If the KitIntegration implements the {@link AttributeListener} interface and returns true
* for {@link AttributeListener#supportsAttributeLists()}, this method will pass back all attributes
* as they are (as String values or as List&lt;String&gt; values). Otherwise, this method will comma-separate
* the List values and return back all String values.
*
* @return a Map of attributes according to the logic above.
*/
@Deprecated
public final Map<String, Object> getAllUserAttributes() {
MParticle instance = MParticle.getInstance();
if (instance != null) {
MParticleUser user = instance.Identity().getCurrentUser();
if (user != null) {
Map<String, Object> userAttributes = user.getUserAttributes();
if (kitManager != null) {
userAttributes = kitManager.getDataplanFilter().transformUserAttributes(userAttributes);
}
Map<String, Object> attributes = (Map<String, Object>) KitConfiguration.filterAttributes(
getConfiguration().getUserAttributeFilters(),
userAttributes
);
if ((this instanceof AttributeListener) && ((AttributeListener) this).supportsAttributeLists()) {
return attributes;
} else {
for (Map.Entry<String, Object> entry : attributes.entrySet()) {
if (entry.getValue() instanceof List) {
attributes.put(entry.getKey(), KitUtils.join((List) entry.getValue()));
}
}
return attributes;
}
}
}
return new HashMap<String, Object>();
}

public final MParticleUser getCurrentUser() {
MParticle instance = MParticle.getInstance();
if (instance != null) {
Expand Down

This file was deleted.

Loading