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

Commit a905ccb8 authored by Anas Karbila's avatar Anas Karbila Committed by LuK1337
Browse files

SystemUI: Squashed support for recents task locking



Author: Anas Karbila <anaskarbila@gmail.com>
Date:   Mon May 1 02:20:07 2017 +0900

    SystemUI: Support recents task locking

    This adds the ability to lock task in recents so they won't be cleared when removing all tasks

    Ticket: NOUGAT-1

    Drawables from material.io

    Change-Id: I06ffe411e72d4e837cfec7b9b77fb2519e417bc7

Author: Joey Rizzoli <joey@lineageos.org>
Date:   Sat Jun 3 17:00:43 2017 +0200

    SystemUI: animate icon when locking a task

    Change-Id: Ic153cb3707a14dba96d8889b11f149a339fb55e0
    Signed-off-by: default avatarJoey Rizzoli <joey@lineageos.org>

Author: LuK1337 <priv.luk@gmail.com>
Date:   Tue Jun 20 01:28:27 2017 +0200

    SystemUI: Fix task lock & freeform buttons placement

    * Get rid of hardcoded margin
    * Use proper gravity flags for task lock button

    Change-Id: Ib864b23f405ad34a56c37e2d9b9d0d391cf4dc8e

Author: Harry Youd <harry@harryyoud.co.uk>
Date:   Sun, 27 Aug 2017 21:29:57 +0200

    Recents: Add accessibility descriptions for lock ImageViews

    Change-Id: I09ce342ce135017294f5a4197b7e52dded3fb17e

Author: thecrazyskull <anaskarbila@gmail.com>
Date:   Sat Sep 9 17:03:18 2017 +0200

    SystemUI: locked tasks should have a valid view

    If the view doesn't exist, the card won't be able to receive touch
    events. We need those touch events to have a bounce-back animation
    when trying to swipe away a locked card.

    Change-Id: If7b3c5e5094d2752926eb306dd54264da0ceaa3e

Author: LuK1337 <priv.luk@gmail.com>
Date:   Thu Nov 30 13:15:13 2017 +0100

    SystemUI: Fix title text clipping when task lock button is visible

    Change-Id: I8005360f932c930011d969e2913bc28efb826163

Change-Id: I882f741ba518090202203e4326a5cf7205ebc098
parent 43f33322
Loading
Loading
Loading
Loading
+54 −0
Original line number Diff line number Diff line
<?xml version="1.0" encoding="utf-8"?>
<!--
     Copyright (C) 2017 The LineageOS Project

     Licensed under the Apache License, Version 2.0 (the "License");
     you may not use this file except in compliance with the License.
     You may obtain a copy of the License at

          http://www.apache.org/licenses/LICENSE-2.0

     Unless required by applicable law or agreed to in writing, software
     distributed under the License is distributed on an "AS IS" BASIS,
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-->
<animated-vector
    xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:aapt="http://schemas.android.com/aapt">
    <aapt:attr name="android:drawable">
        <vector
            android:width="24dp"
            android:height="24dp"
            android:viewportWidth="24"
            android:viewportHeight="24"
            android:alpha="1">
            <path
                android:name="lock"
                android:pathData="M18,20V10H6V20H18M18,8A2,2 0 0,1 20,10V20A2,2 0 0,1 18,22H6C4.89,22 4,21.1 4,20V10A2,2 0 0,1 6,8H15V6A3,3 0 0,0 12,3A3,3 0 0,0 9,6H7A5,5 0 0,1 12,1A5,5 0 0,1 17,6V8H18M12,17A2,2 0 0,1 10,15A2,2 0 0,1 12,13A2,2 0 0,1 14,15A2,2 0 0,1 12,17Z"
                android:fillColor="@color/recents_task_bar_dark_icon_color"/>
            <group
                android:name="group"
                android:pivotX="8"
                android:pivotY="6">
                <path
                    android:name="line"
                    android:pathData="M 7, 6 L 9, 6 L 9, 8 L 7, 8 L 7, 6"
                    android:fillColor="@color/recents_task_bar_dark_icon_color"/>
            </group>
        </vector>
    </aapt:attr>
    <target android:name="group">
        <aapt:attr name="android:animation">
            <objectAnimator
                android:name="group"
                android:propertyName="scaleY"
                android:duration="350"
                android:valueFrom="0"
                android:valueTo="1"
                android:valueType="floatType"
                android:interpolator="@android:anim/accelerate_decelerate_interpolator"/>
        </aapt:attr>
    </target>
