summaryrefslogtreecommitdiffstats
path: root/core/java/android/view
diff options
context:
space:
mode:
authorJoe Onorato <joeo@google.com>2011-04-12 11:53:13 -0700
committerJoe Onorato <joeo@google.com>2011-05-04 14:08:11 -0700
commitc6cc0f8c19d9eccf408a443fa2bf668af261dcd0 (patch)
tree7d1aeea43ab965be44af5cf5e4f5c15546a1a757 /core/java/android/view
parent325039ec5ca9edd5fa0b518bb831ae4e2aedfb5d (diff)
downloadframeworks_base-c6cc0f8c19d9eccf408a443fa2bf668af261dcd0.zip
frameworks_base-c6cc0f8c19d9eccf408a443fa2bf668af261dcd0.tar.gz
frameworks_base-c6cc0f8c19d9eccf408a443fa2bf668af261dcd0.tar.bz2
Rename ViewRoot to ViewAncestor.
ViewRoot is about to be a new public class for poking at ViewAncestor. Change-Id: Ie95d707c6d8bbb48f78d093d7b2667851812a7d5
Diffstat (limited to 'core/java/android/view')
-rw-r--r--core/java/android/view/HardwareRenderer.java4
-rw-r--r--core/java/android/view/SurfaceView.java2
-rw-r--r--core/java/android/view/View.java36
-rw-r--r--core/java/android/view/ViewAncestor.java (renamed from core/java/android/view/ViewRoot.java)42
-rw-r--r--core/java/android/view/ViewDebug.java16
-rw-r--r--core/java/android/view/ViewGroup.java18
-rw-r--r--core/java/android/view/WindowManagerImpl.java30
-rw-r--r--core/java/android/view/inputmethod/BaseInputConnection.java4
-rw-r--r--core/java/android/view/inputmethod/InputMethodManager.java10
9 files changed, 81 insertions, 81 deletions
diff --git a/core/java/android/view/HardwareRenderer.java b/core/java/android/view/HardwareRenderer.java
index 7ca6e09..845fbc3 100644
--- a/core/java/android/view/HardwareRenderer.java
+++ b/core/java/android/view/HardwareRenderer.java
@@ -34,7 +34,7 @@ import javax.microedition.khronos.egl.EGLSurface;
import javax.microedition.khronos.opengles.GL;
/**
- * Interface for rendering a ViewRoot using hardware acceleration.
+ * Interface for rendering a ViewAncestor using hardware acceleration.
*
* @hide
*/
@@ -209,7 +209,7 @@ public abstract class HardwareRenderer {
/**
* Initializes the hardware renderer for the specified surface and setup the
- * renderer for drawing, if needed. This is invoked when the ViewRoot has
+ * renderer for drawing, if needed. This is invoked when the ViewAncestor has
* potentially lost the hardware renderer. The hardware renderer should be
* reinitialized and setup when the render {@link #isRequested()} and
* {@link #isEnabled()}.
diff --git a/core/java/android/view/SurfaceView.java b/core/java/android/view/SurfaceView.java
index 0a7a375..a98c669 100644
--- a/core/java/android/view/SurfaceView.java
+++ b/core/java/android/view/SurfaceView.java
@@ -427,7 +427,7 @@ public class SurfaceView extends View {
if (!mHaveFrame) {
return;
}
- ViewRoot viewRoot = (ViewRoot) getRootView().getParent();
+ ViewAncestor viewRoot = (ViewAncestor) getRootView().getParent();
if (viewRoot != null) {
mTranslator = viewRoot.mTranslator;
}
diff --git a/core/java/android/view/View.java b/core/java/android/view/View.java
index 5af2e56..e47b499 100644
--- a/core/java/android/view/View.java
+++ b/core/java/android/view/View.java
@@ -4496,10 +4496,10 @@ public class View implements Drawable.Callback, KeyEvent.Callback, Accessibility
return true;
}
- /** Gets the ViewRoot, or null if not attached. */
- /*package*/ ViewRoot getViewRoot() {
+ /** Gets the ViewAncestor, or null if not attached. */
+ /*package*/ ViewAncestor getViewAncestor() {
View root = getRootView();
- return root != null ? (ViewRoot)root.getParent() : null;
+ return root != null ? (ViewAncestor)root.getParent() : null;
}
/**
@@ -4515,7 +4515,7 @@ public class View implements Drawable.Callback, KeyEvent.Callback, Accessibility
public final boolean requestFocusFromTouch() {
// Leave touch mode if we need to
if (isInTouchMode()) {
- ViewRoot viewRoot = getViewRoot();
+ ViewAncestor viewRoot = getViewAncestor();
if (viewRoot != null) {
viewRoot.ensureTouchMode(false);
}
@@ -5083,7 +5083,7 @@ public class View implements Drawable.Callback, KeyEvent.Callback, Accessibility
if (mAttachInfo != null) {
return mAttachInfo.mInTouchMode;
} else {
- return ViewRoot.isInTouchMode();
+ return ViewAncestor.isInTouchMode();
}
}
@@ -7311,7 +7311,7 @@ public class View implements Drawable.Callback, KeyEvent.Callback, Accessibility
if (!HardwareRenderer.RENDER_DIRTY_REGIONS) {
if (p != null && ai != null && ai.mHardwareAccelerated) {
// fast-track for GL-enabled applications; just invalidate the whole hierarchy
- // with a null dirty rect, which tells the ViewRoot to redraw everything
+ // with a null dirty rect, which tells the ViewAncestor to redraw everything
p.invalidateChild(this, null);
return;
}
@@ -7354,7 +7354,7 @@ public class View implements Drawable.Callback, KeyEvent.Callback, Accessibility
if (!HardwareRenderer.RENDER_DIRTY_REGIONS) {
if (p != null && ai != null && ai.mHardwareAccelerated) {
// fast-track for GL-enabled applications; just invalidate the whole hierarchy
- // with a null dirty rect, which tells the ViewRoot to redraw everything
+ // with a null dirty rect, which tells the ViewAncestor to redraw everything
p.invalidateChild(this, null);
return;
}
@@ -7409,7 +7409,7 @@ public class View implements Drawable.Callback, KeyEvent.Callback, Accessibility
if (!HardwareRenderer.RENDER_DIRTY_REGIONS) {
if (p != null && ai != null && ai.mHardwareAccelerated) {
// fast-track for GL-enabled applications; just invalidate the whole hierarchy
- // with a null dirty rect, which tells the ViewRoot to redraw everything
+ // with a null dirty rect, which tells the ViewAncestor to redraw everything
p.invalidateChild(this, null);
return;
}
@@ -7558,7 +7558,7 @@ public class View implements Drawable.Callback, KeyEvent.Callback, Accessibility
handler = attachInfo.mHandler;
} else {
// Assume that post will succeed later
- ViewRoot.getRunQueue().post(action);
+ ViewAncestor.getRunQueue().post(action);
return true;
}
@@ -7588,7 +7588,7 @@ public class View implements Drawable.Callback, KeyEvent.Callback, Accessibility
handler = attachInfo.mHandler;
} else {
// Assume that post will succeed later
- ViewRoot.getRunQueue().postDelayed(action, delayMillis);
+ ViewAncestor.getRunQueue().postDelayed(action, delayMillis);
return true;
}
@@ -7612,7 +7612,7 @@ public class View implements Drawable.Callback, KeyEvent.Callback, Accessibility
handler = attachInfo.mHandler;
} else {
// Assume that post will succeed later
- ViewRoot.getRunQueue().removeCallbacks(action);
+ ViewAncestor.getRunQueue().removeCallbacks(action);
return true;
}
@@ -10593,9 +10593,9 @@ public class View implements Drawable.Callback, KeyEvent.Callback, Accessibility
viewParent = view.mParent;
}
- if (viewParent instanceof ViewRoot) {
+ if (viewParent instanceof ViewAncestor) {
// *cough*
- final ViewRoot vr = (ViewRoot)viewParent;
+ final ViewAncestor vr = (ViewAncestor)viewParent;
location[1] -= vr.mCurScrollY;
}
}
@@ -11405,7 +11405,7 @@ public class View implements Drawable.Callback, KeyEvent.Callback, Accessibility
* therefore all View objects remove themselves from the global transparent
* region (passed as a parameter to this function).
*
- * @param region The transparent region for this ViewRoot (window).
+ * @param region The transparent region for this ViewAncestor (window).
*
* @return Returns true if the effective visibility of the view at this
* point is opaque, regardless of the transparent region; returns false
@@ -11711,7 +11711,7 @@ public class View implements Drawable.Callback, KeyEvent.Callback, Accessibility
surface.unlockCanvasAndPost(canvas);
}
- final ViewRoot root = getViewRoot();
+ final ViewAncestor root = getViewAncestor();
// Cache the local state object for delivery with DragEvents
root.setLocalDragState(myLocalState);
@@ -12497,7 +12497,7 @@ public class View implements Drawable.Callback, KeyEvent.Callback, Accessibility
boolean mScalingRequired;
/**
- * If set, ViewRoot doesn't use its lame animation for when the window resizes.
+ * If set, ViewAncestor doesn't use its lame animation for when the window resizes.
*/
boolean mTurnOffWindowResizeAnim;
@@ -12576,7 +12576,7 @@ public class View implements Drawable.Callback, KeyEvent.Callback, Accessibility
boolean mInTouchMode;
/**
- * Indicates that ViewRoot should trigger a global layout change
+ * Indicates that ViewAncestor should trigger a global layout change
* the next time it performs a traversal
*/
boolean mRecomputeGlobalAttributes;
@@ -12638,7 +12638,7 @@ public class View implements Drawable.Callback, KeyEvent.Callback, Accessibility
Canvas mCanvas;
/**
- * A Handler supplied by a view's {@link android.view.ViewRoot}. This
+ * A Handler supplied by a view's {@link android.view.ViewAncestor}. This
* handler can be used to pump events in the UI events queue.
*/
final Handler mHandler;
diff --git a/core/java/android/view/ViewRoot.java b/core/java/android/view/ViewAncestor.java
index f02daba..0a91d8e 100644
--- a/core/java/android/view/ViewRoot.java
+++ b/core/java/android/view/ViewAncestor.java
@@ -82,9 +82,9 @@ import java.util.ArrayList;
* {@hide}
*/
@SuppressWarnings({"EmptyCatchBlock", "PointlessBooleanExpression"})
-public final class ViewRoot extends Handler implements ViewParent,
+public final class ViewAncestor extends Handler implements ViewParent,
View.AttachInfo.Callbacks, HardwareRenderer.HardwareDrawCallbacks {
- private static final String TAG = "ViewRoot";
+ private static final String TAG = "ViewAncestor";
private static final boolean DBG = false;
private static final boolean SHOW_FPS = false;
private static final boolean LOCAL_LOGV = false;
@@ -273,7 +273,7 @@ public final class ViewRoot extends Handler implements ViewParent,
}
}
- public ViewRoot(Context context) {
+ public ViewAncestor(Context context) {
super();
if (MEASURE_LATENCY) {
@@ -515,7 +515,7 @@ public final class ViewRoot extends Handler implements ViewParent,
}
// Only enable hardware acceleration if we are not in the system process
- // The window manager creates ViewRoots to display animated preview windows
+ // The window manager creates ViewAncestors to display animated preview windows
// of launching apps and we don't want those to be hardware accelerated
final boolean systemHwAccelerated =
@@ -2038,7 +2038,7 @@ public final class ViewRoot extends Handler implements ViewParent,
break;
case DO_TRAVERSAL:
if (mProfile) {
- Debug.startMethodTracing("ViewRoot");
+ Debug.startMethodTracing("ViewAncestor");
}
final long traversalStartTime;
@@ -3546,7 +3546,7 @@ public final class ViewRoot extends Handler implements ViewParent,
}
public void requestDisallowInterceptTouchEvent(boolean disallowIntercept) {
- // ViewRoot never intercepts touch event, so this can be a no-op
+ // ViewAncestor never intercepts touch event, so this can be a no-op
}
public boolean requestChildRectangleOnScreen(View child, Rect rectangle,
@@ -3595,14 +3595,14 @@ public final class ViewRoot extends Handler implements ViewParent,
}
static class InputMethodCallback extends IInputMethodCallback.Stub {
- private WeakReference<ViewRoot> mViewRoot;
+ private WeakReference<ViewAncestor> mViewAncestor;
- public InputMethodCallback(ViewRoot viewRoot) {
- mViewRoot = new WeakReference<ViewRoot>(viewRoot);
+ public InputMethodCallback(ViewAncestor viewRoot) {
+ mViewAncestor = new WeakReference<ViewAncestor>(viewRoot);
}
public void finishedEvent(int seq, boolean handled) {
- final ViewRoot viewRoot = mViewRoot.get();
+ final ViewAncestor viewRoot = mViewAncestor.get();
if (viewRoot != null) {
viewRoot.dispatchFinishedEvent(seq, handled);
}
@@ -3614,36 +3614,36 @@ public final class ViewRoot extends Handler implements ViewParent,
}
static class W extends IWindow.Stub {
- private final WeakReference<ViewRoot> mViewRoot;
+ private final WeakReference<ViewAncestor> mViewAncestor;
- W(ViewRoot viewRoot) {
- mViewRoot = new WeakReference<ViewRoot>(viewRoot);
+ W(ViewAncestor viewRoot) {
+ mViewAncestor = new WeakReference<ViewAncestor>(viewRoot);
}
public void resized(int w, int h, Rect coveredInsets, Rect visibleInsets,
boolean reportDraw, Configuration newConfig) {
- final ViewRoot viewRoot = mViewRoot.get();
+ final ViewAncestor viewRoot = mViewAncestor.get();
if (viewRoot != null) {
viewRoot.dispatchResized(w, h, coveredInsets, visibleInsets, reportDraw, newConfig);
}
}
public void dispatchAppVisibility(boolean visible) {
- final ViewRoot viewRoot = mViewRoot.get();
+ final ViewAncestor viewRoot = mViewAncestor.get();
if (viewRoot != null) {
viewRoot.dispatchAppVisibility(visible);
}
}
public void dispatchGetNewSurface() {
- final ViewRoot viewRoot = mViewRoot.get();
+ final ViewAncestor viewRoot = mViewAncestor.get();
if (viewRoot != null) {
viewRoot.dispatchGetNewSurface();
}
}
public void windowFocusChanged(boolean hasFocus, boolean inTouchMode) {
- final ViewRoot viewRoot = mViewRoot.get();
+ final ViewAncestor viewRoot = mViewAncestor.get();
if (viewRoot != null) {
viewRoot.windowFocusChanged(hasFocus, inTouchMode);
}
@@ -3663,7 +3663,7 @@ public final class ViewRoot extends Handler implements ViewParent,
}
public void executeCommand(String command, String parameters, ParcelFileDescriptor out) {
- final ViewRoot viewRoot = mViewRoot.get();
+ final ViewAncestor viewRoot = mViewAncestor.get();
if (viewRoot != null) {
final View view = viewRoot.mView;
if (view != null) {
@@ -3694,7 +3694,7 @@ public final class ViewRoot extends Handler implements ViewParent,
}
public void closeSystemDialogs(String reason) {
- final ViewRoot viewRoot = mViewRoot.get();
+ final ViewAncestor viewRoot = mViewAncestor.get();
if (viewRoot != null) {
viewRoot.dispatchCloseSystemDialogs(reason);
}
@@ -3722,7 +3722,7 @@ public final class ViewRoot extends Handler implements ViewParent,
/* Drag/drop */
public void dispatchDragEvent(DragEvent event) {
- final ViewRoot viewRoot = mViewRoot.get();
+ final ViewAncestor viewRoot = mViewAncestor.get();
if (viewRoot != null) {
viewRoot.dispatchDragEvent(event);
}
@@ -3730,7 +3730,7 @@ public final class ViewRoot extends Handler implements ViewParent,
@Override
public void dispatchSystemUiVisibilityChanged(int visibility) {
- final ViewRoot viewRoot = mViewRoot.get();
+ final ViewAncestor viewRoot = mViewAncestor.get();
if (viewRoot != null) {
viewRoot.dispatchSystemUiVisibilityChanged(visibility);
}
diff --git a/core/java/android/view/ViewDebug.java b/core/java/android/view/ViewDebug.java
index 881cb76..3f05b29 100644
--- a/core/java/android/view/ViewDebug.java
+++ b/core/java/android/view/ViewDebug.java
@@ -395,7 +395,7 @@ public class ViewDebug {
}
private static BufferedWriter sHierarchyTraces;
- private static ViewRoot sHierarhcyRoot;
+ private static ViewAncestor sHierarhcyRoot;
private static String sHierarchyTracePrefix;
/**
@@ -434,7 +434,7 @@ public class ViewDebug {
}
private static BufferedWriter sMotionEventTraces;
- private static ViewRoot sMotionEventRoot;
+ private static ViewAncestor sMotionEventRoot;
private static String sMotionEventTracePrefix;
/**
@@ -449,14 +449,14 @@ public class ViewDebug {
}
/**
- * Returns the number of instanciated ViewRoots.
+ * Returns the number of instanciated ViewAncestors.
*
- * @return The number of ViewRoots instanciated in the current process.
+ * @return The number of ViewAncestors instanciated in the current process.
*
* @hide
*/
- public static long getViewRootInstanceCount() {
- return Debug.countInstancesOfClass(ViewRoot.class);
+ public static long getViewAncestorInstanceCount() {
+ return Debug.countInstancesOfClass(ViewAncestor.class);
}
/**
@@ -670,7 +670,7 @@ public class ViewDebug {
return;
}
- sHierarhcyRoot = (ViewRoot) view.getRootView().getParent();
+ sHierarhcyRoot = (ViewAncestor) view.getRootView().getParent();
}
/**
@@ -808,7 +808,7 @@ public class ViewDebug {
return;
}
- sMotionEventRoot = (ViewRoot) view.getRootView().getParent();
+ sMotionEventRoot = (ViewAncestor) view.getRootView().getParent();
}
/**
diff --git a/core/java/android/view/ViewGroup.java b/core/java/android/view/ViewGroup.java
index 1a84175..7b8242d 100644
--- a/core/java/android/view/ViewGroup.java
+++ b/core/java/android/view/ViewGroup.java
@@ -536,7 +536,7 @@ public abstract class ViewGroup extends View implements ViewParent, ViewManager
// note: knowing that mFocused is non-null is not a good enough reason
// to break the traversal since in that case we'd actually have to find
// the focused view and make sure it wasn't FOCUS_AFTER_DESCENDANTS and
- // an ancestor of v; this will get checked for at ViewRoot
+ // an ancestor of v; this will get checked for at ViewAncestor
&& !(isFocused() && getDescendantFocusability() != FOCUS_AFTER_DESCENDANTS)) {
mParent.focusableViewAvailable(v);
}
@@ -936,7 +936,7 @@ public abstract class ViewGroup extends View implements ViewParent, ViewManager
final float tx = event.mX;
final float ty = event.mY;
- ViewRoot root = getViewRoot();
+ ViewAncestor root = getViewAncestor();
// Dispatch down the view hierarchy
switch (event.mAction) {
@@ -3828,13 +3828,13 @@ public abstract class ViewGroup extends View implements ViewParent, ViewManager
if (drawAnimation) {
if (view != null) {
view.mPrivateFlags |= DRAW_ANIMATION;
- } else if (parent instanceof ViewRoot) {
- ((ViewRoot) parent).mIsAnimating = true;
+ } else if (parent instanceof ViewAncestor) {
+ ((ViewAncestor) parent).mIsAnimating = true;
}
}
- if (parent instanceof ViewRoot) {
- ((ViewRoot) parent).invalidate();
+ if (parent instanceof ViewAncestor) {
+ ((ViewAncestor) parent).invalidate();
parent = null;
} else if (view != null) {
if ((view.mPrivateFlags & DRAWN) == DRAWN ||
@@ -3889,8 +3889,8 @@ public abstract class ViewGroup extends View implements ViewParent, ViewManager
if (drawAnimation) {
if (view != null) {
view.mPrivateFlags |= DRAW_ANIMATION;
- } else if (parent instanceof ViewRoot) {
- ((ViewRoot) parent).mIsAnimating = true;
+ } else if (parent instanceof ViewAncestor) {
+ ((ViewAncestor) parent).mIsAnimating = true;
}
}
@@ -4413,7 +4413,7 @@ public abstract class ViewGroup extends View implements ViewParent, ViewManager
// If this group is dirty, check that the parent is dirty as well
if ((mPrivateFlags & DIRTY_MASK) != 0) {
final ViewParent parent = getParent();
- if (parent != null && !(parent instanceof ViewRoot)) {
+ if (parent != null && !(parent instanceof ViewAncestor)) {
if ((((View) parent).mPrivateFlags & DIRTY_MASK) == 0) {
result = false;
android.util.Log.d(ViewDebug.CONSISTENCY_LOG_TAG,
diff --git a/core/java/android/view/WindowManagerImpl.java b/core/java/android/view/WindowManagerImpl.java
index 8336959..d7a3096 100644
--- a/core/java/android/view/WindowManagerImpl.java
+++ b/core/java/android/view/WindowManagerImpl.java
@@ -111,7 +111,7 @@ public class WindowManagerImpl implements WindowManager {
final WindowManager.LayoutParams wparams
= (WindowManager.LayoutParams)params;
- ViewRoot root;
+ ViewAncestor root;
View panelParentView = null;
synchronized (this) {
@@ -148,7 +148,7 @@ public class WindowManagerImpl implements WindowManager {
}
}
- root = new ViewRoot(view.getContext());
+ root = new ViewAncestor(view.getContext());
root.mAddNesting = 1;
view.setLayoutParams(wparams);
@@ -156,7 +156,7 @@ public class WindowManagerImpl implements WindowManager {
if (mViews == null) {
index = 1;
mViews = new View[1];
- mRoots = new ViewRoot[1];
+ mRoots = new ViewAncestor[1];
mParams = new WindowManager.LayoutParams[1];
} else {
index = mViews.length + 1;
@@ -164,7 +164,7 @@ public class WindowManagerImpl implements WindowManager {
mViews = new View[index];
System.arraycopy(old, 0, mViews, 0, index-1);
old = mRoots;
- mRoots = new ViewRoot[index];
+ mRoots = new ViewAncestor[index];
System.arraycopy(old, 0, mRoots, 0, index-1);
old = mParams;
mParams = new WindowManager.LayoutParams[index];
@@ -192,7 +192,7 @@ public class WindowManagerImpl implements WindowManager {
synchronized (this) {
int index = findViewLocked(view, true);
- ViewRoot root = mRoots[index];
+ ViewAncestor root = mRoots[index];
mParams[index] = wparams;
root.setLayoutParams(wparams, false);
}
@@ -207,14 +207,14 @@ public class WindowManagerImpl implements WindowManager {
}
throw new IllegalStateException("Calling with view " + view
- + " but the ViewRoot is attached to " + curView);
+ + " but the ViewAncestor is attached to " + curView);
}
}
public void removeViewImmediate(View view) {
synchronized (this) {
int index = findViewLocked(view, true);
- ViewRoot root = mRoots[index];
+ ViewAncestor root = mRoots[index];
View curView = root.getView();
root.mAddNesting = 0;
@@ -225,12 +225,12 @@ public class WindowManagerImpl implements WindowManager {
}
throw new IllegalStateException("Calling with view " + view
- + " but the ViewRoot is attached to " + curView);
+ + " but the ViewAncestor is attached to " + curView);
}
}
View removeViewLocked(int index) {
- ViewRoot root = mRoots[index];
+ ViewAncestor root = mRoots[index];
View view = root.getView();
// Don't really remove until we have matched all calls to add().
@@ -256,7 +256,7 @@ public class WindowManagerImpl implements WindowManager {
removeItem(tmpViews, mViews, index);
mViews = tmpViews;
- ViewRoot[] tmpRoots = new ViewRoot[count-1];
+ ViewAncestor[] tmpRoots = new ViewAncestor[count-1];
removeItem(tmpRoots, mRoots, index);
mRoots = tmpRoots;
@@ -281,7 +281,7 @@ public class WindowManagerImpl implements WindowManager {
//Log.i("foo", "@ " + i + " token " + mParams[i].token
// + " view " + mRoots[i].getView());
if (token == null || mParams[i].token == token) {
- ViewRoot root = mRoots[i];
+ ViewAncestor root = mRoots[i];
root.mAddNesting = 1;
//Log.i("foo", "Force closing " + root);
@@ -308,7 +308,7 @@ public class WindowManagerImpl implements WindowManager {
int count = mViews.length;
for (int i=0; i<count; i++) {
if (token == null || mParams[i].token == token) {
- ViewRoot root = mRoots[i];
+ ViewAncestor root = mRoots[i];
root.setStopped(stopped);
}
}
@@ -317,13 +317,13 @@ public class WindowManagerImpl implements WindowManager {
public WindowManager.LayoutParams getRootViewLayoutParameter(View view) {
ViewParent vp = view.getParent();
- while (vp != null && !(vp instanceof ViewRoot)) {
+ while (vp != null && !(vp instanceof ViewAncestor)) {
vp = vp.getParent();
}
if (vp == null) return null;
- ViewRoot vr = (ViewRoot)vp;
+ ViewAncestor vr = (ViewAncestor)vp;
int N = mRoots.length;
for (int i = 0; i < N; ++i) {
@@ -344,7 +344,7 @@ public class WindowManagerImpl implements WindowManager {
}
private View[] mViews;
- private ViewRoot[] mRoots;
+ private ViewAncestor[] mRoots;
private WindowManager.LayoutParams[] mParams;
private static void removeItem(Object[] dst, Object[] src, int index)
diff --git a/core/java/android/view/inputmethod/BaseInputConnection.java b/core/java/android/view/inputmethod/BaseInputConnection.java
index dd2d00d..b4303f4 100644
--- a/core/java/android/view/inputmethod/BaseInputConnection.java
+++ b/core/java/android/view/inputmethod/BaseInputConnection.java
@@ -34,7 +34,7 @@ import android.util.LogPrinter;
import android.view.KeyCharacterMap;
import android.view.KeyEvent;
import android.view.View;
-import android.view.ViewRoot;
+import android.view.ViewAncestor;
class ComposingText implements NoCopySpan {
}
@@ -501,7 +501,7 @@ public class BaseInputConnection implements InputConnection {
}
}
if (h != null) {
- h.sendMessage(h.obtainMessage(ViewRoot.DISPATCH_KEY_FROM_IME,
+ h.sendMessage(h.obtainMessage(ViewAncestor.DISPATCH_KEY_FROM_IME,
event));
}
}
diff --git a/core/java/android/view/inputmethod/InputMethodManager.java b/core/java/android/view/inputmethod/InputMethodManager.java
index eef2a33..27cbaf7 100644
--- a/core/java/android/view/inputmethod/InputMethodManager.java
+++ b/core/java/android/view/inputmethod/InputMethodManager.java
@@ -41,7 +41,7 @@ import android.util.Printer;
import android.view.KeyEvent;
import android.view.MotionEvent;
import android.view.View;
-import android.view.ViewRoot;
+import android.view.ViewAncestor;
import java.io.FileDescriptor;
import java.io.PrintWriter;
@@ -636,7 +636,7 @@ public final class InputMethodManager {
if (vh != null) {
// This will result in a call to reportFinishInputConnection()
// below.
- vh.sendMessage(vh.obtainMessage(ViewRoot.FINISH_INPUT_CONNECTION,
+ vh.sendMessage(vh.obtainMessage(ViewAncestor.FINISH_INPUT_CONNECTION,
mServedInputConnection));
}
}
@@ -1093,9 +1093,9 @@ public final class InputMethodManager {
void scheduleCheckFocusLocked(View view) {
Handler vh = view.getHandler();
- if (vh != null && !vh.hasMessages(ViewRoot.CHECK_FOCUS)) {
+ if (vh != null && !vh.hasMessages(ViewAncestor.CHECK_FOCUS)) {
// This will result in a call to checkFocus() below.
- vh.sendMessage(vh.obtainMessage(ViewRoot.CHECK_FOCUS));
+ vh.sendMessage(vh.obtainMessage(ViewAncestor.CHECK_FOCUS));
}
}
@@ -1150,7 +1150,7 @@ public final class InputMethodManager {
}
/**
- * Called by ViewRoot when its window gets input focus.
+ * Called by ViewAncestor when its window gets input focus.
* @hide
*/
public void onWindowFocus(View rootView, View focusedView, int softInputMode,