// Decompiled by Jad v1.5.8e. Copyright 2001 Pavel Kouznetsov. // Jad home page: http://www.geocities.com/kpdus/jad.html // Decompiler options: braces fieldsfirst space lnc package com.oliodevices.assist.app.detectors; import android.content.Context; import com.olio.data.object.context.PersonalAssistantContext; import com.olio.phone_state.Weather; import com.olio.phone_state.WeatherComplicationData; import com.olio.util.ALog; import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.concurrent.TimeUnit; import retrofit.Callback; import retrofit.RetrofitError; import retrofit.client.Response; // Referenced classes of package com.oliodevices.assist.app.detectors: // WeatherDetector class val.cityName implements Callback { final WeatherDetector this$0; final String val$cityName; public void failure(RetrofitError retrofiterror) { ALog.e("Error retrieving weather forecast", retrofiterror, new Object[0]); } public void success(com.oliodevices.assist.app.api.ecast ecast, Response response) { label0: { response = new ArrayList(); HashMap hashmap = new HashMap(); for (int i = 1; i <= 12; i++) { com.oliodevices.assist.app.api.therData therdata = (com.oliodevices.assist.app.api.therData)ecast.hourly.data.get(i); long l = TimeUnit.SECONDS.toMillis(therdata.time); Weather weather = new Weather(); weather.setTemperature((int)therdata.temperature); weather.setWeatherState(therdata.summary); weather.setWeatherIcon(therdata.icon); weather.setCityName(val$cityName); hashmap.put(Long.valueOf(l), weather); } WeatherComplicationData weathercomplicationdata = new WeatherComplicationData(); weathercomplicationdata.setWeatherStateForecast(hashmap); weathercomplicationdata.setCityName(val$cityName); response.add(weathercomplicationdata); WeatherDetector.access$300(WeatherDetector.this, response); ecast = WeatherDetector.access$400(WeatherDetector.this, ecast.currently.precipIntensity); if (!ecast.equals(WeatherDetector.access$500(WeatherDetector.this))) { WeatherDetector.access$502(WeatherDetector.this, ecast); ecast = PersonalAssistantContext.personalAssistantContext(mContext.getContentResolver(), "weather"); if (ecast != null) { break label0; } (new PersonalAssistantContext("weather", WeatherDetector.access$500(WeatherDetector.this))).save(mContext.getContentResolver()); } return; } ecast.setContextValue(WeatherDetector.access$500(WeatherDetector.this)); ecast.save(mContext.getContentResolver()); } public volatile void success(Object obj, Response response) { success((com.oliodevices.assist.app.api.ecast)obj, response); } ta() { this$0 = final_weatherdetector; val$cityName = String.this; super(); } }