Loading core/java/android/widget/Toast.java +7 −2 Original line number Diff line number Diff line Loading @@ -305,12 +305,14 @@ public class Toast { private static class TN extends ITransientNotification.Stub { final Runnable mShow = new Runnable() { @Override public void run() { handleShow(); } }; final Runnable mHide = new Runnable() { @Override public void run() { handleHide(); // Don't do this in handleHide() because it is also invoked by handleShow() Loading Loading @@ -350,6 +352,7 @@ public class Toast { /** * schedule handleShow into the right thread */ @Override public void show() { if (localLOGV) Log.v(TAG, "SHOW: " + this); mHandler.post(mShow); Loading @@ -358,6 +361,7 @@ public class Toast { /** * schedule handleHide into the right thread */ @Override public void hide() { if (localLOGV) Log.v(TAG, "HIDE: " + this); mHandler.post(mHide); Loading @@ -370,7 +374,8 @@ public class Toast { // remove the old view if necessary handleHide(); mView = mNextView; mWM = (WindowManager)mView.getContext().getSystemService(Context.WINDOW_SERVICE); mWM = (WindowManager)mView.getContext().getApplicationContext() .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(); Loading Loading
core/java/android/widget/Toast.java +7 −2 Original line number Diff line number Diff line Loading @@ -305,12 +305,14 @@ public class Toast { private static class TN extends ITransientNotification.Stub { final Runnable mShow = new Runnable() { @Override public void run() { handleShow(); } }; final Runnable mHide = new Runnable() { @Override public void run() { handleHide(); // Don't do this in handleHide() because it is also invoked by handleShow() Loading Loading @@ -350,6 +352,7 @@ public class Toast { /** * schedule handleShow into the right thread */ @Override public void show() { if (localLOGV) Log.v(TAG, "SHOW: " + this); mHandler.post(mShow); Loading @@ -358,6 +361,7 @@ public class Toast { /** * schedule handleHide into the right thread */ @Override public void hide() { if (localLOGV) Log.v(TAG, "HIDE: " + this); mHandler.post(mHide); Loading @@ -370,7 +374,8 @@ public class Toast { // remove the old view if necessary handleHide(); mView = mNextView; mWM = (WindowManager)mView.getContext().getSystemService(Context.WINDOW_SERVICE); mWM = (WindowManager)mView.getContext().getApplicationContext() .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(); Loading