// Path: src/net/sourcewalker/olv/data/Prefs.java
// public class Prefs {
// 
//     private final SharedPreferences preferences;
//     private final String keyDeviceAddress;
// 
//     public Prefs(Context context) {
//         preferences = PreferenceManager.getDefaultSharedPreferences(context);
//         keyDeviceAddress = context.getString(R.string.prefs_deviceaddress_key);
//     }
// 
//     public String getDeviceAddress() {
//         return preferences.getString("device.address", null);
//     }
// 
//     public void setDeviceAddress(String address) {
//         Editor editor = preferences.edit();
//         editor.putString(keyDeviceAddress, address);
//         editor.commit();
//     }
// }


import net.sourcewalker.olv.data.Prefs;
import android.bluetooth.BluetoothDevice;
import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;
import android.util.Log;
package net.sourcewalker.olv.service;


/**
 * This receiver listens for system broadcasts related to the bluetooth device
 * and controls the LiveView service. It is also used for starting the service
 * on boot (if bluetooth is available).
 * 
 * @author Robert &lt;xperimental@solidproject.de&gt;
 */
public class BTReceiver extends BroadcastReceiver {

    private static final String TAG = "BTReceiver";

    /*
     * (non-Javadoc)
     * @see android.content.BroadcastReceiver#onReceive(android.content.Context,
     * android.content.Intent)
     */
    @Override
    public void onReceive(Context context, Intent intent) {
// Path: src/net/sourcewalker/olv/data/Prefs.java
// public class Prefs {
// 
//     private final SharedPreferences preferences;
//     private final String keyDeviceAddress;
// 
//     public Prefs(Context context) {
//         preferences = PreferenceManager.getDefaultSharedPreferences(context);
//         keyDeviceAddress = context.getString(R.string.prefs_deviceaddress_key);
//     }
// 
//     public String getDeviceAddress() {
//         return preferences.getString("device.address", null);
//     }
// 
//     public void setDeviceAddress(String address) {
//         Editor editor = preferences.edit();
//         editor.putString(keyDeviceAddress, address);
//         editor.commit();
//     }
// }


// Path: src/net/sourcewalker/olv/service/BTReceiver.java
import net.sourcewalker.olv.data.Prefs;
import android.bluetooth.BluetoothDevice;
import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;
import android.util.Log;

package net.sourcewalker.olv.service;


/**
 * This receiver listens for system broadcasts related to the bluetooth device
 * and controls the LiveView service. It is also used for starting the service
 * on boot (if bluetooth is available).
 * 
 * @author Robert &lt;xperimental@solidproject.de&gt;
 */
public class BTReceiver extends BroadcastReceiver {

    private static final String TAG = "BTReceiver";

    /*
     * (non-Javadoc)
     * @see android.content.BroadcastReceiver#onReceive(android.content.Context,
     * android.content.Intent)
     */
    @Override
    public void onReceive(Context context, Intent intent) {
        Prefs prefs = new Prefs(context);