mirror of
https://codeberg.org/Freeyourgadget/Gadgetbridge
synced 2024-11-29 13:26:50 +01:00
Add support for experimental devices
This commit is contained in:
parent
0a19f88a3f
commit
e5faf518ea
@ -80,6 +80,9 @@ public class DeviceCandidateAdapter extends ArrayAdapter<GBDeviceCandidate> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
DeviceCoordinator coordinator = DeviceHelper.getInstance().getCoordinator(device);
|
DeviceCoordinator coordinator = DeviceHelper.getInstance().getCoordinator(device);
|
||||||
|
if (coordinator.isExperimental()) {
|
||||||
|
statusLines.add(getContext().getString(R.string.device_experimental));
|
||||||
|
}
|
||||||
if (coordinator.getBondingStyle() == DeviceCoordinator.BONDING_STYLE_REQUIRE_KEY) {
|
if (coordinator.getBondingStyle() == DeviceCoordinator.BONDING_STYLE_REQUIRE_KEY) {
|
||||||
statusLines.add(getContext().getString(R.string.device_requires_key));
|
statusLines.add(getContext().getString(R.string.device_requires_key));
|
||||||
}
|
}
|
||||||
|
@ -258,6 +258,11 @@ public abstract class AbstractDeviceCoordinator implements DeviceCoordinator {
|
|||||||
return BONDING_STYLE_ASK;
|
return BONDING_STYLE_ASK;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean isExperimental() {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean supportsActivityTracks() {
|
public boolean supportsActivityTracks() {
|
||||||
return false;
|
return false;
|
||||||
|
@ -410,6 +410,11 @@ public interface DeviceCoordinator {
|
|||||||
*/
|
*/
|
||||||
int getBondingStyle();
|
int getBondingStyle();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns true if this device is in an experimental state / not tested.
|
||||||
|
*/
|
||||||
|
boolean isExperimental();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Indicates whether the device has some kind of calender we can sync to.
|
* Indicates whether the device has some kind of calender we can sync to.
|
||||||
* Also used for generated sunrise/sunset events
|
* Also used for generated sunrise/sunset events
|
||||||
|
@ -1581,6 +1581,7 @@
|
|||||||
<string name="device_is_currently_bonded">ALREADY BONDED</string>
|
<string name="device_is_currently_bonded">ALREADY BONDED</string>
|
||||||
<string name="device_requires_key">KEY REQUIRED, LONG PRESS TO ENTER</string>
|
<string name="device_requires_key">KEY REQUIRED, LONG PRESS TO ENTER</string>
|
||||||
<string name="device_unsupported">UNSUPPORTED</string>
|
<string name="device_unsupported">UNSUPPORTED</string>
|
||||||
|
<string name="device_experimental">EXPERIMENTAL</string>
|
||||||
<string name="error_background_service_reason">Starting the background service failed because of an exception. Error: </string>
|
<string name="error_background_service_reason">Starting the background service failed because of an exception. Error: </string>
|
||||||
<string name="pref_check_permission_status">Check permission status</string>
|
<string name="pref_check_permission_status">Check permission status</string>
|
||||||
<string name="pref_check_permission_status_summary">Check and ask for missing permissions even when they might not be instantly needed. Disable this only if your devices actually doesn\'t support any of these features. Not granting a permission might cause issues!</string>
|
<string name="pref_check_permission_status_summary">Check and ask for missing permissions even when they might not be instantly needed. Disable this only if your devices actually doesn\'t support any of these features. Not granting a permission might cause issues!</string>
|
||||||
|
Loading…
Reference in New Issue
Block a user