reformat code with androidstudio

live-sensor-data
Andreas Shimokawa 2015-04-13 11:22:03 +02:00
parent 62a41ac5be
commit bb44cb1e19
4 changed files with 412 additions and 409 deletions

View File

@ -1,10 +1,5 @@
package nodomain.freeyourgadget.gadgetbridge;
import nodomain.freeyourgadget.gadgetbridge.GBDevice.State;
import nodomain.freeyourgadget.gadgetbridge.pebble.PebbleIoThread;
import nodomain.freeyourgadget.gadgetbridge.protocol.GBDeviceProtocol;
import nodomain.freeyourgadget.gadgetbridge.protocol.MibandProtocol;
import nodomain.freeyourgadget.gadgetbridge.protocol.PebbleProtocol;
import android.app.NotificationManager;
import android.app.Service;
import android.bluetooth.BluetoothAdapter;
@ -21,6 +16,12 @@ import android.provider.ContactsContract;
import android.util.Log;
import android.widget.Toast;
import nodomain.freeyourgadget.gadgetbridge.GBDevice.State;
import nodomain.freeyourgadget.gadgetbridge.pebble.PebbleIoThread;
import nodomain.freeyourgadget.gadgetbridge.protocol.GBDeviceProtocol;
import nodomain.freeyourgadget.gadgetbridge.protocol.MibandProtocol;
import nodomain.freeyourgadget.gadgetbridge.protocol.PebbleProtocol;
public class BluetoothCommunicationService extends Service {
public static final String ACTION_START
= "nodomain.freeyourgadget.gadgetbride.bluetoothcommunicationservice.action.start";

View File

@ -1,5 +1,17 @@
package nodomain.freeyourgadget.gadgetbridge.pebble;
import android.bluetooth.BluetoothAdapter;
import android.bluetooth.BluetoothDevice;
import android.bluetooth.BluetoothSocket;
import android.content.Context;
import android.content.Intent;
import android.content.SharedPreferences;
import android.net.Uri;
import android.os.ParcelUuid;
import android.preference.PreferenceManager;
import android.support.v4.content.LocalBroadcastManager;
import android.util.Log;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
@ -21,17 +33,6 @@ import nodomain.freeyourgadget.gadgetbridge.protocol.GBDeviceCommandMusicControl
import nodomain.freeyourgadget.gadgetbridge.protocol.GBDeviceCommandVersionInfo;
import nodomain.freeyourgadget.gadgetbridge.protocol.GBDeviceProtocol;
import nodomain.freeyourgadget.gadgetbridge.protocol.PebbleProtocol;
import android.bluetooth.BluetoothAdapter;
import android.bluetooth.BluetoothDevice;
import android.bluetooth.BluetoothSocket;
import android.content.Context;
import android.content.Intent;
import android.content.SharedPreferences;
import android.net.Uri;
import android.os.ParcelUuid;
import android.preference.PreferenceManager;
import android.support.v4.content.LocalBroadcastManager;
import android.util.Log;
public class PebbleIoThread extends GBDeviceIoThread {
private static final String TAG = PebbleIoThread.class.getSimpleName();
@ -49,6 +50,9 @@ public class PebbleIoThread extends GBDeviceIoThread {
}
private final PebbleProtocol mmPebbleProtocol;
private BluetoothAdapter mBtAdapter = null;
private BluetoothSocket mBtSocket = null;
private InputStream mmInStream = null;
private OutputStream mmOutStream = null;
private boolean mmQuit = false;
@ -66,8 +70,6 @@ public class PebbleIoThread extends GBDeviceIoThread {
private String[] mmFilesToInstall = null;
private int mmCurrentFileIndex = -1;
private int mmInstallSlot = -1;
private BluetoothAdapter mBtAdapter = null;
private BluetoothSocket mBtSocket = null;
public PebbleIoThread(GBDevice gbDevice, GBDeviceProtocol gbDeviceProtocol, BluetoothAdapter btAdapter, Context context) {
super(gbDevice, context);