summaryrefslogtreecommitdiffstats
path: root/src/com
diff options
context:
space:
mode:
authorjrizzoli <joey@cyanogenmoditalia.it>2016-01-07 21:07:51 +0100
committerGerrit Code Review <gerrit@cyanogenmod.org>2016-01-09 02:32:45 -0800
commita4a443b4e2e393d3b0d0e201075a95b02fe0c377 (patch)
tree75bd3236cc1c9637562e4bf244cb7214278a008e /src/com
parent88daff8860dc358a7a084e859f5d72d7a46d9afe (diff)
downloadandroid_packages_apps_Snap-a4a443b4e2e393d3b0d0e201075a95b02fe0c377.tar.gz
android_packages_apps_Snap-a4a443b4e2e393d3b0d0e201075a95b02fe0c377.tar.bz2
android_packages_apps_Snap-a4a443b4e2e393d3b0d0e201075a95b02fe0c377.zip
Snap: initial materialization
Just for initial ship Change-Id: I8d6c0d71d1b94e6eb2f43ab962fb92de0e6c7093 Signed-off-by: jrizzoli <joey@cyanogenmoditalia.it>
Diffstat (limited to 'src/com')
-rw-r--r--src/com/android/camera/PhotoModule.java16
-rw-r--r--src/com/android/camera/PhotoUI.java17
-rw-r--r--src/com/android/camera/ShutterButton.java8
-rw-r--r--src/com/android/camera/ui/CameraControls.java8
-rw-r--r--src/com/android/camera/ui/ModuleSwitcher.java2
-rw-r--r--src/com/android/camera/ui/Switch.java2
6 files changed, 18 insertions, 35 deletions
diff --git a/src/com/android/camera/PhotoModule.java b/src/com/android/camera/PhotoModule.java
index 52f3a8b84..c222025d8 100644
--- a/src/com/android/camera/PhotoModule.java
+++ b/src/com/android/camera/PhotoModule.java
@@ -993,8 +993,6 @@ public class PhotoModule
return;
}
- mUI.doShutterAnimation();
-
Location loc = getLocationAccordPictureFormat(mParameters.get(KEY_PICTURE_FORMAT));
if (mLongshotSave) {
mCameraDevice.takePicture(mHandler,
@@ -1246,20 +1244,20 @@ public class PhotoModule
!mFocusManager.isZslEnabled() &&
CameraUtil.SCENE_MODE_HDR.equals(mSceneMode));
- boolean backCameraRestartPreviewOnPictureTaken =
+ boolean backCameraRestartPreviewOnPictureTaken =
mApplicationContext.getResources().getBoolean(R.bool.back_camera_restart_preview_onPictureTaken);
- boolean frontCameraRestartPreviewOnPictureTaken =
+ boolean frontCameraRestartPreviewOnPictureTaken =
mApplicationContext.getResources().getBoolean(R.bool.front_camera_restart_preview_onPictureTaken);
CameraInfo info = CameraHolder.instance().getCameraInfo()[mCameraId];
- if ((info.facing == CameraInfo.CAMERA_FACING_BACK && backCameraRestartPreviewOnPictureTaken)
+ if ((info.facing == CameraInfo.CAMERA_FACING_BACK && backCameraRestartPreviewOnPictureTaken)
|| (info.facing == CameraInfo.CAMERA_FACING_FRONT && frontCameraRestartPreviewOnPictureTaken)) {
needRestartPreview = true;
}
if (needRestartPreview) {
setupPreview();
- if (CameraUtil.FOCUS_MODE_CONTINUOUS_PICTURE.equals(mFocusManager.getFocusMode()) ||
+ if (CameraUtil.FOCUS_MODE_CONTINUOUS_PICTURE.equals(mFocusManager.getFocusMode()) ||
CameraUtil.FOCUS_MODE_MW_CONTINUOUS_PICTURE.equals(mFocusManager.getFocusMode())) {
mCameraDevice.cancelAutoFocus();
}
@@ -2732,7 +2730,7 @@ public class PhotoModule
if (!mSnapshotOnIdle) {
// If the focus mode is continuous autofocus, call cancelAutoFocus to
// resume it because it may have been paused by autoFocus call.
- if (CameraUtil.FOCUS_MODE_CONTINUOUS_PICTURE.equals(mFocusManager.getFocusMode()) ||
+ if (CameraUtil.FOCUS_MODE_CONTINUOUS_PICTURE.equals(mFocusManager.getFocusMode()) ||
CameraUtil.FOCUS_MODE_MW_CONTINUOUS_PICTURE.equals(mFocusManager.getFocusMode())) {
mCameraDevice.cancelAutoFocus();
}
@@ -4380,8 +4378,8 @@ public class PhotoModule
mMeteringAreaSupported = CameraUtil.isMeteringAreaSupported(mInitialParams);
mAeLockSupported = CameraUtil.isAutoExposureLockSupported(mInitialParams);
mAwbLockSupported = CameraUtil.isAutoWhiteBalanceLockSupported(mInitialParams);
-
- if (mInitialParams.getSupportedFocusModes().contains(CameraUtil.FOCUS_MODE_CONTINUOUS_PICTURE) ||
+
+ if (mInitialParams.getSupportedFocusModes().contains(CameraUtil.FOCUS_MODE_CONTINUOUS_PICTURE) ||
mInitialParams.getSupportedFocusModes().contains(CameraUtil.FOCUS_MODE_MW_CONTINUOUS_PICTURE)) {
mContinuousFocusSupported = true;
} else {
diff --git a/src/com/android/camera/PhotoUI.java b/src/com/android/camera/PhotoUI.java
index 99c7a07c2..d0c2f5a3c 100644
--- a/src/com/android/camera/PhotoUI.java
+++ b/src/com/android/camera/PhotoUI.java
@@ -613,26 +613,11 @@ public class PhotoUI implements PieListener,
// called from onResume but only the first time
public void initializeFirstTime() {
// Initialize shutter button.
- mShutterButton.setImageResource(R.drawable.shutter_button_anim);
- mShutterButton.setOnClickListener(new OnClickListener()
- {
- @Override
- public void onClick(View v) {
- if (!CameraControls.isAnimating())
- doShutterAnimation();
- }
- });
-
+ mShutterButton.setImageResource(R.drawable.btn_new_shutter);
mShutterButton.setOnShutterButtonListener(mController);
mShutterButton.setVisibility(View.VISIBLE);
}
- public void doShutterAnimation() {
- AnimationDrawable frameAnimation = (AnimationDrawable) mShutterButton.getDrawable();
- frameAnimation.stop();
- frameAnimation.start();
- }
-
// called from onResume every other time
public void initializeSecondTime(Camera.Parameters params) {
initializeZoom(params);
diff --git a/src/com/android/camera/ShutterButton.java b/src/com/android/camera/ShutterButton.java
index b35658070..240d2ccdb 100644
--- a/src/com/android/camera/ShutterButton.java
+++ b/src/com/android/camera/ShutterButton.java
@@ -22,14 +22,14 @@ import android.view.MotionEvent;
import android.view.View;
import android.widget.ImageView;
-import com.android.camera.ui.RotateImageView;
+//import com.android.camera.ui.RotateImageView;
/**
* A button designed to be used for the on-screen shutter button.
* It's currently an {@code ImageView} that can call a delegate when the
* pressed state changes.
*/
-public class ShutterButton extends RotateImageView {
+public class ShutterButton extends ImageView {
private class LongClickListener implements View.OnLongClickListener {
public boolean onLongClick(View v) {
@@ -88,7 +88,7 @@ public class ShutterButton extends RotateImageView {
* Hook into the drawable state changing to get changes to isPressed -- the
* onPressed listener doesn't always get called when the pressed state
* changes.
- */
+ *
@Override
protected void drawableStateChanged() {
super.drawableStateChanged();
@@ -127,7 +127,7 @@ public class ShutterButton extends RotateImageView {
}
mOldPressed = pressed;
}
- }
+ }*/
private void callShutterButtonFocus(boolean pressed) {
if (mListener != null) {
diff --git a/src/com/android/camera/ui/CameraControls.java b/src/com/android/camera/ui/CameraControls.java
index dd769e8e3..9695326c4 100644
--- a/src/com/android/camera/ui/CameraControls.java
+++ b/src/com/android/camera/ui/CameraControls.java
@@ -489,7 +489,7 @@ public class CameraControls extends RotatableLayout {
mPreview.animate().translationXBy(-mSize).setDuration(ANIME_DURATION);
break;
}
- mRemainingPhotos.setVisibility(View.INVISIBLE);
+ //mRemainingPhotos.setVisibility(View.INVISIBLE);
mRefocusToast.setVisibility(View.GONE);
}
@@ -579,9 +579,9 @@ public class CameraControls extends RotatableLayout {
mPreview.animate().translationXBy(mSize).setDuration(ANIME_DURATION);
break;
}
- if (mRemainingPhotos.getVisibility() == View.INVISIBLE) {
+ /*if (mRemainingPhotos.getVisibility() == View.INVISIBLE) {
mRemainingPhotos.setVisibility(View.VISIBLE);
- }
+ }*/
mRefocusToast.setVisibility(View.GONE);
}
@@ -829,7 +829,7 @@ public class CameraControls extends RotatableLayout {
mOrientation = orientation;
View[] views = {
mSceneModeSwitcher, mFilterModeSwitcher, mFrontBackSwitcher,
- mHdrSwitcher, mMenu, mShutter, mPreview, mSwitcher
+ mHdrSwitcher, mMenu, mPreview, mSwitcher
};
for (View v : views) {
((RotateImageView) v).setOrientation(orientation, animation);
diff --git a/src/com/android/camera/ui/ModuleSwitcher.java b/src/com/android/camera/ui/ModuleSwitcher.java
index 217c92a54..efac6d98b 100644
--- a/src/com/android/camera/ui/ModuleSwitcher.java
+++ b/src/com/android/camera/ui/ModuleSwitcher.java
@@ -98,7 +98,7 @@ public class ModuleSwitcher extends RotateImageView
private void init(Context context) {
mItemSize = context.getResources().getDimensionPixelSize(R.dimen.switcher_size);
- mIndicator = context.getResources().getDrawable(R.drawable.ic_switcher_menu_indicator);
+ mIndicator = context.getResources().getDrawable(R.color.transparent);
initializeDrawables(context);
}
diff --git a/src/com/android/camera/ui/Switch.java b/src/com/android/camera/ui/Switch.java
index 3e7b9bfb9..68fb36542 100644
--- a/src/com/android/camera/ui/Switch.java
+++ b/src/com/android/camera/ui/Switch.java
@@ -123,7 +123,7 @@ public class Switch extends CompoundButton {
mSwitchMinWidth = res.getDimensionPixelSize(R.dimen.switch_min_width);
mSwitchTextMaxWidth = res.getDimensionPixelSize(R.dimen.switch_text_max_width);
mSwitchPadding = res.getDimensionPixelSize(R.dimen.switch_padding);
- setSwitchTextAppearance(context, android.R.style.TextAppearance_Holo_Small);
+ setSwitchTextAppearance(context, android.R.style.TextAppearance_Material_Small);
ViewConfiguration config = ViewConfiguration.get(context);
mTouchSlop = config.getScaledTouchSlop();