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

Unverified Commit 5bdcc696 authored by Joey's avatar Joey Committed by Michael Bestas
Browse files

Trebuchet: implement hidden & protected apps



* Trebuchet: implement hidden apps
* Trebuchet: Implement protected apps

Squashed with:

Author: Luca Stefani <luca.stefani.ge1@gmail.com>
Date:   Sat Nov 2 15:23:42 2019 +0100

    Switch to BiometricPrompt

    Change-Id: Id6700c81aadb64434aecf1e54ae8b0f01d8143fb

Author: Joey <joey@lineageos.org>
Date:   Fri Feb 7 22:18:51 2020 +0100

    Trebuchet: fix protected apps behaviour

    If no secure lockscreen is set we should not show
    the app list

    Also make icons' touchable area larger

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

Author: Joey <joey@lineageos.org>
Date:   Sat Apr 4 10:57:37 2020 +0200

    Trebuchet: only allow hidden apps when no secure keyguard is set

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

Author: Joey <joey@lineageos.org>
Date:   Wed Aug 5 13:23:03 2020 +0200

    Launcher3: improve protected app names style

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

Author: programminghoch10 <hoch10@kabelbw.de>
Date:   Mon Apr 18 12:39:22 2022 +0200

    Trebuchet: adapt hidden and protected apps for S

    * Specifying the AppFilter class in the config.xml does not work anymore
    * Instead we just instantiate our own HiddenAppsFilter class in the LauncherModel

    Change-Id: I2a6791083261a580327d99dd1e93eaa019de5bc8

Signed-off-by: default avatarJoey <joey@lineageos.org>
Signed-off-by: default avatarLuca Stefani <luca.stefani.ge1@gmail.com>
Change-Id: I10c35407820373a1d5f84b237ac449398e076dcd
parent 2bac1b2f
Loading
Loading
Loading
Loading
+8 −1
Original line number Diff line number Diff line
@@ -43,6 +43,7 @@
    <!-- for rotating surface by arbitrary degree -->
    <uses-permission android:name="android.permission.ROTATE_SURFACE_FLINGER" />
    <uses-permission android:name="android.permission.POST_NOTIFICATIONS" />
    <uses-permission android:name="android.permission.USE_BIOMETRIC" />

    <!--
    Permissions required for read/write access to the workspace data. These permission name
@@ -182,5 +183,11 @@
            android:name="androidx.startup.InitializationProvider"
            android:authorities="${applicationId}.androidx-startup"
            tools:node="remove" />

        <activity
            android:name="com.android.launcher3.lineage.trust.TrustAppsActivity"
            android:label="@string/trust_apps_manager_name"
            android:theme="@android:style/Theme.DeviceDefault.Settings"
            android:autoRemoveFromRecents="true" />
    </application>
</manifest>
+4 −0
Original line number Diff line number Diff line
@@ -61,3 +61,7 @@
-keep class com.android.quickstep.** {
  *;
}

-keep class com.android.launcher3.lineage.trust.** {
  *;
}
+65 −0
Original line number Diff line number Diff line
<!--
     Copyright (C) 2019 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:name="visibilitystrike"
            android:width="24dp"
            android:height="24dp"
            android:viewportWidth="24"
            android:viewportHeight="24">
            <path
                android:name="strike_thru_path"
                android:pathData="M 2 4.27 L 3.27 3 L 3.27 3 L 2 4.27 Z"
                android:fillColor="?android:attr/textColorSecondary"
                android:strokeWidth="1"/>
            <clip-path
                android:name="strike_thru_mask"
                android:pathData="M 0 0 L 24 0 L 24 24 L 0 24 L 0 0 Z M 4.54 1.73 L 3.27 3 L 3.27 3 L 4.54 1.73 Z"/>
            <path
                android:name="eye_path"
                android:pathData="M 12 4.5 C 7 4.5 2.73 7.61 1 12 C 2.73 16.39 7 19.5 12 19.5 C 17 19.5 21.27 16.39 23 12 C 21.27 7.61 17 4.5 12 4.5 L 12 4.5 Z M 12 17 C 9.24 17 7 14.76 7 12 C 7 9.24 9.24 7 12 7 C 14.76 7 17 9.24 17 12 C 17 14.76 14.76 17 12 17 L 12 17 Z M 12 9 C 10.34 9 9 10.34 9 12 C 9 13.66 10.34 15 12 15 C 13.66 15 15 13.66 15 12 C 15 10.34 13.66 9 12 9 L 12 9 Z"
                android:fillColor="?android:attr/textColorSecondary"
                android:strokeWidth="1"/>
        </vector>
    </aapt:attr>
    <target android:name="strike_thru_path">
        <aapt:attr name="android:animation">
            <objectAnimator
                android:propertyName="pathData"
                android:startOffset="268"
                android:duration="1271"
                android:valueFrom="M 2 4.27 L 3.27 3 L 3.27 3 L 2 4.27 Z"
                android:valueTo="M 19.73 22 L 21 20.73 L 3.27 3 L 2 4.27 Z"
                android:valueType="pathType"
                android:interpolator="@android:interpolator/fast_out_slow_in"/>
        </aapt:attr>
    </target>
    <target android:name="strike_thru_mask">
        <aapt:attr name="android:animation">
            <objectAnimator
                android:propertyName="pathData"
                android:startOffset="268"
                android:duration="1271"
                android:valueFrom="M 0 0 L 24 0 L 24 24 L 0 24 L 0 0 Z M 4.54 1.73 L 3.27 3 L 3.27 3 L 4.54 1.73 Z"
                android:valueTo="M 0 0 L 24 0 L 24 24 L 0 24 L 0 0 Z M 4.54 1.73 L 3.27 3 L 21 20.73 L 22.27 19.46 Z"
                android:valueType="pathType"
                android:interpolator="@android:interpolator/fast_out_slow_in"/>
        </aapt:attr>
    </target>
