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

Commit ec396d63 authored by Winson Chung's avatar Winson Chung
Browse files

Initial changes to add task affiliation styling. (Bug 16656169)

- Fixing issue with launch-in-background animation
parent 256e1a62
Loading
Loading
Loading
Loading
+9 −0
Original line number Diff line number Diff line
@@ -700,6 +700,13 @@ public class ActivityManager {
         */
        public int affiliatedTaskId;

        /**
         * Task affiliation color of the source task with the affiliated task id.
         *
         * @hide
         */
        public int affiliatedTaskColor;

        public RecentTaskInfo() {
        }

@@ -732,6 +739,7 @@ public class ActivityManager {
            dest.writeLong(firstActiveTime);
            dest.writeLong(lastActiveTime);
            dest.writeInt(affiliatedTaskId);
            dest.writeInt(affiliatedTaskColor);
        }

        public void readFromParcel(Parcel source) {
@@ -747,6 +755,7 @@ public class ActivityManager {
            firstActiveTime = source.readLong();
            lastActiveTime = source.readLong();
            affiliatedTaskId = source.readInt();
            affiliatedTaskColor = source.readInt();
        }

        public static final Creator<RecentTaskInfo> CREATOR
+4 −4
Original line number Diff line number Diff line
@@ -37,20 +37,20 @@
        android:interpolator="@interpolator/fast_out_slow_in"
        android:duration="350" />

    <alpha android:fromAlpha="1.0" android:toAlpha="1.6"
    <alpha android:fromAlpha="1.0" android:toAlpha="1.6666666666"
        android:fillEnabled="true" android:fillBefore="false" android:fillAfter="true"
        android:interpolator="@interpolator/decelerate_cubic"
        android:startOffset="433"
        android:duration="133"/>

    <translate android:fromYDelta="0%" android:toYDelta="-10%"
    <translate android:fromYDelta="0%" android:toYDelta="-8.8888888888%"
        android:fillEnabled="true" android:fillBefore="false" android:fillAfter="true"
        android:interpolator="@interpolator/decelerate_cubic"
        android:startOffset="433"
        android:duration="350"/>

    <scale android:fromXScale="1.0" android:toXScale="1.1"
        android:fromYScale="1.0" android:toYScale="1.1"
    <scale android:fromXScale="1.0" android:toXScale="1.1111111111"
        android:fromYScale="1.0" android:toYScale="1.1111111111"
        android:fillEnabled="true" android:fillBefore="false" android:fillAfter="true"
        android:pivotX="50%p" android:pivotY="50%p"
        android:interpolator="@interpolator/decelerate_cubic"
+3 −3
Original line number Diff line number Diff line
@@ -18,11 +18,11 @@
    android:layout_width="match_parent" 
    android:layout_height="match_parent"
    android:focusable="true">
    <com.android.systemui.recents.views.TaskThumbnailView
    <com.android.systemui.recents.views.TaskViewThumbnail
        android:id="@+id/task_view_thumbnail"
        android:layout_width="match_parent"
        android:layout_height="match_parent" />
    <com.android.systemui.recents.views.TaskBarView
    <com.android.systemui.recents.views.TaskViewHeader
        android:id="@+id/task_view_bar"
        android:layout_width="match_parent"
        android:layout_height="@dimen/recents_task_bar_height"
@@ -61,7 +61,7 @@
            android:background="@drawable/recents_button_bg"
            android:visibility="invisible"
            android:src="@drawable/recents_dismiss_light" />
    </com.android.systemui.recents.views.TaskBarView>
    </com.android.systemui.recents.views.TaskViewHeader>
    <FrameLayout
        android:id="@+id/lock_to_app_fab"
        android:layout_width="48dp"
+3 −0
Original line number Diff line number Diff line
@@ -237,6 +237,9 @@
         in dps over one second of time. -->
    <dimen name="recents_animation_movement_in_dps_per_second">800dp</dimen>

    <!-- The min alpha to apply to a task affiliation group color. -->
    <item name="recents_task_affiliation_color_min_alpha_percentage" format="float" type="dimen">0.6</item>

    <!-- Space reserved for the cards behind the top card in the top stack -->
    <dimen name="top_stack_peek_amount">12dp</dimen>

+4 −0
Original line number Diff line number Diff line
@@ -86,6 +86,7 @@ public class RecentsConfiguration {
    public int taskBarViewLightTextColor;
    public int taskBarViewDarkTextColor;
    public int taskBarViewHighlightColor;
    public float taskBarViewAffiliationColorMinAlpha;

    /** Task bar size & animations */
    public int taskBarHeight;
@@ -221,6 +222,9 @@ public class RecentsConfiguration {
                res.getColor(R.color.recents_task_bar_dark_text_color);
        taskBarViewHighlightColor =
                res.getColor(R.color.recents_task_bar_highlight_color);
        TypedValue affMinAlphaPctValue = new TypedValue();
        res.getValue(R.dimen.recents_task_affiliation_color_min_alpha_percentage, affMinAlphaPctValue, true);
        taskBarViewAffiliationColorMinAlpha = affMinAlphaPctValue.getFloat();

        // Task bar size & animations
        taskBarHeight = res.getDimensionPixelSize(R.dimen.recents_task_bar_height);
Loading