Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 073c2e4a authored by Winson Chung's avatar Winson Chung Committed by Android (Google) Code Review
Browse files

Merge "Updating task view style, fixing performance on enter-recents...

Merge "Updating task view style, fixing performance on enter-recents animation." into lmp-preview-dev
parents 8d1de048 24cf1524
Loading
Loading
Loading
Loading
+12 −11
Original line number Diff line number Diff line
@@ -25,36 +25,37 @@
    <com.android.systemui.recents.views.TaskBarView
        android:id="@+id/task_view_bar"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:layout_height="56dp"
        android:layout_gravity="top|center_horizontal"
        android:background="@color/recents_task_bar_default_background_color">
        <ImageView
            android:id="@+id/application_icon"
            android:layout_width="@dimen/recents_task_view_application_icon_size"
            android:layout_height="@dimen/recents_task_view_application_icon_size"
            android:layout_gravity="center_vertical|start"
            android:padding="8dp" />
            android:layout_marginStart="16dp"
            android:layout_gravity="center_vertical|start" />
        <TextView
            android:id="@+id/activity_description"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:layout_gravity="center_vertical|left"
            android:layout_marginStart="@dimen/recents_task_view_application_icon_size"
            android:layout_marginEnd="@dimen/recents_task_view_application_icon_size"
            android:textSize="22sp"
            android:layout_gravity="center_vertical|start"
            android:layout_marginStart="64dp"
            android:layout_marginEnd="64dp"
            android:textSize="16sp"
            android:textColor="#ffffffff"
            android:text="@string/recents_empty_message"
            android:fontFamily="sans-serif-light"
            android:fontFamily="sans-serif-medium"
            android:singleLine="true"
            android:maxLines="2"
            android:ellipsize="marquee"
            android:fadingEdge="horizontal" />
        <ImageView
            android:id="@+id/dismiss_task"
            android:layout_width="@dimen/recents_task_view_application_icon_size"
            android:layout_height="@dimen/recents_task_view_application_icon_size"
            android:layout_width="48dp"
            android:layout_height="48dp"
            android:layout_marginEnd="4dp"
            android:layout_gravity="center_vertical|end"
            android:padding="23dp"
            android:padding="18dp"
            android:src="@drawable/recents_dismiss_light" />
    </com.android.systemui.recents.views.TaskBarView>
</com.android.systemui.recents.views.TaskView>
+1 −1
Original line number Diff line number Diff line
@@ -67,7 +67,7 @@
    <!-- The recents task bar light text color to be drawn on top of dark backgrounds. -->
    <color name="recents_task_bar_light_text_color">#ffeeeeee</color>
    <!-- The recents task bar dark text color to be drawn on top of light backgrounds. -->
    <color name="recents_task_bar_dark_text_color">#ff222222</color>
    <color name="recents_task_bar_dark_text_color">#ff333333</color>
    <!-- The recents task bar light dismiss icon color to be drawn on top of dark backgrounds. -->
    <color name="recents_task_bar_light_dismiss_color">#ffeeeeee</color>
    <!-- The recents task bar dark dismiss icon color to be drawn on top of light backgrounds. -->
+1 −1
Original line number Diff line number Diff line
@@ -113,7 +113,7 @@
    <!-- The min animation duration for animating views that are newly visible. -->
    <integer name="recents_filter_animate_new_views_min_duration">125</integer>
    <!-- The min animation duration for animating the task bar in. -->
    <integer name="recents_animate_task_bar_enter_duration">225</integer>
    <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>
    <!-- The animation duration for animating in the info pane. -->
+1 −1
Original line number Diff line number Diff line
@@ -212,7 +212,7 @@
    <dimen name="glowpadview_inner_radius">15dip</dimen>

    <!-- The size of the application icon in the recents task view. -->
    <dimen name="recents_task_view_application_icon_size">60dp</dimen>
    <dimen name="recents_task_view_application_icon_size">32dp</dimen>

    <!-- The size of the activity icon in the recents task view. -->
    <dimen name="recents_task_view_activity_icon_size">60dp</dimen>
+18 −2
Original line number Diff line number Diff line
@@ -35,6 +35,7 @@ import android.os.IBinder;
import android.os.Message;
import android.os.Messenger;
import android.os.RemoteException;
import android.os.SystemClock;
import android.os.UserHandle;
import android.util.DisplayMetrics;
import android.view.Display;
@@ -49,7 +50,7 @@ import java.util.List;
import java.util.concurrent.atomic.AtomicBoolean;

/** A proxy implementation for the recents component */
public class AlternateRecentsComponent {
public class AlternateRecentsComponent implements ActivityOptions.OnAnimationStartedListener {

    /** A handler for messages from the recents implementation */
    class RecentsMessageHandler extends Handler {
@@ -123,6 +124,7 @@ public class AlternateRecentsComponent {
    final public static int MSG_SHOW_RECENTS = 4;
    final public static int MSG_HIDE_RECENTS = 5;
    final public static int MSG_TOGGLE_RECENTS = 6;
    final public static int MSG_START_ENTER_ANIMATION = 7;

    final public static String EXTRA_ANIMATING_WITH_THUMBNAIL = "recents.animatingWithThumbnail";
    final public static String EXTRA_FROM_ALT_TAB = "recents.triggeredFromAltTab";
@@ -392,7 +394,7 @@ public class AlternateRecentsComponent {
        }

        return ActivityOptions.makeThumbnailScaleDownAnimation(mStatusBarView, thumbnail,
                taskRect.left, taskRect.top, null);
                taskRect.left, taskRect.top, this);
    }

    /** Returns whether the recents is currently running */
@@ -517,4 +519,18 @@ public class AlternateRecentsComponent {
            mContext.startActivityAsUser(intent, new UserHandle(UserHandle.USER_CURRENT));
        }
    }


    /**** OnAnimationStartedListener Implementation ****/

    @Override
    public void onAnimationStarted() {
        // Notify recents to start the enter animation
        try {
            Message msg = Message.obtain(null, MSG_START_ENTER_ANIMATION, 0, 0);
            mService.send(msg);
        } catch (RemoteException re) {
            re.printStackTrace();
        }
    }
}
Loading