Warkop v5.73.0版本的 MD5 值为:a4330ec2d6f5e146f59fc7622f3cdb45

以下内容为反编译后的 s.java 源代码,内容仅作参考


package yd1;

import android.content.Intent;
import android.content.pm.PackageManager;
import android.content.pm.ResolveInfo;
import android.net.Uri;
import com.inappstory.sdk.stories.api.models.Image;
import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;
import kotlin.Metadata;
import org.jetbrains.annotations.NotNull;
import p029do.c0;
import sinet.startup.inDriver.core.data.data.ReasonData;

@Metadata(d1 = {"\u0000D\n\u0002\u0018\u0002\n\u0002\u0010\u0000\n\u0002\u0018\u0002\n\u0000\n\u0002\u0010\u000b\n\u0000\n\u0002\u0010\u0006\n\u0002\b\u0002\n\u0002\u0010 \n\u0002\b\u0004\n\u0002\u0018\u0002\n\u0002\b\u0002\n\u0002\u0018\u0002\n\u0002\u0010\b\n\u0002\u0018\u0002\n\u0002\b\u0002\n\u0002\u0018\u0002\n\u0002\b!\u0018\u0000 62\u00020\u0001:\u0002\u000b\nB1\u0012\u0006\u0010\u0010\u001a\u00020\u000e\u0012 \u0010\u0015\u001a\u001c\u0012\u0004\u0012\u00020\u0002\u0012\u0004\u0012\u00020\u0012\u0012\f\u0012\n\u0012\u0004\u0012\u00020\u0013\u0018\u00010\t0\u0011¢\u0006\u0004\b4\u00105J\u0010\u0010\u0005\u001a\u00020\u00042\u0006\u0010\u0003\u001a\u00020\u0002H\u0002J\u001c\u0010\n\u001a\b\u0012\u0004\u0012\u00020\u00020\t2\u0006\u0010\u0007\u001a\u00020\u00062\u0006\u0010\b\u001a\u00020\u0006J\f\u0010\u000b\u001a\b\u0012\u0004\u0012\u00020\u00020\tJ\u0012\u0010\f\u001a\u0004\u0018\u00010\u00022\b\u0010\u0003\u001a\u0004\u0018\u00010\u0002J\u0006\u0010\r\u001a\u00020\u0004R\u0014\u0010\u0010\u001a\u00020\u000e8\u0002X\u0082\u0004¢\u0006\u0006\n\u0004\b\u000b\u0010\u000fR.\u0010\u0015\u001a\u001c\u0012\u0004\u0012\u00020\u0002\u0012\u0004\u0012\u00020\u0012\u0012\f\u0012\n\u0012\u0004\u0012\u00020\u0013\u0018\u00010\t0\u00118\u0002X\u0082\u0004¢\u0006\u0006\n\u0004\b\n\u0010\u0014R\u001c\u0010\u0019\u001a\b\u0012\u0004\u0012\u00020\u00160\t8\u0002@\u0002X\u0082\u000e¢\u0006\u0006\n\u0004\b\u0017\u0010\u0018R\u0016\u0010\u001b\u001a\u0004\u0018\u00010\u00168BX\u0082\u0004¢\u0006\u0006\u001a\u0004\b\u0017\u0010\u001aR\u0014\u0010\u001e\u001a\u00020\u00028BX\u0082\u0004¢\u0006\u0006\u001a\u0004\b\u001c\u0010\u001dR\u0014\u0010 \u001a\u00020\u00028BX\u0082\u0004¢\u0006\u0006\u001a\u0004\b\u001f\u0010\u001dR\u0014\u0010\"\u001a\u00020\u00028BX\u0082\u0004¢\u0006\u0006\u001a\u0004\b!\u0010\u001dR\u0014\u0010$\u001a\u00020\u00028BX\u0082\u0004¢\u0006\u0006\u001a\u0004\b#\u0010\u001dR\u0014\u0010&\u001a\u00020\u00028BX\u0082\u0004¢\u0006\u0006\u001a\u0004\b%\u0010\u001dR\u0014\u0010(\u001a\u00020\u00028BX\u0082\u0004¢\u0006\u0006\u001a\u0004\b'\u0010\u001dR\u0014\u0010*\u001a\u00020\u00028BX\u0082\u0004¢\u0006\u0006\u001a\u0004\b)\u0010\u001dR\u0014\u0010,\u001a\u00020\u00028BX\u0082\u0004¢\u0006\u0006\u001a\u0004\b+\u0010\u001dR\u0014\u0010.\u001a\u00020\u00028BX\u0082\u0004¢\u0006\u0006\u001a\u0004\b-\u0010\u001dR\u001a\u00101\u001a\b\u0012\u0004\u0012\u00020\u00020\t8BX\u0082\u0004¢\u0006\u0006\u001a\u0004\b/\u00100R\u001a\u00103\u001a\b\u0012\u0004\u0012\u00020\u00020\t8BX\u0082\u0004¢\u0006\u0006\u001a\u0004\b2\u00100¨\u00067"}, d2 = {"Lyd1/s;", "", "Landroid/content/Intent;", "intent", "", "q", "", "latitude", "longitude", "", "b", "a", "e", "p", "Landroid/content/pm/PackageManager;", "Landroid/content/pm/PackageManager;", "packageManager", "Lkotlin/Function2;", "", "Landroid/content/pm/ResolveInfo;", "Lqo/p;", "getExternalAppIntentHandlingInfo", "Lyd1/s$b;", "c", "Ljava/util/List;", "route", "()Lyd1/s$b;", "destination", "d", "()Landroid/content/Intent;", "googleNavigatorIntent", "o", "yandexNavigatorNavigatorIntent", "n", "yandexMapsNavigatorIntent", "l", "twoGisNavigatorIntent", "k", "twoGisBetaNavigatorIntent", Image.TYPE_MEDIUM, "wazeNavigatorIntent", "i", "navitelNavigatorIntent", "g", "mapsMeNavigatorIntent", "j", "petalMapsNavigatorIntent", Image.TYPE_HIGH, "()Ljava/util/List;", "navigators", "f", "mAvailableNavigators", "<init>", "(Landroid/content/pm/PackageManager;Lqo/p;)V", "Companion", "location_release"}, k = 1, mv = {1, 8, 0})
public final class s {

