summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorcodeworkx <daniel.hillenbrand@codeworkx.de>2018-01-20 12:46:31 +0100
committerArne Coucheron <arco68@gmail.com>2018-01-27 00:41:46 +0100
commitc3cbf5ddea41311975ed9ed598c8b5b7accb20f5 (patch)
tree280f46f07720f9139c1b4cf70423feb42e33c9a4
parent1fa3d64d1c6f8d59b7c1c87984a587786d723e8e (diff)
downloadandroid_packages_apps_Snap-c3cbf5ddea41311975ed9ed598c8b5b7accb20f5.zip
android_packages_apps_Snap-c3cbf5ddea41311975ed9ed598c8b5b7accb20f5.tar.gz
android_packages_apps_Snap-c3cbf5ddea41311975ed9ed598c8b5b7accb20f5.tar.bz2
Snap: update shutter buttons on CaptureUI
https://review.lineageos.org/#/c/200740/ Change-Id: I674de05dfb46fb714979ac66c16a85825af13c95
-rw-r--r--res/drawable/one_ui_shutter_1.pngbin2957 -> 0 bytes
-rw-r--r--res/drawable/one_ui_shutter_2.pngbin3062 -> 0 bytes
-rw-r--r--res/drawable/one_ui_shutter_3.pngbin3184 -> 0 bytes
-rw-r--r--res/drawable/one_ui_shutter_4.pngbin3131 -> 0 bytes
-rw-r--r--res/drawable/one_ui_shutter_5.pngbin2947 -> 0 bytes
-rw-r--r--res/drawable/one_ui_shutter_6.pngbin2699 -> 0 bytes
-rw-r--r--res/drawable/one_ui_shutter_anim.xml72
-rw-r--r--res/drawable/photo_capture.pngbin3153 -> 0 bytes
-rw-r--r--res/drawable/video_capture.pngbin2529 -> 0 bytes
-rwxr-xr-xres/layout/one_ui_layout.xml6
-rwxr-xr-xsrc/com/android/camera/CaptureModule.java14
-rw-r--r--src/com/android/camera/CaptureUI.java17
-rw-r--r--src/com/android/camera/ui/OneUICameraControls.java2
13 files changed, 7 insertions, 104 deletions
diff --git a/res/drawable/one_ui_shutter_1.png b/res/drawable/one_ui_shutter_1.png
deleted file mode 100644
index 46771e0..0000000
--- a/res/drawable/one_ui_shutter_1.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable/one_ui_shutter_2.png b/res/drawable/one_ui_shutter_2.png
deleted file mode 100644
index 07e1f72..0000000
--- a/res/drawable/one_ui_shutter_2.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable/one_ui_shutter_3.png b/res/drawable/one_ui_shutter_3.png
deleted file mode 100644
index 5031357..0000000
--- a/res/drawable/one_ui_shutter_3.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable/one_ui_shutter_4.png b/res/drawable/one_ui_shutter_4.png
deleted file mode 100644
index 9d3f565..0000000
--- a/res/drawable/one_ui_shutter_4.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable/one_ui_shutter_5.png b/res/drawable/one_ui_shutter_5.png
deleted file mode 100644
index df6ccd7..0000000
--- a/res/drawable/one_ui_shutter_5.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable/one_ui_shutter_6.png b/res/drawable/one_ui_shutter_6.png
deleted file mode 100644
index 5165ef2..0000000
--- a/res/drawable/one_ui_shutter_6.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable/one_ui_shutter_anim.xml b/res/drawable/one_ui_shutter_anim.xml
deleted file mode 100644
index 980b9ad..0000000
--- a/res/drawable/one_ui_shutter_anim.xml
+++ /dev/null
@@ -1,72 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!-- Copyright (c) 2016, The Linux Foundation. All rights reserved.
-
- Redistribution and use in source and binary forms, with or without
- modification, are permitted provided that the following conditions are
- met:
- * Redistributions of source code must retain the above copyright
- notice, this list of conditions and the following disclaimer.
- * Redistributions in binary form must reproduce the above
- copyright notice, this list of conditions and the following
- disclaimer in the documentation and/or other materials provided
- with the distribution.
- * Neither the name of The Linux Foundation nor the names of its
- contributors may be used to endorse or promote products derived
- from this software without specific prior written permission.
-
- THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED
- WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
- MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT
- ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS
- BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
- BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
- WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
- OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
- IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
--->
-<animation-list xmlns:android="http://schemas.android.com/apk/res/android"
- android:id="@+id/shutter_button_pressed"
- android:oneshot="true" >
-
- <item
- android:drawable="@drawable/photo_capture"
- android:duration="16"/>
- <item
- android:drawable="@drawable/one_ui_shutter_6"
- android:duration="16"/>
- <item
- android:drawable="@drawable/one_ui_shutter_5"
- android:duration="16"/>
- <item
- android:drawable="@drawable/one_ui_shutter_4"
- android:duration="16"/>
- <item
- android:drawable="@drawable/one_ui_shutter_3"
- android:duration="16"/>
- <item
- android:drawable="@drawable/one_ui_shutter_2"
- android:duration="16"/>
- <item
- android:drawable="@drawable/one_ui_shutter_1"
- android:duration="16"/>
- <item
- android:drawable="@drawable/one_ui_shutter_2"
- android:duration="16"/>
- <item
- android:drawable="@drawable/one_ui_shutter_3"
- android:duration="16"/>
- <item
- android:drawable="@drawable/one_ui_shutter_4"
- android:duration="16"/>
- <item
- android:drawable="@drawable/one_ui_shutter_5"
- android:duration="16"/>
- <item
- android:drawable="@drawable/one_ui_shutter_6"
- android:duration="16"/>
- <item
- android:drawable="@drawable/photo_capture"
- android:duration="16"/>
-</animation-list>
diff --git a/res/drawable/photo_capture.png b/res/drawable/photo_capture.png
deleted file mode 100644
index 89cdb9a..0000000
--- a/res/drawable/photo_capture.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable/video_capture.png b/res/drawable/video_capture.png
deleted file mode 100644
index f0c7c22..0000000
--- a/res/drawable/video_capture.png
+++ /dev/null
Binary files differ
diff --git a/res/layout/one_ui_layout.xml b/res/layout/one_ui_layout.xml
index 6baed05..5199785 100755
--- a/res/layout/one_ui_layout.xml
+++ b/res/layout/one_ui_layout.xml
@@ -46,9 +46,9 @@
android:contentDescription="@string/accessibility_shutter_button"
android:focusable="true"
android:scaleType="fitCenter"
- android:src="@drawable/photo_capture" />
+ android:src="@drawable/btn_new_shutter" />
- <com.android.camera.ui.RotateImageView
+ <ImageView
android:id="@+id/video_button"
android:layout_width="@dimen/one_ui_bottom_small"
android:layout_height="@dimen/one_ui_bottom_small"
@@ -56,7 +56,7 @@
android:contentDescription="@string/accessibility_shutter_button"
android:focusable="true"
android:scaleType="fitCenter"
- android:src="@drawable/video_capture" />
+ android:src="@drawable/btn_new_shutter_video" />
<com.android.camera.PauseButton
android:id="@+id/video_pause"
diff --git a/src/com/android/camera/CaptureModule.java b/src/com/android/camera/CaptureModule.java
index 687d219..6581b45 100755
--- a/src/com/android/camera/CaptureModule.java
+++ b/src/com/android/camera/CaptureModule.java
@@ -1616,12 +1616,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();
- }
- });
}
}
@@ -1630,14 +1624,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 502e7a6..2293ce9 100644
--- a/src/com/android/camera/CaptureUI.java
+++ b/src/com/android/camera/CaptureUI.java
@@ -633,13 +633,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) {
@@ -788,7 +783,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);
}
@@ -1177,12 +1172,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/ui/OneUICameraControls.java b/src/com/android/camera/ui/OneUICameraControls.java
index 04c8286..1d7eb72 100644
--- a/src/com/android/camera/ui/OneUICameraControls.java
+++ b/src/com/android/camera/ui/OneUICameraControls.java
@@ -492,7 +492,7 @@ public class OneUICameraControls extends RotatableLayout {
mOrientation = orientation;
View[] views = {
mSceneModeSwitcher, mFilterModeSwitcher, mFrontBackSwitcher,
- mTsMakeupSwitcher, mFlashButton, mPreview, mMute, mShutter, mVideoShutter,
+ mTsMakeupSwitcher, mFlashButton, mPreview, mMute,
mMakeupSeekBarLowText, mMakeupSeekBarHighText, mPauseButton, mExitBestPhotpMode
};