[android] Use the new camera api instead of hardcoded values
Fixes #4124
This commit is contained in:
@@ -1,11 +1,5 @@
|
||||
package com.mapbox.mapboxsdk.offline;
|
||||
|
||||
import java.io.ByteArrayInputStream;
|
||||
import java.io.ByteArrayOutputStream;
|
||||
import java.io.IOException;
|
||||
import java.io.ObjectInputStream;
|
||||
import java.io.ObjectOutputStream;
|
||||
|
||||
/**
|
||||
* Arbitrary binary region metadata. The contents are opaque to the SDK implementation;
|
||||
* it just stores and retrieves a byte[].
|
||||
@@ -43,21 +37,4 @@ public class OfflineRegionMetadata {
|
||||
return "OfflineRegionMetadata{metadata=" + metadata + "}";
|
||||
}
|
||||
|
||||
/*
|
||||
* byte[] utils
|
||||
*/
|
||||
|
||||
public static byte[] serialize(Object obj) throws IOException {
|
||||
ByteArrayOutputStream out = new ByteArrayOutputStream();
|
||||
ObjectOutputStream os = new ObjectOutputStream(out);
|
||||
os.writeObject(obj);
|
||||
return out.toByteArray();
|
||||
}
|
||||
|
||||
public static Object deserialize(byte[] data) throws IOException, ClassNotFoundException {
|
||||
ByteArrayInputStream in = new ByteArrayInputStream(data);
|
||||
ObjectInputStream is = new ObjectInputStream(in);
|
||||
return is.readObject();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user