package ඓ.ඓ.K.䁗;

import android.content.Context;
import android.location.Address;
import android.location.Geocoder;
import android.location.Location;
import android.location.LocationListener;
import android.os.Bundle;
import com.mexico.inloancash.bean.DeDataBean;
import com.mexico.inloancash.fragment.IndiaFirstPageFragment;
import java.io.IOException;
import java.util.List;
import ඓ.ඓ.K.ⁱ.C0650;

/* renamed from: ඓ.ඓ.K.䁗.Ԛ  reason: contains not printable characters */
/* compiled from: MyLocationListener */
public class C0709 implements LocationListener {

    /* renamed from: ʬ  reason: contains not printable characters */
    public AbstractC0710 f3720;

    /* renamed from: ῲ  reason: contains not printable characters */
    public Context f3721;

    /* renamed from: K  reason: contains not printable characters */
    public String f3722;

    /* renamed from: ඓ.ඓ.K.䁗.Ԛ$ῲ  reason: contains not printable characters */
    /* compiled from: MyLocationListener */
    public interface AbstractC0710 {
    }

    /* renamed from: ඓ.ඓ.K.䁗.Ԛ$K  reason: contains not printable characters */
    /* compiled from: MyLocationListener */
    public class RunnableC0711 implements Runnable {

        /* renamed from: ʬ  reason: contains not printable characters */
        public final /* synthetic */ double f3723;

        /* renamed from: ῲ  reason: contains not printable characters */
        public final /* synthetic */ double f3724;

        public RunnableC0711(double d, double d2) {
            this.f3724 = d;
            this.f3723 = d2;
        }

        public void run() {
            List<Address> list;
            try {
                list = new Geocoder(C0709.this.f3721).getFromLocation(this.f3724, this.f3723, 10);
            } catch (IOException e) {
                e.printStackTrace();
                list = null;
            }
            if (list != null && list.size() > 0) {
                for (int i = 0; i < list.size(); i++) {
                    Address address = list.get(i);
                    C0709.this.f3722 = address.getLocality();
                    C0709.this.f3722 = address.getAddressLine(0);
                    if (C0709.this.f3722.equals("")) {
                        ((C0650) C0709.this.f3720).f3641.f3640.m2185();
                    } else {
                        C0709 r3 = C0709.this;
                        AbstractC0710 r5 = r3.f3720;
                        String str = r3.f3722;
                        C0650 r52 = (C0650) r5;
                        r52.f3643.removeUpdates(r52.f3642);
                        IndiaFirstPageFragment.f2596 = str;
                        DeDataBean deDataBean = r52.f3641.f2708;
                        if (deDataBean != null) {
                            deDataBean.setGpsLatitude(IndiaFirstPageFragment.f2596 + "");
                            DeDataBean deDataBean2 = r52.f3641.f2708;
                            deDataBean2.setGpsLongitude(IndiaFirstPageFragment.f2597 + "");
                            r52.f3641.f2708.setAddress("地址获取失败");
                        }
                    }
                }
            }
        }
    }

    public C0709(Context context) {
        this.f3721 = context;
    }

    public void onLocationChanged(Location location) {
        location.getAccuracy();
        location.getAltitude();
        double latitude = location.getLatitude();
        double longitude = location.getLongitude();
        IndiaFirstPageFragment.f2596 = latitude + "";
        IndiaFirstPageFragment.f2597 = longitude + "";
        new Thread(new RunnableC0711(latitude, longitude)).start();
    }

    public void onProviderDisabled(String str) {
        ((C0650) this.f3720).f3641.f3640.m2185();
    }

    public void onProviderEnabled(String str) {
    }

    public void onStatusChanged(String str, int i, Bundle bundle) {
    }
}
