Refactor widgets
This commit is contained in:
@@ -0,0 +1,12 @@
|
||||
package de.mm20.launcher2.ktx
|
||||
|
||||
import java.nio.ByteBuffer
|
||||
import java.util.UUID
|
||||
|
||||
fun UUID.toBytes(): ByteArray {
|
||||
val bytes = ByteArray(16)
|
||||
val buffer = ByteBuffer.wrap(bytes)
|
||||
buffer.putLong(mostSignificantBits)
|
||||
buffer.putLong(leastSignificantBits)
|
||||
return buffer.array()
|
||||
}
|
||||
Reference in New Issue
Block a user