mirror of
https://codeberg.org/Freeyourgadget/Gadgetbridge
synced 2024-11-29 05:16:51 +01:00
Fix for pebble sample provider switching without quitting gb)
This commit is contained in:
parent
27a9eb8a07
commit
964994972b
@ -16,16 +16,7 @@ import nodomain.freeyourgadget.gadgetbridge.impl.GBDeviceCandidate;
|
||||
import nodomain.freeyourgadget.gadgetbridge.model.DeviceType;
|
||||
|
||||
public class PebbleCoordinator implements DeviceCoordinator {
|
||||
private MorpheuzSampleProvider sampleProvider;
|
||||
|
||||
public PebbleCoordinator() {
|
||||
// FIXME: make this configurable somewhere else
|
||||
SharedPreferences sharedPrefs = PreferenceManager.getDefaultSharedPreferences(GBApplication.getContext());
|
||||
if (sharedPrefs.getBoolean("pebble_force_untested", false)) {
|
||||
sampleProvider = new PebbleGadgetBridgeSampleProvider();
|
||||
} else {
|
||||
sampleProvider = new MorpheuzSampleProvider();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -54,7 +45,13 @@ public class PebbleCoordinator implements DeviceCoordinator {
|
||||
|
||||
@Override
|
||||
public SampleProvider getSampleProvider() {
|
||||
return sampleProvider;
|
||||
// FIXME: make this configurable somewhere else.
|
||||
SharedPreferences sharedPrefs = PreferenceManager.getDefaultSharedPreferences(GBApplication.getContext());
|
||||
if (sharedPrefs.getBoolean("pebble_force_untested", false)) {
|
||||
return new PebbleGadgetBridgeSampleProvider();
|
||||
} else {
|
||||
return new MorpheuzSampleProvider();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
|
Loading…
Reference in New Issue
Block a user