summaryrefslogtreecommitdiffstats
path: root/src/com
diff options
context:
space:
mode:
authorMartijn Coenen <maco@google.com>2011-11-03 17:24:54 -0700
committerMartijn Coenen <maco@google.com>2011-11-03 17:42:31 -0700
commitd59b331655f0113dc0454aa5d000b269d7cf8b49 (patch)
tree069c97390cb795e3b91662b31a82370dbb3ebaf4 /src/com
parente3cfbec7045220294c172d55122daf55ab6cb058 (diff)
downloadpackages_apps_nfc-d59b331655f0113dc0454aa5d000b269d7cf8b49.zip
packages_apps_nfc-d59b331655f0113dc0454aa5d000b269d7cf8b49.tar.gz
packages_apps_nfc-d59b331655f0113dc0454aa5d000b269d7cf8b49.tar.bz2
Remove static background image from Beam when no hw-acceleration.
The Beam scale down animation on is really jerky on devices where we can't use hardware acceleration. This seems to be due the fact that we have a static background over which we scale. Removing it makes the scaling nice and smooth. Bug: 5567020 Change-Id: Id04bae45713eaa368d03001e5352271f47d26603
Diffstat (limited to 'src/com')
-rw-r--r--src/com/android/nfc/SendUi.java21
1 files changed, 0 insertions, 21 deletions
diff --git a/src/com/android/nfc/SendUi.java b/src/com/android/nfc/SendUi.java
index f755c8c..167ae24 100644
--- a/src/com/android/nfc/SendUi.java
+++ b/src/com/android/nfc/SendUi.java
@@ -77,9 +77,6 @@ public class SendUi implements Animator.AnimatorListener, View.OnTouchListener,
static final int TEXT_HINT_ALPHA_DURATION_MS = 500;
static final int TEXT_HINT_ALPHA_START_DELAY_MS = 300;
- static final float[] BACKGROUND_SCALE_RANGE = {2.0f, 1.0f};
- static final int BACKGROUND_SCALE_DURATION_MS = 5000;
-
static final int FINISH_SCALE_UP = 0;
static final int FINISH_SLIDE_OUT = 1;
@@ -94,7 +91,6 @@ public class SendUi implements Animator.AnimatorListener, View.OnTouchListener,
final StatusBarManager mStatusBarManager;
final View mScreenshotLayout;
final ImageView mScreenshotView;
- final ImageView mBackgroundImage;
final TextureView mTextureView;
final TextView mTextHint;
final Callback mCallback;
@@ -104,7 +100,6 @@ public class SendUi implements Animator.AnimatorListener, View.OnTouchListener,
final ObjectAnimator mFadeInAnimator;
final ObjectAnimator mHintAnimator;
final AnimatorSet mSuccessAnimatorSet;
- final ObjectAnimator mBackgroundAnimator;
final boolean mHardwareAccelerated;
Bitmap mScreenshotBitmap;
@@ -140,7 +135,6 @@ public class SendUi implements Animator.AnimatorListener, View.OnTouchListener,
mTextureView = (TextureView) mScreenshotLayout.findViewById(R.id.fireflies);
mTextureView.setSurfaceTextureListener(this);
- mBackgroundImage = (ImageView) mScreenshotLayout.findViewById(R.id.back);
// We're only allowed to use hardware acceleration if
// isHighEndGfx() returns true - otherwise, we're too limited
// on resources to do it.
@@ -148,11 +142,6 @@ public class SendUi implements Animator.AnimatorListener, View.OnTouchListener,
int hwAccelerationFlags = mHardwareAccelerated ?
WindowManager.LayoutParams.FLAG_HARDWARE_ACCELERATED : 0;
- if (!mHardwareAccelerated) {
- // Only show background in case we're not hw-accelerated
- mBackgroundImage.setVisibility(View.VISIBLE);
- }
-
mWindowLayoutParams = new WindowManager.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT,
ViewGroup.LayoutParams.MATCH_PARENT, 0, 0,
WindowManager.LayoutParams.TYPE_SYSTEM_ALERT,
@@ -209,12 +198,6 @@ public class SendUi implements Animator.AnimatorListener, View.OnTouchListener,
mSuccessAnimatorSet = new AnimatorSet();
mSuccessAnimatorSet.playSequentially(mFastCloneAnimator, mFadeInAnimator);
- scaleUpX = PropertyValuesHolder.ofFloat("scaleX", BACKGROUND_SCALE_RANGE);
- scaleUpY = PropertyValuesHolder.ofFloat("scaleY", BACKGROUND_SCALE_RANGE);
- mBackgroundAnimator = ObjectAnimator.ofPropertyValuesHolder(mBackgroundImage, scaleUpX, scaleUpY);
- mBackgroundAnimator.setInterpolator(new DecelerateInterpolator(2.0f));
- mBackgroundAnimator.setDuration(BACKGROUND_SCALE_DURATION_MS);
-
mAttached = false;
}
@@ -274,10 +257,6 @@ public class SendUi implements Animator.AnimatorListener, View.OnTouchListener,
mAttached = true;
mPreAnimator.start();
-
- if (!mHardwareAccelerated) {
- mBackgroundAnimator.start();
- }
}
/** Show starting send animation */