// 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.fragments; import android.os.Handler; import android.support.v4.app.FragmentActivity; import com.olio.data.object.unit.DeviceStatus; import com.olio.olios.model.loaders.UnitLoaderConfig; import com.olio.olios.model.record.DatabaseRecord; import com.olio.olios.model.record.SerializedRecord; import com.olio.util.ALog; import java.util.List; // Referenced classes of package com.oliodevices.assist.app.fragments: // ConfigWatchFragment class this._cls0 implements Runnable { final ConfigWatchFragment this$0; public void run() { Object obj; Object obj1; obj = getActivity().getContentResolver(); obj1 = SerializedRecord.getByType("device-status", null, ((android.content.ContentResolver) (obj))); if (obj1 != null) { if (((List) (obj1)).size() > 1) { ALog.d("more than 1 record", new Object[0]); } else if (((List) (obj1)).size() == 1) { ALog.d("1 record found", new Object[0]); } else { ALog.d("0 records found", new Object[0]); } } else { ALog.d("no records found", new Object[0]); } if (obj1 == null || ((List) (obj1)).size() != 1) goto _L2; else goto _L1 _L1: ALog.v("1 record found... checking unit", new Object[0]); obj1 = (DatabaseRecord)((List) (obj1)).get(0); try { obj1 = (DeviceStatus)((SerializedRecord)obj1).getObject(); if (!ConfigWatchFragment.access$1500(ConfigWatchFragment.this).equals(((DeviceStatus) (obj1)).getUnitId())) { ALog.w("existing record (%s) is not for this device (%s)... deleting", new Object[] { ((DeviceStatus) (obj1)).getUnitId(), ConfigWatchFragment.access$1500(ConfigWatchFragment.this) }); SerializedRecord.delete(((com.olio.olios.model.record.izedRecordObject) (obj1)), ((DeviceStatus) (obj1)).getUnitId(), ((android.content.ContentResolver) (obj))); } } // Misplaced declaration of an exception variable catch (Object obj) { ALog.e("Didn't retrieve a deviceStatus object", new Object[0]); } // Misplaced declaration of an exception variable catch (Object obj) { ALog.e("NullPointerException", new Object[0]); } _L4: ConfigWatchFragment.access$1400(ConfigWatchFragment.this).post(new Runnable() { final ConfigWatchFragment._cls18 this$1; public void run() { ALog.d("registering DeviceStatus loader", new Object[0]); ConfigWatchFragment.access$1600(this$0).register(); } { this$1 = ConfigWatchFragment._cls18.this; super(); } }); return; _L2: if (obj1 != null && ((List) (obj1)).size() > 1) { ALog.w("More than 1 record saved. Deleting all...", new Object[0]); SerializedRecord.deleteByType("device-status", ((android.content.ContentResolver) (obj))); } if (true) goto _L4; else goto _L3 _L3: } _cls1.this._cls1() { this$0 = ConfigWatchFragment.this; super(); } }