yashsingh1/xdaforums huggingface dataset:
[Android Software/Hacking General [Developers Only]] llrraa2010:
WindowManagerService-- window management

addWindow

frameworks/base/services/java/com/android/server/WindowManagerService.java

public class WindowManagerService extends IWindowManager.Stub

implements Watchdog.Monitor {

......

public int addWindow(Session session, IWindow client,

WindowManager.LayoutParams attrs, int viewVisibility,

Rect outContentInsets, InputChannel outInputChannel) {

......

synchronized(mWindowMap) {

......

boolean addToken = false;

WindowToken token = mTokenMap.get(attrs.token);

if (token == null) {

if (attrs.type >= FIRST_APPLICATION_WINDOW

&& attrs.type <= LAST_APPLICATION_WINDOW) {

......

return WindowManagerImpl.ADD_BAD_APP_TOKEN;

}

if (attrs.type == TYPE_INPUT_METHOD) {

......

return WindowManagerImpl.ADD_BAD_APP_TOKEN;

}

if (attrs.type == TYPE_WALLPAPER) {

......

return WindowManagerImpl.ADD_BAD_APP_TOKEN;

}

token = new WindowToken(attrs.token, -1, false);

addToken = true;

}

......

if (addToken) {

mTokenMap.put(attrs.token, token);

mTokenList.add(token);

}

......

}

......

}

......

}
[Android Software/Hacking General [Developers Only]] llrraa2010:
WindowManagerService-- window management

removeWindowToken

frameworks/base/services/java/com/android/server/WindowManagerService.java

public class WindowManagerService extends IWindowManager.Stub

implements Watchdog.Monitor {

......

public void removeWindowToken(IBinder token) {

if (!checkCallingPermission(android.Manifest.permission.MANAGE_APP_TOKENS,

"removeWindowToken()")) {

throw new SecurityException("Requires MANAGE_APP_TOKENS permission");

}

final long origId = Binder.clearCallingIdentity();

synchronized(mWindowMap) {

WindowToken wtoken = mTokenMap.remove(token);

mTokenList.remove(wtoken);

if (wtoken != null) {

boolean delayed = false;

if (!wtoken.hidden) {

wtoken.hidden = true;

final int N = wtoken.windows.size();

boolean changed = false;

for (int i=0; i<N; i++) {

WindowState win = wtoken.windows.get(i);

if (win.isAnimating()) {

delayed = true;

}

if (win.isVisibleNow()) {

applyAnimationLocked(win,

WindowManagerPolicy.TRANSIT_EXIT, false);

changed = true;

}

}

if (changed) {

mLayoutNeeded = true;

performLayoutAndPlaceSurfacesLocked();

updateFocusedWindowLocked(UPDATE_FOCUS_NORMAL);

}

if (delayed) {

mExitingTokens.add(wtoken);

} else if (wtoken.windowType == TYPE_WALLPAPER) {

mWallpaperTokens.remove(wtoken);

}

}

......

} else {

Slog.w(TAG, "Attempted to remove non-existing token: " + token);

}

}

Binder.restoreCallingIdentity(origId);

}

......

}
[Android Software/Hacking General [Developers Only]] llrraa2010:
WindowManagerService-- window management

8. add WindowState

frameworks/base/services/java/com/android/server/WindowManagerService.java

public class WindowManagerService extends IWindowManager.Stub

implements Watchdog.Monitor {

......

/**

* Mapping from an IWindow IBinder to the server's Window object.

* This is also used as the lock for all of our state.

*/

final HashMap<IBinder, WindowState> mWindowMap = new HashMap<IBinder, WindowState>();

......

/**

* Z-ordered (bottom-most first) list of all Window objects.

*/

final ArrayList<WindowState> mWindows = new ArrayList<WindowState>();

......

public int addWindow(Session session, IWindow client,

WindowManager.LayoutParams attrs, int viewVisibility,

Rect outContentInsets, InputChannel outInputChannel) {

......

WindowState win = null;

synchronized(mWindowMap) {

......

win = new WindowState(session, client, token,

attachedWindow, attrs, viewVisibility);

......

mWindowMap.put(client.asBinder(), win);

......

if (attrs.type == TYPE_INPUT_METHOD) {

mInputMethodWindow = win;

addInputMethodWindowToListLocked(win);

......

} else if (attrs.type == TYPE_INPUT_METHOD_DIALOG) {

mInputMethodDialogs.add(win);

addWindowToListInOrderLocked(win, true);

adjustInputMethodDialogsLocked();

......

} else {

addWindowToListInOrderLocked(win, true);

if (attrs.type == TYPE_WALLPAPER) {

.......

adjustWallpaperWindowsLocked();

} else if ((attrs.flags&FLAG_SHOW_WALLPAPER) != 0) {

adjustWallpaperWindowsLocked();

}

}

......

}

......

}

......

}
[Android Software/Hacking General [Developers Only]] llrraa2010:
WindowManagerService-- window management

