Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix the crash in DevX tracking in debugging mode #797

Merged
merged 3 commits into from
Aug 5, 2022
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
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
VERSION_NAME=6.5.1
VERSION_NAME=6.5.2-SNAPSHOT

POM_PACKAGING=aar
GROUP=com.mixpanel.android
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -298,8 +298,10 @@ protected AnalyticsMessages getAnalyticsMessages() {
}
}



@Test
public void testPeopleOperations() throws JSONException {
public void testPeopleMessageOperations() throws JSONException {
final List<AnalyticsMessages.PeopleDescription> messages = new ArrayList<AnalyticsMessages.PeopleDescription>();

final AnalyticsMessages listener = new AnalyticsMessages(InstrumentationRegistry.getInstrumentation().getContext()) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2111,7 +2111,8 @@ private JSONObject stdPeopleMessage(String actionType, Object properties)
dataObj.put("$mp_metadata", mSessionMetadata.getMetadataForPeople());

if (((getContext().getApplicationInfo().flags & ApplicationInfo.FLAG_DEBUGGABLE) != 0)) {
if (properties instanceof JSONObject && !((JSONObject) properties).keys().next().startsWith("$ae_")) {
if (properties instanceof JSONObject && ((JSONObject) properties).keys().hasNext()
&& !((JSONObject) properties).keys().next().startsWith("$ae_")) {
mPersistentIdentity.setHasMPDebugUsedPeople(mToken);
}
}
Expand Down