导航菜单

页面标题

页面副标题

Housing v14.7.8 - HeapViewAutocaptureContentProvider.java 源代码

正在查看: Housing v14.7.8 应用的 HeapViewAutocaptureContentProvider.java JAVA 源代码文件

本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。


package io.heap.autocapture;

import android.app.Application;
import android.content.ContentProvider;
import android.content.ContentValues;
import android.content.Context;
import android.database.Cursor;
import android.net.Uri;
import io.heap.autocapture.capture.util.f;
import io.heap.autocapture.capture.util.h;
import io.heap.core.Heap;
import io.heap.core.Options;
import kotlin.Metadata;
import kotlin.jvm.internal.r;

@Metadata(d1 = {"\u0000\f\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\b\u0003\u0018\u00002\u00020\u0001B\u0007¢\u0006\u0004\b\u0002\u0010\u0003¨\u0006\u0004"}, d2 = {"Lio/heap/autocapture/HeapViewAutocaptureContentProvider;", "Landroid/content/ContentProvider;", "<init>", "()V", "autocapture_release"}, k = 1, mv = {1, 8, 0}, xi = 48)
public final class HeapViewAutocaptureContentProvider extends ContentProvider {
    public final boolean a() {
        ap.a aVar;
        ap.a aVar2;
        h hVar;
        ap.a aVar3;
        b bVar;
        b bVar2;
        b bVar3;
        ap.b.INSTANCE.getClass();
        Heap.setLogLevel(ap.b.f());
        if (getContext() == null) {
            throw new jp.c("No context found in HeapViewAutocaptureContentProvider. Heap View Autocapture SDK will not run.");
        }
        Context context = getContext();
        if (context == null) {
            return true;
        }
        Context applicationContext = context.getApplicationContext();
        if (!(applicationContext instanceof Application)) {
            throw new jp.c("No application found in HeapViewAutocaptureContentProvider. Unable to register lifecycle callbacks. Heap View Autocapture SDK will not run.");
        }
        ap.a.INSTANCE.getClass();
        aVar = ap.a.INSTANCE;
        ((Application) applicationContext).registerActivityLifecycleCallbacks(aVar);
        aVar2 = ap.a.INSTANCE;
        h.INSTANCE.getClass();
        hVar = h.INSTANCE;
        aVar2.f(hVar);
        aVar3 = ap.a.INSTANCE;
        f.INSTANCE.getClass();
        aVar3.g(f.INSTANCE);
        if (!ap.b.b()) {
            return true;
        }
        if (ap.b.c() == null) {
            pp.b.a(pp.b.INSTANCE, "Invalid build-time configuration for automatic initialization. Failed to retrieve a non-empty string for env ID (ext.heapEnvId) when automatic initialization was enabled (ext.heapAutoInit = true). Check your configuration of Heap in your app module's build.gradle/build.gradle.kts file. Skipping automatic initialization.", null, 6);
            return false;
        }
        a aVar4 = a.INSTANCE;
        String envId = ap.b.c();
        aVar4.getClass();
        r.k(envId, "envId");
        pp.b bVar4 = pp.b.INSTANCE;
        StringBuilder sb = new StringBuilder("Automatic initialization enabled for ");
        b.INSTANCE.getClass();
        bVar = b.INSTANCE;
        sb.append(bVar.getName());
        sb.append(". Registering for autocapture and starting recording.");
        pp.b.a(bVar4, sb.toString(), null, 6);
        StringBuilder sb2 = new StringBuilder("Attempting to register ");
        bVar2 = b.INSTANCE;
        sb2.append(bVar2.getName());
        sb2.append(lr.b.PACKAGE_SEPARATOR_CHAR);
        pp.b.a(bVar4, sb2.toString(), null, 6);
        bVar3 = b.INSTANCE;
        Heap.addSource(bVar3, false);
        Heap.startRecording(context, envId, new Options(null, 0.0d, ap.b.d(), ap.b.e(), false, false, false, 0, false, false, false, 0, 0L, null, 0, 32755, null));
        return true;
    }

    @Override
    public final int delete(Uri uri, String str, String[] strArr) {
        r.k(uri, "uri");
        return 0;
    }

    @Override
    public final String getType(Uri uri) {
        r.k(uri, "uri");
        return null;
    }

    @Override
    public final Uri insert(Uri uri, ContentValues contentValues) {
        r.k(uri, "uri");
        return null;
    }

    @Override
    public final boolean onCreate() {
        try {
            return a();
        } catch (ThreadDeath e) {
            throw e;
        } catch (Throwable th) {
            jp.a.INSTANCE.getClass();
            jp.a.b(th);
            return false;
        }
    }

    @Override
    public final Cursor query(Uri uri, String[] strArr, String str, String[] strArr2, String str2) {
        r.k(uri, "uri");
        return null;
    }

    @Override
    public final int update(Uri uri, ContentValues contentValues, String str, String[] strArr) {
        r.k(uri, "uri");
        return 0;
    }
}