Lines Matching refs:token

365      * Mapping from a token IBinder to a WindowToken object.
946 //This method finds out the index of a window that has the same app token as
960 * Return the list of Windows from the passed token on the given Display.
961 * @param token The token with all the windows.
963 * @return List of windows from token that are on displayContent.
965 WindowList getTokenWindowsOnDisplay(WindowToken token, DisplayContent displayContent) {
967 final int count = token.windows.size();
969 final WindowState win = token.windows.get(i);
1000 final WindowToken token = win.mToken;
1009 WindowList tokenWindowList = getTokenWindowsOnDisplay(token, displayContent);
1020 tokenWindowsPos = indexOfWinInWindowList(lowestWindow, token.windows);
1026 tokenWindowsPos = indexOfWinInWindowList(lastWindow, token.windows);
1032 //windows associated with this token.
1038 // No window from token found on win's display.
1042 windows.get(newIdx), token.windows) + 1;
1050 // No windows from this token on this display
1052 + " (token=" + token + ")");
1064 if (t == token) {
1075 // We haven't reached the token yet; if this token
1077 // use it as an anchor for when we do reach the token.
1111 // token that has windows on this display.
1181 final WindowToken token = win.mToken;
1188 WindowList tokenWindowList = getTokenWindowsOnDisplay(token, displayContent);
1209 if (DEBUG_ADD_REMOVE) Slog.v(TAG, "Adding " + win + " to " + token);
1210 token.windows.add(i, win);
1220 if (DEBUG_ADD_REMOVE) Slog.v(TAG, "Adding " + win + " to " + token);
1221 token.windows.add(i, win);
1230 if (DEBUG_ADD_REMOVE) Slog.v(TAG, "Adding " + win + " to " + token);
1231 token.windows.add(win);
1248 final WindowToken token = win.mToken;
1250 if (token.appWindowToken != null) {
1256 if (DEBUG_ADD_REMOVE) Slog.v(TAG, "Adding " + win + " to " + token);
1257 token.windows.add(tokenWindowsPos, win);
1354 AppWindowToken token = curTarget == null ? null : curTarget.mAppToken;
1355 if (token != null) {
1363 if (token.mAppAnimator.animating || token.mAppAnimator.animation != null) {
1368 if (win.mAppToken != token) {
1729 // If this window's app token is hidden and not animating,
1733 "Skipping hidden and not animating token: " + w);
1756 + ": token animating, looking behind.");
1928 WindowToken token = mWallpaperTokens.get(curTokenIndex);
1929 if (token.hidden == visible) {
1931 "Wallpaper token " + token + " hidden=" + !visible);
1933 token.hidden = !visible;
1939 int curWallpaperIndex = token.windows.size();
1942 WindowState wallpaper = token.windows.get(curWallpaperIndex);
2038 WindowToken token = mWallpaperTokens.get(curTokenIndex);
2039 int curWallpaperIndex = token.windows.size();
2042 WindowState wallpaper = token.windows.get(curWallpaperIndex);
2179 WindowToken token = mWallpaperTokens.get(curTokenIndex);
2180 int curWallpaperIndex = token.windows.size();
2183 WindowState wallpaper = token.windows.get(curWallpaperIndex);
2228 WindowToken token = mWallpaperTokens.get(curTokenIndex);
2229 if (token.hidden == visible) {
2230 token.hidden = !visible;
2236 int curWallpaperIndex = token.windows.size();
2239 WindowState wallpaper = token.windows.get(curWallpaperIndex);
2287 attachedWindow = windowForClientLocked(null, attrs.token, false);
2289 Slog.w(TAG, "Attempted to add window with token that is not a window: "
2290 + attrs.token + ". Aborting.");
2295 Slog.w(TAG, "Attempted to add window with token that is a sub-window: "
2296 + attrs.token + ". Aborting.");
2307 WindowToken token = mTokenMap.get(attrs.token);
2308 if (token == null) {
2310 Slog.w(TAG, "Attempted to add application window with unknown token "
2311 + attrs.token + ". Aborting.");
2315 Slog.w(TAG, "Attempted to add input method window with unknown token "
2316 + attrs.token + ". Aborting.");
2320 Slog.w(TAG, "Attempted to add voice interaction window with unknown token "
2321 + attrs.token + ". Aborting.");
2325 Slog.w(TAG, "Attempted to add wallpaper window with unknown token "
2326 + attrs.token + ". Aborting.");
2330 Slog.w(TAG, "Attempted to add Dream window with unknown token "
2331 + attrs.token + ". Aborting.");
2334 token = new WindowToken(this, attrs.token, -1, false);
2337 AppWindowToken atoken = token.appWindowToken;
2339 Slog.w(TAG, "Attempted to add window with non-application token "
2340 + token + ". Aborting.");
2343 Slog.w(TAG, "Attempted to add window with exiting application token "
2344 + token + ". Aborting.");
2354 if (token.windowType != TYPE_INPUT_METHOD) {
2355 Slog.w(TAG, "Attempted to add input method window with bad token "
2356 + attrs.token + ". Aborting.");
2360 if (token.windowType != TYPE_VOICE_INTERACTION) {
2361 Slog.w(TAG, "Attempted to add voice interaction window with bad token "
2362 + attrs.token + ". Aborting.");
2366 if (token.windowType != TYPE_WALLPAPER) {
2367 Slog.w(TAG, "Attempted to add wallpaper window with bad token "
2368 + attrs.token + ". Aborting.");
2372 if (token.windowType != TYPE_DREAM) {
2373 Slog.w(TAG, "Attempted to add Dream window with bad token "
2374 + attrs.token + ". Aborting.");
2377 } else if (token.appWindowToken != null) {
2379 // It is not valid to use an app token with other system types; we will
2380 // instead make a new token for it (as if null had been passed in for the token).
2381 attrs.token = null;
2382 token = new WindowToken(this, null, -1, false);
2386 win = new WindowState(this, session, client, token,
2426 mTokenMap.put(attrs.token, token);
2437 if (type == TYPE_APPLICATION_STARTING && token.appWindowToken != null) {
2438 token.appWindowToken.startingWindow = win;
2439 if (DEBUG_STARTING_WINDOW) Slog.v (TAG, "addWindow: " + token.appWindowToken
2695 final WindowToken token = win.mToken;
2697 if (DEBUG_ADD_REMOVE) Slog.v(TAG, "Removing " + win + " from " + token);
2698 token.windows.remove(win);
2704 + token.windows.size());
2705 if (token.windows.size() == 0) {
2706 if (!token.explicit) {
2707 mTokenMap.remove(token.token);
2887 WindowToken token = mWallpaperTokens.get(curTokenIndex);
2888 int curWallpaperIndex = token.windows.size();
2891 WindowState wallpaper = token.windows.get(curWallpaperIndex);
2941 public void onRectangleOnScreenRequested(IBinder token, Rect rectangle) {
2944 WindowState window = mWindowMap.get(token);
2953 public IWindowId getWindowId(IBinder token) {
2955 WindowState window = mWindowMap.get(token);
3435 if (tokens.get(v) != atoken.token) {
3481 AppWindowToken findAppWindowToken(IBinder token) {
3482 WindowToken wtoken = mTokenMap.get(token);
3490 public void addWindowToken(IBinder token, int type) {
3497 WindowToken wtoken = mTokenMap.get(token);
3499 Slog.w(TAG, "Attempted to add existing input method token: " + token);
3502 wtoken = new WindowToken(this, token, type, true);
3503 mTokenMap.put(token, wtoken);
3511 public void removeWindowToken(IBinder token) {
3520 WindowToken wtoken = mTokenMap.remove(token);
3569 Slog.w(TAG, "Attempted to remove non-existing token: " + token);
3590 public void addAppToken(int addPos, IApplicationToken token, int taskId, int stackId,
3603 // (which holds locks while querying the application token).
3606 inputDispatchingTimeoutNanos = token.getKeyDispatchingTimeout() * 1000000L;
3613 AppWindowToken atoken = findAppWindowToken(token.asBinder());
3615 Slog.w(TAG, "Attempted to add existing app token: " + token);
3618 atoken = new AppWindowToken(this, token, voiceInteraction);
3637 mTokenMap.put(token.asBinder(), atoken);
3648 public void setAppGroupId(IBinder token, int groupId) {
3655 final AppWindowToken atoken = findAppWindowToken(token);
3657 Slog.w(TAG, "Attempted to set group id of non-existing app token: " + token);
3755 // Last token in this task.
3902 public void setAppOrientation(IApplicationToken token, int requestedOrientation) {
3909 AppWindowToken atoken = findAppWindowToken(token.asBinder());
3911 Slog.w(TAG, "Attempted to set orientation of non-existing app token: " + token);
3920 public int getAppOrientation(IApplicationToken token) {
3922 AppWindowToken wtoken = findAppWindowToken(token.asBinder());
3979 public void setFocusedApp(IBinder token, boolean moveFocusNow) {
3987 if (token == null) {
3991 newFocus = findAppWindowToken(token);
3993 Slog.w(TAG, "Attempted to set focus to non-existing app token: " + token);
4116 public void setAppStartingWindow(IBinder token, String pkg,
4127 TAG, "setAppStartingWindow: token=" + token + " pkg=" + pkg
4130 AppWindowToken wtoken = findAppWindowToken(token);
4132 Slog.w(TAG, "Attempted to set icon of non-existing app token: " + token);
4164 // token.
4192 // tokens. If the old token is displayed, we should
4249 // The old token is animating with a thumbnail, transfer
4250 // that to the new token.
4329 public void removeAppStartingWindow(IBinder token) {
4331 AppWindowToken wtoken = mTokenMap.get(token).appWindowToken;
4339 public void setAppWillBeHidden(IBinder token) {
4348 wtoken = findAppWindowToken(token);
4350 Slog.w(TAG, "Attempted to set will be hidden of non-existing app token: " + token);
4357 public void setAppFullscreen(IBinder token, boolean toOpaque) {
4359 AppWindowToken atoken = findAppWindowToken(token);
4362 setWindowOpaqueLocked(token, toOpaque);
4368 public void setWindowOpaque(IBinder token, boolean isOpaque) {
4370 setWindowOpaqueLocked(token, isOpaque);
4374 public void setWindowOpaqueLocked(IBinder token, boolean isOpaque) {
4375 AppWindowToken wtoken = findAppWindowToken(token);
4506 public void setAppVisibility(IBinder token, boolean visible) {
4515 wtoken = findAppWindowToken(token);
4517 Slog.w(TAG, "Attempted to set visibility of non-existing app token: " + token);
4522 token + ", visible=" + visible + "): " + mAppTransition +
4528 // the visibility of this token until we execute that transition.
4546 // If the token is currently hidden (should be the
4569 // If the token is currently visible (should be the
4673 public void startAppFreezingScreen(IBinder token, int configChanges) {
4681 if (DEBUG_ORIENTATION) Slog.v(TAG, "Skipping set freeze of " + token);
4685 AppWindowToken wtoken = findAppWindowToken(token);
4687 Slog.w(TAG, "Attempted to freeze screen with non-existing app token: " + wtoken);
4697 public void stopAppFreezingScreen(IBinder token, boolean force) {
4704 AppWindowToken wtoken = findAppWindowToken(token);
4709 if (DEBUG_ORIENTATION) Slog.v(TAG, "Clear freezing of " + token
4722 Slog.e(TAG, "removeAppFromTaskLocked: token=" + wtoken + " not found.");
4728 public void removeAppToken(IBinder token) {
4740 WindowToken basewtoken = mTokenMap.remove(token);
4742 if (DEBUG_APP_TRANSITIONS) Slog.v(TAG, "Removing app token: " + wtoken);
4763 // set the token aside because it has an active animation to be finished
4769 // Make sure there is no animation running on this token,
4783 if (DEBUG_FOCUS_LIGHT) Slog.v(TAG, "Removing focused app token:" + wtoken);
4789 Slog.w(TAG, "Attempted to remove non-existing app token: " + token);
4817 private boolean tmpRemoveAppWindowsLocked(WindowToken token) {
4818 WindowList windows = token.windows;
4852 Slog.v(TAG, " activity #" + tokenNdx + ": " + tokens.get(tokenNdx).token);
4900 // Find the first app token below the new position that has
4902 if (DEBUG_REORDER) Slog.v(TAG, "Looking for lower windows in " + wtoken.token);
4904 if (DEBUG_REORDER) Slog.v(TAG, "Skipping token -- currently sending to bottom");
4973 WindowToken token) {
4974 final int NW = token.windows.size();
4976 final WindowState win = token.windows.get(i);
5250 public void disableKeyguard(IBinder token, String tag) {
5256 if (token == null) {
5257 throw new IllegalArgumentException("token == null");
5261 KeyguardDisableHandler.KEYGUARD_DISABLE, new Pair<IBinder, String>(token, tag)));
5265 public void reenableKeyguard(IBinder token) {
5271 if (token == null) {
5272 throw new IllegalArgumentException("token == null");
5276 KeyguardDisableHandler.KEYGUARD_REENABLE, token));
6052 if (ws.mAppToken == null || ws.mAppToken.token != appToken) {
6083 if (ws.mAppToken != null && ws.mAppToken.token == appToken &&
7273 IBinder token = null;
7289 token = new Binder();
7290 mDragState = new DragState(this, token, surface, /*flags*/ 0, winBinder);
7291 token = mDragState.mToken = new Binder();
7312 return token;
7330 WindowToken token = mTokenMap.get(_token);
7331 if (token != null) {
7332 mInputMonitor.pauseDispatchingLw(token);
7345 WindowToken token = mTokenMap.get(_token);
7346 if (token != null) {
7347 mInputMonitor.resumeDispatchingLw(token);
7595 wtoken.token, sd.pkg, sd.theme, sd.compatInfo,
7629 mPolicy.removeStartingWindow(wtoken.token, view);
7639 IBinder token = null;
7648 token = wtoken.token;
7657 mPolicy.removeStartingWindow(token, view);
7665 IBinder token = null;
7685 token = wtoken.token;
7693 mPolicy.removeStartingWindow(token, view);
8050 // have a window in this app token. Let's look for it.
8523 Slog.w(TAG, "Current app token list:");
8965 // app token sets are wallpaper targets, in which
9437 mH.obtainMessage(H.NOTIFY_ACTIVITY_DRAWN, wtoken.token).sendToTarget();
9789 // hiding apps, moving apps in Z-order, etc. The app token list
9881 WindowToken token = exitingTokens.get(i);
9882 if (!token.hasVisible) {
9884 if (token.windowType == TYPE_WALLPAPER) {
9885 mWallpaperTokens.remove(token);
9897 AppWindowToken token = exitingAppTokens.get(i);
9898 if (!token.hasVisible && !mClosingApps.contains(token) && !token.mDeferRemoval) {
9899 // Make sure there is no animation running on this token,
9902 token.mAppAnimator.clearAnimation();
9903 token.mAppAnimator.animating = false;
9905 "performLayout: App token exiting now removed" + token);
9906 removeAppFromTaskLocked(token);
10186 + " token=" + ws.mToken
10197 Slog.w(TAG, "LEAKED SURFACE (app token hidden): "
10199 + " token=" + ws.mAppToken);
10382 final AppWindowToken token = tokens.get(tokenNdx);
10383 if (wtoken == token) {
10386 if (mFocusedApp == token) {
10394 // Early exit from loop, must have found the matching token.
10747 public boolean clearWindowContentFrameStats(IBinder token) {
10753 WindowState windowState = mWindowMap.get(token);
10766 public WindowContentFrameStats getWindowContentFrameStats(IBinder token) {
10772 WindowState windowState = mWindowMap.get(token);
10807 WindowToken token = it.next();
10808 pw.print(" "); pw.print(token);
10811 token.dump(pw, " ");
10821 WindowToken token = mWallpaperTokens.get(i);
10823 pw.print(' '); pw.print(token);
10826 token.dump(pw, " ");
10836 WindowToken token = mFinishedStarting.get(i);
10838 pw.print(' '); pw.print(token);
10841 token.dump(pw, " ");
11209 pw.println(" t[okens]: token list");
11578 public void getWindowFrame(IBinder token, Rect outBounds) {
11580 WindowState windowState = mWindowMap.get(token);