</animated-vector>
+54 −0
Original line number Diff line number Diff line
<?xml version="1.0" encoding="utf-8"?>
<!--
     Copyright (C) 2017 The LineageOS Project

     Licensed under the Apache License, Version 2.0 (the "License");
     you may not use this file except in compliance with the License.
     You may obtain a copy of the License at

          http://www.apache.org/licenses/LICENSE-2.0

     Unless required by applicable law or agreed to in writing, software
     distributed under the License is distributed on an "AS IS" BASIS,
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-->
<animated-vector
    xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:aapt="http://schemas.android.com/aapt">
    <aapt:attr name="android:drawable">
        <vector
            android:width="24dp"
            android:height="24dp"
            android:viewportWidth="24"
            android:viewportHeight="24"
            android:alpha="1">
            <path
                android:name="lock"
                android:pathData="M18,20V10H6V20H18M18,8A2,2 0 0,1 20,10V20A2,2 0 0,1 18,22H6C4.89,22 4,21.1 4,20V10A2,2 0 0,1 6,8H15V6A3,3 0 0,0 12,3A3,3 0 0,0 9,6H7A5,5 0 0,1 12,1A5,5 0 0,1 17,6V8H18M12,17A2,2 0 0,1 10,15A2,2 0 0,1 12,13A2,2 0 0,1 14,15A2,2 0 0,1 12,17Z"
                android:fillColor="@color/recents_task_bar_light_icon_color"/>
            <group
                android:name="group"
                android:pivotX="8"
                android:pivotY="6">
                <path
                    android:name="line"
                    android:pathData="M 7, 6 L 9, 6 L 9, 8 L 7, 8 L 7, 6"
                    android:fillColor="@color/recents_task_bar_light_icon_color"/>
            </group>
        </vector>
    </aapt:attr>
    <target android:name="group">
        <aapt:attr name="android:animation">
            <objectAnimator
                android:name="group"
                android:propertyName="scaleY"
                android:duration="350"
                android:valueFrom="0"
                android:valueTo="1"
                android:valueType="floatType"
                android:interpolator="@android:anim/accelerate_decelerate_interpolator"/>
        </aapt:attr>
    </target>
</animated-vector>
+54 −0
Original line number Diff line number Diff line
<?xml version="1.0" encoding="utf-8"?>
<!--
     Copyright (C) 2017 The LineageOS Project

     Licensed under the Apache License, Version 2.0 (the "License");
     you may not use this file except in compliance with the License.
     You may obtain a copy of the License at

          http://www.apache.org/licenses/LICENSE-2.0

     Unless required by applicable law or agreed to in writing, software
     distributed under the License is distributed on an "AS IS" BASIS,
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-->
<animated-vector
    xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:aapt="http://schemas.android.com/aapt">
    <aapt:attr name="android:drawable">
        <vector
            android:width="24dp"
            android:height="24dp"
            android:viewportWidth="24"
            android:viewportHeight="24"
            android:alpha="1">
            <path
                android:name="lock"
                android:pathData="M18,20V10H6V20H18M18,8A2,2 0 0,1 20,10V20A2,2 0 0,1 18,22H6C4.89,22 4,21.1 4,20V10A2,2 0 0,1 6,8H15V6A3,3 0 0,0 12,3A3,3 0 0,0 9,6H7A5,5 0 0,1 12,1A5,5 0 0,1 17,6V8H18M12,17A2,2 0 0,1 10,15A2,2 0 0,1 12,13A2,2 0 0,1 14,15A2,2 0 0,1 12,17Z"
                android:fillColor="@color/recents_task_bar_dark_icon_color"/>
            <group
                android:name="group"
                android:pivotX="8"
                android:pivotY="6">
                <path
                    android:name="line"
                    android:pathData="M 7, 6 L 9, 6 L 9, 8 L 7, 8 L 7, 6"
                    android:fillColor="@color/recents_task_bar_dark_icon_color"/>
            </group>
        </vector>
    </aapt:attr>
    <target android:name="group">
        <aapt:attr name="android:animation">
            <objectAnimator
                android:name="group"
                android:propertyName="scaleY"
                android:duration="350"
                android:valueFrom="1"
                android:valueTo="0"
                android:valueType="floatType"
                android:interpolator="@android:anim/accelerate_decelerate_interpolator"/>
        </aapt:attr>
    </target>
</animated-vector>
+54 −0
Original line number Diff line number Diff line
<?xml version="1.0" encoding="utf-8"?>
<!--
     Copyright (C) 2017 The LineageOS Project

     Licensed under the Apache License, Version 2.0 (the "License");
     you may not use this file except in compliance with the License.
     You may obtain a copy of the License at

          http://www.apache.org/licenses/LICENSE-2.0

     Unless required by applicable law or agreed to in writing, software
     distributed under the License is distributed on an "AS IS" BASIS,
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-->
<animated-vector
    xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:aapt="http://schemas.android.com/aapt">
    <aapt:attr name="android:drawable">
        <vector
            android:width="24dp"
            android:height="24dp"
            android:viewportWidth="24"
            android:viewportHeight="24"
            android:alpha="1">
            <path
                android:name="lock"
                android:pathData="M18,20V10H6V20H18M18,8A2,2 0 0,1 20,10V20A2,2 0 0,1 18,22H6C4.89,22 4,21.1 4,20V10A2,2 0 0,1 6,8H15V6A3,3 0 0,0 12,3A3,3 0 0,0 9,6H7A5,5 0 0,1 12,1A5,5 0 0,1 17,6V8H18M12,17A2,2 0 0,1 10,15A2,2 0 0,1 12,13A2,2 0 0,1 14,15A2,2 0 0,1 12,17Z"
                android:fillColor="@color/recents_task_bar_light_icon_color"/>
            <group
                android:name="group"
                android:pivotX="8"
                android:pivotY="6">
                <path
                    android:name="line"
                    android:pathData="M 7, 6 L 9, 6 L 9, 8 L 7, 8 L 7, 6"
                    android:fillColor="@color/recents_task_bar_light_icon_color"/>
            </group>
        </vector>
    </aapt:attr>
    <target android:name="group">
        <aapt:attr name="android:animation">
            <objectAnimator
                android:name="group"
                android:propertyName="scaleY"
                android:duration="350"
                android:valueFrom="1"
                android:valueTo="0"
                android:valueType="floatType"
                android:interpolator="@android:anim/accelerate_decelerate_interpolator"/>
        </aapt:attr>
    </target>
</animated-vector>
+10 −0
Original line number Diff line number Diff line
@@ -55,6 +55,16 @@
        android:background="?android:selectableItemBackground"
        android:alpha="0"
        android:visibility="gone" />
    <com.android.systemui.recents.views.FixedSizeImageView
        android:id="@+id/lock_task"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_gravity="center_vertical|end"
        android:padding="@dimen/recents_task_view_header_button_padding"
        android:src="@drawable/recents_dismiss_light"
        android:background="?android:selectableItemBackground"
        android:alpha="0"
        android:visibility="gone" />
    <com.android.systemui.recents.views.FixedSizeImageView
        android:id="@+id/dismiss_task"
        android:layout_width="wrap_content"
Loading