mirror of
https://codeberg.org/Freeyourgadget/Gadgetbridge
synced 2024-11-10 03:59:24 +01:00
Xiaomi: Enable activity sync on debug and nightly builds
This commit is contained in:
parent
4f75141d76
commit
cb66cd742a
@ -1562,6 +1562,10 @@ public class GBApplication extends Application {
|
|||||||
return BuildConfig.APPLICATION_ID.contains("nightly");
|
return BuildConfig.APPLICATION_ID.contains("nightly");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static boolean isDebug() {
|
||||||
|
return BuildConfig.DEBUG;
|
||||||
|
}
|
||||||
|
|
||||||
public String getVersion() {
|
public String getVersion() {
|
||||||
try {
|
try {
|
||||||
return getPackageManager().getPackageInfo(getPackageName(), PackageManager.GET_META_DATA).versionName;
|
return getPackageManager().getPackageInfo(getPackageName(), PackageManager.GET_META_DATA).versionName;
|
||||||
|
@ -34,7 +34,6 @@ import java.util.List;
|
|||||||
import java.util.UUID;
|
import java.util.UUID;
|
||||||
import java.util.regex.Pattern;
|
import java.util.regex.Pattern;
|
||||||
|
|
||||||
import nodomain.freeyourgadget.gadgetbridge.BuildConfig;
|
|
||||||
import nodomain.freeyourgadget.gadgetbridge.GBApplication;
|
import nodomain.freeyourgadget.gadgetbridge.GBApplication;
|
||||||
import nodomain.freeyourgadget.gadgetbridge.GBException;
|
import nodomain.freeyourgadget.gadgetbridge.GBException;
|
||||||
import nodomain.freeyourgadget.gadgetbridge.R;
|
import nodomain.freeyourgadget.gadgetbridge.R;
|
||||||
@ -226,19 +225,19 @@ public abstract class XiaomiCoordinator extends AbstractBLEDeviceCoordinator {
|
|||||||
@Override
|
@Override
|
||||||
public boolean supportsActivityDataFetching() {
|
public boolean supportsActivityDataFetching() {
|
||||||
// TODO It does, but not yet fully working - only in Mi Band 8
|
// TODO It does, but not yet fully working - only in Mi Band 8
|
||||||
return false;
|
return GBApplication.isDebug() || GBApplication.isNightly();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean supportsActivityTracking() {
|
public boolean supportsActivityTracking() {
|
||||||
// TODO It does, but not yet fully working - only in Mi Band 8
|
// TODO It does, but not yet fully working - only in Mi Band 8
|
||||||
return false;
|
return GBApplication.isDebug() || GBApplication.isNightly();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean supportsActivityTracks() {
|
public boolean supportsActivityTracks() {
|
||||||
// TODO It does, but not yet fully working - only in Mi Band 8
|
// TODO It does, but not yet fully working - only in Mi Band 8
|
||||||
return false;
|
return GBApplication.isDebug() || GBApplication.isNightly();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
Loading…
Reference in New Issue
Block a user