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 onResume() {
56            /* Do nothing */
57        }
58
59        public void onPause() {
60            /* Do nothing */
61        }
62
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         */
71        public Intent showPanorama(Activity activity, Uri uri) {
72            /* Do nothing */
73            return null;
74        }
75
76        public void showRgbz(Uri uri) {
77            /* Do nothing */
78        }
79    }
80
81    public static final PanoramaMetadata NOT_PANORAMA = new PanoramaMetadata(false, false);
82
83    public static boolean hasLightCycleCapture(Context context) {
84        return false;
85    }
86
87    public static PanoramaMetadata getPanoramaMetadata(Context context, Uri uri) {
88        return NOT_PANORAMA;
89    }
90
91    public static CameraModule createPanoramaModule(AppController app) {
92        return null;
93    }
94
95    public static CameraModule createWideAnglePanoramaModule(AppController app) {
96        return null;
97    }
98
99    /**
100     * Get the file path from a Media storage URI.
101     */
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     */
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     */
116    public static int getPanoramaHorizontalDrawableId() {
117        return 0;
118    }
119
120    /**
121     * Get the resource id of the panorama vertical icon.
122     */
123    public static int getPanoramaVerticalDrawableId() {
124        return 0;
125    }
126
127    /**
128     * Get the resource id of the panorama orientation option icon array.
129     */
130    public static int getPanoramaOrientationOptionArrayId() {
131        return 0;
132    }
133
134    /**
135     * Get the resource id of the panorama orientation descriptions array.
136     */
137    public static int getPanoramaOrientationDescriptions() {
138        return 0;
139    }
140
141    /**
142     * Get the resource id of the panorama orientation indicator array.
143     */
144    public static int getPanoramaOrientationIndicatorArrayId() {
145        return 0;
146    }
147}
148