addWindowToListInOrderLocked

frameworks/base/services/java/com/android/server/WindowManagerService.java

public class WindowManagerService extends IWindowManager.Stub

implements Watchdog.Monitor {

......

private void addWindowToListInOrderLocked(WindowState win, boolean addToToken) {

final IWindow client = win.mClient;

final WindowToken token = win.mToken;

final ArrayList<WindowState> localmWindows = mWindows;

final int N = localmWindows.size();

final WindowState attached = win.mAttachedWindow;

int i;

if (attached == null) {

//CASE 1

int tokenWindowsPos = token.windows.size();

if (token.appWindowToken != null) {

//CASE 1.1

int index = tokenWindowsPos-1;

if (index >= 0) {

//CASE 1.1.1

......

} else {

//CASE 1.1.2

......

}

} else {

//CASE 1.2

......

}

if (addToToken) {

token.windows.add(tokenWindowsPos, win);

}

} else {

//CASE 2

......

}

if (win.mAppToken != null && addToToken) {

win.mAppToken.allAppWindows.add(win);

}

}

......

}
[Android Software/Hacking General [Developers Only]] llrraa2010:
WindowManagerService-- window management

CASE 1.1.1

if (win.mAttrs.type == TYPE_BASE_APPLICATION) {

// Base windows go behind everything else.

placeWindowBefore(token.windows.get(0), win);

tokenWindowsPos = 0;

} else {

AppWindowToken atoken = win.mAppToken;

if (atoken != null &&

token.windows.get(index) == atoken.startingWindow) {

placeWindowBefore(token.windows.get(index), win);

tokenWindowsPos--;

} else {

int newIdx = findIdxBasedOnAppTokens(win);

if(newIdx != -1) {

//there is a window above this one associated with the same

//apptoken note that the window could be a floating window

//that was created later or a window at the top of the list of

//windows associated with this token.

......

localmWindows.add(newIdx+1, win);

mWindowsChanged = true;

}

}

}
[Android Software/Hacking General [Developers Only]] llrraa2010:
WindowManagerService-- window management

CASE 1.1.2

// Figure out where the window should go, based on the

// order of applications.

final int NA = mAppTokens.size();

WindowState pos = null;

for (i=NA-1; i>=0; i--) {

AppWindowToken t = mAppTokens.get(i);

if (t == token) {

i--;

break;

}

// We haven't reached the token yet; if this token

// is not going to the bottom and has windows, we can

// use it as an anchor for when we do reach the token.

if (!t.sendingToBottom && t.windows.size() > 0) {

pos = t.windows.get(0);

}

}

// We now know the index into the apps. If we found

// an app window above, that gives us the position; else

// we need to look some more.

if (pos != null) {

// Move behind any windows attached to this one.

WindowToken atoken = mTokenMap.get(pos.mClient.asBinder());

if (atoken != null) {

final int NC = atoken.windows.size();

if (NC > 0) {

WindowState bottom = atoken.windows.get(0);

if (bottom.mSubLayer < 0) {

pos = bottom;

}

}

}

placeWindowBefore(pos, win);

} else {

// Continue looking down until we find the first

// token that has windows.

while (i >= 0) {

AppWindowToken t = mAppTokens.get(i);

final int NW = t.windows.size();

if (NW > 0) {

pos = t.windows.get(NW-1);

break;

}

i--;

}

if (pos != null) {

// Move in front of any windows attached to this

// one.

WindowToken atoken = mTokenMap.get(pos.mClient.asBinder());

if (atoken != null) {

final int NC = atoken.windows.size();

if (NC > 0) {

WindowState top = atoken.windows.get(NC-1);

if (top.mSubLayer >= 0) {

pos = top;

}

}

}

placeWindowAfter(pos, win);

placeWindowAfter(pos, win);

} else {

// Just search for the start of this layer.

final int myLayer = win.mBaseLayer;

for (i=0; i<N; i++) {

WindowState w = localmWindows.get(i);

if (w.mBaseLayer > myLayer) {

break;

}

}

......

localmWindows.add(i, win);

mWindowsChanged = true;

}

}
[Android Software/Hacking General [Developers Only]] llrraa2010:
CASE 1.2

