1
0
Fork 0
mirror of https://github.com/vanitasvitae/Spherical synced 2024-12-26 21:08:01 +01:00

Save some processing power

This commit is contained in:
vanitasvitae 2017-09-13 01:42:03 +02:00
parent 72f934b808
commit e6e0b1f680
Signed by: vanitasvitae
GPG key ID: 62BEE9264BF17311

View file

@ -92,10 +92,12 @@ public class MainActivity extends AppCompatActivity {
String xml = SphereParser.getXMLContent(inputStream);
PhotoSphereMetadata metadata = SphereParser.parse(xml);
inputStream = getContentResolver().openInputStream(uri);
if (metadata.isUsePanoramaViewer()) {
displayPhotoSphere(uri);
displayPhotoSphere(inputStream, metadata);
} else {
displayFlatImage(uri);
displayFlatImage(inputStream);
}
} catch (FileNotFoundException e) {
@ -132,9 +134,9 @@ public class MainActivity extends AppCompatActivity {
/**
* Display a flat image.
* @param uri
* @param inputStream
*/
private void displayFlatImage(Uri uri) {
private void displayFlatImage(InputStream inputStream) {
}
}