package com.bytedance.bdlocation.utils;

import android.location.Location;
import android.os.Build;
import com.bytedance.covode.number.Covode;
import com.google.gson.h;
import com.google.gson.i;
import com.google.gson.j;
import com.google.gson.m;
import java.lang.reflect.Type;

public class LocationDeserializer implements i<Location> {
    static {
        Covode.recordClassIndex(24363);
    }

    public final /* synthetic */ Object LIZ(j jVar, Type type, h hVar) {
        m LJIIL = jVar.LJIIL();
        Location location = new Location(LJIIL.LIZLLL("mProvider").LIZJ());
        location.setAccuracy(LJIIL.LIZLLL("mAccuracy").LJ());
        location.setAltitude((double) LJIIL.LIZLLL("mAltitude").LJ());
        location.setBearing(LJIIL.LIZLLL("mBearing").LJ());
        if (Build.VERSION.SDK_INT >= 26) {
            location.setBearingAccuracyDegrees(LJIIL.LIZLLL("mBearingAccuracyDegrees").LJ());
        }
        location.setElapsedRealtimeNanos(LJIIL.LIZLLL("mElapsedRealtimeNanos").LJFF());
        location.setLatitude(LJIIL.LIZLLL("mLatitude").LIZLLL());
        location.setLongitude(LJIIL.LIZLLL("mLongitude").LIZLLL());
        location.setProvider(LJIIL.LIZLLL("mProvider").LIZJ());
        location.setSpeed(LJIIL.LIZLLL("mSpeed").LJ());
        if (Build.VERSION.SDK_INT >= 26) {
            location.setSpeedAccuracyMetersPerSecond(LJIIL.LIZLLL("mSpeedAccuracyMetersPerSecond").LJ());
        }
        location.setTime(LJIIL.LIZLLL("mTime").LJFF());
        if (Build.VERSION.SDK_INT >= 26) {
            location.setVerticalAccuracyMeters(LJIIL.LIZLLL("mVerticalAccuracyMeters").LJ());
        }
        return location;
    }
}
