Java Code Examples for com.eveningoutpost.dexdrip.Services.G5CollectionService#setStoredFirmwareBytes()
The following examples show how to use
com.eveningoutpost.dexdrip.Services.G5CollectionService#setStoredFirmwareBytes() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: WatchUpdaterService.java From xDrip with GNU General Public License v3.0 | 6 votes |
private void syncFieldData(DataMap dataMap) { String dex_txid = dataMap.getString("dex_txid", ""); byte[] G5_BATTERY_MARKER = dataMap.getByteArray(G5CollectionService.G5_BATTERY_MARKER); byte[] G5_FIRMWARE_MARKER = dataMap.getByteArray(G5CollectionService.G5_FIRMWARE_MARKER); if (dex_txid != null && dex_txid.equals(mPrefs.getString("dex_txid", "default"))) { if (G5_BATTERY_MARKER != null) { long watch_last_battery_query = dataMap.getLong(G5CollectionService.G5_BATTERY_FROM_MARKER); long phone_last_battery_query = PersistentStore.getLong(G5CollectionService.G5_BATTERY_FROM_MARKER + dex_txid); if (watch_last_battery_query > phone_last_battery_query) { G5CollectionService.setStoredBatteryBytes(dex_txid, G5_BATTERY_MARKER); PersistentStore.setLong(G5CollectionService.G5_BATTERY_FROM_MARKER + dex_txid, watch_last_battery_query); G5CollectionService.getBatteryStatusNow = false; Ob1G5CollectionService.getBatteryStatusNow = false; } } if (G5_FIRMWARE_MARKER != null) { G5CollectionService.setStoredFirmwareBytes(dex_txid, G5_FIRMWARE_MARKER); } } }
Example 2
Source File: WatchUpdaterService.java From xDrip-plus with GNU General Public License v3.0 | 6 votes |
private void syncFieldData(DataMap dataMap) { String dex_txid = dataMap.getString("dex_txid", ""); byte[] G5_BATTERY_MARKER = dataMap.getByteArray(G5CollectionService.G5_BATTERY_MARKER); byte[] G5_FIRMWARE_MARKER = dataMap.getByteArray(G5CollectionService.G5_FIRMWARE_MARKER); if (dex_txid != null && dex_txid.equals(mPrefs.getString("dex_txid", "default"))) { if (G5_BATTERY_MARKER != null) { long watch_last_battery_query = dataMap.getLong(G5CollectionService.G5_BATTERY_FROM_MARKER); long phone_last_battery_query = PersistentStore.getLong(G5CollectionService.G5_BATTERY_FROM_MARKER + dex_txid); if (watch_last_battery_query > phone_last_battery_query) { G5CollectionService.setStoredBatteryBytes(dex_txid, G5_BATTERY_MARKER); PersistentStore.setLong(G5CollectionService.G5_BATTERY_FROM_MARKER + dex_txid, watch_last_battery_query); G5CollectionService.getBatteryStatusNow = false; Ob1G5CollectionService.getBatteryStatusNow = false; } } if (G5_FIRMWARE_MARKER != null) { G5CollectionService.setStoredFirmwareBytes(dex_txid, G5_FIRMWARE_MARKER); } } }