summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Lily Zhou <lilymzhou@google.com> 2024-09-27 17:13:31 +0000
committer Lily Zhou <lilymzhou@google.com> 2024-09-27 17:22:06 +0000
commit810779d8545fb14a38337a402e4e651801fe05e6 (patch)
tree6ab0fca7bb79c4bb8fc42de9dc63ad0c2e4bca8c
parent63108dfb0b66d88be54bd86d2e98984a9ab2141c (diff)
Handles DeadObjectExceptions in WalletContextualLocationsService.
Flag: EXEMPT bugfix Bug: 315309572 Change-Id: Ic745d24313c75447c5bbfc69f24a030e8505dbd8
-rw-r--r--packages/SystemUI/src/com/android/systemui/wallet/controller/WalletContextualLocationsService.kt13
1 files changed, 11 insertions, 2 deletions
diff --git a/packages/SystemUI/src/com/android/systemui/wallet/controller/WalletContextualLocationsService.kt b/packages/SystemUI/src/com/android/systemui/wallet/controller/WalletContextualLocationsService.kt
index 3c50c7b4a212..09b1f45f179b 100644
--- a/packages/SystemUI/src/com/android/systemui/wallet/controller/WalletContextualLocationsService.kt
+++ b/packages/SystemUI/src/com/android/systemui/wallet/controller/WalletContextualLocationsService.kt
@@ -1,6 +1,7 @@
package com.android.systemui.wallet.controller
import android.content.Intent
+import android.os.DeadObjectException
import android.os.IBinder
import android.util.Log
import androidx.annotation.VisibleForTesting
@@ -47,7 +48,11 @@ constructor(
controller.allWalletCards.collect { cards ->
val cardsSize = cards.size
Log.i(TAG, "Number of cards registered $cardsSize")
- listener?.registerNewWalletCards(cards)
+ try {
+ listener?.registerNewWalletCards(cards)
+ } catch (e: DeadObjectException) {
+ Log.e(TAG, "Failed to register wallet cards because IWalletCardsUpdatedListener is dead")
+ }
}
}
} else {
@@ -55,7 +60,11 @@ constructor(
controller.allWalletCards.collect { cards ->
val cardsSize = cards.size
Log.i(TAG, "Number of cards registered $cardsSize")
- listener?.registerNewWalletCards(cards)
+ try {
+ listener?.registerNewWalletCards(cards)
+ } catch (e: DeadObjectException) {
+ Log.e(TAG, "Failed to register wallet cards because IWalletCardsUpdatedListener is dead")
+ }
}
}
}