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