package com.bytedance.bdlocation.utils;

import X.SEJ;
import android.os.Build;
import com.bytedance.bdlocation.BDLocation;
import com.bytedance.covode.number.Covode;
import com.google.gson.j;
import com.google.gson.m;
import com.google.gson.q;
import com.google.gson.r;

public class BDLocationSerializer implements r<BDLocation> {
    static {
        Covode.recordClassIndex(24362);
    }

    public final /* synthetic */ j LIZ(Object obj, q qVar) {
        BDLocation bDLocation = (BDLocation) obj;
        m mVar = new m();
        mVar.LIZ("mProvider", bDLocation.getProvider());
        mVar.LIZ("mAccuracy", Float.valueOf(bDLocation.getAccuracy()));
        mVar.LIZ("mAltitude", Double.valueOf(bDLocation.getAltitude()));
        mVar.LIZ("mBearing", Float.valueOf(bDLocation.getBearing()));
        if (Build.VERSION.SDK_INT >= 26) {
            mVar.LIZ("mBearingAccuracyDegrees", Float.valueOf(bDLocation.getBearingAccuracyDegrees()));
        }
        mVar.LIZ("mElapsedRealtimeNanos", Long.valueOf(bDLocation.getElapsedRealtimeNanos()));
        mVar.LIZ("mLatitude", Double.valueOf(bDLocation.getLatitude()));
        mVar.LIZ("mLongitude", Double.valueOf(bDLocation.getLongitude()));
        mVar.LIZ("mProvider", bDLocation.getProvider());
        mVar.LIZ("mSpeed", Float.valueOf(bDLocation.getSpeed()));
        if (Build.VERSION.SDK_INT >= 26) {
            mVar.LIZ("mSpeedAccuracyMetersPerSecond", Float.valueOf(bDLocation.getSpeedAccuracyMetersPerSecond()));
        }
        mVar.LIZ("mTime", Long.valueOf(bDLocation.getTime()));
        if (Build.VERSION.SDK_INT >= 26) {
            mVar.LIZ("mVerticalAccuracyMeters", Float.valueOf(bDLocation.getVerticalAccuracyMeters()));
        }
        mVar.LIZ("mAddress", bDLocation.LIZ);
        mVar.LIZ("mCountry", bDLocation.LIZIZ);
        mVar.LIZ("mAdministrativeArea", bDLocation.LIZJ);
        mVar.LIZ("mSubAdministrativeArea", bDLocation.LIZLLL);
        mVar.LIZ("mCity", bDLocation.LJ);
        mVar.LIZ("mDistrict", bDLocation.LJFF);
        mVar.LIZ("mCityCode", bDLocation.LJIJJLI);
        mVar.LIZ("mStreet", bDLocation.LJJ);
        mVar.LIZ("mStreetNum", bDLocation.LJJI);
        mVar.LIZ("mFloor", bDLocation.LJJIFFI);
        mVar.LIZ("mLocationMs", Long.valueOf(bDLocation.LJJII));
        mVar.LIZ("mLocationType", Integer.valueOf(bDLocation.LJJIIJ));
        mVar.LIZ("mCountryCode", bDLocation.LJJIIZ);
        mVar.LIZ("mCountryLocalID", bDLocation.LJJIIZI);
        mVar.LIZ("mLocalID", bDLocation.LJJIJ);
        mVar.LIZ("mDistrictLocalID", bDLocation.LJJIJIIJI);
        mVar.LIZ("mGeoNameID", bDLocation.LJJIJIIJIL);
        mVar.LIZ("mBdLBSResult", SEJ.LIZ((Object) bDLocation.LJJIJIL));
        mVar.LIZ("mLocationResult", SEJ.LIZ((Object) bDLocation.LJJIJL));
        mVar.LIZ("mGCJ02", SEJ.LIZ((Object) bDLocation.LJJIII));
        return mVar;
    }
}
