summaryrefslogtreecommitdiffstats
path: root/src/com/android/camera/CameraActivity.java
diff options
context:
space:
mode:
authorSascha Haeberling <haeberling@google.com>2013-07-31 11:28:21 -0700
committerSascha Haeberling <haeberling@google.com>2013-08-01 15:50:13 -0700
commit0a4cfdc5ee74759893142754faea77d0d0aba48c (patch)
treeba9340e4f010bbe78e2ad1f3236daf9ba5fe0428 /src/com/android/camera/CameraActivity.java
parent1a8760622fccea0b1f60d1db530d8404a87209a5 (diff)
downloadandroid_packages_apps_Gallery2-0a4cfdc5ee74759893142754faea77d0d0aba48c.tar.gz
android_packages_apps_Gallery2-0a4cfdc5ee74759893142754faea77d0d0aba48c.tar.bz2
android_packages_apps_Gallery2-0a4cfdc5ee74759893142754faea77d0d0aba48c.zip
Adds back the PhotoSphere View icon in filmstrip.
This also exercises the "leave a place cleaner than you found it" rule by cleaning up stuff: - Formatting according to the Android format rules - Removing unused code - Putting braces where they belong. Change-Id: Ie1dbfe9195bf3e20d9624d7ae85eeba16df8f931
Diffstat (limited to 'src/com/android/camera/CameraActivity.java')
-rw-r--r--src/com/android/camera/CameraActivity.java18
1 files changed, 12 insertions, 6 deletions
diff --git a/src/com/android/camera/CameraActivity.java b/src/com/android/camera/CameraActivity.java
index 701303653..296c1f9d9 100644
--- a/src/com/android/camera/CameraActivity.java
+++ b/src/com/android/camera/CameraActivity.java
@@ -34,7 +34,6 @@ import android.os.IBinder;
import android.provider.Settings;
import android.view.KeyEvent;
import android.view.LayoutInflater;
-import android.view.MotionEvent;
import android.view.OrientationEventListener;
import android.view.View;
import android.view.ViewGroup;
@@ -51,6 +50,7 @@ import com.android.gallery3d.R;
import com.android.gallery3d.common.ApiHelper;
import com.android.gallery3d.util.LightCycleHelper;
import com.android.gallery3d.util.RefocusHelper;
+import com.android.gallery3d.util.LightCycleHelper.PanoramaViewHelper;
public class CameraActivity extends Activity
implements CameraSwitchListener {
@@ -78,7 +78,6 @@ public class CameraActivity extends Activity
private Intent mResultDataForTesting;
private OnScreenHint mStorageHint;
private long mStorageSpace = Storage.LOW_STORAGE_THRESHOLD;
- private PhotoModule mController;
private boolean mAutoRotateScreen;
private boolean mSecureCamera;
// This is a hack to speed up the start of SecureCamera.
@@ -87,6 +86,7 @@ public class CameraActivity extends Activity
private int mLastRawOrientation;
private MyOrientationEventListener mOrientationListener;
private Handler mMainHandler;
+ private PanoramaViewHelper mPanoramaViewHelper;
private class MyOrientationEventListener
extends OrientationEventListener {
@@ -272,6 +272,9 @@ public class CameraActivity extends Activity
mFilmStripView = (FilmStripView) findViewById(R.id.filmstrip_view);
mFilmStripView.setViewGap(
getResources().getDimensionPixelSize(R.dimen.camera_film_strip_gap));
+ mPanoramaViewHelper = new PanoramaViewHelper(this);
+ mPanoramaViewHelper.onCreate();
+ mFilmStripView.setPanoramaViewHelper(mPanoramaViewHelper);
// Set up the camera preview first so the preview shows up ASAP.
mDataAdapter.setCameraPreviewInfo(rootLayout,
FilmStripView.ImageData.SIZE_FULL, FilmStripView.ImageData.SIZE_FULL);
@@ -345,6 +348,13 @@ public class CameraActivity extends Activity
v.getDrawable().getIntrinsicHeight(),
0, 0));
}
+ mPanoramaViewHelper.onStart();
+ }
+
+ @Override
+ protected void onStop() {
+ super.onStop();
+ mPanoramaViewHelper.onStop();
}
@Override
@@ -384,10 +394,6 @@ public class CameraActivity extends Activity
return super.onKeyUp(keyCode, event);
}
- @Override
- public boolean dispatchTouchEvent(MotionEvent m) {
- return mFilmStripView.dispatchTouchEvent(m);
- }
public boolean isAutoRotateScreen() {
return mAutoRotateScreen;
}