Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 2ec83936 authored by Martijn Coenen's avatar Martijn Coenen
Browse files

Remove NfcFragment from activity when no longer sharing.

This fixes scenarios where the same activity sets, unsets
and re-sets an NdefMessage and/or callback.

Bug: 5454848
Change-Id: I5ed98047b9cfe90d2f48656d978f2d08bb4bf0cc
parent 9ad680ca
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -162,6 +162,7 @@ public final class NfcActivityManager extends INdefPushCallback.Stub {
    synchronized void maybeRemoveState(Activity activity, NfcActivityState state) {
        if (state.ndefMessage == null && state.ndefMessageCallback == null &&
                state.onNdefPushCompleteCallback == null) {
            NfcFragment.remove(activity);
            mNfcState.remove(activity);
        }
    }