ClashMetaForAndroid icon indicating copy to clipboard operation
ClashMetaForAndroid copied to clipboard

fix broadcast receiver not registered when application started with no ui, e.g. from settings tile or external control

Open yqx1110 opened this issue 5 months ago • 1 comments

fixes #421

The broadcast receiver should not be unregistered when the App becomes invisible since it still needs to listen to Intents.ACTION_CLASH_STARTED Intents.ACTION_CLASH_STOPPED to correctly update clashRunning state. However, Broadcasts.registered was never updated to true so the unregister function never acctually took effect.

The problem is that when the App is started without ui, it never became visible, so the Broadcast receiever wasn't registered at all.

yqx1110 avatar Aug 21 '25 04:08 yqx1110