mirror of
https://github.com/vanitasvitae/Spherical
synced 2025-09-11 03:09:47 +02:00
Fix NPE, add permission for external storage
This commit is contained in:
parent
179d3b7bd2
commit
a6f93088df
3 changed files with 23 additions and 8 deletions
|
@ -115,12 +115,15 @@ public class SphereParser {
|
|||
|
||||
byte[] xml = new byte[xmlLen - 2];
|
||||
i = inputStream.read(xml);
|
||||
throwIfUnexpectedEOF(i, r.length);
|
||||
throwIfUnexpectedEOF(i, xml.length);
|
||||
|
||||
return new String(xml);
|
||||
}
|
||||
|
||||
public static PhotoSphereMetadata parse(String xmp) {
|
||||
if (xmp == null) {
|
||||
return null;
|
||||
}
|
||||
PhotoSphereMetadata meta = new PhotoSphereMetadata();
|
||||
meta.setUsePanoramaViewer(parseBoolean(USE_PANORAMA_VIEWER, xmp, true));
|
||||
meta.setCaptureSoftware(parseString(CAPTURE_SOFTWARE, xmp));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue