The MultiSelectable interface defines one method to be invoked instead of Applet.deselect()
when the applet being deselected, or any other applet in its package, is already selected on another logical channel:
public void MultiSelectable.deselect(boolean appInstStillSelected)
The MultiSelectable.deselect(boolean)
method informs the applet instance if it is being deselected on the logical channel while the same applet instance or another applet in the same package is still active on another channel on any interface. The parameter appInstStillSelected
is true
if the applet remains active on a different channel. It is false
if it is not active on another channel, indicating that this is the last remaining active instance of the applet.
This method can be called as the result of a MANAGE CHANNEL CLOSE
or a SELECT FILE
APDU command. If the applet remains active on a different channel, the appInstStillSelected
parameter is passed as true
.
If the MultiSelectable.deselect(boolean)
method is called, it means that either an instance of this applet or another applet from the same package remains active on another channel, so CLEAR_ON_DESELECT
transients are not cleared.
Only when the last applet instance from the entire package is deselected does a call to Applet.deselect()
occur, resulting in the erasure of CLEAR_ON_DESELECT
transients.