MCPcopy Create free account
hub / github.com/XCSoar/XCSoar / toUnsignedLong

Method toUnsignedLong

android/src/BluetoothSensor.java:153–163  ·  view source on GitHub ↗
(int x)

Source from the content-addressed store, hash-verified

151 }
152
153 static long toUnsignedLong(int x) {
154 if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.N)
155 // Android 7 "Nougat" supports Java 8
156 return Integer.toUnsignedLong(x);
157
158 // Reimplement for older Android versions
159 long l = x;
160 if (l < 0)
161 l += (1L << 32);
162 return l;
163 }
164
165 @Override
166 public synchronized void onCharacteristicChanged(BluetoothGatt gatt,

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected