OpenDelta: Do not leak service connection

We bind using the old API so we should also unbind.
bind onCreate so symmetricly unbind onDestroy
This commit is contained in:
Ido Ben-Hur 2022-10-20 13:20:09 +03:00
parent a8f06d50a9
commit 03147665ce
No known key found for this signature in database
GPG Key ID: 0B827201D8C20BFE
1 changed files with 6 additions and 0 deletions

View File

@ -751,6 +751,12 @@ public class MainActivity extends Activity {
}
}
@Override
public void onDestroy() {
unbindService(mConnection);
super.onDestroy();
}
private boolean isExternalStorageDocument(Uri uri) {
return "com.android.externalstorage.documents".equals(uri.getAuthority());
}