    @NotNull
    private final PackageManager packageManager;

    @NotNull
    private final qo.p<Intent, Integer, List<ResolveInfo>> getExternalAppIntentHandlingInfo;

    @NotNull
    private List<Location> route;

    @Metadata(d1 = {"\u0000$\n\u0002\u0018\u0002\n\u0002\u0010\u0000\n\u0002\u0010\u000e\n\u0000\n\u0002\u0010\b\n\u0002\b\u0002\n\u0002\u0010\u000b\n\u0000\n\u0002\u0010\u0006\n\u0002\b\t\b\u0082\b\u0018\u00002\u00020\u0001B\u0017\u0012\u0006\u0010\r\u001a\u00020\t\u0012\u0006\u0010\u000f\u001a\u00020\t¢\u0006\u0004\b\u0010\u0010\u0011J\t\u0010\u0003\u001a\u00020\u0002HÖ\u0001J\t\u0010\u0005\u001a\u00020\u0004HÖ\u0001J\u0013\u0010\b\u001a\u00020\u00072\b\u0010\u0006\u001a\u0004\u0018\u00010\u0001HÖ\u0003R\u0017\u0010\r\u001a\u00020\t8\u0006¢\u0006\f\n\u0004\b\n\u0010\u000b\u001a\u0004\b\n\u0010\fR\u0017\u0010\u000f\u001a\u00020\t8\u0006¢\u0006\f\n\u0004\b\u000e\u0010\u000b\u001a\u0004\b\u000e\u0010\f¨\u0006\u0012"}, d2 = {"Lyd1/s$b;", "", "", "toString", "", "hashCode", ReasonData.TYPE_OTHER, "", "equals", "", "a", "D", "()D", "latitude", "b", "longitude", "<init>", "(DD)V", "location_release"}, k = 1, mv = {1, 8, 0})
    public static final class Location {

        private final double latitude;

