Allowing SurfaceViewHost to show up in layout inspector
Bug: 191298629 Test: Verified on device Change-Id: I83c74423b6f33f45cdd93926badb2cad32c7a86d
This commit is contained in:
@@ -216,10 +216,14 @@ public final class WindowManagerGlobal {
|
||||
public String[] getViewRootNames() {
|
||||
synchronized (mLock) {
|
||||
final int numRoots = mRoots.size();
|
||||
String[] mViewRoots = new String[numRoots];
|
||||
final int windowlessRoots = mWindowlessRoots.size();
|
||||
String[] mViewRoots = new String[numRoots + windowlessRoots];
|
||||
for (int i = 0; i < numRoots; ++i) {
|
||||
mViewRoots[i] = getWindowName(mRoots.get(i));
|
||||
}
|
||||
for (int i = 0; i < windowlessRoots; ++i) {
|
||||
mViewRoots[i + numRoots] = getWindowName(mWindowlessRoots.get(i));
|
||||
}
|
||||
return mViewRoots;
|
||||
}
|
||||
}
|
||||
@@ -288,6 +292,10 @@ public final class WindowManagerGlobal {
|
||||
final ViewRootImpl root = mRoots.get(i);
|
||||
if (name.equals(getWindowName(root))) return root.getView();
|
||||
}
|
||||
for (int i = mWindowlessRoots.size() - 1; i >= 0; --i) {
|
||||
final ViewRootImpl root = mWindowlessRoots.get(i);
|
||||
if (name.equals(getWindowName(root))) return root.getView();
|
||||
}
|
||||
}
|
||||
|
||||
return null;
|
||||
|
||||
Reference in New Issue
Block a user