Skip to content

Commit 5b4a579

Browse files
Martijn CoenenAndroid (Google) Code Review
authored andcommitted
Merge "Make sure initial activity state is correct."
2 parents 1c35d11 + 20fe537 commit 5b4a579

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)