com.eg.agent.android.connectivity.UserActionFacade Maven / Gradle / Ivy
The newest version!
/*
* Decompiled with CFR 0.137.
*/
package com.eg.agent.android.connectivity;
import com.eg.agent.android.analytics.BaseController;
import com.eg.agent.android.analytics.EventCategory;
import com.eg.agent.android.connectivity.Facade;
import com.eg.agent.android.connectivity.UserActionType;
import com.eg.agent.android.Features;
import java.util.Map;
import java.util.TreeMap;
import java.util.concurrent.atomic.AtomicReference;
public class UserActionFacade {
private static AtomicReference instance = new AtomicReference(null);
public static UserActionFacade getInstance() {
instance.compareAndSet(null, new UserActionFacade());
return instance.get();
}
public void recordUserAction(UserActionType userActionType) {
this.recordUserAction(userActionType, null);
}
public void recordUserAction(UserActionType userActionType, Map userActionAttributes) {
if (Features.featureEnabled(Features.DistributedTracing)) {
TreeMap attributes = new TreeMap();
attributes.put("actionType", userActionType.toString());
if (userActionAttributes != null) {
attributes.putAll(userActionAttributes);
}
BaseController.getInstance().internalRecordEvent(null, EventCategory.UserAction, "MobileUserAction", attributes);
}
}
}