package o;

import android.app.Activity;
import android.app.Notification;
import android.content.Context;
import android.content.LocusId;
import android.content.res.Resources;
import android.graphics.Insets;
import android.view.View;
import android.view.ViewStructure;
import android.view.autofill.AutofillId;
import android.view.contentcapture.ContentCaptureSession;
import ir.devixor.app.service.ForegroundService;
import o.QY;

/* compiled from: r8-map-id-3b7cc9102578c509342fa2f0fabed2bfc72239cd258d579fc679bfcbc198b048 */
/* loaded from: classes.dex */
public abstract class R8 {
    public static LocusId a(String str) {
        return new LocusId(str);
    }

    public static ContentCaptureSession b(View view) {
        return view.getContentCaptureSession();
    }

    public static String c(Context context) {
        return context.getOpPackageName();
    }

    public static AutofillId d(ContentCaptureSession contentCaptureSession, AutofillId autofillId, long j) {
        return contentCaptureSession.newAutofillId(autofillId, j);
    }

    public static ViewStructure e(ContentCaptureSession contentCaptureSession, AutofillId autofillId, long j) {
        return contentCaptureSession.newVirtualViewStructure(autofillId, j);
    }

    public static void f(ContentCaptureSession contentCaptureSession, ViewStructure viewStructure) {
        contentCaptureSession.notifyViewAppeared(viewStructure);
    }

    public static void g(ContentCaptureSession contentCaptureSession, AutofillId autofillId) {
        contentCaptureSession.notifyViewDisappeared(autofillId);
    }

    public static void h(ContentCaptureSession contentCaptureSession, AutofillId autofillId, String str) {
        contentCaptureSession.notifyViewTextChanged(autofillId, str);
    }

    public static void i(ContentCaptureSession contentCaptureSession, AutofillId autofillId, long[] jArr) {
        contentCaptureSession.notifyViewsDisappeared(autofillId, jArr);
    }

    public static Insets j(int i, int i2, int i3, int i4) {
        return Insets.of(i, i2, i3, i4);
    }

    public static void k(Resources.Theme theme) {
        theme.rebase();
    }

    public static final void l(Activity activity, QY.a aVar) {
        activity.registerActivityLifecycleCallbacks(aVar);
    }

    public static void m(Notification.Builder builder, boolean z) {
        builder.setAllowSystemGeneratedContextualActions(z);
    }

    public static void n(Notification.Builder builder) {
        builder.setBubbleMetadata(null);
    }

    public static void o(Notification.Action.Builder builder) {
        builder.setContextual(false);
    }

    public static void p(Notification.Builder builder, Object obj) {
        builder.setLocusId((LocusId) obj);
    }

    public static void q(ForegroundService foregroundService, Notification notification, int i) {
        if (i == 0 || i == -1) {
            foregroundService.startForeground(1001, notification, i);
        } else {
            foregroundService.startForeground(1001, notification, i & 255);
        }
    }

    public static void r(ForegroundService foregroundService, Notification notification, int i) {
        if (i == 0 || i == -1) {
            foregroundService.startForeground(1001, notification, i);
        } else {
            foregroundService.startForeground(1001, notification, i & 1073745919);
        }
    }
}
