Snackbar on OOM

pull/174/head
M66B 5 years ago
parent a0588d616f
commit 4214bc81f5

@ -1899,6 +1899,9 @@ public class AdapterMessage extends RecyclerView.Adapter<AdapterMessage.ViewHold
@Override @Override
protected void onException(Bundle args, Throwable ex) { protected void onException(Bundle args, Throwable ex) {
if (ex instanceof OutOfMemoryError)
Snackbar.make(parentFragment.getView(), ex.getMessage(), Snackbar.LENGTH_LONG).show();
else
Log.unexpectedError(parentFragment.getParentFragmentManager(), ex); Log.unexpectedError(parentFragment.getParentFragmentManager(), ex);
} }
}.execute(context, owner, args, "message:body"); }.execute(context, owner, args, "message:body");

Loading…
Cancel
Save