diff options
| author | 2022-12-23 14:45:42 +0000 | |
|---|---|---|
| committer | 2023-01-05 08:02:45 +0000 | |
| commit | b658e2dff0a7a4c941061b2ed52db933e7c38fd5 (patch) | |
| tree | 664d8a87725a7d6ad22ba14671ea021d68c130e2 | |
| parent | 75117f499cfc15fcf5650ea88304c04d7dbc7b0e (diff) | |
Nfc: Replace use of android.view.Window->isDestroyed()
The code was testing to know if an Activity is destroyed,
directly use Activity->isDestroyed() to this purpose.
Bug: 244264995
Test: m
Change-Id: Ia3845819f65214367648f35c8e1ad685f2e00c85
| -rw-r--r-- | core/java/android/nfc/NfcActivityManager.java | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/core/java/android/nfc/NfcActivityManager.java b/core/java/android/nfc/NfcActivityManager.java index 935374d15d9b..911aaf317e3e 100644 --- a/core/java/android/nfc/NfcActivityManager.java +++ b/core/java/android/nfc/NfcActivityManager.java @@ -122,7 +122,7 @@ public final class NfcActivityManager extends IAppCallback.Stub Binder token; public NfcActivityState(Activity activity) { - if (activity.getWindow().isDestroyed()) { + if (activity.isDestroyed()) { throw new IllegalStateException("activity is already destroyed"); } // Check if activity is resumed right now, as we will not |