PhotoSphereHelper.java revision 0eaf01670a1198c95b6472ec0dc076c9f84971de
1/* 2 * Copyright (C) 2012 The Android Open Source Project 3 * 4 * Licensed under the Apache License, Version 2.0 (the "License"); 5 * you may not use this file except in compliance with the License. 6 * You may obtain a copy of the License at 7 * 8 * http://www.apache.org/licenses/LICENSE-2.0 9 * 10 * Unless required by applicable law or agreed to in writing, software 11 * distributed under the License is distributed on an "AS IS" BASIS, 12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 * See the License for the specific language governing permissions and 14 * limitations under the License. 15 */ 16 17package com.android.camera.util; 18 19import android.app.Activity; 20import android.content.ContentResolver; 21import android.content.Context; 22import android.content.Intent; 23import android.net.Uri; 24 25import com.android.camera.CameraModule; 26import com.android.camera.app.AppController; 27 28public class PhotoSphereHelper { 29 public static class PanoramaMetadata { 30 // Whether a panorama viewer should be used 31 public final boolean mUsePanoramaViewer; 32 // Whether a panorama is 360 degrees 33 public final boolean mIsPanorama360; 34 35 public PanoramaMetadata(boolean usePanoramaViewer, boolean isPanorama360) { 36 mUsePanoramaViewer = usePanoramaViewer; 37 mIsPanorama360 = isPanorama360; 38 } 39 } 40 41 public static class PanoramaViewHelper { 42 43 public PanoramaViewHelper(Activity activity) { 44 /* Do nothing */ 45 } 46 47 public void onStart() { 48 /* Do nothing */ 49 } 50 51 public void onCreate() { 52 /* Do nothing */ 53 } 54 55 public void onStop() { 56 /* Do nothing */ 57 } 58 59 /** 60 * @return The {@link android.content.Intent} to invoke the external 61 * PhotoSphere viewer. 62 */ 63 public Intent showPanorama(Uri uri) { 64 /* Do nothing */ 65 return null; 66 } 67 68 public void showRgbz(Uri uri) { 69 /* Do nothing */ 70 } 71 } 72 73 public static final PanoramaMetadata NOT_PANORAMA = new PanoramaMetadata(false, false); 74 75 public static boolean hasLightCycleCapture(Context context) { 76 return false; 77 } 78 79 public static PanoramaMetadata getPanoramaMetadata(Context context, Uri uri) { 80 return NOT_PANORAMA; 81 } 82 83 public static CameraModule createPanoramaModule(AppController app) { 84 return null; 85 } 86 87 public static CameraModule createWideAnglePanoramaModule(AppController app) { 88 return null; 89 } 90 91 /** 92 * Get the file path from a Media storage URI. 93 */ 94 public static String getPathFromURI(ContentResolver contentResolver, Uri contentUri) { 95 return null; 96 } 97 98 /** 99 * Get the modified time from a Media storage URI. 100 */ 101 public static long getModifiedTimeFromURI(ContentResolver contentResolver, Uri contentUri) { 102 return 0; 103 } 104} 105