• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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 
17 package com.android.camera.util;
18 
19 import android.app.Activity;
20 import android.content.ContentResolver;
21 import android.content.Context;
22 import android.content.Intent;
23 import android.net.Uri;
24 
25 import com.android.camera.CameraModule;
26 import com.android.camera.app.AppController;
27 
28 public 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 
PanoramaMetadata(boolean usePanoramaViewer, boolean isPanorama360)35         public PanoramaMetadata(boolean usePanoramaViewer, boolean isPanorama360) {
36             mUsePanoramaViewer = usePanoramaViewer;
37             mIsPanorama360 = isPanorama360;
38         }
39     }
40 
41     public static class PanoramaViewHelper {
42 
PanoramaViewHelper(Activity activity)43         public PanoramaViewHelper(Activity activity) {
44             /* Do nothing */
45         }
46 
onStart()47         public void onStart() {
48             /* Do nothing */
49         }
50 
onCreate()51         public void onCreate() {
52             /* Do nothing */
53         }
54 
onResume()55         public void onResume() {
56             /* Do nothing */
57         }
58 
onPause()59         public void onPause() {
60             /* Do nothing */
61         }
62 
onStop()63         public void onStop() {
64             /* Do nothing */
65         }
66 
67         /**
68          * @return The {@link android.content.Intent} to invoke the external
69          * PhotoSphere viewer.
70          */
showPanorama(Activity activity, Uri uri)71         public Intent showPanorama(Activity activity, Uri uri) {
72             /* Do nothing */
73             return null;
74         }
75 
showRgbz(Uri uri)76         public void showRgbz(Uri uri) {
77             /* Do nothing */
78         }
79     }
80 
81     public static final PanoramaMetadata NOT_PANORAMA = new PanoramaMetadata(false, false);
82 
hasLightCycleCapture(Context context)83     public static boolean hasLightCycleCapture(Context context) {
84         return false;
85     }
86 
getPanoramaMetadata(Context context, Uri uri)87     public static PanoramaMetadata getPanoramaMetadata(Context context, Uri uri) {
88         return NOT_PANORAMA;
89     }
90 
createPanoramaModule(AppController app)91     public static CameraModule createPanoramaModule(AppController app) {
92         return null;
93     }
94 
createWideAnglePanoramaModule(AppController app)95     public static CameraModule createWideAnglePanoramaModule(AppController app) {
96         return null;
97     }
98 
99     /**
100      * Get the file path from a Media storage URI.
101      */
getPathFromURI(ContentResolver contentResolver, Uri contentUri)102     public static String getPathFromURI(ContentResolver contentResolver, Uri contentUri) {
103         return null;
104     }
105 
106     /**
107      * Get the modified time from a Media storage URI.
108      */
getModifiedTimeFromURI(ContentResolver contentResolver, Uri contentUri)109     public static long getModifiedTimeFromURI(ContentResolver contentResolver, Uri contentUri) {
110         return 0;
111     }
112 
113     /**
114      * Get the resource id of the panorama horizontal icon.
115      */
getPanoramaHorizontalDrawableId()116     public static int getPanoramaHorizontalDrawableId() {
117         return 0;
118     }
119 
120     /**
121      * Get the resource id of the panorama vertical icon.
122      */
getPanoramaVerticalDrawableId()123     public static int getPanoramaVerticalDrawableId() {
124         return 0;
125     }
126 
127     /**
128      * Get the resource id of the panorama orientation option icon array.
129      */
getPanoramaOrientationOptionArrayId()130     public static int getPanoramaOrientationOptionArrayId() {
131         return 0;
132     }
133 
134     /**
135      * Get the resource id of the panorama orientation descriptions array.
136      */
getPanoramaOrientationDescriptions()137     public static int getPanoramaOrientationDescriptions() {
138         return 0;
139     }
140 
141     /**
142      * Get the resource id of the panorama orientation indicator array.
143      */
getPanoramaOrientationIndicatorArrayId()144     public static int getPanoramaOrientationIndicatorArrayId() {
145         return 0;
146     }
147 }
148