</animated-vector>
+63 −0
Original line number Diff line number Diff line
<!--
     Copyright (C) 2019 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:name="visibilitystrike"
            android:width="24dp"
            android:height="24dp"
            android:viewportWidth="24"
            android:viewportHeight="24">
            <path
                android:name="strike_thru_path"
                android:pathData="M 2 4.27 L 3.27 3 L 3.27 3 L 2 4.27 Z"
                android:fillColor="?android:attr/textColorSecondary"
                android:strokeWidth="1"/>
            <clip-path
                android:name="strike_thru_mask"
                android:pathData="M 0 0 L 24 0 L 24 24 L 0 24 L 0 0 Z M 4.54 1.73 L 3.27 3 L 3.27 3 L 4.54 1.73 Z"/>
            <path
                android:name="eye_path"
                android:pathData="M 12 4.5 C 7 4.5 2.73 7.61 1 12 C 2.73 16.39 7 19.5 12 19.5 C 17 19.5 21.27 16.39 23 12 C 21.27 7.61 17 4.5 12 4.5 L 12 4.5 Z M 12 17 C 9.24 17 7 14.76 7 12 C 7 9.24 9.24 7 12 7 C 14.76 7 17 9.24 17 12 C 17 14.76 14.76 17 12 17 L 12 17 Z M 12 9 C 10.34 9 9 10.34 9 12 C 9 13.66 10.34 15 12 15 C 13.66 15 15 13.66 15 12 C 15 10.34 13.66 9 12 9 L 12 9 Z"
                android:fillColor="?android:attr/textColorSecondary"
                android:strokeWidth="1"/>
        </vector>
    </aapt:attr>
    <target android:name="strike_thru_path">
        <aapt:attr name="android:animation">
            <objectAnimator
                android:propertyName="pathData"
                android:duration="1271"
                android:valueFrom="M 19.73 22 L 21 20.73 L 3.27 3 L 2 4.27 Z"
                android:valueTo="M 2 4.27 L 3.27 3 L 3.27 3 L 2 4.27 Z"
                android:valueType="pathType"
                android:interpolator="@android:interpolator/fast_out_slow_in"/>
        </aapt:attr>
    </target>
    <target android:name="strike_thru_mask">
        <aapt:attr name="android:animation">
            <objectAnimator
                android:propertyName="pathData"
                android:duration="1271"
                android:valueFrom="M 0 0 L 24 0 L 24 24 L 0 24 L 0 0 Z M 4.54 1.73 L 3.27 3 L 21 20.73 L 22.27 19.46 Z"
                android:valueTo="M 0 0 L 24 0 L 24 24 L 0 24 L 0 0 Z M 4.54 1.73 L 3.27 3 L 3.27 3 L 4.54 1.73 Z"
                android:valueType="pathType"
                android:interpolator="@android:interpolator/fast_out_slow_in"/>
        </aapt:attr>
    </target>
</animated-vector>
+52 −0
Original line number Diff line number Diff line
<!--
     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:alpha="1"
            android:viewportHeight="24"
            android:viewportWidth="24">
            <path
                android:name="lock"
                android:fillColor="?android:attr/textColorSecondary"
                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" />
            <group
                android:name="group"
                android:pivotX="8"
                android:pivotY="6">
                <path
                    android:name="line"
                    android:fillColor="?android:attr/textColorSecondary"
                    android:pathData="M 7, 6 L 9, 6 L 9, 8 L 7, 8 L 7, 6" />
            </group>
        </vector>
    </aapt:attr>
    <target android:name="group">
        <aapt:attr name="android:animation">
            <objectAnimator
                android:name="group"
                android:duration="350"
                android:interpolator="@android:anim/accelerate_decelerate_interpolator"
                android:propertyName="scaleY"
                android:valueFrom="0"
                android:valueTo="1"
                android:valueType="floatType" />
        </aapt:attr>
    </target>
</animated-vector>
 No newline at end of file
Loading