package E1;

import android.content.ComponentName;
import android.content.Context;
import android.content.Intent;
import android.content.res.TypedArray;
import android.net.Uri;
import android.util.AttributeSet;

/* JADX INFO: renamed from: E1.b, reason: case insensitive filesystem */
/* JADX INFO: loaded from: classes.dex */
public final class C0095b extends A {

    /* JADX INFO: renamed from: A, reason: collision with root package name */
    public Intent f2062A;

    /* JADX INFO: renamed from: B, reason: collision with root package name */
    public String f2063B;

    @Override // E1.A
    public final boolean equals(Object obj) {
        if (obj != null && (obj instanceof C0095b) && super.equals(obj)) {
            Intent intent = this.f2062A;
            if ((intent != null ? intent.filterEquals(((C0095b) obj).f2062A) : ((C0095b) obj).f2062A == null) && P6.g.a(this.f2063B, ((C0095b) obj).f2063B)) {
                return true;
            }
        }
        return false;
    }

    @Override // E1.A
    public final void g(Context context, AttributeSet attributeSet) {
        super.g(context, attributeSet);
        TypedArray typedArrayObtainAttributes = context.getResources().obtainAttributes(attributeSet, U.f2058a);
        P6.g.d(typedArrayObtainAttributes, "context.resources.obtain…tyNavigator\n            )");
        String string = typedArrayObtainAttributes.getString(4);
        if (string != null) {
            String packageName = context.getPackageName();
            P6.g.d(packageName, "context.packageName");
            string = X6.n.K(string, "${applicationId}", packageName);
        }
        if (this.f2062A == null) {
            this.f2062A = new Intent();
        }
        Intent intent = this.f2062A;
        P6.g.b(intent);
        intent.setPackage(string);
        String string2 = typedArrayObtainAttributes.getString(0);
        if (string2 != null) {
            if (string2.charAt(0) == '.') {
                string2 = context.getPackageName() + string2;
            }
            ComponentName componentName = new ComponentName(context, string2);
            if (this.f2062A == null) {
                this.f2062A = new Intent();
            }
            Intent intent2 = this.f2062A;
            P6.g.b(intent2);
            intent2.setComponent(componentName);
        }
        String string3 = typedArrayObtainAttributes.getString(1);
        if (this.f2062A == null) {
            this.f2062A = new Intent();
        }
        Intent intent3 = this.f2062A;
        P6.g.b(intent3);
        intent3.setAction(string3);
        String string4 = typedArrayObtainAttributes.getString(2);
        if (string4 != null) {
            Uri uri = Uri.parse(string4);
            if (this.f2062A == null) {
                this.f2062A = new Intent();
            }
            Intent intent4 = this.f2062A;
            P6.g.b(intent4);
            intent4.setData(uri);
        }
        this.f2063B = typedArrayObtainAttributes.getString(3);
        typedArrayObtainAttributes.recycle();
    }

    @Override // E1.A
    public final int hashCode() {
        int iHashCode = super.hashCode() * 31;
        Intent intent = this.f2062A;
        int iFilterHashCode = (iHashCode + (intent != null ? intent.filterHashCode() : 0)) * 31;
        String str = this.f2063B;
        return iFilterHashCode + (str != null ? str.hashCode() : 0);
    }

    @Override // E1.A
    public final String toString() {
        Intent intent = this.f2062A;
        ComponentName component = intent != null ? intent.getComponent() : null;
        StringBuilder sb = new StringBuilder();
        sb.append(super.toString());
        if (component != null) {
            sb.append(" class=");
            sb.append(component.getClassName());
        } else {
            Intent intent2 = this.f2062A;
            String action = intent2 != null ? intent2.getAction() : null;
            if (action != null) {
                sb.append(" action=");
                sb.append(action);
            }
        }
        String string = sb.toString();
        P6.g.d(string, "sb.toString()");
        return string;
    }
}