        private final double longitude;

        public Location(double d15, double d16) {
            this.latitude = d15;
            this.longitude = d16;
        }

        public final double getLatitude() {
            return this.latitude;
        }

        public final double getLongitude() {
            return this.longitude;
        }

        public boolean equals(Object other) {
            if (this == other) {
                return true;
            }
            if (!(other instanceof Location)) {
                return false;
            }
            Location location = (Location) other;
            return Double.compare(this.latitude, location.latitude) == 0 && Double.compare(this.longitude, location.longitude) == 0;
        }

        public int hashCode() {
            return (Double.hashCode(this.latitude) * 31) + Double.hashCode(this.longitude);
        }

        @NotNull
        public String toString() {
            return "Location(latitude=" + this.latitude + ", longitude=" + this.longitude + ")";
        }
    }

    public s(@NotNull PackageManager packageManager, @NotNull qo.p<? super Intent, ? super Integer, ? extends List<? extends ResolveInfo>> pVar) {
        List<Location> k15;
        this.packageManager = packageManager;
        this.getExternalAppIntentHandlingInfo = pVar;
        k15 = p029do.u.k();
        this.route = k15;
    }

    private final Location c() {
        Object B0;
        B0 = c0.B0(this.route);
        return (Location) B0;
    }

    private final Intent d() {
        Double d15;
        Location c15 = c();
        Double d16 = null;
        if (c15 != null) {
            d15 = Double.valueOf(c15.getLatitude());
        } else {
            d15 = null;
        }
        Location c16 = c();
        if (c16 != null) {
            d16 = Double.valueOf(c16.getLongitude());
        }
        Intent intent = new Intent("android.intent.action.VIEW", Uri.parse("google.navigation:q=" + d15 + "," + d16));
        intent.setPackage("com.google.android.apps.maps");
        return intent;
    }

    private final List<Intent> f() {
        List<Intent> h15 = h();
        ArrayList arrayList = new ArrayList();
        for (Object obj : h15) {
            if (q((Intent) obj)) {
                arrayList.add(obj);
            }
        }
        return arrayList;
    }

    private final Intent g() {
        Double d15;
        Intent intent = new Intent("com.mapswithme.maps.pro.action.BUILD_ROUTE");
        intent.setPackage("com.mapswithme.maps.pro");
        Location c15 = c();
        Double d16 = null;
        if (c15 != null) {
            d15 = Double.valueOf(c15.getLatitude());
        } else {
            d15 = null;
        }
        intent.putExtra("lat_to", d15);
        Location c16 = c();
        if (c16 != null) {
            d16 = Double.valueOf(c16.getLongitude());
        }
        intent.putExtra("lon_to", d16);
        return intent;
    }

    private final List<Intent> h() {
        List<Intent> n15;
        n15 = p029do.u.n(d(), o(), n(), l(), k(), m(), i(), g(), j());
        return n15;
    }

    private final Intent i() {
        Double d15;
        Location c15 = c();
        Double d16 = null;
        if (c15 != null) {
            d15 = Double.valueOf(c15.getLatitude());
        } else {
            d15 = null;
        }
        Location c16 = c();
        if (c16 != null) {
            d16 = Double.valueOf(c16.getLongitude());
        }
        Intent intent = new Intent("android.intent.action.VIEW", Uri.parse("google.navigation:ll=" + d15 + "," + d16));
        intent.setPackage("com.navitel");
        return intent;
    }

    private final Intent j() {
        Double d15;
        Location c15 = c();
        Double d16 = null;
        if (c15 != null) {
            d15 = Double.valueOf(c15.getLatitude());
        } else {
            d15 = null;
        }
        Location c16 = c();
        if (c16 != null) {
            d16 = Double.valueOf(c16.getLongitude());
        }
        Intent intent = new Intent("android.intent.action.VIEW", Uri.parse("petalmaps://navigation?type=drive&daddr=" + d15 + "," + d16));
        intent.setPackage("com.huawei.maps.app");
        return intent;
    }

