// 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.communication.bluetooth; import android.bluetooth.BluetoothAdapter; import android.bluetooth.BluetoothDevice; import android.bluetooth.BluetoothSocket; import com.olio.data.object.analytics.DumpsysBatteryStatsHelper; import com.olio.util.ALog; import java.io.IOException; // Referenced classes of package com.olio.communication.bluetooth: // BluetoothConnection private class mSocketType extends Thread { private String mSocketType; private final BluetoothDevice mmDevice; private final BluetoothSocket mmSocket; final BluetoothConnection this$0; public void cancel() { try { mmSocket.close(); return; } catch (IOException ioexception) { ALog.e((new StringBuilder()).append("close() of connect ").append(mSocketType).append(" socket failed").toString(), ioexception, new Object[0]); return; } catch (NullPointerException nullpointerexception) { ALog.e("Null pointer in BluetoothConnection Connect thread. Probably disconnection.", nullpointerexception, new Object[0]); } } public void run() { ALog.i((new StringBuilder()).append("BEGIN mConnectThread SocketType:").append(mSocketType).toString(), new Object[0]); setName((new StringBuilder()).append("ConnectThread").append(mSocketType).toString()); if (mmSocket != null) goto _L2; else goto _L1 _L1: BluetoothConnection.access$300(BluetoothConnection.this); _L4: return; _L2: BluetoothConnection.access$200(BluetoothConnection.this).cancelDiscovery(); if (mmSocket.isConnected()) goto _L4; else goto _L3 _L3: DumpsysBatteryStatsHelper.getInstance().log("bt_update=bt3_disconnected +bt3_socket_connect", new Object[0]); mmSocket.connect(); DumpsysBatteryStatsHelper.getInstance().log("-bt3_socket_connect", new Object[0]); synchronized (BluetoothConnection.this) { BluetoothConnection.access$502(BluetoothConnection.this, null); } connected(mmSocket, mmDevice, mSocketType); return; obj; mmSocket.close(); _L5: BluetoothConnection.access$300(BluetoothConnection.this); DumpsysBatteryStatsHelper.getInstance().log("-bt3_socket_connect", new Object[0]); return; obj; ALog.e((new StringBuilder()).append("unable to close() ").append(mSocketType).append(" socket during connection failure").toString(), ((Throwable) (obj)), new Object[0]); goto _L5 obj; DumpsysBatteryStatsHelper.getInstance().log("-bt3_socket_connect", new Object[0]); throw obj; obj; ALog.e("Null pointer in BluetoothConnection Connectthread. Probably disconnection.", ((Throwable) (obj)), new Object[0]); BluetoothConnection.access$300(BluetoothConnection.this); DumpsysBatteryStatsHelper.getInstance().log("-bt3_socket_connect", new Object[0]); return; exception; obj; JVM INSTR monitorexit ; throw exception; } public (BluetoothDevice bluetoothdevice) { this$0 = BluetoothConnection.this; super(); mmDevice = bluetoothdevice; bluetoothconnection = null; mSocketType = "Secure"; bluetoothdevice = bluetoothdevice.createRfcommSocketToServiceRecord(BluetoothConnection.access$100()); bluetoothconnection = bluetoothdevice; _L2: mmSocket = BluetoothConnection.this; return; bluetoothdevice; ALog.e((new StringBuilder()).append("Socket Type: ").append(mSocketType).append("create() failed").toString(), bluetoothdevice, new Object[0]); continue; /* Loop/switch isn't completed */ bluetoothdevice; ALog.e("Null pointer in BluetoothConnection ConnectThread thread. Probably disconnection.", bluetoothdevice, new Object[0]); if (true) goto _L2; else goto _L1 _L1: } }