summaryrefslogtreecommitdiffstats
path: root/src/com/android
diff options
context:
space:
mode:
Diffstat (limited to 'src/com/android')
-rwxr-xr-xsrc/com/android/camera/CaptureModule.java14
-rwxr-xr-xsrc/com/android/camera/CaptureUI.java17
-rw-r--r--src/com/android/camera/PhotoModule.java2
-rwxr-xr-xsrc/com/android/camera/PhotoUI.java20
-rw-r--r--src/com/android/camera/ShutterButton.java49
-rw-r--r--src/com/android/camera/ui/CameraControls.java2
-rw-r--r--src/com/android/camera/ui/ModuleSwitcher.java2
-rwxr-xr-xsrc/com/android/camera/ui/OneUICameraControls.java4
-rw-r--r--src/com/android/camera/ui/Switch.java2
9 files changed, 10 insertions, 102 deletions
diff --git a/src/com/android/camera/CaptureModule.java b/src/com/android/camera/CaptureModule.java
index cbd545562..5872a625f 100755
--- a/src/com/android/camera/CaptureModule.java
+++ b/src/com/android/camera/CaptureModule.java
@@ -2161,12 +2161,6 @@ public class CaptureModule implements CameraModule, PhotoController,
Log.d(TAG, "captureStillPictureForLongshot onCaptureCompleted: " + id);
if (mLongshotActive) {
checkAndPlayShutterSound(id);
- mActivity.runOnUiThread(new Runnable() {
- @Override
- public void run() {
- mUI.doShutterAnimation();
- }
- });
}
}
@@ -2175,14 +2169,6 @@ public class CaptureModule implements CameraModule, PhotoController,
CaptureRequest request,
CaptureFailure result) {
Log.d(TAG, "captureStillPictureForLongshot onCaptureFailed: " + id);
- if (mLongshotActive) {
- mActivity.runOnUiThread(new Runnable() {
- @Override
- public void run() {
- mUI.doShutterAnimation();
- }
- });
- }
}
@Override
diff --git a/src/com/android/camera/CaptureUI.java b/src/com/android/camera/CaptureUI.java
index ccb45e12d..696cff527 100755
--- a/src/com/android/camera/CaptureUI.java
+++ b/src/com/android/camera/CaptureUI.java
@@ -716,13 +716,8 @@ public class CaptureUI implements FocusOverlayManager.FocusUI,
mVideoButton.setVisibility(View.VISIBLE);
}
mShutterButton.setOnShutterButtonListener(mModule);
- mShutterButton.setImageResource(R.drawable.one_ui_shutter_anim);
- mShutterButton.setOnClickListener(new View.OnClickListener() {
- @Override
- public void onClick(View v) {
- doShutterAnimation();
- }
- });
+ mShutterButton.setImageResource(R.drawable.btn_new_shutter);
+
mVideoButton.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
@@ -872,7 +867,7 @@ public class CaptureUI implements FocusOverlayManager.FocusUI,
} else {
mFlashButton.setVisibility(View.VISIBLE);
mFlashButton.init(false);
- mVideoButton.setImageResource(R.drawable.video_capture);
+ mVideoButton.setImageResource(R.drawable.btn_new_shutter_video);
mRecordingTimeRect.setVisibility(View.GONE);
mMuteButton.setVisibility(View.INVISIBLE);
}
@@ -1284,12 +1279,6 @@ public class CaptureUI implements FocusOverlayManager.FocusUI,
}
}
- public void doShutterAnimation() {
- AnimationDrawable frameAnimation = (AnimationDrawable) mShutterButton.getDrawable();
- frameAnimation.stop();
- frameAnimation.start();
- }
-
public void showUI() {
if (!mUIhidden)
return;
diff --git a/src/com/android/camera/PhotoModule.java b/src/com/android/camera/PhotoModule.java
index b444608e9..2919c7421 100644
--- a/src/com/android/camera/PhotoModule.java
+++ b/src/com/android/camera/PhotoModule.java
@@ -1094,8 +1094,6 @@ public class PhotoModule
return;
}
- mUI.doShutterAnimation();
-
Location loc = getLocationAccordPictureFormat(mParameters.get(KEY_PICTURE_FORMAT));
mLongShotCaptureCount++;
diff --git a/src/com/android/camera/PhotoUI.java b/src/com/android/camera/PhotoUI.java
index a467e9481..1022b0709 100755
--- a/src/com/android/camera/PhotoUI.java
+++ b/src/com/android/camera/PhotoUI.java
@@ -658,29 +658,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();
- if (mController.isImageCaptureIntent()) {
- mCameraControls.setTitleBarVisibility(View.VISIBLE);
- }
- }
- });
-
+ 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..22223510c 100644
--- a/src/com/android/camera/ShutterButton.java
+++ b/src/com/android/camera/ShutterButton.java
@@ -22,14 +22,12 @@ import android.view.MotionEvent;
import android.view.View;
import android.widget.ImageView;
-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) {
@@ -84,51 +82,6 @@ public class ShutterButton extends RotateImageView {
setLongClickable(enable);
}
- /**
- * 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();
- final boolean pressed = isPressed();
- if (pressed != mOldPressed) {
- if (!pressed) {
- // When pressing the physical camera button the sequence of
- // events is:
- // focus pressed, optional camera pressed, focus released.
- // We want to emulate this sequence of events with the shutter
- // button. When clicking using a trackball button, the view
- // system changes the drawable state before posting click
- // notification, so the sequence of events is:
- // pressed(true), optional click, pressed(false)
- // When clicking using touch events, the view system changes the
- // drawable state after posting click notification, so the
- // sequence of events is:
- // pressed(true), pressed(false), optional click
- // Since we're emulating the physical camera button, we want to
- // have the same order of events. So we want the optional click
- // callback to be delivered before the pressed(false) callback.
- //
- // To do this, we delay the posting of the pressed(false) event
- // slightly by pushing it on the event queue. This moves it
- // after the optional click notification, so our client always
- // sees events in this sequence:
- // pressed(true), optional click, pressed(false)
- post(new Runnable() {
- @Override
- public void run() {
- callShutterButtonFocus(pressed);
- }
- });
- } else {
- callShutterButtonFocus(pressed);
- }
- mOldPressed = pressed;
- }
- }
-
private void callShutterButtonFocus(boolean pressed) {
if (mListener != null) {
mListener.onShutterButtonFocus(pressed);
diff --git a/src/com/android/camera/ui/CameraControls.java b/src/com/android/camera/ui/CameraControls.java
index b85d7f1ca..7461e12be 100644
--- a/src/com/android/camera/ui/CameraControls.java
+++ b/src/com/android/camera/ui/CameraControls.java
@@ -1025,7 +1025,7 @@ public class CameraControls extends RotatableLayout {
View[] views = {
mSceneModeSwitcher, mFilterModeSwitcher, mFrontBackSwitcher,
TsMakeupManager.HAS_TS_MAKEUP ? mTsMakeupSwitcher : mHdrSwitcher,
- mMenu, mShutter, mPreview, mSwitcher, mMute, mReviewRetakeButton,
+ mMenu, mPreview, mSwitcher, mMute, mReviewRetakeButton,
mReviewCancelButton, mReviewDoneButton, mExitPanorama
};
for (View v : views) {
diff --git a/src/com/android/camera/ui/ModuleSwitcher.java b/src/com/android/camera/ui/ModuleSwitcher.java
index d96775d14..e9a9a5419 100644
--- a/src/com/android/camera/ui/ModuleSwitcher.java
+++ b/src/com/android/camera/ui/ModuleSwitcher.java
@@ -102,7 +102,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/OneUICameraControls.java b/src/com/android/camera/ui/OneUICameraControls.java
index 646596912..73cb68e16 100755
--- a/src/com/android/camera/ui/OneUICameraControls.java
+++ b/src/com/android/camera/ui/OneUICameraControls.java
@@ -232,7 +232,7 @@ public class OneUICameraControls extends RotatableLayout {
mViews = new View[]{
mSceneModeSwitcher, mFilterModeSwitcher, mFrontBackSwitcher,
- mTsMakeupSwitcher,mDeepportraitSwitcher, mFlashButton, mShutter,
+ mTsMakeupSwitcher, mDeepportraitSwitcher, mFlashButton,
mPreview, mVideoShutter, mPauseButton, mCancelButton
};
mBottomLargeSize = getResources().getDimensionPixelSize(
@@ -501,7 +501,7 @@ public class OneUICameraControls extends RotatableLayout {
View[] views = {
mSceneModeSwitcher, mFilterModeSwitcher, mFrontBackSwitcher,
mTsMakeupSwitcher, mFlashButton, mDeepportraitSwitcher, mPreview, mMute,
- mShutter, mVideoShutter, mMakeupSeekBarLowText, mMakeupSeekBarHighText,
+ mMakeupSeekBarLowText, mMakeupSeekBarHighText,
mPauseButton, mExitBestPhotpMode
};
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();