正在查看: Namma Yatri v3.3.7 应用的 Clarity.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
正在查看: Namma Yatri v3.3.7 应用的 Clarity.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
package com.microsoft.clarity;
import android.app.Activity;
import android.content.Context;
import android.net.Uri;
import android.view.View;
import com.microsoft.clarity.a.A;
import com.microsoft.clarity.a.B;
import com.microsoft.clarity.a.C;
import com.microsoft.clarity.a.C0345f;
import com.microsoft.clarity.a.C0346g;
import com.microsoft.clarity.a.D;
import com.microsoft.clarity.a.E;
import com.microsoft.clarity.a.F;
import com.microsoft.clarity.a.G;
import com.microsoft.clarity.a.k;
import com.microsoft.clarity.a.n;
import com.microsoft.clarity.a.o;
import com.microsoft.clarity.a.q;
import com.microsoft.clarity.a.r;
import com.microsoft.clarity.a.s;
import com.microsoft.clarity.a.v;
import com.microsoft.clarity.a.y;
import com.microsoft.clarity.a.z;
import com.microsoft.clarity.i.p;
import com.microsoft.clarity.i.t;
import com.microsoft.clarity.i.u;
import com.microsoft.clarity.models.LogLevel;
import com.microsoft.clarity.models.PageMetadata;
import com.microsoft.clarity.models.SessionMetadata;
import com.microsoft.clarity.q.g;
import com.microsoft.clarity.q.l;
import jd.InterfaceC1001a;
import jd.InterfaceC1012l;
import kotlin.jvm.internal.m;
import sd.AbstractC1172m;
public class Clarity {
@Deprecated
public static String getCurrentSessionId() {
t tVar = G.a;
if (tVar == null) {
l.e("Clarity has not started yet.");
return null;
}
String a = u.a(tVar.b);
if (a != null) {
return a;
}
l.e("No Clarity session has started yet.");
return a;
}
public static String getCurrentSessionUrl() {
String a;
String userId;
SessionMetadata sessionMetadata;
t tVar = G.a;
if (tVar == null) {
l.e("Clarity has not started yet.");
a = null;
} else {
a = u.a(tVar.b);
if (a == null) {
l.e("No Clarity session has started yet.");
}
}
if (a == null) {
return null;
}
t tVar2 = G.a;
if (tVar2 == null) {
l.e("Clarity has not started yet.");
userId = null;
} else {
PageMetadata a2 = tVar2.b.a();
userId = (a2 == null || (sessionMetadata = a2.getSessionMetadata()) == null) ? null : sessionMetadata.getUserId();
if (userId == null) {
l.e("No Clarity session has started yet.");
}
}
if (userId == null) {
return null;
}
ClarityConfig clarityConfig = G.c;
String projectId = clarityConfig != null ? clarityConfig.getProjectId() : null;
if (projectId == null) {
l.e("Clarity has not started yet.");
}
if (projectId == null) {
return null;
}
return Uri.parse("https://clarity.microsoft.com/player/").buildUpon().appendPath(projectId).appendPath(userId).appendPath(a).build().toString();
}
public static Boolean initialize(Context context, ClarityConfig config) {
if (context == null || config == null) {
l.c("context and config parameters cannot be null.");
return Boolean.FALSE;
}
t tVar = G.a;
m.i(context, "context");
m.i(config, "config");
return Boolean.valueOf(g.a((InterfaceC1001a) new C0345f(null, context, config), (InterfaceC1012l) C0346g.a, (p) null, 26));
}
public static Boolean isPaused() {
boolean z;
synchronized (G.o) {
z = G.n;
}
return Boolean.valueOf(z);
}
public static Boolean maskView(View view) {
if (view == null) {
l.c("View cannot be null.");
return Boolean.FALSE;
}
t tVar = G.a;
m.i(view, "view");
LogLevel logLevel = l.a;
l.d("Mask view " + view + '.');
return Boolean.valueOf(g.a((InterfaceC1001a) new k(view), (InterfaceC1012l) com.microsoft.clarity.a.l.a, (p) null, 26));
}
public static Boolean pause() {
t tVar = G.a;
return Boolean.valueOf(g.a((InterfaceC1001a) com.microsoft.clarity.a.m.a, (InterfaceC1012l) n.a, (p) null, 26));
}
public static Boolean resume() {
t tVar = G.a;
return Boolean.valueOf(g.a((InterfaceC1001a) o.a, (InterfaceC1012l) com.microsoft.clarity.a.p.a, (p) null, 26));
}
public static boolean sendCustomEvent(String value) {
if (value == null) {
l.c("Custom event value cannot be null.");
return false;
}
t tVar = G.a;
m.i(value, "value");
if (AbstractC1172m.X(value)) {
l.c("Custom event value cannot be blank.");
return false;
}
if (value.length() < 254) {
return g.a((InterfaceC1001a) new q(value), (InterfaceC1012l) r.a, (p) null, 26);
}
l.c("Custom event value length should be less than 254 characters.");
return false;
}
public static Boolean setCurrentScreenName(String str) {
t tVar = G.a;
boolean z = false;
if (str != null && AbstractC1172m.X(str)) {
l.c("Current screen name cannot be blank.");
} else if (str == null || str.length() < 255) {
z = g.a((InterfaceC1001a) new A(str), (InterfaceC1012l) B.a, (p) null, 26);
} else {
l.c("Current screen name length should be less than 255 characters.");
}
return Boolean.valueOf(z);
}
public static Boolean setCustomSessionId(String customSessionId) {
if (customSessionId == null) {
l.c("Custom session id cannot be null.");
return Boolean.FALSE;
}
t tVar = G.a;
m.i(customSessionId, "customSessionId");
LogLevel logLevel = l.a;
l.d("Setting custom session id to " + customSessionId + '.');
boolean z = false;
if (AbstractC1172m.X(customSessionId)) {
l.c("Custom session id cannot be blank.");
} else if (customSessionId.length() > 255) {
l.c("Custom session id length cannot exceed 255 characters.");
} else {
z = g.a((InterfaceC1001a) new s(customSessionId), (InterfaceC1012l) com.microsoft.clarity.a.t.a, (p) null, 26);
}
return Boolean.valueOf(z);
}
public static boolean setCustomTag(String key, String value) {
if (key == null || value == null) {
l.c("Custom tag key and value cannot be null.");
return false;
}
t tVar = G.a;
m.i(key, "key");
m.i(value, "value");
if (AbstractC1172m.X(key) || AbstractC1172m.X(value)) {
l.c("Custom tag key and value cannot be blank.");
return false;
}
if (key.length() < 255 && value.length() < 255) {
return g.a((InterfaceC1001a) new com.microsoft.clarity.a.u(key, value), (InterfaceC1012l) v.a, (p) null, 26);
}
l.c("Custom tag key and value length should be less than 255 characters.");
return false;
}
public static Boolean setCustomUserId(String str) {
if (str != null) {
return Boolean.valueOf(G.a(str));
}
l.c("Custom user id cannot be null.");
return Boolean.FALSE;
}
public static Boolean setOnSessionStartedCallback(SessionStartedCallback callback) {
if (callback == null) {
l.c("Callback function cannot be null.");
return Boolean.FALSE;
}
t tVar = G.a;
m.i(callback, "callback");
return Boolean.valueOf(g.a((InterfaceC1001a) new y(callback), (InterfaceC1012l) z.a, (p) null, 26));
}
public static Boolean startNewSession(SessionStartedCallback sessionStartedCallback) {
t tVar = G.a;
return Boolean.valueOf(g.a((InterfaceC1001a) new C(sessionStartedCallback), (InterfaceC1012l) D.a, (p) null, 26));
}
public static Boolean unmaskView(View view) {
if (view == null) {
l.c("View cannot be null.");
return Boolean.FALSE;
}
t tVar = G.a;
m.i(view, "view");
LogLevel logLevel = l.a;
l.d("Unmask view " + view + '.');
return Boolean.valueOf(g.a((InterfaceC1001a) new E(view), (InterfaceC1012l) F.a, (p) null, 26));
}
public static Boolean initialize(Activity activity, ClarityConfig config) {
if (activity != null && config != null) {
t tVar = G.a;
Context context = activity.getApplicationContext();
m.i(context, "context");
m.i(config, "config");
return Boolean.valueOf(g.a((InterfaceC1001a) new C0345f(activity, context, config), (InterfaceC1012l) C0346g.a, (p) null, 26));
}
l.c("activity and config parameters cannot be null.");
return Boolean.FALSE;
}
}