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
This commit is contained in:
Henri Chataing
2022-12-23 14:45:42 +00:00
parent 75117f499c
commit b658e2dff0

View File

@@ -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