diff options
author | Jeff Brown <jeffbrown@google.com> | 2012-02-15 19:18:31 -0800 |
---|---|---|
committer | Jeff Brown <jeffbrown@google.com> | 2012-02-15 19:32:16 -0800 |
commit | a175a5b7ea3682cb58cca7f9726d0b8171cd549d (patch) | |
tree | a0747492e739adc22a9415fe37a19a71a4a1e010 /tools | |
parent | 1654d0b8d9ba477a0134338838b6e5921f1aabb8 (diff) | |
download | frameworks_base-a175a5b7ea3682cb58cca7f9726d0b8171cd549d.zip frameworks_base-a175a5b7ea3682cb58cca7f9726d0b8171cd549d.tar.gz frameworks_base-a175a5b7ea3682cb58cca7f9726d0b8171cd549d.tar.bz2 |
Encapsulate the ViewRootImpl's handler.
This change makes it much easier to make sense of the messages that
get posted to the ViewRootImpl's handler by encapsulating their point
of dispatch within the ViewRootImpl itself.
As part of this change, the View.AttachInfo now carries a reference
to the ViewRootImpl itself, which simplifies some code that used
to try to find the ViewRootImpl by getting the root view's parent.
In principle, it might have been nice to hide the ViewRootImpl from
the View hierarchy but in practice the two were coupled in many ways.
Change-Id: I51ebccdf5f8c8c505cd6f17cdf594174d041dc54
Diffstat (limited to 'tools')
-rw-r--r-- | tools/layoutlib/bridge/src/android/view/AttachInfo_Accessor.java | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/layoutlib/bridge/src/android/view/AttachInfo_Accessor.java b/tools/layoutlib/bridge/src/android/view/AttachInfo_Accessor.java index 96de51c..97d9969 100644 --- a/tools/layoutlib/bridge/src/android/view/AttachInfo_Accessor.java +++ b/tools/layoutlib/bridge/src/android/view/AttachInfo_Accessor.java @@ -29,7 +29,7 @@ public class AttachInfo_Accessor { public static void setAttachInfo(View view) { AttachInfo info = new AttachInfo(new BridgeWindowSession(), new BridgeWindow(), - new Handler(), null); + new ViewRootImpl(view.getContext()), new Handler(), null); info.mHasWindowFocus = true; info.mWindowVisibility = View.VISIBLE; info.mInTouchMode = false; // this is so that we can display selections. |