// Figure out where window should go, based on layer.

final int myLayer = win.mBaseLayer;

for (i=N-1; i>=0; i--) {

if (localmWindows.get(i).mBaseLayer <= myLayer) {

i++;

break;

}

}

if (i < 0) i = 0;

......

localmWindows.add(i, win);

mWindowsChanged = true;
[Android Software/Hacking General [Developers Only]] llrraa2010:
CASE 2

// Figure out this window's ordering relative to the window

// it is attached to.

final int NA = token.windows.size();

final int sublayer = win.mSubLayer;

int largestSublayer = Integer.MIN_VALUE;

WindowState windowWithLargestSublayer = null;

for (i=0; i<NA; i++) {

WindowState w = token.windows.get(i);

final int wSublayer = w.mSubLayer;

if (wSublayer >= largestSublayer) {

largestSublayer = wSublayer;

windowWithLargestSublayer = w;

}

if (sublayer < 0) {

// For negative sublayers, we go below all windows

// in the same sublayer.

if (wSublayer >= sublayer) {

if (addToToken) {

token.windows.add(i, win);

}

placeWindowBefore(

wSublayer >= 0 ? attached : w, win);

break;

}

} else {

// For positive sublayers, we go above all windows

// in the same sublayer.

if (wSublayer > sublayer) {

if (addToToken) {

token.windows.add(i, win);

}

placeWindowBefore(w, win);

break;

}

}

}

if (i >= NA) {

if (addToToken) {

token.windows.add(win);

}

if (sublayer < 0) {

placeWindowBefore(attached, win);

} else {

placeWindowAfter(largestSublayer >= 0

? windowWithLargestSublayer

: attached,

win);

}

}
[Android Software/Hacking General [Developers Only]] llrraa2010:
tmpRemoveWindowLocked

frameworks/base/services/java/com/android/server/WindowManagerService.java

public class WindowManagerService extends IWindowManager.Stub

implements Watchdog.Monitor {

......

private int tmpRemoveWindowLocked(int interestingPos, WindowState win) {

int wpos = mWindows.indexOf(win);

if (wpos >= 0) {

if (wpos < interestingPos) interestingPos--;

......

mWindows.remove(wpos);

mWindowsChanged = true;

int NC = win.mChildWindows.size();

while (NC > 0) {

NC--;

WindowState cw = win.mChildWindows.get(NC);

int cpos = mWindows.indexOf(cw);

if (cpos >= 0) {

if (cpos < interestingPos) interestingPos--;

......

mWindows.remove(cpos);

}

}

}

return interestingPos;

}

......

}
[Android Software/Hacking General [Developers Only]] llrraa2010:
reAddWindowLocked

frameworks/base/services/java/com/android/server/WindowManagerService.java

public class WindowManagerService extends IWindowManager.Stub

implements Watchdog.Monitor {

......

private final int reAddWindowLocked(int index, WindowState win) {

final int NCW = win.mChildWindows.size();

boolean added = false;

for (int j=0; j<NCW; j++) {

WindowState cwin = win.mChildWindows.get(j);

if (!added && cwin.mSubLayer >= 0) {

......

mWindows.add(index, win);

index++;

added = true;

}

......

mWindows.add(index, cwin);

index++;

}

if (!added) {

......

mWindows.add(index, win);

index++;

}

mWindowsChanged = true;

return index;

}

......

}
[Android Software/Hacking General [Developers Only]] llrraa2010:
reAddWindowToListInOrderLocked

frameworks/base/services/java/com/android/server/WindowManagerService.java

public class WindowManagerService extends IWindowManager.Stub

