Skip to content

Commit

Permalink
fix app crash on android 14 - fix #1301
Browse files Browse the repository at this point in the history
Signed-off-by: David Luhmer <[email protected]>
  • Loading branch information
David-Development committed Oct 28, 2023
1 parent 6c8b2bc commit 9d0b747
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
import android.widget.Toast;

import androidx.core.app.ActivityCompat;
import androidx.core.content.ContextCompat;
import androidx.core.content.PermissionChecker;
import androidx.fragment.app.DialogFragment;

Expand Down Expand Up @@ -483,7 +484,7 @@ public void onReceive(Context context, Intent intent) {
}
};
IntentFilter intentFilter = new IntentFilter(DownloadManager.ACTION_DOWNLOAD_COMPLETE);
requireActivity().registerReceiver(downloadCompleteReceiver, intentFilter);
ContextCompat.registerReceiver(requireActivity(), downloadCompleteReceiver, intentFilter, ContextCompat.RECEIVER_NOT_EXPORTED);
}

public boolean isExternalStorageWritable() {
Expand Down

0 comments on commit 9d0b747

Please sign in to comment.