Changes for March 2021
- Move "clear all" button in recents for convenience
This commit is contained in:
parent
414ac1d254
commit
76a17280d9
@ -60,6 +60,9 @@ cd ..
|
|||||||
cd packages/apps/LineageParts
|
cd packages/apps/LineageParts
|
||||||
git am $BL/patches/0001-LineageParts-Invert-per-app-stretch-to-fullscreen.patch
|
git am $BL/patches/0001-LineageParts-Invert-per-app-stretch-to-fullscreen.patch
|
||||||
cd ../../..
|
cd ../../..
|
||||||
|
cd packages/apps/Trebuchet
|
||||||
|
git am $BL/patches/0001-Trebuchet-Move-clear-all-button-to-actions-view.patch
|
||||||
|
cd ../../..
|
||||||
cd vendor/lineage
|
cd vendor/lineage
|
||||||
git am $BL/patches/0001-vendor_lineage-Log-privapp-permissions-whitelist-vio.patch
|
git am $BL/patches/0001-vendor_lineage-Log-privapp-permissions-whitelist-vio.patch
|
||||||
cd ../..
|
cd ../..
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
From 15359fa07d5f0216a6916662cc8dfce2e8e4b050 Mon Sep 17 00:00:00 2001
|
From 398f1882e09c12509c819a4568fb6b65f571418f Mon Sep 17 00:00:00 2001
|
||||||
From: Andy CrossGate Yan <GeForce8800Ultra@gmail.com>
|
From: Andy CrossGate Yan <GeForce8800Ultra@gmail.com>
|
||||||
Date: Sun, 10 Jan 2021 05:10:39 +0000
|
Date: Sun, 10 Jan 2021 05:10:39 +0000
|
||||||
Subject: [PATCH] Restore /sbin
|
Subject: [PATCH] Restore /sbin
|
||||||
@ -54,7 +54,7 @@ index 5805a4d19..b30707fc8 100644
|
|||||||
{ 00755, AID_ROOT, AID_SHELL, 0, "system/xbin/*" },
|
{ 00755, AID_ROOT, AID_SHELL, 0, "system/xbin/*" },
|
||||||
{ 00755, AID_ROOT, AID_SHELL, 0, "system/apex/*/bin/*" },
|
{ 00755, AID_ROOT, AID_SHELL, 0, "system/apex/*/bin/*" },
|
||||||
diff --git a/rootdir/Android.mk b/rootdir/Android.mk
|
diff --git a/rootdir/Android.mk b/rootdir/Android.mk
|
||||||
index a9d0ed08a..56b0d5b5b 100644
|
index 7d383f522..6d518dcb3 100644
|
||||||
--- a/rootdir/Android.mk
|
--- a/rootdir/Android.mk
|
||||||
+++ b/rootdir/Android.mk
|
+++ b/rootdir/Android.mk
|
||||||
@@ -77,7 +77,7 @@ endif
|
@@ -77,7 +77,7 @@ endif
|
||||||
@ -63,7 +63,7 @@ index a9d0ed08a..56b0d5b5b 100644
|
|||||||
LOCAL_POST_INSTALL_CMD := mkdir -p $(addprefix $(TARGET_ROOT_OUT)/, \
|
LOCAL_POST_INSTALL_CMD := mkdir -p $(addprefix $(TARGET_ROOT_OUT)/, \
|
||||||
- dev proc sys system data data_mirror odm oem acct config storage mnt apex debug_ramdisk \
|
- dev proc sys system data data_mirror odm oem acct config storage mnt apex debug_ramdisk \
|
||||||
+ sbin dev proc sys system data data_mirror odm oem acct config storage mnt apex debug_ramdisk \
|
+ sbin dev proc sys system data data_mirror odm oem acct config storage mnt apex debug_ramdisk \
|
||||||
linkerconfig $(BOARD_ROOT_EXTRA_FOLDERS)); \
|
linkerconfig postinstall $(BOARD_ROOT_EXTRA_FOLDERS)); \
|
||||||
ln -sf /system/bin $(TARGET_ROOT_OUT)/bin; \
|
ln -sf /system/bin $(TARGET_ROOT_OUT)/bin; \
|
||||||
ln -sf /system/etc $(TARGET_ROOT_OUT)/etc; \
|
ln -sf /system/etc $(TARGET_ROOT_OUT)/etc; \
|
||||||
--
|
--
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
From 22d48d3925e8741ab115e7f20c2faf20c2fe21b5 Mon Sep 17 00:00:00 2001
|
From 3ecc72b4917790fa43867ce19438874a109de5d6 Mon Sep 17 00:00:00 2001
|
||||||
From: Andy CrossGate Yan <GeForce8800Ultra@gmail.com>
|
From: Andy CrossGate Yan <GeForce8800Ultra@gmail.com>
|
||||||
Date: Sat, 19 Dec 2020 15:57:27 +0000
|
Date: Sat, 19 Dec 2020 15:57:27 +0000
|
||||||
Subject: [PATCH] Revert "init: Add vendor-specific initialization hooks."
|
Subject: [PATCH] Revert "init: Add vendor-specific initialization hooks."
|
||||||
@ -78,7 +78,7 @@ index 383d0f541..c5b1efa7a 100644
|
|||||||
-OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
|
-OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
|
||||||
-IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
-IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
diff --git a/init/property_service.cpp b/init/property_service.cpp
|
diff --git a/init/property_service.cpp b/init/property_service.cpp
|
||||||
index 2852f4fb4..a89504e59 100644
|
index 44b51c2cf..019955b16 100644
|
||||||
--- a/init/property_service.cpp
|
--- a/init/property_service.cpp
|
||||||
+++ b/init/property_service.cpp
|
+++ b/init/property_service.cpp
|
||||||
@@ -70,7 +70,6 @@
|
@@ -70,7 +70,6 @@
|
||||||
@ -89,7 +89,7 @@ index 2852f4fb4..a89504e59 100644
|
|||||||
|
|
||||||
using namespace std::literals;
|
using namespace std::literals;
|
||||||
|
|
||||||
@@ -913,9 +912,6 @@ void PropertyLoadBootDefaults() {
|
@@ -976,9 +975,6 @@ void PropertyLoadBootDefaults() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -98,7 +98,7 @@ index 2852f4fb4..a89504e59 100644
|
|||||||
-
|
-
|
||||||
property_initialize_ro_product_props();
|
property_initialize_ro_product_props();
|
||||||
property_derive_build_fingerprint();
|
property_derive_build_fingerprint();
|
||||||
|
property_initialize_ro_cpu_abilist();
|
||||||
diff --git a/init/vendor_init.cpp b/init/vendor_init.cpp
|
diff --git a/init/vendor_init.cpp b/init/vendor_init.cpp
|
||||||
deleted file mode 100644
|
deleted file mode 100644
|
||||||
index d3fd5ffe2..000000000
|
index d3fd5ffe2..000000000
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
From 30abf39af77e87b0b4fd8c11d3bc9a601b1b31bd Mon Sep 17 00:00:00 2001
|
From c789a333062b16af8b41d52a002372500de7cf1e Mon Sep 17 00:00:00 2001
|
||||||
From: Andy CrossGate Yan <GeForce8800Ultra@gmail.com>
|
From: Andy CrossGate Yan <GeForce8800Ultra@gmail.com>
|
||||||
Date: Sun, 13 Dec 2020 02:22:12 +0000
|
Date: Sun, 13 Dec 2020 02:22:12 +0000
|
||||||
Subject: [PATCH] Squashed revert of LOS FOD implementation
|
Subject: [PATCH] Squashed revert of LOS FOD implementation
|
||||||
@ -9,7 +9,9 @@ Change-Id: I4650cef96617c32e52d5dd088c8afffb06ab5e1d
|
|||||||
---
|
---
|
||||||
.../internal/statusbar/IStatusBar.aidl | 6 -
|
.../internal/statusbar/IStatusBar.aidl | 6 -
|
||||||
.../internal/statusbar/IStatusBarService.aidl | 6 -
|
.../internal/statusbar/IStatusBarService.aidl | 6 -
|
||||||
|
data/etc/com.android.systemui.xml | 1 -
|
||||||
packages/SystemUI/Android.bp | 2 -
|
packages/SystemUI/Android.bp | 2 -
|
||||||
|
packages/SystemUI/AndroidManifest.xml | 1 -
|
||||||
.../res-keyguard/values/lineage_dimens.xml | 20 -
|
.../res-keyguard/values/lineage_dimens.xml | 20 -
|
||||||
.../res/drawable-nodpi/fod_icon_pressed.png | Bin 108 -> 0 bytes
|
.../res/drawable-nodpi/fod_icon_pressed.png | Bin 108 -> 0 bytes
|
||||||
.../res/drawable/fod_icon_default.xml | 25 -
|
.../res/drawable/fod_icon_default.xml | 25 -
|
||||||
@ -17,21 +19,28 @@ Change-Id: I4650cef96617c32e52d5dd088c8afffb06ab5e1d
|
|||||||
.../SystemUI/res/values/lineage_config.xml | 4 -
|
.../SystemUI/res/values/lineage_config.xml | 4 -
|
||||||
.../keyguard/KeyguardSecurityContainer.java | 15 +-
|
.../keyguard/KeyguardSecurityContainer.java | 15 +-
|
||||||
.../systemui/biometrics/FODCircleView.java | 544 ------------------
|
.../systemui/biometrics/FODCircleView.java | 544 ------------------
|
||||||
.../biometrics/FODCircleViewImpl.java | 73 ---
|
.../biometrics/FODCircleViewImpl.java | 128 -----
|
||||||
|
.../biometrics/FODCircleViewImplCallback.java | 25 -
|
||||||
.../systemui/dagger/SystemUIBinder.java | 7 -
|
.../systemui/dagger/SystemUIBinder.java | 7 -
|
||||||
.../keyguard/KeyguardViewMediator.java | 10 +-
|
.../keyguard/KeyguardViewMediator.java | 10 +-
|
||||||
.../systemui/statusbar/CommandQueue.java | 28 -
|
.../systemui/statusbar/CommandQueue.java | 28 -
|
||||||
|
.../notification/ActivityLaunchAnimator.java | 21 +-
|
||||||
|
.../systemui/statusbar/phone/StatusBar.java | 70 +--
|
||||||
.../phone/StatusBarKeyguardViewManager.java | 11 +-
|
.../phone/StatusBarKeyguardViewManager.java | 11 +-
|
||||||
|
.../phone/dagger/StatusBarPhoneModule.java | 7 +-
|
||||||
|
.../ActivityLaunchAnimatorTest.java | 6 +-
|
||||||
|
.../statusbar/phone/StatusBarTest.java | 5 +-
|
||||||
services/core/Android.bp | 1 -
|
services/core/Android.bp | 1 -
|
||||||
.../biometrics/BiometricServiceBase.java | 2 +-
|
.../biometrics/BiometricServiceBase.java | 2 +-
|
||||||
.../fingerprint/FingerprintService.java | 112 ----
|
.../fingerprint/FingerprintService.java | 112 ----
|
||||||
.../statusbar/StatusBarManagerService.java | 22 -
|
.../statusbar/StatusBarManagerService.java | 22 -
|
||||||
19 files changed, 5 insertions(+), 884 deletions(-)
|
27 files changed, 12 insertions(+), 1068 deletions(-)
|
||||||
delete mode 100644 packages/SystemUI/res-keyguard/values/lineage_dimens.xml
|
delete mode 100644 packages/SystemUI/res-keyguard/values/lineage_dimens.xml
|
||||||
delete mode 100644 packages/SystemUI/res/drawable-nodpi/fod_icon_pressed.png
|
delete mode 100644 packages/SystemUI/res/drawable-nodpi/fod_icon_pressed.png
|
||||||
delete mode 100644 packages/SystemUI/res/drawable/fod_icon_default.xml
|
delete mode 100644 packages/SystemUI/res/drawable/fod_icon_default.xml
|
||||||
delete mode 100644 packages/SystemUI/src/com/android/systemui/biometrics/FODCircleView.java
|
delete mode 100644 packages/SystemUI/src/com/android/systemui/biometrics/FODCircleView.java
|
||||||
delete mode 100644 packages/SystemUI/src/com/android/systemui/biometrics/FODCircleViewImpl.java
|
delete mode 100644 packages/SystemUI/src/com/android/systemui/biometrics/FODCircleViewImpl.java
|
||||||
|
delete mode 100644 packages/SystemUI/src/com/android/systemui/biometrics/FODCircleViewImplCallback.java
|
||||||
|
|
||||||
diff --git a/core/java/com/android/internal/statusbar/IStatusBar.aidl b/core/java/com/android/internal/statusbar/IStatusBar.aidl
|
diff --git a/core/java/com/android/internal/statusbar/IStatusBar.aidl b/core/java/com/android/internal/statusbar/IStatusBar.aidl
|
||||||
index 44607f7f5fb..83b672e06b0 100644
|
index 44607f7f5fb..83b672e06b0 100644
|
||||||
@ -67,6 +76,18 @@ index e9b0683db89..ca0eccdbc6e 100644
|
|||||||
/**
|
/**
|
||||||
* Starts the default assistant app.
|
* Starts the default assistant app.
|
||||||
*/
|
*/
|
||||||
|
diff --git a/data/etc/com.android.systemui.xml b/data/etc/com.android.systemui.xml
|
||||||
|
index 7af1de6a6ca..06f1dae30cd 100644
|
||||||
|
--- a/data/etc/com.android.systemui.xml
|
||||||
|
+++ b/data/etc/com.android.systemui.xml
|
||||||
|
@@ -30,7 +30,6 @@
|
||||||
|
<permission name="android.permission.GET_APP_OPS_STATS"/>
|
||||||
|
<permission name="android.permission.INTERACT_ACROSS_USERS"/>
|
||||||
|
<permission name="android.permission.MANAGE_DEBUGGING"/>
|
||||||
|
- <permission name="android.permission.MANAGE_FINGERPRINT" />
|
||||||
|
<permission name="android.permission.MANAGE_SENSOR_PRIVACY"/>
|
||||||
|
<permission name="android.permission.MANAGE_USB"/>
|
||||||
|
<permission name="android.permission.MANAGE_USERS"/>
|
||||||
diff --git a/packages/SystemUI/Android.bp b/packages/SystemUI/Android.bp
|
diff --git a/packages/SystemUI/Android.bp b/packages/SystemUI/Android.bp
|
||||||
index c78630c05f0..84870f83ad2 100644
|
index c78630c05f0..84870f83ad2 100644
|
||||||
--- a/packages/SystemUI/Android.bp
|
--- a/packages/SystemUI/Android.bp
|
||||||
@ -87,6 +108,18 @@ index c78630c05f0..84870f83ad2 100644
|
|||||||
"vendor.lineage.powershare-V1.0-java",
|
"vendor.lineage.powershare-V1.0-java",
|
||||||
],
|
],
|
||||||
libs: [
|
libs: [
|
||||||
|
diff --git a/packages/SystemUI/AndroidManifest.xml b/packages/SystemUI/AndroidManifest.xml
|
||||||
|
index c68be502c4e..239edbd0c6f 100644
|
||||||
|
--- a/packages/SystemUI/AndroidManifest.xml
|
||||||
|
+++ b/packages/SystemUI/AndroidManifest.xml
|
||||||
|
@@ -137,7 +137,6 @@
|
||||||
|
<uses-permission android:name="android.permission.USE_FINGERPRINT" />
|
||||||
|
<uses-permission android:name="android.permission.RESET_FINGERPRINT_LOCKOUT" />
|
||||||
|
<uses-permission android:name="android.permission.MANAGE_BIOMETRIC" />
|
||||||
|
- <uses-permission android:name="android.permission.MANAGE_FINGERPRINT" />
|
||||||
|
<uses-permission android:name="android.permission.MANAGE_SLICE_PERMISSIONS" />
|
||||||
|
<uses-permission android:name="android.permission.CONTROL_KEYGUARD_SECURE_NOTIFICATIONS" />
|
||||||
|
<uses-permission android:name="android.permission.GET_RUNTIME_PERMISSIONS" />
|
||||||
diff --git a/packages/SystemUI/res-keyguard/values/lineage_dimens.xml b/packages/SystemUI/res-keyguard/values/lineage_dimens.xml
|
diff --git a/packages/SystemUI/res-keyguard/values/lineage_dimens.xml b/packages/SystemUI/res-keyguard/values/lineage_dimens.xml
|
||||||
deleted file mode 100644
|
deleted file mode 100644
|
||||||
index bb6070c7199..00000000000
|
index bb6070c7199..00000000000
|
||||||
@ -246,7 +279,7 @@ index bace9324ac9..1db2e32b8cd 100644
|
|||||||
|
|
||||||
diff --git a/packages/SystemUI/src/com/android/systemui/biometrics/FODCircleView.java b/packages/SystemUI/src/com/android/systemui/biometrics/FODCircleView.java
|
diff --git a/packages/SystemUI/src/com/android/systemui/biometrics/FODCircleView.java b/packages/SystemUI/src/com/android/systemui/biometrics/FODCircleView.java
|
||||||
deleted file mode 100644
|
deleted file mode 100644
|
||||||
index db2ab659709..00000000000
|
index dee208705b2..00000000000
|
||||||
--- a/packages/SystemUI/src/com/android/systemui/biometrics/FODCircleView.java
|
--- a/packages/SystemUI/src/com/android/systemui/biometrics/FODCircleView.java
|
||||||
+++ /dev/null
|
+++ /dev/null
|
||||||
@@ -1,544 +0,0 @@
|
@@ -1,544 +0,0 @@
|
||||||
@ -305,7 +338,7 @@ index db2ab659709..00000000000
|
|||||||
-import java.util.TimerTask;
|
-import java.util.TimerTask;
|
||||||
-
|
-
|
||||||
-public class FODCircleView extends ImageView {
|
-public class FODCircleView extends ImageView {
|
||||||
- private static final int FADE_ANIM_DURATION = 250;
|
- private static final int FADE_ANIM_DURATION = 125;
|
||||||
-
|
-
|
||||||
- private final int mPositionX;
|
- private final int mPositionX;
|
||||||
- private final int mPositionY;
|
- private final int mPositionY;
|
||||||
@ -796,10 +829,10 @@ index db2ab659709..00000000000
|
|||||||
-}
|
-}
|
||||||
diff --git a/packages/SystemUI/src/com/android/systemui/biometrics/FODCircleViewImpl.java b/packages/SystemUI/src/com/android/systemui/biometrics/FODCircleViewImpl.java
|
diff --git a/packages/SystemUI/src/com/android/systemui/biometrics/FODCircleViewImpl.java b/packages/SystemUI/src/com/android/systemui/biometrics/FODCircleViewImpl.java
|
||||||
deleted file mode 100644
|
deleted file mode 100644
|
||||||
index ca4fd6b99a0..00000000000
|
index 1b179ef98f2..00000000000
|
||||||
--- a/packages/SystemUI/src/com/android/systemui/biometrics/FODCircleViewImpl.java
|
--- a/packages/SystemUI/src/com/android/systemui/biometrics/FODCircleViewImpl.java
|
||||||
+++ /dev/null
|
+++ /dev/null
|
||||||
@@ -1,73 +0,0 @@
|
@@ -1,128 +0,0 @@
|
||||||
-/**
|
-/**
|
||||||
- * Copyright (C) 2019 The Android Open Source Project
|
- * Copyright (C) 2019 The Android Open Source Project
|
||||||
- *
|
- *
|
||||||
@ -824,10 +857,14 @@ index ca4fd6b99a0..00000000000
|
|||||||
-import android.view.View;
|
-import android.view.View;
|
||||||
-
|
-
|
||||||
-import com.android.systemui.SystemUI;
|
-import com.android.systemui.SystemUI;
|
||||||
|
-import com.android.systemui.biometrics.FODCircleViewImplCallback;
|
||||||
-import com.android.systemui.statusbar.CommandQueue;
|
-import com.android.systemui.statusbar.CommandQueue;
|
||||||
|
-import com.android.systemui.util.Assert;
|
||||||
-
|
-
|
||||||
-import lineageos.app.LineageContextConstants;
|
-import lineageos.app.LineageContextConstants;
|
||||||
-
|
-
|
||||||
|
-import java.lang.ref.WeakReference;
|
||||||
|
-import java.util.ArrayList;
|
||||||
-import javax.inject.Inject;
|
-import javax.inject.Inject;
|
||||||
-import javax.inject.Singleton;
|
-import javax.inject.Singleton;
|
||||||
-
|
-
|
||||||
@ -836,8 +873,13 @@ index ca4fd6b99a0..00000000000
|
|||||||
- private static final String TAG = "FODCircleViewImpl";
|
- private static final String TAG = "FODCircleViewImpl";
|
||||||
-
|
-
|
||||||
- private FODCircleView mFodCircleView;
|
- private FODCircleView mFodCircleView;
|
||||||
|
-
|
||||||
|
- private final ArrayList<WeakReference<FODCircleViewImplCallback>>
|
||||||
|
- mCallbacks = new ArrayList<>();
|
||||||
- private final CommandQueue mCommandQueue;
|
- private final CommandQueue mCommandQueue;
|
||||||
-
|
-
|
||||||
|
- private boolean mIsFODVisible;
|
||||||
|
-
|
||||||
- @Inject
|
- @Inject
|
||||||
- public FODCircleViewImpl(Context context, CommandQueue commandQueue) {
|
- public FODCircleViewImpl(Context context, CommandQueue commandQueue) {
|
||||||
- super(context);
|
- super(context);
|
||||||
@ -854,6 +896,12 @@ index ca4fd6b99a0..00000000000
|
|||||||
- mCommandQueue.addCallback(this);
|
- mCommandQueue.addCallback(this);
|
||||||
- try {
|
- try {
|
||||||
- mFodCircleView = new FODCircleView(mContext);
|
- mFodCircleView = new FODCircleView(mContext);
|
||||||
|
- for (int i = 0; i < mCallbacks.size(); i++) {
|
||||||
|
- FODCircleViewImplCallback cb = mCallbacks.get(i).get();
|
||||||
|
- if (cb != null) {
|
||||||
|
- cb.onFODStart();
|
||||||
|
- }
|
||||||
|
- }
|
||||||
- } catch (RuntimeException e) {
|
- } catch (RuntimeException e) {
|
||||||
- Slog.e(TAG, "Failed to initialize FODCircleView", e);
|
- Slog.e(TAG, "Failed to initialize FODCircleView", e);
|
||||||
- }
|
- }
|
||||||
@ -862,6 +910,13 @@ index ca4fd6b99a0..00000000000
|
|||||||
- @Override
|
- @Override
|
||||||
- public void showInDisplayFingerprintView() {
|
- public void showInDisplayFingerprintView() {
|
||||||
- if (mFodCircleView != null) {
|
- if (mFodCircleView != null) {
|
||||||
|
- for (int i = 0; i < mCallbacks.size(); i++) {
|
||||||
|
- FODCircleViewImplCallback cb = mCallbacks.get(i).get();
|
||||||
|
- if (cb != null) {
|
||||||
|
- cb.onFODStatusChange(true);
|
||||||
|
- }
|
||||||
|
- }
|
||||||
|
- mIsFODVisible = true;
|
||||||
- mFodCircleView.show();
|
- mFodCircleView.show();
|
||||||
- }
|
- }
|
||||||
- }
|
- }
|
||||||
@ -869,9 +924,73 @@ index ca4fd6b99a0..00000000000
|
|||||||
- @Override
|
- @Override
|
||||||
- public void hideInDisplayFingerprintView() {
|
- public void hideInDisplayFingerprintView() {
|
||||||
- if (mFodCircleView != null) {
|
- if (mFodCircleView != null) {
|
||||||
|
- for (int i = 0; i < mCallbacks.size(); i++) {
|
||||||
|
- FODCircleViewImplCallback cb = mCallbacks.get(i).get();
|
||||||
|
- if (cb != null) {
|
||||||
|
- cb.onFODStatusChange(false);
|
||||||
|
- }
|
||||||
|
- }
|
||||||
|
- mIsFODVisible = false;
|
||||||
- mFodCircleView.hide();
|
- mFodCircleView.hide();
|
||||||
- }
|
- }
|
||||||
- }
|
- }
|
||||||
|
-
|
||||||
|
- public void registerCallback(FODCircleViewImplCallback callback) {
|
||||||
|
- Assert.isMainThread();
|
||||||
|
- Slog.v(TAG, "*** register callback for " + callback);
|
||||||
|
- for (int i = 0; i < mCallbacks.size(); i++) {
|
||||||
|
- if (mCallbacks.get(i).get() == callback) {
|
||||||
|
- Slog.e(TAG, "Object tried to add another callback",
|
||||||
|
- new Exception("Called by"));
|
||||||
|
- return;
|
||||||
|
- }
|
||||||
|
- }
|
||||||
|
- mCallbacks.add(new WeakReference<>(callback));
|
||||||
|
- removeCallback(null);
|
||||||
|
- sendUpdates(callback);
|
||||||
|
- }
|
||||||
|
-
|
||||||
|
- public void removeCallback(FODCircleViewImplCallback callback) {
|
||||||
|
- Assert.isMainThread();
|
||||||
|
- Slog.v(TAG, "*** unregister callback for " + callback);
|
||||||
|
- mCallbacks.removeIf(el -> el.get() == callback);
|
||||||
|
- }
|
||||||
|
-
|
||||||
|
- private void sendUpdates(FODCircleViewImplCallback callback) {
|
||||||
|
- callback.onFODStart();
|
||||||
|
- callback.onFODStatusChange(mIsFODVisible);
|
||||||
|
- }
|
||||||
|
-}
|
||||||
|
diff --git a/packages/SystemUI/src/com/android/systemui/biometrics/FODCircleViewImplCallback.java b/packages/SystemUI/src/com/android/systemui/biometrics/FODCircleViewImplCallback.java
|
||||||
|
deleted file mode 100644
|
||||||
|
index 5c11fb9061e..00000000000
|
||||||
|
--- a/packages/SystemUI/src/com/android/systemui/biometrics/FODCircleViewImplCallback.java
|
||||||
|
+++ /dev/null
|
||||||
|
@@ -1,25 +0,0 @@
|
||||||
|
-/**
|
||||||
|
- * Copyright (C) 2021 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.
|
||||||
|
- */
|
||||||
|
-
|
||||||
|
-package com.android.systemui.biometrics;
|
||||||
|
-
|
||||||
|
-public class FODCircleViewImplCallback {
|
||||||
|
-
|
||||||
|
- public void onFODStart() {}
|
||||||
|
-
|
||||||
|
- public void onFODStatusChange(boolean isVisible) {}
|
||||||
|
-
|
||||||
-}
|
-}
|
||||||
diff --git a/packages/SystemUI/src/com/android/systemui/dagger/SystemUIBinder.java b/packages/SystemUI/src/com/android/systemui/dagger/SystemUIBinder.java
|
diff --git a/packages/SystemUI/src/com/android/systemui/dagger/SystemUIBinder.java b/packages/SystemUI/src/com/android/systemui/dagger/SystemUIBinder.java
|
||||||
index a0a2e6f0dd6..413a522bccd 100644
|
index a0a2e6f0dd6..413a522bccd 100644
|
||||||
@ -1007,11 +1126,251 @@ index 5f3875701e4..39b6aa1a360 100644
|
|||||||
case MSG_SET_BLOCKED_GESTURAL_NAVIGATION:
|
case MSG_SET_BLOCKED_GESTURAL_NAVIGATION:
|
||||||
for (int i = 0; i < mCallbacks.size(); i++) {
|
for (int i = 0; i < mCallbacks.size(); i++) {
|
||||||
mCallbacks.get(i).setBlockedGesturalNavigation((Boolean) msg.obj);
|
mCallbacks.get(i).setBlockedGesturalNavigation((Boolean) msg.obj);
|
||||||
|
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/notification/ActivityLaunchAnimator.java b/packages/SystemUI/src/com/android/systemui/statusbar/notification/ActivityLaunchAnimator.java
|
||||||
|
index 1e1655256b1..382715a3fb7 100644
|
||||||
|
--- a/packages/SystemUI/src/com/android/systemui/statusbar/notification/ActivityLaunchAnimator.java
|
||||||
|
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/notification/ActivityLaunchAnimator.java
|
||||||
|
@@ -20,12 +20,9 @@ import android.animation.Animator;
|
||||||
|
import android.animation.AnimatorListenerAdapter;
|
||||||
|
import android.animation.ValueAnimator;
|
||||||
|
import android.app.ActivityManager;
|
||||||
|
-import android.content.Context;
|
||||||
|
import android.graphics.Matrix;
|
||||||
|
import android.graphics.Rect;
|
||||||
|
-import android.hardware.fingerprint.IFingerprintService;
|
||||||
|
import android.os.RemoteException;
|
||||||
|
-import android.os.ServiceManager;
|
||||||
|
import android.util.MathUtils;
|
||||||
|
import android.view.IRemoteAnimationFinishedCallback;
|
||||||
|
import android.view.IRemoteAnimationRunner;
|
||||||
|
@@ -37,7 +34,6 @@ import android.view.View;
|
||||||
|
|
||||||
|
import com.android.internal.policy.ScreenDecorationsUtils;
|
||||||
|
import com.android.systemui.Interpolators;
|
||||||
|
-import com.android.systemui.biometrics.FODCircleViewImpl;
|
||||||
|
import com.android.systemui.statusbar.NotificationShadeDepthController;
|
||||||
|
import com.android.systemui.statusbar.notification.row.ExpandableNotificationRow;
|
||||||
|
import com.android.systemui.statusbar.notification.stack.NotificationListContainer;
|
||||||
|
@@ -74,8 +70,6 @@ public class ActivityLaunchAnimator {
|
||||||
|
private boolean mAnimationPending;
|
||||||
|
private boolean mAnimationRunning;
|
||||||
|
private boolean mIsLaunchForActivity;
|
||||||
|
- private IFingerprintService mFingerprintService;
|
||||||
|
- private FODCircleViewImpl mFODCircleViewImpl;
|
||||||
|
|
||||||
|
public ActivityLaunchAnimator(
|
||||||
|
NotificationShadeWindowViewController notificationShadeWindowViewController,
|
||||||
|
@@ -83,8 +77,7 @@ public class ActivityLaunchAnimator {
|
||||||
|
NotificationPanelViewController notificationPanel,
|
||||||
|
NotificationShadeDepthController depthController,
|
||||||
|
NotificationListContainer container,
|
||||||
|
- Executor mainExecutor,
|
||||||
|
- FODCircleViewImpl fodCircleViewImpl) {
|
||||||
|
+ Executor mainExecutor) {
|
||||||
|
mNotificationPanel = notificationPanel;
|
||||||
|
mNotificationContainer = container;
|
||||||
|
mDepthController = depthController;
|
||||||
|
@@ -94,9 +87,6 @@ public class ActivityLaunchAnimator {
|
||||||
|
mWindowCornerRadius = ScreenDecorationsUtils
|
||||||
|
.getWindowCornerRadius(mNotificationShadeWindowViewController.getView()
|
||||||
|
.getResources());
|
||||||
|
- mFODCircleViewImpl = fodCircleViewImpl;
|
||||||
|
- mFingerprintService = IFingerprintService.Stub.asInterface(
|
||||||
|
- ServiceManager.getService(Context.FINGERPRINT_SERVICE));
|
||||||
|
}
|
||||||
|
|
||||||
|
public RemoteAnimationAdapter getLaunchAnimation(
|
||||||
|
@@ -273,15 +263,6 @@ public class ActivityLaunchAnimator {
|
||||||
|
mNotificationShadeWindowViewController.setExpandAnimationRunning(running);
|
||||||
|
mNotificationContainer.setExpandingNotification(running ? mSourceNotification : null);
|
||||||
|
mAnimationRunning = running;
|
||||||
|
- boolean isFPClientActive = false;
|
||||||
|
- try {
|
||||||
|
- isFPClientActive = mFingerprintService.isClientActive();
|
||||||
|
- } catch (Exception e) {
|
||||||
|
- // do nothing.
|
||||||
|
- }
|
||||||
|
- if (!isFPClientActive) {
|
||||||
|
- mFODCircleViewImpl.hideInDisplayFingerprintView();
|
||||||
|
- }
|
||||||
|
if (!running) {
|
||||||
|
mCallback.onExpandAnimationFinished(mIsFullScreenLaunch);
|
||||||
|
applyParamsToNotification(null);
|
||||||
|
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBar.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBar.java
|
||||||
|
index f47a23287d3..b55d6a55bca 100644
|
||||||
|
--- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBar.java
|
||||||
|
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBar.java
|
||||||
|
@@ -76,7 +76,6 @@ import android.content.res.Configuration;
|
||||||
|
import android.graphics.Point;
|
||||||
|
import android.graphics.PointF;
|
||||||
|
import android.hardware.display.DisplayManager;
|
||||||
|
-import android.hardware.fingerprint.IFingerprintService;
|
||||||
|
import android.media.AudioAttributes;
|
||||||
|
import android.metrics.LogMaker;
|
||||||
|
import android.net.Uri;
|
||||||
|
@@ -151,8 +150,6 @@ import com.android.systemui.R;
|
||||||
|
import com.android.systemui.SystemUI;
|
||||||
|
import com.android.systemui.SystemUIFactory;
|
||||||
|
import com.android.systemui.assist.AssistManager;
|
||||||
|
-import com.android.systemui.biometrics.FODCircleViewImpl;
|
||||||
|
-import com.android.systemui.biometrics.FODCircleViewImplCallback;
|
||||||
|
import com.android.systemui.broadcast.BroadcastDispatcher;
|
||||||
|
import com.android.systemui.bubbles.BubbleController;
|
||||||
|
import com.android.systemui.charging.WirelessChargingAnimation;
|
||||||
|
@@ -241,7 +238,6 @@ import lineageos.providers.LineageSettings;
|
||||||
|
import java.io.FileDescriptor;
|
||||||
|
import java.io.PrintWriter;
|
||||||
|
import java.io.StringWriter;
|
||||||
|
-import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
import java.util.Optional;
|
||||||
|
import java.util.concurrent.Executor;
|
||||||
|
@@ -637,33 +633,6 @@ public class StatusBar extends SystemUI implements DemoMode,
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
- private ActivityManager mActivityManager;
|
||||||
|
- private boolean mFodVisibility;
|
||||||
|
- private boolean mIsDreaming;
|
||||||
|
- private FODCircleViewImpl mFODCircleViewImpl;
|
||||||
|
- private String mTopPkgClass;
|
||||||
|
- private FODCircleViewImplCallback mFODCircleViewImplCallback =
|
||||||
|
- new FODCircleViewImplCallback() {
|
||||||
|
- @Override
|
||||||
|
- public void onFODStatusChange(boolean isVisible) {
|
||||||
|
- boolean isFPClientActive = false;
|
||||||
|
- try {
|
||||||
|
- isFPClientActive = mFingerprintService.isClientActive();
|
||||||
|
- } catch (Exception e) {
|
||||||
|
- // do nothing.
|
||||||
|
- }
|
||||||
|
- mFodVisibility = isVisible;
|
||||||
|
- if (!isFPClientActive) {
|
||||||
|
- // if the client is not active, we have to nullify mTopPkgClass before
|
||||||
|
- // checking it against current foreground activity
|
||||||
|
- mTopPkgClass = null;
|
||||||
|
- return;
|
||||||
|
- } else if (isVisible && !mIsKeyguard && !mIsDreaming) {
|
||||||
|
- mTopPkgClass = getForegroundPackageNameAndClass();
|
||||||
|
- }
|
||||||
|
- }
|
||||||
|
- };
|
||||||
|
-
|
||||||
|
private KeyguardUserSwitcher mKeyguardUserSwitcher;
|
||||||
|
private final UserSwitcherController mUserSwitcherController;
|
||||||
|
private final NetworkController mNetworkController;
|
||||||
|
@@ -692,7 +661,6 @@ public class StatusBar extends SystemUI implements DemoMode,
|
||||||
|
new KeyguardUpdateMonitorCallback() {
|
||||||
|
@Override
|
||||||
|
public void onDreamingStateChanged(boolean dreaming) {
|
||||||
|
- mIsDreaming = dreaming;
|
||||||
|
if (dreaming) {
|
||||||
|
maybeEscalateHeadsUp();
|
||||||
|
}
|
||||||
|
@@ -717,7 +685,6 @@ public class StatusBar extends SystemUI implements DemoMode,
|
||||||
|
private Lazy<NotificationShadeDepthController> mNotificationShadeDepthControllerLazy;
|
||||||
|
private final BubbleController mBubbleController;
|
||||||
|
private final BubbleController.BubbleExpandListener mBubbleExpandListener;
|
||||||
|
- private final IFingerprintService mFingerprintService;
|
||||||
|
|
||||||
|
private ActivityIntentHelper mActivityIntentHelper;
|
||||||
|
|
||||||
|
@@ -807,8 +774,7 @@ public class StatusBar extends SystemUI implements DemoMode,
|
||||||
|
DismissCallbackRegistry dismissCallbackRegistry,
|
||||||
|
Lazy<NotificationShadeDepthController> notificationShadeDepthControllerLazy,
|
||||||
|
StatusBarTouchableRegionManager statusBarTouchableRegionManager,
|
||||||
|
- TunerService tunerService,
|
||||||
|
- FODCircleViewImpl fodCircleViewImpl) {
|
||||||
|
+ TunerService tunerService) {
|
||||||
|
super(context);
|
||||||
|
mNotificationsController = notificationsController;
|
||||||
|
mLightBarController = lightBarController;
|
||||||
|
@@ -886,7 +852,6 @@ public class StatusBar extends SystemUI implements DemoMode,
|
||||||
|
mIconPolicy = phoneStatusBarPolicy;
|
||||||
|
mDismissCallbackRegistry = dismissCallbackRegistry;
|
||||||
|
mTunerService = tunerService;
|
||||||
|
- mFODCircleViewImpl = fodCircleViewImpl;
|
||||||
|
|
||||||
|
mBubbleExpandListener =
|
||||||
|
(isExpanding, key) -> {
|
||||||
|
@@ -896,9 +861,6 @@ public class StatusBar extends SystemUI implements DemoMode,
|
||||||
|
|
||||||
|
|
||||||
|
DateTimeView.setReceiverHandler(timeTickHandler);
|
||||||
|
-
|
||||||
|
- mFingerprintService = IFingerprintService.Stub.asInterface(
|
||||||
|
- ServiceManager.getService(Context.FINGERPRINT_SERVICE));
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
@@ -1097,8 +1059,6 @@ public class StatusBar extends SystemUI implements DemoMode,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}, OverlayPlugin.class, true /* Allow multiple plugins */);
|
||||||
|
- mActivityManager = mContext.getSystemService(ActivityManager.class);
|
||||||
|
- mFODCircleViewImpl.registerCallback(mFODCircleViewImplCallback);
|
||||||
|
}
|
||||||
|
|
||||||
|
// ================================================================================
|
||||||
|
@@ -1407,8 +1367,7 @@ public class StatusBar extends SystemUI implements DemoMode,
|
||||||
|
mActivityLaunchAnimator = new ActivityLaunchAnimator(
|
||||||
|
mNotificationShadeWindowViewController, this, mNotificationPanelViewController,
|
||||||
|
mNotificationShadeDepthControllerLazy.get(),
|
||||||
|
- (NotificationListContainer) mStackScroller, mContext.getMainExecutor(),
|
||||||
|
- mFODCircleViewImpl);
|
||||||
|
+ (NotificationListContainer) mStackScroller, mContext.getMainExecutor());
|
||||||
|
|
||||||
|
// TODO: inject this.
|
||||||
|
mPresenter = new StatusBarNotificationPresenter(mContext, mNotificationPanelViewController,
|
||||||
|
@@ -1923,12 +1882,6 @@ public class StatusBar extends SystemUI implements DemoMode,
|
||||||
|
clearNotificationEffects();
|
||||||
|
}
|
||||||
|
|
||||||
|
- if (isExpanded && mFodVisibility) {
|
||||||
|
- mFODCircleViewImpl.hideInDisplayFingerprintView();
|
||||||
|
- } else if (!isExpanded && getForegroundPackageNameAndClass().equals(mTopPkgClass)) {
|
||||||
|
- mFODCircleViewImpl.showInDisplayFingerprintView();
|
||||||
|
- }
|
||||||
|
-
|
||||||
|
if (!isExpanded) {
|
||||||
|
mRemoteInputManager.onPanelCollapsed();
|
||||||
|
}
|
||||||
|
@@ -2650,11 +2603,6 @@ public class StatusBar extends SystemUI implements DemoMode,
|
||||||
|
@Override
|
||||||
|
public void onRecentsAnimationStateChanged(boolean running) {
|
||||||
|
setInteracting(StatusBarManager.WINDOW_NAVIGATION_BAR, running);
|
||||||
|
- if (!running && getForegroundPackageNameAndClass().equals(mTopPkgClass)) {
|
||||||
|
- mFODCircleViewImpl.showInDisplayFingerprintView();
|
||||||
|
- } else {
|
||||||
|
- mFODCircleViewImpl.hideInDisplayFingerprintView();
|
||||||
|
- }
|
||||||
|
}
|
||||||
|
|
||||||
|
protected BarTransitions getStatusBarTransitions() {
|
||||||
|
@@ -4680,18 +4628,4 @@ public class StatusBar extends SystemUI implements DemoMode,
|
||||||
|
public void suppressAmbientDisplay(boolean suppressed) {
|
||||||
|
mDozeServiceHost.setDozeSuppressed(suppressed);
|
||||||
|
}
|
||||||
|
-
|
||||||
|
- private String getForegroundPackageNameAndClass() {
|
||||||
|
- List<ActivityManager.RunningTaskInfo> tasks = mActivityManager.getRunningTasks(1);
|
||||||
|
- if (tasks.isEmpty()) {
|
||||||
|
- return null;
|
||||||
|
- }
|
||||||
|
- ActivityManager.RunningTaskInfo currentTask = tasks.get(0);
|
||||||
|
- ComponentName currentActivity = currentTask.topActivity;
|
||||||
|
- if (currentActivity.getPackageName() != null) {
|
||||||
|
- return currentActivity.getPackageName().trim() +
|
||||||
|
- currentActivity.getShortClassName().trim();
|
||||||
|
- }
|
||||||
|
- return null;
|
||||||
|
- }
|
||||||
|
}
|
||||||
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarKeyguardViewManager.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarKeyguardViewManager.java
|
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarKeyguardViewManager.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarKeyguardViewManager.java
|
||||||
index ca9e61320fd..2097cbcf9fc 100644
|
index 68b83fb68d5..b354e45bfde 100644
|
||||||
--- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarKeyguardViewManager.java
|
--- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarKeyguardViewManager.java
|
||||||
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarKeyguardViewManager.java
|
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarKeyguardViewManager.java
|
||||||
@@ -116,7 +116,6 @@ public class StatusBarKeyguardViewManager implements RemoteInputController.Callb
|
@@ -115,7 +115,6 @@ public class StatusBarKeyguardViewManager implements RemoteInputController.Callb
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onStartingToShow() {
|
public void onStartingToShow() {
|
||||||
@ -1019,7 +1378,7 @@ index ca9e61320fd..2097cbcf9fc 100644
|
|||||||
updateLockIcon();
|
updateLockIcon();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -164,7 +163,6 @@ public class StatusBarKeyguardViewManager implements RemoteInputController.Callb
|
@@ -163,7 +162,6 @@ public class StatusBarKeyguardViewManager implements RemoteInputController.Callb
|
||||||
protected boolean mLastShowing;
|
protected boolean mLastShowing;
|
||||||
protected boolean mLastOccluded;
|
protected boolean mLastOccluded;
|
||||||
private boolean mLastBouncerShowing;
|
private boolean mLastBouncerShowing;
|
||||||
@ -1027,7 +1386,7 @@ index ca9e61320fd..2097cbcf9fc 100644
|
|||||||
private boolean mLastBouncerDismissible;
|
private boolean mLastBouncerDismissible;
|
||||||
protected boolean mLastRemoteInputActive;
|
protected boolean mLastRemoteInputActive;
|
||||||
private boolean mLastDozing;
|
private boolean mLastDozing;
|
||||||
@@ -811,7 +809,6 @@ public class StatusBarKeyguardViewManager implements RemoteInputController.Callb
|
@@ -810,7 +808,6 @@ public class StatusBarKeyguardViewManager implements RemoteInputController.Callb
|
||||||
boolean showing = mShowing;
|
boolean showing = mShowing;
|
||||||
boolean occluded = mOccluded;
|
boolean occluded = mOccluded;
|
||||||
boolean bouncerShowing = mBouncer.isShowing();
|
boolean bouncerShowing = mBouncer.isShowing();
|
||||||
@ -1035,7 +1394,7 @@ index ca9e61320fd..2097cbcf9fc 100644
|
|||||||
boolean bouncerDismissible = !mBouncer.isFullscreenBouncer();
|
boolean bouncerDismissible = !mBouncer.isFullscreenBouncer();
|
||||||
boolean remoteInputActive = mRemoteInputActive;
|
boolean remoteInputActive = mRemoteInputActive;
|
||||||
|
|
||||||
@@ -840,11 +837,8 @@ public class StatusBarKeyguardViewManager implements RemoteInputController.Callb
|
@@ -839,11 +836,8 @@ public class StatusBarKeyguardViewManager implements RemoteInputController.Callb
|
||||||
if ((showing && !occluded) != (mLastShowing && !mLastOccluded) || mFirstUpdate) {
|
if ((showing && !occluded) != (mLastShowing && !mLastOccluded) || mFirstUpdate) {
|
||||||
mKeyguardUpdateManager.onKeyguardVisibilityChanged(showing && !occluded);
|
mKeyguardUpdateManager.onKeyguardVisibilityChanged(showing && !occluded);
|
||||||
}
|
}
|
||||||
@ -1049,7 +1408,7 @@ index ca9e61320fd..2097cbcf9fc 100644
|
|||||||
}
|
}
|
||||||
|
|
||||||
mFirstUpdate = false;
|
mFirstUpdate = false;
|
||||||
@@ -852,7 +846,6 @@ public class StatusBarKeyguardViewManager implements RemoteInputController.Callb
|
@@ -851,7 +845,6 @@ public class StatusBarKeyguardViewManager implements RemoteInputController.Callb
|
||||||
mLastGlobalActionsVisible = mGlobalActionsVisible;
|
mLastGlobalActionsVisible = mGlobalActionsVisible;
|
||||||
mLastOccluded = occluded;
|
mLastOccluded = occluded;
|
||||||
mLastBouncerShowing = bouncerShowing;
|
mLastBouncerShowing = bouncerShowing;
|
||||||
@ -1057,6 +1416,98 @@ index ca9e61320fd..2097cbcf9fc 100644
|
|||||||
mLastBouncerDismissible = bouncerDismissible;
|
mLastBouncerDismissible = bouncerDismissible;
|
||||||
mLastRemoteInputActive = remoteInputActive;
|
mLastRemoteInputActive = remoteInputActive;
|
||||||
mLastDozing = mDozing;
|
mLastDozing = mDozing;
|
||||||
|
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/dagger/StatusBarPhoneModule.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/dagger/StatusBarPhoneModule.java
|
||||||
|
index dfd4c6b5d46..8c0dd002eb0 100644
|
||||||
|
--- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/dagger/StatusBarPhoneModule.java
|
||||||
|
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/dagger/StatusBarPhoneModule.java
|
||||||
|
@@ -30,7 +30,6 @@ import com.android.keyguard.KeyguardUpdateMonitor;
|
||||||
|
import com.android.keyguard.ViewMediatorCallback;
|
||||||
|
import com.android.systemui.InitController;
|
||||||
|
import com.android.systemui.assist.AssistManager;
|
||||||
|
-import com.android.systemui.biometrics.FODCircleViewImpl;
|
||||||
|
import com.android.systemui.broadcast.BroadcastDispatcher;
|
||||||
|
import com.android.systemui.bubbles.BubbleController;
|
||||||
|
import com.android.systemui.colorextraction.SysuiColorExtractor;
|
||||||
|
@@ -201,8 +200,7 @@ public interface StatusBarPhoneModule {
|
||||||
|
Lazy<NotificationShadeDepthController> notificationShadeDepthController,
|
||||||
|
DismissCallbackRegistry dismissCallbackRegistry,
|
||||||
|
StatusBarTouchableRegionManager statusBarTouchableRegionManager,
|
||||||
|
- TunerService tunerService,
|
||||||
|
- FODCircleViewImpl fodCircleViewImpl) {
|
||||||
|
+ TunerService tunerService) {
|
||||||
|
return new StatusBar(
|
||||||
|
context,
|
||||||
|
notificationsController,
|
||||||
|
@@ -281,7 +279,6 @@ public interface StatusBarPhoneModule {
|
||||||
|
dismissCallbackRegistry,
|
||||||
|
notificationShadeDepthController,
|
||||||
|
statusBarTouchableRegionManager,
|
||||||
|
- tunerService,
|
||||||
|
- fodCircleViewImpl);
|
||||||
|
+ tunerService);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
diff --git a/packages/SystemUI/tests/src/com/android/systemui/statusbar/notification/ActivityLaunchAnimatorTest.java b/packages/SystemUI/tests/src/com/android/systemui/statusbar/notification/ActivityLaunchAnimatorTest.java
|
||||||
|
index 3e5454d84d0..2fa6cf02d8b 100644
|
||||||
|
--- a/packages/SystemUI/tests/src/com/android/systemui/statusbar/notification/ActivityLaunchAnimatorTest.java
|
||||||
|
+++ b/packages/SystemUI/tests/src/com/android/systemui/statusbar/notification/ActivityLaunchAnimatorTest.java
|
||||||
|
@@ -30,7 +30,6 @@ import android.view.RemoteAnimationAdapter;
|
||||||
|
import android.view.View;
|
||||||
|
|
||||||
|
import com.android.systemui.SysuiTestCase;
|
||||||
|
-import com.android.systemui.biometrics.FODCircleViewImpl;
|
||||||
|
import com.android.systemui.statusbar.NotificationShadeDepthController;
|
||||||
|
import com.android.systemui.statusbar.notification.row.ExpandableNotificationRow;
|
||||||
|
import com.android.systemui.statusbar.notification.stack.NotificationListContainer;
|
||||||
|
@@ -70,8 +69,6 @@ public class ActivityLaunchAnimatorTest extends SysuiTestCase {
|
||||||
|
private NotificationShadeDepthController mNotificationShadeDepthController;
|
||||||
|
@Mock
|
||||||
|
private NotificationPanelViewController mNotificationPanelViewController;
|
||||||
|
- @Mock
|
||||||
|
- private FODCircleViewImpl mFODCircleViewImpl;
|
||||||
|
@Rule
|
||||||
|
public MockitoRule rule = MockitoJUnit.rule();
|
||||||
|
|
||||||
|
@@ -87,8 +84,7 @@ public class ActivityLaunchAnimatorTest extends SysuiTestCase {
|
||||||
|
mNotificationPanelViewController,
|
||||||
|
mNotificationShadeDepthController,
|
||||||
|
mNotificationContainer,
|
||||||
|
- mExecutor,
|
||||||
|
- mFODCircleViewImpl);
|
||||||
|
+ mExecutor);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
diff --git a/packages/SystemUI/tests/src/com/android/systemui/statusbar/phone/StatusBarTest.java b/packages/SystemUI/tests/src/com/android/systemui/statusbar/phone/StatusBarTest.java
|
||||||
|
index c6dba6b8b80..474e9d7446f 100644
|
||||||
|
--- a/packages/SystemUI/tests/src/com/android/systemui/statusbar/phone/StatusBarTest.java
|
||||||
|
+++ b/packages/SystemUI/tests/src/com/android/systemui/statusbar/phone/StatusBarTest.java
|
||||||
|
@@ -79,7 +79,6 @@ import com.android.systemui.InitController;
|
||||||
|
import com.android.systemui.R;
|
||||||
|
import com.android.systemui.SysuiTestCase;
|
||||||
|
import com.android.systemui.assist.AssistManager;
|
||||||
|
-import com.android.systemui.biometrics.FODCircleViewImpl;
|
||||||
|
import com.android.systemui.broadcast.BroadcastDispatcher;
|
||||||
|
import com.android.systemui.bubbles.BubbleController;
|
||||||
|
import com.android.systemui.classifier.FalsingManagerFake;
|
||||||
|
@@ -241,7 +240,6 @@ public class StatusBarTest extends SysuiTestCase {
|
||||||
|
@Mock private DismissCallbackRegistry mDismissCallbackRegistry;
|
||||||
|
@Mock private StatusBarTouchableRegionManager mStatusBarTouchableRegionManager;
|
||||||
|
@Mock private TunerService mTunerService;
|
||||||
|
- @Mock private FODCircleViewImpl mFODCircleViewImpl;
|
||||||
|
@Mock private ScreenPinningRequest mScreenPinningRequest;
|
||||||
|
@Mock private LockscreenLockIconController mLockscreenLockIconController;
|
||||||
|
@Mock private StatusBarNotificationActivityStarter.Builder
|
||||||
|
@@ -409,8 +407,7 @@ public class StatusBarTest extends SysuiTestCase {
|
||||||
|
mDismissCallbackRegistry,
|
||||||
|
mNotificationShadeDepthControllerLazy,
|
||||||
|
mStatusBarTouchableRegionManager,
|
||||||
|
- mTunerService,
|
||||||
|
- mFODCircleViewImpl);
|
||||||
|
+ mTunerService);
|
||||||
|
|
||||||
|
when(mNotificationShadeWindowView.findViewById(R.id.lock_icon_container)).thenReturn(
|
||||||
|
mLockIconContainer);
|
||||||
diff --git a/services/core/Android.bp b/services/core/Android.bp
|
diff --git a/services/core/Android.bp b/services/core/Android.bp
|
||||||
index 2510f678381..30eea474c0e 100644
|
index 2510f678381..30eea474c0e 100644
|
||||||
--- a/services/core/Android.bp
|
--- a/services/core/Android.bp
|
||||||
|
@ -0,0 +1,448 @@
|
|||||||
|
From 69e5c49e18b9f33cebde3d54c69477ef2c18a756 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Vachounet <vachounet@live.fr>
|
||||||
|
Date: Tue, 24 Nov 2020 05:49:46 +0000
|
||||||
|
Subject: [PATCH] Trebuchet: Move clear all button to actions view
|
||||||
|
|
||||||
|
Change-Id: I9d13247501ca8e1610c17adc204ad64dd4a04cec
|
||||||
|
---
|
||||||
|
.../RecentsViewStateController.java | 3 -
|
||||||
|
.../FallbackRecentsStateController.java | 3 -
|
||||||
|
.../quickstep/views/ClearAllButton.java | 112 ------------------
|
||||||
|
.../android/quickstep/views/RecentsView.java | 52 ++------
|
||||||
|
.../res/drawable/ic_clear_all_recents.xml | 21 ++++
|
||||||
|
.../res/layout/overview_actions_container.xml | 17 ++-
|
||||||
|
.../res/layout/overview_clear_all_button.xml | 27 -----
|
||||||
|
7 files changed, 44 insertions(+), 191 deletions(-)
|
||||||
|
delete mode 100644 quickstep/recents_ui_overrides/src/com/android/quickstep/views/ClearAllButton.java
|
||||||
|
create mode 100644 quickstep/res/drawable/ic_clear_all_recents.xml
|
||||||
|
delete mode 100644 quickstep/res/layout/overview_clear_all_button.xml
|
||||||
|
|
||||||
|
diff --git a/quickstep/recents_ui_overrides/src/com/android/launcher3/uioverrides/RecentsViewStateController.java b/quickstep/recents_ui_overrides/src/com/android/launcher3/uioverrides/RecentsViewStateController.java
|
||||||
|
index 5ccc1e868..bc47c5a00 100644
|
||||||
|
--- a/quickstep/recents_ui_overrides/src/com/android/launcher3/uioverrides/RecentsViewStateController.java
|
||||||
|
+++ b/quickstep/recents_ui_overrides/src/com/android/launcher3/uioverrides/RecentsViewStateController.java
|
||||||
|
@@ -35,7 +35,6 @@ import com.android.launcher3.anim.PendingAnimation;
|
||||||
|
import com.android.launcher3.anim.PropertySetter;
|
||||||
|
import com.android.launcher3.states.StateAnimationConfig;
|
||||||
|
import com.android.launcher3.util.MultiValueAlpha;
|
||||||
|
-import com.android.quickstep.views.ClearAllButton;
|
||||||
|
import com.android.quickstep.views.LauncherRecentsView;
|
||||||
|
import com.android.quickstep.views.RecentsView;
|
||||||
|
|
||||||
|
@@ -84,8 +83,6 @@ public final class RecentsViewStateController extends
|
||||||
|
private void setAlphas(PropertySetter propertySetter, StateAnimationConfig config,
|
||||||
|
LauncherState state) {
|
||||||
|
float buttonAlpha = (state.getVisibleElements(mLauncher) & OVERVIEW_BUTTONS) != 0 ? 1 : 0;
|
||||||
|
- propertySetter.setFloat(mRecentsView.getClearAllButton(), ClearAllButton.VISIBILITY_ALPHA,
|
||||||
|
- buttonAlpha, LINEAR);
|
||||||
|
propertySetter.setFloat(mLauncher.getActionsView().getVisibilityAlpha(),
|
||||||
|
MultiValueAlpha.VALUE, buttonAlpha, config.getInterpolator(
|
||||||
|
ANIM_OVERVIEW_ACTIONS_FADE, LINEAR));
|
||||||
|
diff --git a/quickstep/recents_ui_overrides/src/com/android/quickstep/fallback/FallbackRecentsStateController.java b/quickstep/recents_ui_overrides/src/com/android/quickstep/fallback/FallbackRecentsStateController.java
|
||||||
|
index 24a761066..7af77ef60 100644
|
||||||
|
--- a/quickstep/recents_ui_overrides/src/com/android/quickstep/fallback/FallbackRecentsStateController.java
|
||||||
|
+++ b/quickstep/recents_ui_overrides/src/com/android/quickstep/fallback/FallbackRecentsStateController.java
|
||||||
|
@@ -35,7 +35,6 @@ import com.android.launcher3.statemanager.StateManager.StateHandler;
|
||||||
|
import com.android.launcher3.states.StateAnimationConfig;
|
||||||
|
import com.android.launcher3.util.MultiValueAlpha;
|
||||||
|
import com.android.quickstep.RecentsActivity;
|
||||||
|
-import com.android.quickstep.views.ClearAllButton;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* State controller for fallback recents activity
|
||||||
|
@@ -78,8 +77,6 @@ public class FallbackRecentsStateController implements StateHandler<RecentsState
|
||||||
|
private void setProperties(RecentsState state, StateAnimationConfig config,
|
||||||
|
PropertySetter setter) {
|
||||||
|
float buttonAlpha = state.hasButtons() ? 1 : 0;
|
||||||
|
- setter.setFloat(mRecentsView.getClearAllButton(), ClearAllButton.VISIBILITY_ALPHA,
|
||||||
|
- buttonAlpha, LINEAR);
|
||||||
|
setter.setFloat(mActivity.getActionsView().getVisibilityAlpha(),
|
||||||
|
MultiValueAlpha.VALUE, buttonAlpha, LINEAR);
|
||||||
|
|
||||||
|
diff --git a/quickstep/recents_ui_overrides/src/com/android/quickstep/views/ClearAllButton.java b/quickstep/recents_ui_overrides/src/com/android/quickstep/views/ClearAllButton.java
|
||||||
|
deleted file mode 100644
|
||||||
|
index fd74357f3..000000000
|
||||||
|
--- a/quickstep/recents_ui_overrides/src/com/android/quickstep/views/ClearAllButton.java
|
||||||
|
+++ /dev/null
|
||||||
|
@@ -1,112 +0,0 @@
|
||||||
|
-/*
|
||||||
|
- * Copyright (C) 2018 The Android Open Source 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.
|
||||||
|
- */
|
||||||
|
-
|
||||||
|
-package com.android.quickstep.views;
|
||||||
|
-
|
||||||
|
-import android.content.Context;
|
||||||
|
-import android.util.AttributeSet;
|
||||||
|
-import android.util.FloatProperty;
|
||||||
|
-import android.widget.Button;
|
||||||
|
-
|
||||||
|
-import com.android.launcher3.touch.PagedOrientationHandler;
|
||||||
|
-import com.android.quickstep.views.RecentsView.PageCallbacks;
|
||||||
|
-import com.android.quickstep.views.RecentsView.ScrollState;
|
||||||
|
-
|
||||||
|
-public class ClearAllButton extends Button implements PageCallbacks {
|
||||||
|
-
|
||||||
|
- public static final FloatProperty<ClearAllButton> VISIBILITY_ALPHA =
|
||||||
|
- new FloatProperty<ClearAllButton>("visibilityAlpha") {
|
||||||
|
- @Override
|
||||||
|
- public Float get(ClearAllButton view) {
|
||||||
|
- return view.mVisibilityAlpha;
|
||||||
|
- }
|
||||||
|
-
|
||||||
|
- @Override
|
||||||
|
- public void setValue(ClearAllButton view, float v) {
|
||||||
|
- view.setVisibilityAlpha(v);
|
||||||
|
- }
|
||||||
|
- };
|
||||||
|
-
|
||||||
|
- private float mScrollAlpha = 1;
|
||||||
|
- private float mContentAlpha = 1;
|
||||||
|
- private float mVisibilityAlpha = 1;
|
||||||
|
-
|
||||||
|
- private boolean mIsRtl;
|
||||||
|
-
|
||||||
|
- private int mScrollOffset;
|
||||||
|
-
|
||||||
|
- public ClearAllButton(Context context, AttributeSet attrs) {
|
||||||
|
- super(context, attrs);
|
||||||
|
- mIsRtl = getLayoutDirection() == LAYOUT_DIRECTION_RTL;
|
||||||
|
- }
|
||||||
|
-
|
||||||
|
- @Override
|
||||||
|
- protected void onLayout(boolean changed, int left, int top, int right, int bottom) {
|
||||||
|
- super.onLayout(changed, left, top, right, bottom);
|
||||||
|
- PagedOrientationHandler orientationHandler = getRecentsView().getPagedOrientationHandler();
|
||||||
|
- mScrollOffset = orientationHandler.getClearAllScrollOffset(getRecentsView(), mIsRtl);
|
||||||
|
- }
|
||||||
|
-
|
||||||
|
- private RecentsView getRecentsView() {
|
||||||
|
- return (RecentsView) getParent();
|
||||||
|
- }
|
||||||
|
-
|
||||||
|
- @Override
|
||||||
|
- public void onRtlPropertiesChanged(int layoutDirection) {
|
||||||
|
- super.onRtlPropertiesChanged(layoutDirection);
|
||||||
|
- mIsRtl = getLayoutDirection() == LAYOUT_DIRECTION_RTL;
|
||||||
|
- }
|
||||||
|
-
|
||||||
|
- @Override
|
||||||
|
- public boolean hasOverlappingRendering() {
|
||||||
|
- return false;
|
||||||
|
- }
|
||||||
|
-
|
||||||
|
- public void setContentAlpha(float alpha) {
|
||||||
|
- if (mContentAlpha != alpha) {
|
||||||
|
- mContentAlpha = alpha;
|
||||||
|
- updateAlpha();
|
||||||
|
- }
|
||||||
|
- }
|
||||||
|
-
|
||||||
|
- public void setVisibilityAlpha(float alpha) {
|
||||||
|
- if (mVisibilityAlpha != alpha) {
|
||||||
|
- mVisibilityAlpha = alpha;
|
||||||
|
- updateAlpha();
|
||||||
|
- }
|
||||||
|
- }
|
||||||
|
-
|
||||||
|
- @Override
|
||||||
|
- public void onPageScroll(ScrollState scrollState) {
|
||||||
|
- PagedOrientationHandler orientationHandler = getRecentsView().getPagedOrientationHandler();
|
||||||
|
- float orientationSize = orientationHandler.getPrimaryValue(getWidth(), getHeight());
|
||||||
|
- if (orientationSize == 0) {
|
||||||
|
- return;
|
||||||
|
- }
|
||||||
|
-
|
||||||
|
- float shift = Math.min(scrollState.scrollFromEdge, orientationSize);
|
||||||
|
- float translation = mIsRtl ? (mScrollOffset - shift) : (mScrollOffset + shift);
|
||||||
|
- orientationHandler.setPrimaryAndResetSecondaryTranslate(this, translation);
|
||||||
|
- mScrollAlpha = 1 - shift / orientationSize;
|
||||||
|
- updateAlpha();
|
||||||
|
- }
|
||||||
|
-
|
||||||
|
- private void updateAlpha() {
|
||||||
|
- final float alpha = mScrollAlpha * mContentAlpha * mVisibilityAlpha;
|
||||||
|
- setAlpha(alpha);
|
||||||
|
- setClickable(alpha == 1);
|
||||||
|
- }
|
||||||
|
-}
|
||||||
|
diff --git a/quickstep/recents_ui_overrides/src/com/android/quickstep/views/RecentsView.java b/quickstep/recents_ui_overrides/src/com/android/quickstep/views/RecentsView.java
|
||||||
|
index 0130cae47..bfdd79e5f 100644
|
||||||
|
--- a/quickstep/recents_ui_overrides/src/com/android/quickstep/views/RecentsView.java
|
||||||
|
+++ b/quickstep/recents_ui_overrides/src/com/android/quickstep/views/RecentsView.java
|
||||||
|
@@ -85,6 +85,7 @@ import android.view.ViewGroup;
|
||||||
|
import android.view.accessibility.AccessibilityEvent;
|
||||||
|
import android.view.accessibility.AccessibilityNodeInfo;
|
||||||
|
import android.view.animation.Interpolator;
|
||||||
|
+import android.widget.Button;
|
||||||
|
import android.widget.ListView;
|
||||||
|
|
||||||
|
import androidx.annotation.Nullable;
|
||||||
|
@@ -268,8 +269,7 @@ public abstract class RecentsView<T extends StatefulActivity> extends PagedView
|
||||||
|
private final float mFastFlingVelocity;
|
||||||
|
private final RecentsModel mModel;
|
||||||
|
private final int mTaskTopMargin;
|
||||||
|
- private final ClearAllButton mClearAllButton;
|
||||||
|
- private final Rect mClearAllButtonDeadZoneRect = new Rect();
|
||||||
|
+ private Button mClearAllButton;
|
||||||
|
private final Rect mTaskViewDeadZoneRect = new Rect();
|
||||||
|
|
||||||
|
private final ScrollState mScrollState = new ScrollState();
|
||||||
|
@@ -442,9 +442,6 @@ public abstract class RecentsView<T extends StatefulActivity> extends PagedView
|
||||||
|
mModel = RecentsModel.INSTANCE.get(context);
|
||||||
|
mIdp = InvariantDeviceProfile.INSTANCE.get(context);
|
||||||
|
|
||||||
|
- mClearAllButton = (ClearAllButton) LayoutInflater.from(context)
|
||||||
|
- .inflate(R.layout.overview_clear_all_button, this, false);
|
||||||
|
- mClearAllButton.setOnClickListener(this::dismissAllTasks);
|
||||||
|
mTaskViewPool = new ViewPool<>(context, this, R.layout.task, 20 /* max size */,
|
||||||
|
10 /* initial size */);
|
||||||
|
|
||||||
|
@@ -550,6 +547,8 @@ public abstract class RecentsView<T extends StatefulActivity> extends PagedView
|
||||||
|
public void init(OverviewActionsView actionsView) {
|
||||||
|
mActionsView = actionsView;
|
||||||
|
mActionsView.updateHiddenFlags(HIDDEN_NO_TASKS, getTaskViewCount() == 0);
|
||||||
|
+ mClearAllButton = (Button) mActionsView.findViewById(R.id.clear_all);
|
||||||
|
+ mClearAllButton.setOnClickListener(this::dismissAllTasks);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
@@ -620,7 +619,7 @@ public abstract class RecentsView<T extends StatefulActivity> extends PagedView
|
||||||
|
}
|
||||||
|
|
||||||
|
private void updateTaskStartIndex(View affectingView) {
|
||||||
|
- if (!(affectingView instanceof TaskView) && !(affectingView instanceof ClearAllButton)) {
|
||||||
|
+ if (!(affectingView instanceof TaskView)) {
|
||||||
|
int childCount = getChildCount();
|
||||||
|
|
||||||
|
mTaskViewStartIndex = 0;
|
||||||
|
@@ -674,7 +673,7 @@ public abstract class RecentsView<T extends StatefulActivity> extends PagedView
|
||||||
|
* button fully visible, center page is Clear All button.
|
||||||
|
*/
|
||||||
|
public boolean isClearAllHidden() {
|
||||||
|
- return mClearAllButton.getAlpha() != 1f;
|
||||||
|
+ return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
@@ -732,11 +731,8 @@ public abstract class RecentsView<T extends StatefulActivity> extends PagedView
|
||||||
|
mTouchDownToStartHome = true;
|
||||||
|
} else {
|
||||||
|
updateDeadZoneRects();
|
||||||
|
- final boolean clearAllButtonDeadZoneConsumed =
|
||||||
|
- mClearAllButton.getAlpha() == 1
|
||||||
|
- && mClearAllButtonDeadZoneRect.contains(x, y);
|
||||||
|
final boolean cameFromNavBar = (ev.getEdgeFlags() & EDGE_NAV_BAR) != 0;
|
||||||
|
- if (!clearAllButtonDeadZoneConsumed && !cameFromNavBar
|
||||||
|
+ if (!cameFromNavBar
|
||||||
|
&& !mTaskViewDeadZoneRect.contains(x + getScrollX(), y)) {
|
||||||
|
mTouchDownToStartHome = true;
|
||||||
|
}
|
||||||
|
@@ -783,18 +779,12 @@ public abstract class RecentsView<T extends StatefulActivity> extends PagedView
|
||||||
|
|
||||||
|
final int requiredTaskCount = tasks.size();
|
||||||
|
if (getTaskViewCount() != requiredTaskCount) {
|
||||||
|
- if (indexOfChild(mClearAllButton) != -1) {
|
||||||
|
- removeView(mClearAllButton);
|
||||||
|
- }
|
||||||
|
for (int i = getTaskViewCount(); i < requiredTaskCount; i++) {
|
||||||
|
addView(mTaskViewPool.getView());
|
||||||
|
}
|
||||||
|
while (getTaskViewCount() > requiredTaskCount) {
|
||||||
|
removeView(getChildAt(getChildCount() - 1));
|
||||||
|
}
|
||||||
|
- if (requiredTaskCount > 0) {
|
||||||
|
- addView(mClearAllButton);
|
||||||
|
- }
|
||||||
|
}
|
||||||
|
|
||||||
|
// Rebind and reset all task views
|
||||||
|
@@ -834,16 +824,10 @@ public abstract class RecentsView<T extends StatefulActivity> extends PagedView
|
||||||
|
for (int i = getTaskViewCount() - 1; i >= 0; i--) {
|
||||||
|
removeView(getTaskViewAt(i));
|
||||||
|
}
|
||||||
|
- if (indexOfChild(mClearAllButton) != -1) {
|
||||||
|
- removeView(mClearAllButton);
|
||||||
|
- }
|
||||||
|
}
|
||||||
|
|
||||||
|
public int getTaskViewCount() {
|
||||||
|
int taskViewCount = getChildCount() - mTaskViewStartIndex;
|
||||||
|
- if (indexOfChild(mClearAllButton) != -1) {
|
||||||
|
- taskViewCount--;
|
||||||
|
- }
|
||||||
|
return taskViewCount;
|
||||||
|
}
|
||||||
|
|
||||||
|
@@ -1199,9 +1183,6 @@ public abstract class RecentsView<T extends StatefulActivity> extends PagedView
|
||||||
|
// Add an empty view for now until the task plan is loaded and applied
|
||||||
|
final TaskView taskView = mTaskViewPool.getView();
|
||||||
|
addView(taskView, mTaskViewStartIndex);
|
||||||
|
- if (wasEmpty) {
|
||||||
|
- addView(mClearAllButton);
|
||||||
|
- }
|
||||||
|
// The temporary running task is only used for the duration between the start of the
|
||||||
|
// gesture and the task list is loaded and applied
|
||||||
|
mTmpRunningTask = Task.from(new TaskKey(runningTaskInfo), runningTaskInfo, false);
|
||||||
|
@@ -1538,7 +1519,6 @@ public abstract class RecentsView<T extends StatefulActivity> extends PagedView
|
||||||
|
removeViewInLayout(taskView);
|
||||||
|
|
||||||
|
if (getTaskViewCount() == 0) {
|
||||||
|
- removeViewInLayout(mClearAllButton);
|
||||||
|
startHome();
|
||||||
|
} else {
|
||||||
|
snapToPageImmediately(pageToSnapTo);
|
||||||
|
@@ -1677,7 +1657,6 @@ public abstract class RecentsView<T extends StatefulActivity> extends PagedView
|
||||||
|
child.setStableAlpha(alpha);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
- mClearAllButton.setContentAlpha(mContentAlpha);
|
||||||
|
int alphaInt = Math.round(alpha * 255);
|
||||||
|
mEmptyMessagePaint.setAlpha(alphaInt);
|
||||||
|
mEmptyIcon.setAlpha(alphaInt);
|
||||||
|
@@ -1740,10 +1719,6 @@ public abstract class RecentsView<T extends StatefulActivity> extends PagedView
|
||||||
|
setLayoutDirection(mIsRtl
|
||||||
|
? View.LAYOUT_DIRECTION_RTL
|
||||||
|
: View.LAYOUT_DIRECTION_LTR);
|
||||||
|
- mClearAllButton.setLayoutDirection(mIsRtl
|
||||||
|
- ? View.LAYOUT_DIRECTION_LTR
|
||||||
|
- : View.LAYOUT_DIRECTION_RTL);
|
||||||
|
- mClearAllButton.setRotation(mOrientationHandler.getDegreesRotated());
|
||||||
|
mActivity.getDragLayer().recreateControllers();
|
||||||
|
boolean isInLandscape = mOrientationState.getTouchRotation() != ROTATION_0
|
||||||
|
|| mOrientationState.getRecentsActivityRotation() != ROTATION_0;
|
||||||
|
@@ -1963,15 +1938,6 @@ public abstract class RecentsView<T extends StatefulActivity> extends PagedView
|
||||||
|
}
|
||||||
|
|
||||||
|
private void updateDeadZoneRects() {
|
||||||
|
- // Get the deadzone rect surrounding the clear all button to not dismiss overview to home
|
||||||
|
- mClearAllButtonDeadZoneRect.setEmpty();
|
||||||
|
- if (mClearAllButton.getWidth() > 0) {
|
||||||
|
- int verticalMargin = getResources()
|
||||||
|
- .getDimensionPixelSize(R.dimen.recents_clear_all_deadzone_vertical_margin);
|
||||||
|
- mClearAllButton.getHitRect(mClearAllButtonDeadZoneRect);
|
||||||
|
- mClearAllButtonDeadZoneRect.inset(-getPaddingRight() / 2, -verticalMargin);
|
||||||
|
- }
|
||||||
|
-
|
||||||
|
// Get the deadzone rect between the task views
|
||||||
|
mTaskViewDeadZoneRect.setEmpty();
|
||||||
|
int count = getTaskViewCount();
|
||||||
|
@@ -2304,10 +2270,6 @@ public abstract class RecentsView<T extends StatefulActivity> extends PagedView
|
||||||
|
return super.computeMaxScroll();
|
||||||
|
}
|
||||||
|
|
||||||
|
- public ClearAllButton getClearAllButton() {
|
||||||
|
- return mClearAllButton;
|
||||||
|
- }
|
||||||
|
-
|
||||||
|
@Override
|
||||||
|
protected boolean onOverscroll(int amount) {
|
||||||
|
// overscroll should only be accepted on -1 direction (for clear all button)
|
||||||
|
diff --git a/quickstep/res/drawable/ic_clear_all_recents.xml b/quickstep/res/drawable/ic_clear_all_recents.xml
|
||||||
|
new file mode 100644
|
||||||
|
index 000000000..7cba0220b
|
||||||
|
--- /dev/null
|
||||||
|
+++ b/quickstep/res/drawable/ic_clear_all_recents.xml
|
||||||
|
@@ -0,0 +1,21 @@
|
||||||
|
+<!-- Copyright (C) 2020 The Android Open Source 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.
|
||||||
|
+-->
|
||||||
|
+<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
+ android:height="24dp"
|
||||||
|
+ android:width="24dp"
|
||||||
|
+ android:viewportWidth="24"
|
||||||
|
+ android:viewportHeight="24">
|
||||||
|
+ <path android:fillColor="#FF000000" android:pathData="M5,13H19V11H5M3,17H17V15H3M7,7V9H21V7" />
|
||||||
|
+</vector>
|
||||||
|
diff --git a/quickstep/res/layout/overview_actions_container.xml b/quickstep/res/layout/overview_actions_container.xml
|
||||||
|
index 258f24a54..302cabf8a 100644
|
||||||
|
--- a/quickstep/res/layout/overview_actions_container.xml
|
||||||
|
+++ b/quickstep/res/layout/overview_actions_container.xml
|
||||||
|
@@ -45,6 +45,21 @@
|
||||||
|
android:layout_height="1dp"
|
||||||
|
android:layout_weight="1" />
|
||||||
|
|
||||||
|
+ <Button
|
||||||
|
+ style="@style/OverviewActionButton"
|
||||||
|
+ android:id="@+id/clear_all"
|
||||||
|
+ android:layout_width="wrap_content"
|
||||||
|
+ android:layout_height="wrap_content"
|
||||||
|
+ android:text="@string/recents_clear_all"
|
||||||
|
+ android:theme="@style/ThemeControlHighlightWorkspaceColor"
|
||||||
|
+ android:drawableStart="@drawable/ic_clear_all_recents"
|
||||||
|
+ />
|
||||||
|
+
|
||||||
|
+ <Space
|
||||||
|
+ android:layout_width="0dp"
|
||||||
|
+ android:layout_height="1dp"
|
||||||
|
+ android:layout_weight="1" />
|
||||||
|
+
|
||||||
|
<Button
|
||||||
|
android:id="@+id/action_share"
|
||||||
|
style="@style/OverviewActionButton"
|
||||||
|
@@ -63,4 +78,4 @@
|
||||||
|
android:visibility="gone" />
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
-</com.android.quickstep.views.OverviewActionsView>
|
||||||
|
\ No newline at end of file
|
||||||
|
+</com.android.quickstep.views.OverviewActionsView>
|
||||||
|
diff --git a/quickstep/res/layout/overview_clear_all_button.xml b/quickstep/res/layout/overview_clear_all_button.xml
|
||||||
|
deleted file mode 100644
|
||||||
|
index fc06ba057..000000000
|
||||||
|
--- a/quickstep/res/layout/overview_clear_all_button.xml
|
||||||
|
+++ /dev/null
|
||||||
|
@@ -1,27 +0,0 @@
|
||||||
|
-<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
-<!--
|
||||||
|
- Copyright (C) 2018 The Android Open Source 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.
|
||||||
|
--->
|
||||||
|
-<com.android.quickstep.views.ClearAllButton
|
||||||
|
- xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
- style="@android:style/Widget.DeviceDefault.Button.Borderless"
|
||||||
|
- android:id="@+id/clear_all"
|
||||||
|
- android:layout_width="wrap_content"
|
||||||
|
- android:layout_height="wrap_content"
|
||||||
|
- android:text="@string/recents_clear_all"
|
||||||
|
- android:textColor="?attr/workspaceTextColor"
|
||||||
|
- android:textSize="14sp"
|
||||||
|
- android:translationY="@dimen/task_thumbnail_half_top_margin"
|
||||||
|
- />
|
||||||
|
\ No newline at end of file
|
||||||
|
--
|
||||||
|
2.25.1
|
||||||
|
|
Loading…
x
Reference in New Issue
Block a user