// 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.receivers; import android.bluetooth.BluetoothDevice; import android.content.BroadcastReceiver; import android.content.Context; import android.content.Intent; import com.olio.util.ALog; import com.oliodevices.assist.app.api.UserManager; import com.oliodevices.assist.app.core.Utils; public class BluetoothBroadcastReceiver extends BroadcastReceiver { public BluetoothBroadcastReceiver() { } public void onReceive(Context context, Intent intent) { String s = intent.getAction(); ALog.d("BluetoothBroadcastReceiver.onReceive: %s", new Object[] { s }); BluetoothDevice bluetoothdevice = (BluetoothDevice)intent.getParcelableExtra("android.bluetooth.device.extra.DEVICE"); if (bluetoothdevice != null && bluetoothdevice.getAddress() != null && bluetoothdevice.getAddress().equals(UserManager.getInstance().getUnitId())) { ALog.d("BT connected to our paired Olio (%s)", new Object[] { bluetoothdevice.getAddress() }); if (s == "android.bluetooth.adapter.action.CONNECTION_STATE_CHANGED") { int i = intent.getIntExtra("android.bluetooth.adapter.extra.CONNECTION_STATE", -1); int j = intent.getIntExtra("android.bluetooth.adapter.extra.PREVIOUS_CONNECTION_STATE", -1); ALog.d("Connection state changed: from %d to %d", new Object[] { Integer.valueOf(j), Integer.valueOf(i) }); if ((j == 0 || j == 1) && i == 2) { Utils.startServices(context, false); } } else if (s == "android.bluetooth.device.action.ACL_CONNECTED") { ALog.d("ACL connection established", new Object[0]); Utils.startServices(context, false); return; } } } }