[android] Use the new camera api instead of hardcoded values

Fixes #4124
This commit is contained in:
Antonio Zugaldia
2016-02-26 11:30:18 -05:00
parent fe7b52e792
commit 3ed9f4336c
3 changed files with 64 additions and 44 deletions

View File

@@ -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();
}
}