From 63c3a28a306711b5c6773e45b3d9bd85dc39d234 Mon Sep 17 00:00:00 2001 From: Josh Tsuji Date: Mon, 13 Jun 2022 15:02:09 -0400 Subject: [PATCH] Remove linkToDeath from KeyguardUnlockAnimationController. This results in leaking the NexusLauncherActivity, and should not be necessary as we check for DeadObjectExceptions already. Fixes: 221892011 Test: kill sysui/launcher in different orders, things still work fine Change-Id: I8c86d37db602003f272b701f8d03724f21a7a930 --- .../systemui/keyguard/KeyguardUnlockAnimationController.kt | 7 ------- 1 file changed, 7 deletions(-) diff --git a/packages/SystemUI/src/com/android/systemui/keyguard/KeyguardUnlockAnimationController.kt b/packages/SystemUI/src/com/android/systemui/keyguard/KeyguardUnlockAnimationController.kt index d634030337230..c686b48278a39 100644 --- a/packages/SystemUI/src/com/android/systemui/keyguard/KeyguardUnlockAnimationController.kt +++ b/packages/SystemUI/src/com/android/systemui/keyguard/KeyguardUnlockAnimationController.kt @@ -216,13 +216,6 @@ class KeyguardUnlockAnimationController @Inject constructor( */ override fun setLauncherUnlockController(callback: ILauncherUnlockAnimationController?) { launcherUnlockController = callback - - // If the provided callback dies, set it to null. We'll always check whether it's null - // to avoid DeadObjectExceptions. - callback?.asBinder()?.linkToDeath({ - launcherUnlockController = null - launcherSmartspaceState = null - }, 0 /* flags */) } /**