implements Watchdog.Monitor {

......

private void reAddWindowToListInOrderLocked(WindowState win) {

addWindowToListInOrderLocked(win, false);

// This is a hack to get all of the child windows added as well

// at the right position. Child windows should be rare and

// this case should be rare, so it shouldn't be that big a deal.

int wpos = mWindows.indexOf(win);

if (wpos >= 0) {

......

mWindows.remove(wpos);

mWindowsChanged = true;

reAddWindowLocked(wpos, win);

}

}

......

}
[Android Software/Hacking General [Developers Only]] llrraa2010:
13. reAddAppWindowsLocked

frameworks/base/services/java/com/android/server/WindowManagerService.java

public class WindowManagerService extends IWindowManager.Stub

implements Watchdog.Monitor {

......

private final int reAddAppWindowsLocked(int index, WindowToken token) {

final int NW = token.windows.size();

for (int i=0; i<NW; i++) {

index = reAddWindowLocked(index, token.windows.get(i));

}

return index;

}

......

}
[Android Software/Hacking General [Developers Only]] llrraa2010:
14. moveAppWindowsLocked

frameworks/base/services/java/com/android/server/WindowManagerService.java

public class WindowManagerService extends IWindowManager.Stub

implements Watchdog.Monitor {

......

private void moveAppWindowsLocked(AppWindowToken wtoken, int tokenPos,

boolean updateFocusAndLayout) {

// First remove all of the windows from the list.

tmpRemoveAppWindowsLocked(wtoken);

// Where to start adding?

int pos = findWindowOffsetLocked(tokenPos);

// And now add them back at the correct place.

pos = reAddAppWindowsLocked(pos, wtoken);

if (updateFocusAndLayout) {

if (!updateFocusedWindowLocked(UPDATE_FOCUS_WILL_PLACE_SURFACES)) {

assignLayersLocked();

}

mLayoutNeeded = true;

performLayoutAndPlaceSurfacesLocked();

}

}

......

}
[Android Software/Hacking General [Developers Only]] llrraa2010:
15. moveAppWindowsLocked

frameworks/base/services/java/com/android/server/WindowManagerService.java

public class WindowManagerService extends IWindowManager.Stub

implements Watchdog.Monitor {

......

private void moveAppWindowsLocked(List<IBinder> tokens, int tokenPos) {

// First remove all of the windows from the list.

final int N = tokens.size();

int i;

for (i=0; i<N; i++) {

WindowToken token = mTokenMap.get(tokens.get(i));

if (token != null) {

tmpRemoveAppWindowsLocked(token);

}

}

// Where to start adding?

int pos = findWindowOffsetLocked(tokenPos);

// And now add them back at the correct place.

for (i=0; i<N; i++) {

WindowToken token = mTokenMap.get(tokens.get(i));

if (token != null) {

pos = reAddAppWindowsLocked(pos, token);

}

}

if (!updateFocusedWindowLocked(UPDATE_FOCUS_WILL_PLACE_SURFACES)) {

assignLayersLocked();

}

mLayoutNeeded = true;

performLayoutAndPlaceSurfacesLocked();

//dump();

}

......

}
[Android Software/Hacking General [Developers Only]] llrraa2010:
20.3 Input Method Window management
[Android Software/Hacking General [Developers Only]] llrraa2010:
frameworks/base/services/java/com/android/server/WindowManagerService.java

public class WindowManagerService extends IWindowManager.Stub

implements Watchdog.Monitor {

......

WindowState mInputMethodWindow = null;

final ArrayList<WindowState> mInputMethodDialogs = new ArrayList<WindowState>();

......

public int addWindow(Session session, IWindow client,

WindowManager.LayoutParams attrs, int viewVisibility,

Rect outContentInsets, InputChannel outInputChannel) {

......

synchronized(mWindowMap) {

......

WindowToken token = mTokenMap.get(attrs.token);

if (token == null) {

......

if (attrs.type == TYPE_INPUT_METHOD) {

......

return WindowManagerImpl.ADD_BAD_APP_TOKEN;

}

......

}

......

win = new WindowState(session, client, token,

attachedWindow, attrs, viewVisibility);

......

boolean imMayMove = true;

if (attrs.type == TYPE_INPUT_METHOD) {

mInputMethodWindow = win;

addInputMethodWindowToListLocked(win);

imMayMove = false;

} else if (attrs.type == TYPE_INPUT_METHOD_DIALOG) {

mInputMethodDialogs.add(win);

addWindowToListInOrderLocked(win, true);

adjustInputMethodDialogsLocked();

imMayMove = false;

}

......

boolean focusChanged = false;

if (win.canReceiveKeys()) {

focusChanged = updateFocusedWindowLocked(UPDATE_FOCUS_WILL_ASSIGN_LAYERS);

if (focusChanged) {

imMayMove = false;

}

}

if (imMayMove) {

moveInputMethodWindowsIfNeededLocked(false);

}

......

}

......

}

......

}
[Android Software/Hacking General [Developers Only]] llrraa2010:
findDesiredInputMethodWindowIndexLocked

