summaryrefslogtreecommitdiffstats
path: root/packages
diff options
context:
space:
mode:
authorWinson Chung <winsonc@google.com>2014-05-29 21:50:02 +0000
committerAndroid (Google) Code Review <android-gerrit@google.com>2014-05-29 21:50:02 +0000
commit457fa277049578aa6195e8d784f3c33b384b96e6 (patch)
tree4c36fc358cec6fff2835d60220f46b9611a3dd23 /packages
parent3d5e5c7b266863953ece3d77ab2c334e9a9c4ebc (diff)
parentb01ed681fe97ff5e98471c120ff9581a78db13c5 (diff)
downloadframeworks_base-457fa277049578aa6195e8d784f3c33b384b96e6.zip
frameworks_base-457fa277049578aa6195e8d784f3c33b384b96e6.tar.gz
frameworks_base-457fa277049578aa6195e8d784f3c33b384b96e6.tar.bz2
Merge "Fixing issue with configuration states not being reset on configuration change." into lmp-preview-dev
Diffstat (limited to 'packages')
-rw-r--r--packages/SystemUI/res/values/config.xml2
-rw-r--r--packages/SystemUI/src/com/android/systemui/recents/RecentsConfiguration.java17
-rw-r--r--packages/SystemUI/src/com/android/systemui/recents/RecentsService.java4
-rw-r--r--packages/SystemUI/src/com/android/systemui/recents/views/TaskBarView.java3
-rw-r--r--packages/SystemUI/src/com/android/systemui/recents/views/TaskStackView.java3
-rw-r--r--packages/SystemUI/src/com/android/systemui/recents/views/TaskView.java9
6 files changed, 24 insertions, 14 deletions
diff --git a/packages/SystemUI/res/values/config.xml b/packages/SystemUI/res/values/config.xml
index 3c86d45..0184df2 100644
--- a/packages/SystemUI/res/values/config.xml
+++ b/packages/SystemUI/res/values/config.xml
@@ -115,7 +115,7 @@
<!-- The min animation duration for animating the task bar in. -->
<integer name="recents_animate_task_bar_enter_duration">300</integer>
<!-- The min animation duration for animating the task bar out. -->
- <integer name="recents_animate_task_bar_exit_duration">175</integer>
+ <integer name="recents_animate_task_bar_exit_duration">150</integer>
<!-- The animation duration for animating in the info pane. -->
<integer name="recents_animate_task_view_info_pane_duration">150</integer>
<!-- The animation duration for animating the removal of a task view. -->
diff --git a/packages/SystemUI/src/com/android/systemui/recents/RecentsConfiguration.java b/packages/SystemUI/src/com/android/systemui/recents/RecentsConfiguration.java
index 03f7e36..6d08281 100644
--- a/packages/SystemUI/src/com/android/systemui/recents/RecentsConfiguration.java
+++ b/packages/SystemUI/src/com/android/systemui/recents/RecentsConfiguration.java
@@ -46,7 +46,9 @@ public class RecentsConfiguration {
public float animationPxMovementPerSecond;
- public Interpolator defaultBezierInterpolator;
+ public Interpolator fastOutSlowInInterpolator;
+ public Interpolator fastOutLinearInInterpolator;
+ public Interpolator linearOutSlowInInterpolator;
public int filteringCurrentViewsMinAnimDuration;
public int filteringNewViewsMinAnimDuration;
@@ -141,8 +143,12 @@ public class RecentsConfiguration {
taskBarViewDarkTextColor =
res.getColor(R.color.recents_task_bar_dark_text_color);
- defaultBezierInterpolator = AnimationUtils.loadInterpolator(context,
+ fastOutSlowInInterpolator = AnimationUtils.loadInterpolator(context,
com.android.internal.R.interpolator.fast_out_slow_in);
+ fastOutLinearInInterpolator = AnimationUtils.loadInterpolator(context,
+ com.android.internal.R.interpolator.fast_out_linear_in);
+ linearOutSlowInInterpolator = AnimationUtils.loadInterpolator(context,
+ com.android.internal.R.interpolator.linear_out_slow_in);
// Check if the developer options are enabled
ContentResolver cr = context.getContentResolver();
@@ -167,6 +173,13 @@ public class RecentsConfiguration {
appWidgetId).apply();
}
+ /** Called when the configuration has changed, and we want to reset any configuration specific
+ * members. */
+ public void updateOnConfigurationChange() {
+ launchedFromAltTab = false;
+ launchedWithThumbnailAnimation = false;
+ }
+
/** Returns whether the search bar app widget exists */
public boolean hasSearchBarAppWidget() {
return searchBarAppWidgetId >= 0;
diff --git a/packages/SystemUI/src/com/android/systemui/recents/RecentsService.java b/packages/SystemUI/src/com/android/systemui/recents/RecentsService.java
index f90e4d3..9acb2bd 100644
--- a/packages/SystemUI/src/com/android/systemui/recents/RecentsService.java
+++ b/packages/SystemUI/src/com/android/systemui/recents/RecentsService.java
@@ -55,7 +55,8 @@ class SystemUIMessageHandler extends Handler {
if (msg.what == AlternateRecentsComponent.MSG_UPDATE_FOR_CONFIGURATION) {
RecentsTaskLoader.initialize(context);
- RecentsConfiguration.reinitialize(context);
+ RecentsConfiguration config = RecentsConfiguration.reinitialize(context);
+ config.updateOnConfigurationChange();
try {
Bundle data = msg.getData();
@@ -73,7 +74,6 @@ class SystemUIMessageHandler extends Handler {
// Get the task stack and search bar bounds
Rect taskStackBounds = new Rect();
- RecentsConfiguration config = RecentsConfiguration.getInstance();
config.getTaskStackBounds(windowRect.width(), windowRect.height(), taskStackBounds);
// Calculate the target task rect for when there is one task.
diff --git a/packages/SystemUI/src/com/android/systemui/recents/views/TaskBarView.java b/packages/SystemUI/src/com/android/systemui/recents/views/TaskBarView.java
index 07caa1b..9e6c98e 100644
--- a/packages/SystemUI/src/com/android/systemui/recents/views/TaskBarView.java
+++ b/packages/SystemUI/src/com/android/systemui/recents/views/TaskBarView.java
@@ -16,7 +16,6 @@
package com.android.systemui.recents.views;
-import android.animation.ValueAnimator;
import android.content.Context;
import android.content.res.Resources;
import android.graphics.drawable.Drawable;
@@ -81,7 +80,7 @@ class TaskBarView extends FrameLayout {
.alpha(toTransform.dismissAlpha)
.setStartDelay(0)
.setDuration(duration)
- .setInterpolator(config.defaultBezierInterpolator)
+ .setInterpolator(config.fastOutSlowInInterpolator)
.withLayer()
.start();
} else {
diff --git a/packages/SystemUI/src/com/android/systemui/recents/views/TaskStackView.java b/packages/SystemUI/src/com/android/systemui/recents/views/TaskStackView.java
index 99054d5..b7d7d1d 100644
--- a/packages/SystemUI/src/com/android/systemui/recents/views/TaskStackView.java
+++ b/packages/SystemUI/src/com/android/systemui/recents/views/TaskStackView.java
@@ -23,7 +23,6 @@ import android.animation.ValueAnimator;
import android.app.Activity;
import android.content.ComponentName;
import android.content.Context;
-import android.content.Intent;
import android.graphics.Canvas;
import android.graphics.Rect;
import android.graphics.Region;
@@ -345,7 +344,7 @@ public class TaskStackView extends FrameLayout implements TaskStack.TaskStackCal
mScrollAnimator = ObjectAnimator.ofInt(this, "stackScroll", curScroll, newScroll);
mScrollAnimator.setDuration(Utilities.calculateTranslationAnimationDuration(newScroll -
curScroll, 250));
- mScrollAnimator.setInterpolator(RecentsConfiguration.getInstance().defaultBezierInterpolator);
+ mScrollAnimator.setInterpolator(RecentsConfiguration.getInstance().fastOutSlowInInterpolator);
mScrollAnimator.addUpdateListener(new ValueAnimator.AnimatorUpdateListener() {
@Override
public void onAnimationUpdate(ValueAnimator animation) {
diff --git a/packages/SystemUI/src/com/android/systemui/recents/views/TaskView.java b/packages/SystemUI/src/com/android/systemui/recents/views/TaskView.java
index 486539f..813c26a 100644
--- a/packages/SystemUI/src/com/android/systemui/recents/views/TaskView.java
+++ b/packages/SystemUI/src/com/android/systemui/recents/views/TaskView.java
@@ -21,7 +21,6 @@ import android.animation.ValueAnimator;
import android.content.Context;
import android.graphics.Canvas;
import android.graphics.Outline;
-import android.graphics.Paint;
import android.graphics.Path;
import android.graphics.Point;
import android.graphics.Rect;
@@ -167,7 +166,7 @@ public class TaskView extends FrameLayout implements Task.TaskCallbacks, View.On
.scaleY(toTransform.scale)
.alpha(toTransform.alpha)
.setDuration(duration)
- .setInterpolator(config.defaultBezierInterpolator)
+ .setInterpolator(config.fastOutSlowInInterpolator)
.withLayer()
.setUpdateListener(new ValueAnimator.AnimatorUpdateListener() {
@Override
@@ -235,7 +234,7 @@ public class TaskView extends FrameLayout implements Task.TaskCallbacks, View.On
mBarView.animate()
.translationY(0)
.setStartDelay(200)
- .setInterpolator(config.defaultBezierInterpolator)
+ .setInterpolator(config.fastOutSlowInInterpolator)
.setDuration(config.taskBarEnterAnimDuration)
.withLayer()
.start();
@@ -247,7 +246,7 @@ public class TaskView extends FrameLayout implements Task.TaskCallbacks, View.On
mBarView.animate()
.translationY(-mBarView.getMeasuredHeight())
.setStartDelay(0)
- .setInterpolator(config.defaultBezierInterpolator)
+ .setInterpolator(config.fastOutLinearInInterpolator)
.setDuration(config.taskBarExitAnimDuration)
.withLayer()
.withEndAction(new Runnable() {
@@ -268,7 +267,7 @@ public class TaskView extends FrameLayout implements Task.TaskCallbacks, View.On
animate().translationX(config.taskViewRemoveAnimTranslationXPx)
.alpha(0f)
.setStartDelay(0)
- .setInterpolator(config.defaultBezierInterpolator)
+ .setInterpolator(config.fastOutSlowInInterpolator)
.setDuration(config.taskViewRemoveAnimDuration)
.withLayer()
.withEndAction(new Runnable() {