1
0
mirror of https://codeberg.org/Freeyourgadget/Gadgetbridge synced 2024-11-29 05:16:51 +01:00

Merge branch 'master' into new_GUI

This commit is contained in:
Daniele Gobbetti 2016-10-25 17:43:00 +02:00
commit d93a5be57a
5 changed files with 55 additions and 0 deletions

View File

@ -140,4 +140,19 @@ public interface DeviceCoordinator {
* Returns the readable name of the manufacturer. * Returns the readable name of the manufacturer.
*/ */
String getManufacturer(); String getManufacturer();
/**
* Returns true if this device/coordinator supports managing device apps.
*
* @return
*/
boolean supportsAppsManagement();
/**
* Returns the Activity class that will be used to manage device apps.
*
* @return
*/
Class<? extends Activity> getAppsManagementActivity();
} }

View File

@ -142,4 +142,14 @@ public class UnknownDeviceCoordinator extends AbstractDeviceCoordinator {
public String getManufacturer() { public String getManufacturer() {
return "unknown"; return "unknown";
} }
@Override
public boolean supportsAppsManagement() {
return false;
}
@Override
public Class<? extends Activity> getAppsManagementActivity() {
return null;
}
} }

View File

@ -119,6 +119,16 @@ public class MiBandCoordinator extends AbstractDeviceCoordinator {
return "Xiaomi"; return "Xiaomi";
} }
@Override
public boolean supportsAppsManagement() {
return false;
}
@Override
public Class<? extends Activity> getAppsManagementActivity() {
return null;
}
public static boolean hasValidUserInfo() { public static boolean hasValidUserInfo() {
String dummyMacAddress = MiBandService.MAC_ADDRESS_FILTER_1_1A + ":00:00:00"; String dummyMacAddress = MiBandService.MAC_ADDRESS_FILTER_1_1A + ":00:00:00";
try { try {

View File

@ -117,4 +117,14 @@ public class PebbleCoordinator extends AbstractDeviceCoordinator {
public String getManufacturer() { public String getManufacturer() {
return "Pebble"; return "Pebble";
} }
@Override
public boolean supportsAppsManagement() {
return true;
}
@Override
public Class<? extends Activity> getAppsManagementActivity() {
return AppManagerActivity.class;
}
} }

View File

@ -85,6 +85,16 @@ public class VibratissimoCoordinator extends AbstractDeviceCoordinator {
return "Amor AG"; return "Amor AG";
} }
@Override
public boolean supportsAppsManagement() {
return false;
}
@Override
public Class<? extends Activity> getAppsManagementActivity() {
return null;
}
@Override @Override
protected void deleteDevice(@NonNull GBDevice gbDevice, @NonNull Device device, @NonNull DaoSession session) throws GBException { protected void deleteDevice(@NonNull GBDevice gbDevice, @NonNull Device device, @NonNull DaoSession session) throws GBException {
// nothing to delete, yet // nothing to delete, yet