Loading core/java/android/view/IWindowManager.aidl +2 −1 Original line number Diff line number Diff line Loading @@ -106,12 +106,13 @@ interface IWindowManager * @param alwaysFocusable True if the app windows are always focusable regardless of the stack * they are in. * @param homeTask True if this is the task. * @param targetSdkVersion The application's target SDK version */ void addAppToken(int addPos, IApplicationToken token, int taskId, int stackId, int requestedOrientation, boolean fullscreen, boolean showWhenLocked, int userId, int configChanges, boolean voiceInteraction, boolean launchTaskBehind, in Rect taskBounds, in Configuration configuration, int taskResizeMode, boolean alwaysFocusable, boolean homeTask); boolean alwaysFocusable, boolean homeTask, int targetSdkVersion); /** * * @param token The token we are adding to the input task Id. Loading services/core/java/com/android/server/am/ActivityStack.java +2 −1 Original line number Diff line number Diff line Loading @@ -5177,7 +5177,8 @@ final class ActivityStack { r.task.taskId, mStackId, r.info.screenOrientation, r.fullscreen, (r.info.flags & FLAG_SHOW_FOR_ALL_USERS) != 0, r.userId, r.info.configChanges, task.voiceSession != null, r.mLaunchTaskBehind, bounds, task.mOverrideConfig, task.mResizeMode, r.isAlwaysFocusable(), task.isHomeTask()); task.mResizeMode, r.isAlwaysFocusable(), task.isHomeTask(), r.appInfo.targetSdkVersion); r.taskConfigOverride = task.mOverrideConfig; } Loading services/core/java/com/android/server/wm/AppWindowToken.java +1 −0 Original line number Diff line number Diff line Loading @@ -72,6 +72,7 @@ class AppWindowToken extends WindowToken { int requestedOrientation = ActivityInfo.SCREEN_ORIENTATION_UNSPECIFIED; boolean layoutConfigChanges; boolean showForAllUsers; int targetSdk; // The input dispatching timeout for this application token in nanoseconds. long inputDispatchingTimeoutNanos; Loading services/core/java/com/android/server/wm/DragState.java +9 −1 Original line number Diff line number Diff line Loading @@ -28,6 +28,7 @@ import android.content.Context; import android.graphics.Matrix; import android.graphics.Point; import android.hardware.input.InputManager; import android.os.Build; import android.os.IBinder; import android.os.Message; import android.os.Process; Loading Loading @@ -289,7 +290,7 @@ class DragState { if (!targetWin.isPotentialDragTarget()) { return false; } if ((mFlags & View.DRAG_FLAG_GLOBAL) == 0) { if ((mFlags & View.DRAG_FLAG_GLOBAL) == 0 || !targetWindowSupportsGlobalDrag(targetWin)) { // Drag is limited to the current window. if (mLocalWin != targetWin.mClient.asBinder()) { return false; Loading @@ -300,6 +301,13 @@ class DragState { mSourceUserId == UserHandle.getUserId(targetWin.getOwningUid()); } private boolean targetWindowSupportsGlobalDrag(WindowState targetWin) { // Global drags are limited to system windows, and windows for apps that are targeting N and // above. return targetWin.mAppToken == null || targetWin.mAppToken.targetSdk >= Build.VERSION_CODES.N; } /* helper - send a ACTION_DRAG_STARTED event only if the window has not * previously been notified, i.e. it became visible after the drag operation * was begun. This is a rare case. Loading services/core/java/com/android/server/wm/WindowManagerService.java +2 −1 Original line number Diff line number Diff line Loading @@ -3420,7 +3420,7 @@ public class WindowManagerService extends IWindowManager.Stub int requestedOrientation, boolean fullscreen, boolean showForAllUsers, int userId, int configChanges, boolean voiceInteraction, boolean launchTaskBehind, Rect taskBounds, Configuration config, int taskResizeMode, boolean alwaysFocusable, boolean homeTask) { boolean homeTask, int targetSdkVersion) { if (!checkCallingPermission(android.Manifest.permission.MANAGE_APP_TOKENS, "addAppToken()")) { throw new SecurityException("Requires MANAGE_APP_TOKENS permission"); Loading Loading @@ -3450,6 +3450,7 @@ public class WindowManagerService extends IWindowManager.Stub atoken.inputDispatchingTimeoutNanos = inputDispatchingTimeoutNanos; atoken.appFullscreen = fullscreen; atoken.showForAllUsers = showForAllUsers; atoken.targetSdk = targetSdkVersion; atoken.requestedOrientation = requestedOrientation; atoken.layoutConfigChanges = (configChanges & (ActivityInfo.CONFIG_SCREEN_SIZE | ActivityInfo.CONFIG_ORIENTATION)) != 0; Loading Loading
core/java/android/view/IWindowManager.aidl +2 −1 Original line number Diff line number Diff line Loading @@ -106,12 +106,13 @@ interface IWindowManager * @param alwaysFocusable True if the app windows are always focusable regardless of the stack * they are in. * @param homeTask True if this is the task. * @param targetSdkVersion The application's target SDK version */ void addAppToken(int addPos, IApplicationToken token, int taskId, int stackId, int requestedOrientation, boolean fullscreen, boolean showWhenLocked, int userId, int configChanges, boolean voiceInteraction, boolean launchTaskBehind, in Rect taskBounds, in Configuration configuration, int taskResizeMode, boolean alwaysFocusable, boolean homeTask); boolean alwaysFocusable, boolean homeTask, int targetSdkVersion); /** * * @param token The token we are adding to the input task Id. Loading
services/core/java/com/android/server/am/ActivityStack.java +2 −1 Original line number Diff line number Diff line Loading @@ -5177,7 +5177,8 @@ final class ActivityStack { r.task.taskId, mStackId, r.info.screenOrientation, r.fullscreen, (r.info.flags & FLAG_SHOW_FOR_ALL_USERS) != 0, r.userId, r.info.configChanges, task.voiceSession != null, r.mLaunchTaskBehind, bounds, task.mOverrideConfig, task.mResizeMode, r.isAlwaysFocusable(), task.isHomeTask()); task.mResizeMode, r.isAlwaysFocusable(), task.isHomeTask(), r.appInfo.targetSdkVersion); r.taskConfigOverride = task.mOverrideConfig; } Loading
services/core/java/com/android/server/wm/AppWindowToken.java +1 −0 Original line number Diff line number Diff line Loading @@ -72,6 +72,7 @@ class AppWindowToken extends WindowToken { int requestedOrientation = ActivityInfo.SCREEN_ORIENTATION_UNSPECIFIED; boolean layoutConfigChanges; boolean showForAllUsers; int targetSdk; // The input dispatching timeout for this application token in nanoseconds. long inputDispatchingTimeoutNanos; Loading
services/core/java/com/android/server/wm/DragState.java +9 −1 Original line number Diff line number Diff line Loading @@ -28,6 +28,7 @@ import android.content.Context; import android.graphics.Matrix; import android.graphics.Point; import android.hardware.input.InputManager; import android.os.Build; import android.os.IBinder; import android.os.Message; import android.os.Process; Loading Loading @@ -289,7 +290,7 @@ class DragState { if (!targetWin.isPotentialDragTarget()) { return false; } if ((mFlags & View.DRAG_FLAG_GLOBAL) == 0) { if ((mFlags & View.DRAG_FLAG_GLOBAL) == 0 || !targetWindowSupportsGlobalDrag(targetWin)) { // Drag is limited to the current window. if (mLocalWin != targetWin.mClient.asBinder()) { return false; Loading @@ -300,6 +301,13 @@ class DragState { mSourceUserId == UserHandle.getUserId(targetWin.getOwningUid()); } private boolean targetWindowSupportsGlobalDrag(WindowState targetWin) { // Global drags are limited to system windows, and windows for apps that are targeting N and // above. return targetWin.mAppToken == null || targetWin.mAppToken.targetSdk >= Build.VERSION_CODES.N; } /* helper - send a ACTION_DRAG_STARTED event only if the window has not * previously been notified, i.e. it became visible after the drag operation * was begun. This is a rare case. Loading
services/core/java/com/android/server/wm/WindowManagerService.java +2 −1 Original line number Diff line number Diff line Loading @@ -3420,7 +3420,7 @@ public class WindowManagerService extends IWindowManager.Stub int requestedOrientation, boolean fullscreen, boolean showForAllUsers, int userId, int configChanges, boolean voiceInteraction, boolean launchTaskBehind, Rect taskBounds, Configuration config, int taskResizeMode, boolean alwaysFocusable, boolean homeTask) { boolean homeTask, int targetSdkVersion) { if (!checkCallingPermission(android.Manifest.permission.MANAGE_APP_TOKENS, "addAppToken()")) { throw new SecurityException("Requires MANAGE_APP_TOKENS permission"); Loading Loading @@ -3450,6 +3450,7 @@ public class WindowManagerService extends IWindowManager.Stub atoken.inputDispatchingTimeoutNanos = inputDispatchingTimeoutNanos; atoken.appFullscreen = fullscreen; atoken.showForAllUsers = showForAllUsers; atoken.targetSdk = targetSdkVersion; atoken.requestedOrientation = requestedOrientation; atoken.layoutConfigChanges = (configChanges & (ActivityInfo.CONFIG_SCREEN_SIZE | ActivityInfo.CONFIG_ORIENTATION)) != 0; Loading