mirror of
https://codeberg.org/Freeyourgadget/Gadgetbridge
synced 2025-01-24 08:37:32 +01:00
reformat code with androidstudio
This commit is contained in:
parent
62a41ac5be
commit
bb44cb1e19
@ -1,10 +1,5 @@
|
|||||||
package nodomain.freeyourgadget.gadgetbridge;
|
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.NotificationManager;
|
||||||
import android.app.Service;
|
import android.app.Service;
|
||||||
import android.bluetooth.BluetoothAdapter;
|
import android.bluetooth.BluetoothAdapter;
|
||||||
@ -21,6 +16,12 @@ import android.provider.ContactsContract;
|
|||||||
import android.util.Log;
|
import android.util.Log;
|
||||||
import android.widget.Toast;
|
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 class BluetoothCommunicationService extends Service {
|
||||||
public static final String ACTION_START
|
public static final String ACTION_START
|
||||||
= "nodomain.freeyourgadget.gadgetbride.bluetoothcommunicationservice.action.start";
|
= "nodomain.freeyourgadget.gadgetbride.bluetoothcommunicationservice.action.start";
|
||||||
|
@ -1,5 +1,17 @@
|
|||||||
package nodomain.freeyourgadget.gadgetbridge.pebble;
|
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.IOException;
|
||||||
import java.io.InputStream;
|
import java.io.InputStream;
|
||||||
import java.io.OutputStream;
|
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.GBDeviceCommandVersionInfo;
|
||||||
import nodomain.freeyourgadget.gadgetbridge.protocol.GBDeviceProtocol;
|
import nodomain.freeyourgadget.gadgetbridge.protocol.GBDeviceProtocol;
|
||||||
import nodomain.freeyourgadget.gadgetbridge.protocol.PebbleProtocol;
|
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 {
|
public class PebbleIoThread extends GBDeviceIoThread {
|
||||||
private static final String TAG = PebbleIoThread.class.getSimpleName();
|
private static final String TAG = PebbleIoThread.class.getSimpleName();
|
||||||
@ -49,6 +50,9 @@ public class PebbleIoThread extends GBDeviceIoThread {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private final PebbleProtocol mmPebbleProtocol;
|
private final PebbleProtocol mmPebbleProtocol;
|
||||||
|
|
||||||
|
private BluetoothAdapter mBtAdapter = null;
|
||||||
|
private BluetoothSocket mBtSocket = null;
|
||||||
private InputStream mmInStream = null;
|
private InputStream mmInStream = null;
|
||||||
private OutputStream mmOutStream = null;
|
private OutputStream mmOutStream = null;
|
||||||
private boolean mmQuit = false;
|
private boolean mmQuit = false;
|
||||||
@ -66,8 +70,6 @@ public class PebbleIoThread extends GBDeviceIoThread {
|
|||||||
private String[] mmFilesToInstall = null;
|
private String[] mmFilesToInstall = null;
|
||||||
private int mmCurrentFileIndex = -1;
|
private int mmCurrentFileIndex = -1;
|
||||||
private int mmInstallSlot = -1;
|
private int mmInstallSlot = -1;
|
||||||
private BluetoothAdapter mBtAdapter = null;
|
|
||||||
private BluetoothSocket mBtSocket = null;
|
|
||||||
|
|
||||||
public PebbleIoThread(GBDevice gbDevice, GBDeviceProtocol gbDeviceProtocol, BluetoothAdapter btAdapter, Context context) {
|
public PebbleIoThread(GBDevice gbDevice, GBDeviceProtocol gbDeviceProtocol, BluetoothAdapter btAdapter, Context context) {
|
||||||
super(gbDevice, context);
|
super(gbDevice, context);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user