    private final Intent k() {
        Double d15;
        Location c15 = c();
        Double d16 = null;
        if (c15 != null) {
            d15 = Double.valueOf(c15.getLongitude());
        } else {
            d15 = null;
        }
        Location c16 = c();
        if (c16 != null) {
            d16 = Double.valueOf(c16.getLatitude());
        }
        Intent intent = new Intent("android.intent.action.VIEW", Uri.parse("dgis://2gis.ru/routeSearch/rsType/car/to/" + d15 + "," + d16));
        intent.setPackage("ru.dublgis.dgismobile4preview");
        return intent;
    }

    private final Intent l() {
        Double d15;
        Location c15 = c();
        Double d16 = null;
        if (c15 != null) {
            d15 = Double.valueOf(c15.getLongitude());
        } else {
            d15 = null;
        }
        Location c16 = c();
        if (c16 != null) {
            d16 = Double.valueOf(c16.getLatitude());
        }
        Intent intent = new Intent("android.intent.action.VIEW", Uri.parse("dgis://2gis.ru/routeSearch/rsType/car/to/" + d15 + "," + d16));
        intent.setPackage("ru.dublgis.dgismobile");
        return intent;
    }

    private final Intent m() {
        Double d15;
        Location c15 = c();
        Double d16 = null;
        if (c15 != null) {
            d15 = Double.valueOf(c15.getLatitude());
        } else {
            d15 = null;
        }
        Location c16 = c();
        if (c16 != null) {
            d16 = Double.valueOf(c16.getLongitude());
        }
        Intent intent = new Intent("android.intent.action.VIEW", Uri.parse("https://waze.com/ul?ll=" + d15 + "," + d16 + "&navigate=yes"));
        intent.setPackage("com.waze");
        return intent;
    }

    private final Intent n() {
        Intent intent = new Intent("android.intent.action.VIEW");
        intent.setPackage("ru.yandex.yandexmaps");
        StringBuilder sb5 = new StringBuilder();
        int i15 = 0;
        for (Object obj : this.route) {
            int i16 = i15 + 1;
            if (i15 < 0) {
                p029do.u.u();
            }
            Location location = (Location) obj;
            sb5.append("~" + location.getLatitude() + "," + location.getLongitude());
            i15 = i16;
        }
        intent.setData(Uri.parse("yandexmaps://maps.yandex.ru/?rtext=" + ((Object) sb5) + "&rtt=auto"));
        return intent;
    }

    private final Intent o() {
        List g05;
        Intent intent = new Intent("ru.yandex.yandexnavi.action.BUILD_ROUTE_ON_MAP");
        intent.setPackage("ru.yandex.yandexnavi");
        g05 = c0.g0(this.route, 1);
        int i15 = 0;
        for (Object obj : g05) {
            int i16 = i15 + 1;
            if (i15 < 0) {
                p029do.u.u();
            }
            Location location = (Location) obj;
            intent.putExtra("lat_via_" + i15, location.getLatitude());
            intent.putExtra("lon_via_" + i15, location.getLongitude());
            i15 = i16;
        }
        Location c15 = c();
        if (c15 != null) {
            intent.putExtra("lat_to", c15.getLatitude());
            intent.putExtra("lon_to", c15.getLongitude());
        }
        return intent;
    }

    private final boolean q(Intent intent) {
        boolean z15 = false;
        List<ResolveInfo> invoke = this.getExternalAppIntentHandlingInfo.invoke(intent, 0);
        if (invoke == null || invoke.isEmpty()) {
            z15 = true;
        }
        return !z15;
    }

    @NotNull
    public final List<Intent> a() {
        return f();
    }

    @NotNull
    public final List<Intent> b(double latitude, double longitude) {
        List<Location> e15;
        e15 = p029do.t.e(new Location(latitude, longitude));
        this.route = e15;
        return f();
    }

    public final Intent e(Intent intent) {
        String str;
        if (intent != null && (str = intent.getPackage()) != null) {
            return this.packageManager.getLaunchIntentForPackage(str);
        }
        return null;
    }

    public final boolean p() {
        Iterator<T> it = h().iterator();
        while (it.hasNext()) {
            if (q((Intent) it.next())) {
                return true;
            }
        }
        return false;
    }
}