fix upload not aborted on service destroy

This commit is contained in:
Jakub Hrabec 2018-09-26 14:38:27 +08:00
parent 5cac2ce0e6
commit baea766d5e
No known key found for this signature in database
GPG Key ID: BD51B6B9E4B2D430
1 changed files with 3 additions and 0 deletions

View File

@ -890,6 +890,9 @@ public abstract class DfuBaseService extends IntentService implements DfuProgres
public void onDestroy() {
super.onDestroy();
if (mDfuServiceImpl != null)
mDfuServiceImpl.abort();
final LocalBroadcastManager manager = LocalBroadcastManager.getInstance(this);
manager.unregisterReceiver(mDfuActionReceiver);