Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit e771f3a6 authored by Craig Mautner's avatar Craig Mautner Committed by Android Git Automerger
Browse files

am ddd75cb1: Merge "Fix NPE when showing Toast from system process." into jb-mr1.1-dev

* commit 'ddd75cb1':
  Fix NPE when showing Toast from system process.
parents 780a53df ddd75cb1
Loading
Loading
Loading
Loading
+5 −2
Original line number Diff line number Diff line
@@ -374,8 +374,11 @@ public class Toast {
                // remove the old view if necessary
                handleHide();
                mView = mNextView;
                mWM = (WindowManager)mView.getContext().getApplicationContext()
                        .getSystemService(Context.WINDOW_SERVICE);
                Context context = mView.getContext().getApplicationContext();
                if (context == null) {
                    context = mView.getContext();
                }
                mWM = (WindowManager)context.getSystemService(Context.WINDOW_SERVICE);
                // We can resolve the Gravity here by using the Locale for getting
                // the layout direction
                final Configuration config = mView.getContext().getResources().getConfiguration();