1
0
mirror of https://codeberg.org/Freeyourgadget/Gadgetbridge synced 2024-12-26 18:45:49 +01:00

fix compilation

This commit is contained in:
Andreas Shimokawa 2015-12-23 22:15:50 +01:00
parent 15436c59e5
commit 9f60bf3561

View File

@ -25,13 +25,14 @@ import java.util.concurrent.locks.ReentrantLock;
import nodomain.freeyourgadget.gadgetbridge.database.ActivityDatabaseHandler; import nodomain.freeyourgadget.gadgetbridge.database.ActivityDatabaseHandler;
import nodomain.freeyourgadget.gadgetbridge.database.DBConstants; import nodomain.freeyourgadget.gadgetbridge.database.DBConstants;
import nodomain.freeyourgadget.gadgetbridge.database.DBHandler; import nodomain.freeyourgadget.gadgetbridge.database.DBHandler;
import nodomain.freeyourgadget.gadgetbridge.externalevents.BluetoothConnectReceiver;
import nodomain.freeyourgadget.gadgetbridge.impl.GBDeviceService; import nodomain.freeyourgadget.gadgetbridge.impl.GBDeviceService;
import nodomain.freeyourgadget.gadgetbridge.model.DeviceService; import nodomain.freeyourgadget.gadgetbridge.model.DeviceService;
import nodomain.freeyourgadget.gadgetbridge.util.FileUtils; import nodomain.freeyourgadget.gadgetbridge.util.FileUtils;
import nodomain.freeyourgadget.gadgetbridge.util.GB; import nodomain.freeyourgadget.gadgetbridge.util.GB;
import nodomain.freeyourgadget.gadgetbridge.util.IDSenderLookup; import nodomain.freeyourgadget.gadgetbridge.util.IDSenderLookup;
//import nodomain.freeyourgadget.gadgetbridge.externalevents.BluetoothConnectReceiver;
/** /**
* Main Application class that initializes and provides access to certain things like * Main Application class that initializes and provides access to certain things like
* logging and DB access. * logging and DB access.
@ -60,10 +61,10 @@ public class GBApplication extends Application {
} }
}; };
private BluetoothConnectReceiver systemBTReceiver = new BluetoothConnectReceiver(); //private BluetoothConnectReceiver systemBTReceiver = new BluetoothConnectReceiver();
private void quit() { private void quit() {
unregisterSystemBTReceiver(); //unregisterSystemBTReceiver();
GB.removeAllNotifications(this); GB.removeAllNotifications(this);
} }
@ -102,22 +103,24 @@ public class GBApplication extends Application {
filterLocal.addAction(ACTION_QUIT); filterLocal.addAction(ACTION_QUIT);
LocalBroadcastManager.getInstance(this).registerReceiver(mReceiver, filterLocal); LocalBroadcastManager.getInstance(this).registerReceiver(mReceiver, filterLocal);
registerSystemBTReceiver(); //registerSystemBTReceiver();
// for testing DB stuff // for testing DB stuff
// SQLiteDatabase db = mActivityDatabaseHandler.getWritableDatabase(); // SQLiteDatabase db = mActivityDatabaseHandler.getWritableDatabase();
// db.close(); // db.close();
} }
private void registerSystemBTReceiver() { /*
IntentFilter filter = new IntentFilter(); private void registerSystemBTReceiver() {
filter.addAction("android.bluetooth.device.action.ACL_CONNECTED"); IntentFilter filter = new IntentFilter();
filter.addAction("android.bluetooth.device.action.ACL_CONNECTED"); filter.addAction("android.bluetooth.device.action.ACL_CONNECTED");
registerReceiver(systemBTReceiver, filter); filter.addAction("android.bluetooth.device.action.ACL_CONNECTED");
} registerReceiver(systemBTReceiver, filter);
}
private void unregisterSystemBTReceiver() { private void unregisterSystemBTReceiver() {
unregisterReceiver(systemBTReceiver); unregisterReceiver(systemBTReceiver);
} }
*/
private void setupExceptionHandler() { private void setupExceptionHandler() {
LoggingExceptionHandler handler = new LoggingExceptionHandler(Thread.getDefaultUncaughtExceptionHandler()); LoggingExceptionHandler handler = new LoggingExceptionHandler(Thread.getDefaultUncaughtExceptionHandler());