mirror of
https://github.com/vanitasvitae/Spherical
synced 2024-11-24 13:22:08 +01:00
Save some processing power
This commit is contained in:
parent
72f934b808
commit
e6e0b1f680
1 changed files with 6 additions and 4 deletions
|
@ -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) {
|
||||
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue