PhotoSphereHelper.java revision 280fd3edae1dc35ac1015bcc9532477169fad3aa
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.net.Uri; 23 24import com.android.camera.CameraModule; 25import com.android.camera.app.CameraServices; 26 27public class PhotoSphereHelper { 28 public static class PanoramaMetadata { 29 // Whether a panorama viewer should be used 30 public final boolean mUsePanoramaViewer; 31 // Whether a panorama is 360 degrees 32 public final boolean mIsPanorama360; 33 34 public PanoramaMetadata(boolean usePanoramaViewer, boolean isPanorama360) { 35 mUsePanoramaViewer = usePanoramaViewer; 36 mIsPanorama360 = isPanorama360; 37 } 38 } 39 40 public static class PanoramaViewHelper { 41 42 public PanoramaViewHelper(Activity activity) { 43 /* Do nothing */ 44 } 45 46 public void onStart() { 47 /* Do nothing */ 48 } 49 50 public void onCreate() { 51 /* Do nothing */ 52 } 53 54 public void onStop() { 55 /* Do nothing */ 56 } 57 58 public void showPanorama(Uri uri) { 59 /* Do nothing */ 60 } 61 62 public void showRgbz(Uri uri) { 63 /* Do nothing */ 64 } 65 } 66 67 public static final PanoramaMetadata NOT_PANORAMA = new PanoramaMetadata(false, false); 68 69 public static boolean hasLightCycleCapture(Context context) { 70 return false; 71 } 72 73 public static PanoramaMetadata getPanoramaMetadata(Context context, Uri uri) { 74 return NOT_PANORAMA; 75 } 76 77 public static CameraModule createPanoramaModule(CameraServices services) { 78 return null; 79 } 80 81 /** 82 * Get the file path from a Media storage URI. 83 */ 84 public static String getPathFromURI(ContentResolver contentResolver, Uri contentUri) { 85 return null; 86 } 87 88 /** 89 * Get the modified time from a Media storage URI. 90 */ 91 public static long getModifiedTimeFromURI(ContentResolver contentResolver, Uri contentUri) { 92 return 0; 93 } 94} 95