mirror of
https://github.com/oliexdev/openScale.git
synced 2025-09-02 21:02:48 +02:00
Set access level to protected for all next*Cmd
This commit is contained in:
@@ -146,7 +146,7 @@ public class BluetoothBeurerSanitas extends BluetoothCommunication {
|
||||
}
|
||||
|
||||
@Override
|
||||
boolean nextInitCmd(int stateNr) {
|
||||
protected boolean nextInitCmd(int stateNr) {
|
||||
|
||||
switch (stateNr) {
|
||||
case 0:
|
||||
@@ -245,7 +245,7 @@ public class BluetoothBeurerSanitas extends BluetoothCommunication {
|
||||
}
|
||||
|
||||
@Override
|
||||
boolean nextBluetoothCmd(int stateNr) {
|
||||
protected boolean nextBluetoothCmd(int stateNr) {
|
||||
|
||||
switch (stateNr) {
|
||||
case 0:
|
||||
@@ -274,7 +274,7 @@ public class BluetoothBeurerSanitas extends BluetoothCommunication {
|
||||
}
|
||||
|
||||
@Override
|
||||
boolean nextCleanUpCmd(int stateNr) {
|
||||
protected boolean nextCleanUpCmd(int stateNr) {
|
||||
switch (stateNr) {
|
||||
case 0:
|
||||
// Force disconnect
|
||||
|
@@ -126,7 +126,7 @@ public abstract class BluetoothCommunication {
|
||||
* @param stateNr the current step number
|
||||
* @return false if no next step is available otherwise true
|
||||
*/
|
||||
abstract boolean nextInitCmd(int stateNr);
|
||||
abstract protected boolean nextInitCmd(int stateNr);
|
||||
|
||||
/**
|
||||
* State machine for the normal/command process of the Bluetooth device.
|
||||
@@ -136,7 +136,7 @@ public abstract class BluetoothCommunication {
|
||||
* @param stateNr the current step number
|
||||
* @return false if no next step is available otherwise true
|
||||
*/
|
||||
abstract boolean nextBluetoothCmd(int stateNr);
|
||||
abstract protected boolean nextBluetoothCmd(int stateNr);
|
||||
|
||||
/**
|
||||
* Set the next command number of the current state.
|
||||
@@ -165,7 +165,7 @@ public abstract class BluetoothCommunication {
|
||||
* @param stateNr the current step number
|
||||
* @return false if no next step is available otherwise true
|
||||
*/
|
||||
abstract boolean nextCleanUpCmd(int stateNr);
|
||||
abstract protected boolean nextCleanUpCmd(int stateNr);
|
||||
|
||||
/**
|
||||
* Method is triggered if a Bluetooth data is read from a device.
|
||||
|
@@ -47,17 +47,17 @@ public class BluetoothCustomOpenScale extends BluetoothCommunication {
|
||||
}
|
||||
|
||||
@Override
|
||||
boolean nextInitCmd(int stateNr) {
|
||||
protected boolean nextInitCmd(int stateNr) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
boolean nextBluetoothCmd(int stateNr) {
|
||||
protected boolean nextBluetoothCmd(int stateNr) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
boolean nextCleanUpCmd(int stateNr) {
|
||||
protected boolean nextCleanUpCmd(int stateNr) {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@@ -56,7 +56,7 @@ public class BluetoothDigooDGSO38H extends BluetoothCommunication {
|
||||
|
||||
|
||||
@Override
|
||||
boolean nextInitCmd(int stateNr) {
|
||||
protected boolean nextInitCmd(int stateNr) {
|
||||
switch (stateNr) {
|
||||
case 0:
|
||||
//Tell device to send us weight measurements
|
||||
@@ -68,7 +68,7 @@ public class BluetoothDigooDGSO38H extends BluetoothCommunication {
|
||||
}
|
||||
|
||||
@Override
|
||||
boolean nextBluetoothCmd(int stateNr) {
|
||||
protected boolean nextBluetoothCmd(int stateNr) {
|
||||
switch (stateNr) {
|
||||
default:
|
||||
return false;
|
||||
@@ -76,7 +76,7 @@ public class BluetoothDigooDGSO38H extends BluetoothCommunication {
|
||||
}
|
||||
|
||||
@Override
|
||||
boolean nextCleanUpCmd(int stateNr) {
|
||||
protected boolean nextCleanUpCmd(int stateNr) {
|
||||
|
||||
switch (stateNr) {
|
||||
default:
|
||||
|
@@ -46,12 +46,12 @@ public class BluetoothExcelvanCF369BLE extends BluetoothCommunication {
|
||||
}
|
||||
|
||||
@Override
|
||||
boolean nextInitCmd(int stateNr) {
|
||||
protected boolean nextInitCmd(int stateNr) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
boolean nextBluetoothCmd(int stateNr) {
|
||||
protected boolean nextBluetoothCmd(int stateNr) {
|
||||
switch (stateNr) {
|
||||
case 0:
|
||||
final ScaleUser selectedUser = OpenScale.getInstance(context).getSelectedScaleUser();
|
||||
@@ -87,7 +87,7 @@ public class BluetoothExcelvanCF369BLE extends BluetoothCommunication {
|
||||
}
|
||||
|
||||
@Override
|
||||
boolean nextCleanUpCmd(int stateNr) {
|
||||
protected boolean nextCleanUpCmd(int stateNr) {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@@ -43,7 +43,7 @@ public class BluetoothExingtechY1 extends BluetoothCommunication {
|
||||
}
|
||||
|
||||
@Override
|
||||
boolean nextInitCmd(int stateNr) {
|
||||
protected boolean nextInitCmd(int stateNr) {
|
||||
switch (stateNr) {
|
||||
case 0:
|
||||
setNotificationOn(WEIGHT_MEASUREMENT_SERVICE, WEIGHT_MEASUREMENT_CHARACTERISTIC, WEIGHT_MEASUREMENT_CONFIG);
|
||||
@@ -69,12 +69,12 @@ public class BluetoothExingtechY1 extends BluetoothCommunication {
|
||||
}
|
||||
|
||||
@Override
|
||||
boolean nextBluetoothCmd(int stateNr) {
|
||||
protected boolean nextBluetoothCmd(int stateNr) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
boolean nextCleanUpCmd(int stateNr) {
|
||||
protected boolean nextCleanUpCmd(int stateNr) {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@@ -41,7 +41,7 @@ public class BluetoothHesley extends BluetoothCommunication {
|
||||
}
|
||||
|
||||
@Override
|
||||
boolean nextInitCmd(int stateNr) {
|
||||
protected boolean nextInitCmd(int stateNr) {
|
||||
switch (stateNr) {
|
||||
case 0:
|
||||
setNotificationOn(WEIGHT_MEASUREMENT_SERVICE, WEIGHT_MEASUREMENT_CHARACTERISTIC, WEIGHT_MEASUREMENT_CONFIG);
|
||||
@@ -58,12 +58,12 @@ public class BluetoothHesley extends BluetoothCommunication {
|
||||
}
|
||||
|
||||
@Override
|
||||
boolean nextBluetoothCmd(int stateNr) {
|
||||
protected boolean nextBluetoothCmd(int stateNr) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
boolean nextCleanUpCmd(int stateNr) {
|
||||
protected boolean nextCleanUpCmd(int stateNr) {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@@ -54,19 +54,19 @@ public class BluetoothIhealthHS3 extends BluetoothCommunication {
|
||||
}
|
||||
|
||||
@Override
|
||||
boolean nextInitCmd(int stateNr) {
|
||||
protected boolean nextInitCmd(int stateNr) {
|
||||
Log.w("openscale","ihealthHS3 - nextInitCmd - returning false");
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
boolean nextBluetoothCmd(int stateNr) {
|
||||
protected boolean nextBluetoothCmd(int stateNr) {
|
||||
Log.w("openscale","ihealthHS3 - nextBluetoothCmd - returning false");
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
boolean nextCleanUpCmd(int stateNr) {
|
||||
protected boolean nextCleanUpCmd(int stateNr) {
|
||||
Log.w("openscale","ihealthHS3 - nextCleanUpCmd - returning false");
|
||||
return false;
|
||||
}
|
||||
|
@@ -84,7 +84,7 @@ public class BluetoothMGB extends BluetoothCommunication {
|
||||
}
|
||||
|
||||
@Override
|
||||
boolean nextInitCmd(int stateNr) {
|
||||
protected boolean nextInitCmd(int stateNr) {
|
||||
switch (stateNr) {
|
||||
case 0:
|
||||
setNotificationOn(uuid_service, uuid_char_ctrl, uuid_desc_ctrl);
|
||||
@@ -125,13 +125,13 @@ public class BluetoothMGB extends BluetoothCommunication {
|
||||
|
||||
|
||||
@Override
|
||||
boolean nextBluetoothCmd(int stateNr) {
|
||||
protected boolean nextBluetoothCmd(int stateNr) {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
boolean nextCleanUpCmd(int stateNr) {
|
||||
protected boolean nextCleanUpCmd(int stateNr) {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@@ -46,12 +46,12 @@ public class BluetoothMedisanaBS444 extends BluetoothCommunication {
|
||||
}
|
||||
|
||||
@Override
|
||||
boolean nextInitCmd(int stateNr) {
|
||||
protected boolean nextInitCmd(int stateNr) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
boolean nextBluetoothCmd(int stateNr) {
|
||||
protected boolean nextBluetoothCmd(int stateNr) {
|
||||
switch (stateNr) {
|
||||
case 0:
|
||||
// set indication on for feature characteristic
|
||||
@@ -89,7 +89,7 @@ public class BluetoothMedisanaBS444 extends BluetoothCommunication {
|
||||
}
|
||||
|
||||
@Override
|
||||
boolean nextCleanUpCmd(int stateNr) {
|
||||
protected boolean nextCleanUpCmd(int stateNr) {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@@ -98,7 +98,7 @@ public class BluetoothMiScale extends BluetoothCommunication {
|
||||
|
||||
|
||||
@Override
|
||||
boolean nextInitCmd(int stateNr) {
|
||||
protected boolean nextInitCmd(int stateNr) {
|
||||
switch (stateNr) {
|
||||
case 0:
|
||||
// read device time
|
||||
@@ -136,7 +136,7 @@ public class BluetoothMiScale extends BluetoothCommunication {
|
||||
}
|
||||
|
||||
@Override
|
||||
boolean nextBluetoothCmd(int stateNr) {
|
||||
protected boolean nextBluetoothCmd(int stateNr) {
|
||||
switch (stateNr) {
|
||||
case 0:
|
||||
// set notification on for weight measurement history
|
||||
@@ -173,7 +173,7 @@ public class BluetoothMiScale extends BluetoothCommunication {
|
||||
}
|
||||
|
||||
@Override
|
||||
boolean nextCleanUpCmd(int stateNr) {
|
||||
protected boolean nextCleanUpCmd(int stateNr) {
|
||||
|
||||
switch (stateNr) {
|
||||
case 0:
|
||||
|
@@ -85,7 +85,7 @@ public class BluetoothMiScale2 extends BluetoothCommunication {
|
||||
|
||||
|
||||
@Override
|
||||
boolean nextInitCmd(int stateNr) {
|
||||
protected boolean nextInitCmd(int stateNr) {
|
||||
switch (stateNr) {
|
||||
case 0:
|
||||
// set scale units
|
||||
@@ -119,7 +119,7 @@ public class BluetoothMiScale2 extends BluetoothCommunication {
|
||||
}
|
||||
|
||||
@Override
|
||||
boolean nextBluetoothCmd(int stateNr) {
|
||||
protected boolean nextBluetoothCmd(int stateNr) {
|
||||
switch (stateNr) {
|
||||
case 0:
|
||||
// configure scale to get only last measurements
|
||||
@@ -148,7 +148,7 @@ public class BluetoothMiScale2 extends BluetoothCommunication {
|
||||
}
|
||||
|
||||
@Override
|
||||
boolean nextCleanUpCmd(int stateNr) {
|
||||
protected boolean nextCleanUpCmd(int stateNr) {
|
||||
|
||||
switch (stateNr) {
|
||||
case 0:
|
||||
|
@@ -45,7 +45,7 @@ public class BluetoothOneByone extends BluetoothCommunication {
|
||||
}
|
||||
|
||||
@Override
|
||||
boolean nextInitCmd(int stateNr) {
|
||||
protected boolean nextInitCmd(int stateNr) {
|
||||
switch (stateNr) {
|
||||
case 0:
|
||||
setIndicationOn(WEIGHT_MEASUREMENT_SERVICE_BODY_COMPOSITION, WEIGHT_MEASUREMENT_CHARACTERISTIC_BODY_COMPOSITION, WEIGHT_MEASUREMENT_CONFIG);
|
||||
@@ -69,12 +69,12 @@ public class BluetoothOneByone extends BluetoothCommunication {
|
||||
}
|
||||
|
||||
@Override
|
||||
boolean nextBluetoothCmd(int stateNr) {
|
||||
protected boolean nextBluetoothCmd(int stateNr) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
boolean nextCleanUpCmd(int stateNr) {
|
||||
protected boolean nextCleanUpCmd(int stateNr) {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@@ -52,7 +52,7 @@ public class BluetoothYunmaiSE_Mini extends BluetoothCommunication {
|
||||
}
|
||||
|
||||
@Override
|
||||
boolean nextInitCmd(int stateNr) {
|
||||
protected boolean nextInitCmd(int stateNr) {
|
||||
switch (stateNr) {
|
||||
case 0:
|
||||
byte[] userId = Converters.toUnsignedInt16Be(getUniqueNumber());
|
||||
@@ -94,12 +94,12 @@ public class BluetoothYunmaiSE_Mini extends BluetoothCommunication {
|
||||
}
|
||||
|
||||
@Override
|
||||
boolean nextBluetoothCmd(int stateNr) {
|
||||
protected boolean nextBluetoothCmd(int stateNr) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
boolean nextCleanUpCmd(int stateNr) {
|
||||
protected boolean nextCleanUpCmd(int stateNr) {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user