Home | History | Annotate | Download | only in util
      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.gallery3d.util;
     18 
     19 import android.app.Activity;
     20 import android.content.Context;
     21 import android.content.Intent;
     22 import android.net.Uri;
     23 
     24 import com.android.camera.CameraModule;
     25 import com.android.gallery3d.app.GalleryApp;
     26 import com.android.gallery3d.app.StitchingProgressManager;
     27 
     28 public class LightCycleHelper {
     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         public void showPanorama(Uri uri) {
     60             /* Do nothing */
     61         }
     62     }
     63 
     64     public static final PanoramaMetadata NOT_PANORAMA = new PanoramaMetadata(false, false);
     65 
     66     public static void setupCaptureIntent(Context context, Intent it, String outputDir) {
     67         /* Do nothing */
     68     }
     69 
     70     public static boolean hasLightCycleCapture(Context context) {
     71         return false;
     72     }
     73 
     74     public static PanoramaMetadata getPanoramaMetadata(Context context, Uri uri) {
     75         return NOT_PANORAMA;
     76     }
     77 
     78     public static CameraModule createPanoramaModule() {
     79         return null;
     80     }
     81 
     82     public static StitchingProgressManager createStitchingManagerInstance(GalleryApp app) {
     83         return null;
     84     }
     85 }
     86