diff options
author | Jeff Brown <jeffbrown@google.com> | 2012-08-19 20:30:52 -0700 |
---|---|---|
committer | Jeff Brown <jeffbrown@google.com> | 2012-08-19 22:42:08 -0700 |
commit | 98365d7663cbd82979a5700faf0050220b01084d (patch) | |
tree | 8a4ff3e0a8afd814ed29609b26aa1c6ade2367f6 /core/java/android/widget | |
parent | 848c2dc93b6795e171f3dd6f64ea0be65e2762ca (diff) | |
download | frameworks_base-98365d7663cbd82979a5700faf0050220b01084d.zip frameworks_base-98365d7663cbd82979a5700faf0050220b01084d.tar.gz frameworks_base-98365d7663cbd82979a5700faf0050220b01084d.tar.bz2 |
Refactor for multi-display support.
Split WindowManagerImpl into two parts, the WindowManager
interface implementation remains where it is but the global
communications with the window manager are now handled by
the WindowManagerGlobal class. This change greatly simplifies
the challenge of having separate WindowManager instances
for each Context.
Removed WindowManagerImpl.getDefault(). This represents the
bulk of this change. Most of the usages of this method were
either to perform global functions (now handled by WindowManagerGlobal)
or to obtain the default display (now handled by DisplayManager).
Explicitly associate each new window with a display and make
the Display object available to the View hierarchy.
Add stubs for some new display manager API features.
Start to split apart the concepts of display id and layer stack.
since they operate at different layers of abstraction.
While it's true that each logical display uniquely corresponds to a
surface flinger layer stack, it is not necessarily the case that
they must use the same ids. Added Display.getLayerStack()
and started using it in places where it was relatively easy to do.
Change-Id: I29ed909114dec86807c4d3a5059c3fa0358bea61
Diffstat (limited to 'core/java/android/widget')
-rw-r--r-- | core/java/android/widget/Toast.java | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/core/java/android/widget/Toast.java b/core/java/android/widget/Toast.java index 7dcbc3e..053ade7 100644 --- a/core/java/android/widget/Toast.java +++ b/core/java/android/widget/Toast.java @@ -30,7 +30,6 @@ import android.view.Gravity; import android.view.LayoutInflater; import android.view.View; import android.view.WindowManager; -import android.view.WindowManagerImpl; import android.view.accessibility.AccessibilityEvent; import android.view.accessibility.AccessibilityManager; @@ -331,7 +330,7 @@ public class Toast { View mView; View mNextView; - WindowManagerImpl mWM; + WindowManager mWM; TN() { // XXX This should be changed to use a Dialog, with a Theme.Toast @@ -371,7 +370,7 @@ public class Toast { // remove the old view if necessary handleHide(); mView = mNextView; - mWM = WindowManagerImpl.getDefault(); + mWM = (WindowManager)mView.getContext().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(); |