frameworks/base/services/java/com/android/server/WindowManagerService.java

public class WindowManagerService extends IWindowManager.Stub

implements Watchdog.Monitor {

......

int findDesiredInputMethodWindowIndexLocked(boolean willMove) {

final ArrayList<WindowState> localmWindows = mWindows;

final int N = localmWindows.size();

WindowState w = null;

int i = N;

while (i > 0) {

i--;

w = localmWindows.get(i);

......

if (canBeImeTarget(w)) {

......

// Yet more tricksyness! If this window is a "starting"

// window, we do actually want to be on top of it, but

// it is not -really- where input will go. So if the caller

// is not actually looking to move the IME, look down below

// for a real window to target...

if (!willMove

&& w.mAttrs.type == WindowManager.LayoutParams.TYPE_APPLICATION_STARTING

&& i > 0) {

WindowState wb = localmWindows.get(i-1);

while (i > 1 && wb.mAppToken == w.mAppToken && !canBeImeTarget(wb)) {

i--;

wb = localmWindows.get(i-1);

}

if (wb.mAppToken == w.mAppToken && canBeImeTarget(wb)) {

i--;

w = wb;

}

}

break;

}

}

mUpcomingInputMethodTarget = w;
[Android Software/Hacking General [Developers Only]] llrraa2010:
moveInputMethodDialogsLocked

frameworks/base/services/java/com/android/server/WindowManagerService.java

public class WindowManagerService extends IWindowManager.Stub

implements Watchdog.Monitor {

......

void moveInputMethodDialogsLocked(int pos) {

ArrayList<WindowState> dialogs = mInputMethodDialogs;

final int N = dialogs.size();

......

for (int i=0; i<N; i++) {

pos = tmpRemoveWindowLocked(pos, dialogs.get(i));

}

......

if (pos >= 0) {

final AppWindowToken targetAppToken = mInputMethodTarget.mAppToken;

if (pos < mWindows.size()) {

WindowState wp = mWindows.get(pos);

if (wp == mInputMethodWindow) {

pos++;

}

}

......

for (int i=0; i<N; i++) {

WindowState win = dialogs.get(i);

win.mTargetAppToken = targetAppToken;

pos = reAddWindowLocked(pos, win);

}

......

return;

}

for (int i=0; i<N; i++) {

WindowState win = dialogs.get(i);

win.mTargetAppToken = null;

reAddWindowToListInOrderLocked(win);

......

}

}

......

}
[Android Software/Hacking General [Developers Only]] llrraa2010:
addInputMethodWindowToListLocked

frameworks/base/services/java/com/android/server/WindowManagerService.java

public class WindowManagerService extends IWindowManager.Stub

implements Watchdog.Monitor {

......

void addInputMethodWindowToListLocked(WindowState win) {

int pos = findDesiredInputMethodWindowIndexLocked(true);

if (pos >= 0) {

win.mTargetAppToken = mInputMethodTarget.mAppToken;

......

mWindows.add(pos, win);

mWindowsChanged = true;

moveInputMethodDialogsLocked(pos+1);

return;

}

win.mTargetAppToken = null;

addWindowToListInOrderLocked(win, true);

moveInputMethodDialogsLocked(pos);

}

......

}
[Android Software/Hacking General [Developers Only]] llrraa2010:
adjustInputMethodDialogsLocked

frameworks/base/services/java/com/android/server/WindowManagerService.java

public class WindowManagerService extends IWindowManager.Stub
implements Watchdog.Monitor {
......

void adjustInputMethodDialogsLocked() {
moveInputMethodDialogsLocked(findDesiredInputMethodWindowIndexLocked(true));
}

......
}
[Android Software/Hacking General [Developers Only]] llrraa2010:
moveInputMethodWindowsIfNeededLocked

frameworks/base/services/java/com/android/server/WindowManagerService.java
public class WindowManagerService extends IWindowManager.Stub
implements Watchdog.Monitor {
......

boolean moveInputMethodWindowsIfNeededLocked(boolean needAssignLayers) {
final WindowState imWin = mInputMethodWindow;
final int DN = mInputMethodDialogs.size();
if (imWin == null && DN == 0) {
return false;
}

int imPos = findDesiredInputMethodWindowIndexLocked(true);
if (imPos >= 0) {
// In this case, the input method windows are to be placed
// immediately above the window they are targeting.

// First check to see if the input method windows are already
// located here, and contiguous.
final int N = mWindows.size();
WindowState firstImWin = imPos < N
? mWindows.get(imPos) : null;

// Figure out the actual input method window that should be
// at the bottom of their stack.
WindowState baseImWin = imWin != null
? imWin : mInputMethodDialogs.get(0);
if (baseImWin.mChildWindows.size() > 0) {
WindowState cw = baseImWin.mChildWindows.get(0);
if (cw.mSubLayer < 0) baseImWin = cw;
}

if (firstImWin == baseImWin) {
// The windows haven't moved... but are they still contiguous?
// First find the top IM window.
int pos = imPos+1;
while (pos < N) {
if (!(mWindows.get(pos)).mIsImWindow) {
break;
}
pos++;
}
pos++;
// Now there should be no more input method windows above.
while (pos < N) {
if ((mWindows.get(pos)).mIsImWindow) {
break;
}
pos++;
}
if (pos >= N) {
// All is good!
return false;
}
}

if (imWin != null) {
......
imPos = tmpRemoveWindowLocked(imPos, imWin);
......
imWin.mTargetAppToken = mInputMethodTarget.mAppToken;
reAddWindowLocked(imPos, imWin);
......
if (DN > 0) moveInputMethodDialogsLocked(imPos+1);
} else {
moveInputMethodDialogsLocked(imPos);
}

} else {
// In this case, the input method windows go in a fixed layer,
// because they aren't currently associated with a focus window.

if (imWin != null) {
......
tmpRemoveWindowLocked(0, imWin);
imWin.mTargetAppToken = null;
reAddWindowToListInOrderLocked(imWin);
......
if (DN > 0) moveInputMethodDialogsLocked(-1);;
} else {
moveInputMethodDialogsLocked(-1);;
}

}

if (needAssignLayers) {
assignLayersLocked();
}

return true;
}

......
}
[Android Software/Hacking General [Developers Only]] llrraa2010:
20.4 Wallpaper Window management

AndroidManifest.xml

<activity android:name=".WallpaperActivity"
android:theme="@android:style/Theme.Translucent">
......
</activity>
[Android Software/Hacking General [Developers Only]] llrraa2010:
public class WallpaperActivity extends Activity {
......

[MENTION=439709]override[/MENTION]
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);

getWindow().addFlags(WindowManager.LayoutParams.FLAG_SHOW_WALLPAPER);
}

......
}
[Android Software/Hacking General [Developers Only]] llrraa2010:
addWindow

public class WindowManagerService extends IWindowManager.Stub
implements Watchdog.Monitor {
......

public int addWindow(Session session, IWindow client,
WindowManager.LayoutParams attrs, int viewVisibility,
Rect outContentInsets, InputChannel outInputChannel) {
......

synchronized(mWindowMap) {
......

WindowToken token = mTokenMap.get(attrs.token);
if (token == null) {
......

if (attrs.type == TYPE_WALLPAPER) {
......
return WindowManagerImpl.ADD_BAD_APP_TOKEN;
}

......
}
......

win = new WindowState(session, client, token,
attachedWindow, attrs, viewVisibility);
......

if (attrs.type == TYPE_INPUT_METHOD) {
......
} else if (attrs.type == TYPE_INPUT_METHOD_DIALOG) {
......
} else {
addWindowToListInOrderLocked(win, true);
if (attrs.type == TYPE_WALLPAPER) {
......
adjustWallpaperWindowsLocked();
} else if ((attrs.flags&FLAG_SHOW_WALLPAPER) != 0) {
adjustWallpaperWindowsLocked();
}
}
......

assignLayersLocked();

......
}

......
}

......
}