package o;

import android.app.Activity;
import android.window.OnBackInvokedCallback;
import android.window.OnBackInvokedDispatcher;
import java.util.Objects;

/* compiled from: r8-map-id-3b7cc9102578c509342fa2f0fabed2bfc72239cd258d579fc679bfcbc198b048 */
/* loaded from: classes.dex */
public abstract class M7 {
    public static OnBackInvokedDispatcher a(Activity activity) {
        return activity.getOnBackInvokedDispatcher();
    }

    public static OnBackInvokedCallback b(Object obj, S7 s7) {
        Objects.requireNonNull(s7);
        C2025o7 c2025o7 = new C2025o7(1, s7);
        B0.q(obj).registerOnBackInvokedCallback(1000000, c2025o7);
        return c2025o7;
    }

    public static void c(Object obj, Object obj2) {
        B0.q(obj).unregisterOnBackInvokedCallback(B0.n(obj2));
    }
}
