Skip to content

Commit 20fe537

Browse files
author
Martijn Coenen
committed
Make sure initial activity state is correct.
Change-Id: Ic6199b42e59afa06a0f38f866e2924b84cd234b3
1 parent 1d7e906 commit 20fe537

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

core/java/android/nfc/NfcActivityManager.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -114,6 +114,10 @@ public NfcActivityState(Activity activity) {
114114
if (activity.getWindow().isDestroyed()) {
115115
throw new IllegalStateException("activity is already destroyed");
116116
}
117+
// Check if activity is resumed right now, as we will not
118+
// immediately get a callback for that.
119+
resumed = activity.isResumed();
120+
117121
this.activity = activity;
118122
registerApplication(activity.getApplication());
119123
}

0 commit comments

Comments
 (0)