1
0
mirror of https://codeberg.org/Freeyourgadget/Gadgetbridge synced 2024-07-22 06:41:06 +02:00

Core: fixed typo

This commit is contained in:
Daniel Dakhno 2022-09-29 00:42:15 +02:00 committed by Gitea
parent ec161be66e
commit ea851b312a
5 changed files with 9 additions and 9 deletions

View File

@ -100,7 +100,7 @@ public class GBDevice implements Parcelable {
private int mNotificationIconDisconnected = R.drawable.ic_notification_disconnected;
private int mNotificationIconLowBattery = R.drawable.ic_notification_low_battery;
public static enum DeviceUbdateSubject {
public static enum DeviceUpdateSubject {
UNKNOWN,
NOTHING,
CONNECTION_STATE,
@ -487,11 +487,11 @@ public class GBDevice implements Parcelable {
// TODO: this doesn't really belong here
public void sendDeviceUpdateIntent(Context context) {
sendDeviceUpdateIntent(context, DeviceUbdateSubject.UNKNOWN);
sendDeviceUpdateIntent(context, DeviceUpdateSubject.UNKNOWN);
}
// TODO: this doesn't really belong here
public void sendDeviceUpdateIntent(Context context, DeviceUbdateSubject subject) {
public void sendDeviceUpdateIntent(Context context, DeviceUpdateSubject subject) {
Intent deviceUpdateIntent = new Intent(ACTION_DEVICE_CHANGED);
deviceUpdateIntent.putExtra(EXTRA_DEVICE, this);
deviceUpdateIntent.putExtra(EXTRA_UPDATE_SUBJECT, subject);

View File

@ -437,9 +437,9 @@ public class DeviceCommunicationService extends Service implements SharedPrefere
}
updateReceiversState();
GBDevice.DeviceUbdateSubject subject = (GBDevice.DeviceUbdateSubject) intent.getSerializableExtra(GBDevice.EXTRA_UPDATE_SUBJECT);
GBDevice.DeviceUpdateSubject subject = (GBDevice.DeviceUpdateSubject) intent.getSerializableExtra(GBDevice.EXTRA_UPDATE_SUBJECT);
if(subject == GBDevice.DeviceUbdateSubject.DEVICE_STATE && device.isInitialized()){
if(subject == GBDevice.DeviceUpdateSubject.DEVICE_STATE && device.isInitialized()){
LOG.debug("device state update reason");
sendDeviceConnectedBroadcast(device.getAddress());
}
@ -685,7 +685,7 @@ public class DeviceCommunicationService extends Service implements SharedPrefere
switch (action) {
case ACTION_REQUEST_DEVICEINFO:
device.sendDeviceUpdateIntent(this, GBDevice.DeviceUbdateSubject.NOTHING);
device.sendDeviceUpdateIntent(this, GBDevice.DeviceUpdateSubject.NOTHING);
break;
case ACTION_NOTIFICATION: {
int desiredId = intent.getIntExtra(EXTRA_NOTIFICATION_ID, -1);

View File

@ -264,7 +264,7 @@ public final class BtLEQueue {
LOG.debug("new device connection state: " + newState);
mGbDevice.setState(newState);
mGbDevice.sendDeviceUpdateIntent(mContext, GBDevice.DeviceUbdateSubject.CONNECTION_STATE);
mGbDevice.sendDeviceUpdateIntent(mContext, GBDevice.DeviceUpdateSubject.CONNECTION_STATE);
}
public void disconnect() {

View File

@ -37,7 +37,7 @@ public class SetDeviceStateAction extends PlainAction {
@Override
public boolean run(BluetoothGatt gatt) {
device.setState(deviceState);
device.sendDeviceUpdateIntent(getContext(), GBDevice.DeviceUbdateSubject.DEVICE_STATE);
device.sendDeviceUpdateIntent(getContext(), GBDevice.DeviceUpdateSubject.DEVICE_STATE);
return true;
}

View File

@ -828,7 +828,7 @@ public class FossilWatchAdapter extends WatchAdapter {
private void setDeviceState(GBDevice.State state) {
getDeviceSupport().getDevice().setState(state);
getDeviceSupport().getDevice().sendDeviceUpdateIntent(getContext(), GBDevice.DeviceUbdateSubject.DEVICE_STATE);
getDeviceSupport().getDevice().sendDeviceUpdateIntent(getContext(), GBDevice.DeviceUpdateSubject.DEVICE_STATE);
}
public void queueWrite(FossilRequest request, boolean priorise) {