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

Commit ddd75cb1 authored by Craig Mautner's avatar Craig Mautner Committed by Android (Google) Code Review
Browse files

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

parents 07efb030 54ae2f38
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();