summaryrefslogtreecommitdiffstats
path: root/src/com/android/camera/ShutterButton.java
diff options
context:
space:
mode:
authorjrizzoli <joey@cyanogenmoditalia.it>2016-01-07 21:07:51 +0100
committerBruno Martins <bgcngm@gmail.com>2018-11-20 12:31:36 +0000
commit946b1c0614536b804b4a6665946ee8e212d7f7ba (patch)
treef0426373485d1a6282f83e5d71ae8b41a547752b /src/com/android/camera/ShutterButton.java
parent0a02122121546c445177f6625d4241616bb61d35 (diff)
downloadandroid_packages_apps_Snap-946b1c0614536b804b4a6665946ee8e212d7f7ba.tar.gz
android_packages_apps_Snap-946b1c0614536b804b4a6665946ee8e212d7f7ba.tar.bz2
android_packages_apps_Snap-946b1c0614536b804b4a6665946ee8e212d7f7ba.zip
Snap: Materialize
Author: jrizzoli <joey@cyanogenmoditalia.it> Date: Thu Jan 7 21:07:51 2016 +0100 Snap: initial materialization Just for initial ship Change-Id: I8d6c0d71d1b94e6eb2f43ab962fb92de0e6c7093 Signed-off-by: jrizzoli <joey@cyanogenmoditalia.it> Author: jrizzoli <joey@cyanogenmoditalia.it> Date: Mon Jan 11 21:02:08 2016 +0100 Snap: remove captureUI pngdrawables CM now supports 90/270 degrees rotated vectordrawables Change-Id: I13b36463c60430564c00bd1e36393fff7ddbfdae Signed-off-by: jrizzoli <joey@cyanogenmoditalia.it> Author: jrizzoli <joey@cyanogenmoditalia.it> Date: Wed Jan 20 20:54:10 2016 +0100 Snap: update shutter button style Change-Id: Ide5fc0ff1c54e216ac7cd9bea202002d1d4dfa12 Author: Joey Rizzoli <joey@cyanogenmoditalia.it> Date: Sun Dec 11 21:30:18 2016 +0100 Snap: update caf icons Change-Id: I1adaf709253637bde037b5aea1f856fc5b9029c7 Signed-off-by: Joey Rizzoli <joey@cyanogenmoditalia.it> Author: Arne Coucheron <arco68@gmail.com> Date: Thu Aug 17 01:19:05 2017 +0200 Snap: Update HDR icons Current ones are so small, I can hardly see them. These new ones are bigger and looks more in line with the rest of the icons. Change-Id: Idaeec67a78d66105a375f09b6701a49dce43fd22 Author: codeworkx <daniel.hillenbrand@codeworkx.de> Date: Sat Jan 20 12:46:31 2018 +0100 Snap: update shutter buttons on CaptureUI Change-Id: I674de05dfb46fb714979ac66c16a85825af13c95 Author: Paul Keith <javelinanddart@gmail.com> Date: Tue Jan 23 23:36:19 2018 +0100 Snap: Update pano and video icons to be more like photo icons * Put the colored ring on the _outside_ of the shutter * While we're at it, cleanup naming and usage of color resources Change-Id: I4f344fa272374d043f2b83dba7248e263fab8bf0 Author: Andreas Blaesius <andi@unlegacy-android.org> Date: Fri Jun 1 17:47:00 2018 +0200 Snap: remove unused shutter buttons Change-Id: Id913626bbccc6fd245ed9f46374389ca7eca3c30 Change-Id: I7596f3c887874b4913d87ecbfa5438191fc86249
Diffstat (limited to 'src/com/android/camera/ShutterButton.java')
-rw-r--r--src/com/android/camera/ShutterButton.java49
1 files changed, 1 insertions, 48 deletions
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);