// 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.olio.state; import android.bluetooth.BluetoothAdapter; import android.os.Environment; import com.olio.communication.messages.unit.WatchProfile; import com.olio.util.ALog; import java.io.BufferedReader; import java.io.File; import java.io.FileNotFoundException; import java.io.FileReader; import java.io.IOException; public class CurrentDevice { public CurrentDevice() { } public static String getSoftwareVersion() { String s3 = (new StringBuilder()).append(Environment.getExternalStorageDirectory()).append(File.separator).append("olio").append(File.separator).append("firmware_update_latest.txt").toString(); String s2 = ""; String s = s2; Object obj = s2; String s1 = s2; BufferedReader bufferedreader; try { bufferedreader = new BufferedReader(new FileReader(s3), 256); } // Misplaced declaration of an exception variable catch (Object obj) { ALog.w("Could not find version info file: %s", ((Throwable) (obj)), new Object[] { s3 }); return s; } catch (IndexOutOfBoundsException indexoutofboundsexception) { ALog.w("Could not find comma in version info csv.", indexoutofboundsexception, new Object[0]); return ((String) (obj)); } catch (IOException ioexception) { ALog.w("Problem reading version info file.", ioexception, new Object[0]); return s1; } s = s2; obj = s2; s1 = s2; s2 = bufferedreader.readLine(); s = s2; obj = s2; s1 = s2; s2 = s2.substring(0, s2.indexOf(",")); s = s2; obj = s2; s1 = s2; bufferedreader.close(); return s2; } public static WatchProfile getWatchProfile() { Object obj; String s; String s1; String s2; String s3; String s4; String s5; String s6; String s7; String s8; s8 = (new StringBuilder()).append(Environment.getExternalStorageDirectory()).append(File.separator).append("olio").append(File.separator).append("firmware_update_latest.txt").toString(); obj = ""; s7 = unitId(); s = ""; s4 = s; s1 = ((String) (obj)); s5 = s; s2 = ((String) (obj)); s6 = s; s3 = ((String) (obj)); BufferedReader bufferedreader = new BufferedReader(new FileReader(s8), 256); s4 = s; s1 = ((String) (obj)); s5 = s; s2 = ((String) (obj)); s6 = s; s3 = ((String) (obj)); String as[] = bufferedreader.readLine().split(","); s4 = s; s1 = ((String) (obj)); s5 = s; s2 = ((String) (obj)); s6 = s; s3 = ((String) (obj)); obj = as[0].trim(); s4 = s; s1 = ((String) (obj)); s5 = s; s2 = ((String) (obj)); s6 = s; s3 = ((String) (obj)); s = as[1].trim(); s4 = s; s1 = ((String) (obj)); s5 = s; s2 = ((String) (obj)); s6 = s; s3 = ((String) (obj)); try { bufferedreader.close(); } catch (FileNotFoundException filenotfoundexception) { ALog.w("Could not find version info file: %s", filenotfoundexception, new Object[] { s8 }); s = s4; filenotfoundexception = s1; } catch (IndexOutOfBoundsException indexoutofboundsexception) { ALog.w("Could not find comma in version info csv.", indexoutofboundsexception, new Object[0]); s = s5; indexoutofboundsexception = s2; } catch (IOException ioexception) { ALog.w("Problem reading version info file.", ioexception, new Object[0]); s = s6; ioexception = s3; } return new WatchProfile(s7, s, ((String) (obj))); } public static String unitId() { return BluetoothAdapter.getDefaultAdapter().getAddress(); } }