Merge pull request #126 from lady-technologies/97-fix-kill-app

fix upload not aborted on service destroy
This commit is contained in:
Aleksander Nowakowski 2018-09-26 09:15:51 +02:00 committed by GitHub
commit e9254224be
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
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);