diff options
13 files changed, 5 insertions, 272 deletions
diff --git a/services/core/java/com/android/server/wm/ActivityRecord.java b/services/core/java/com/android/server/wm/ActivityRecord.java index 3de4cdc930e5..eab1e31c5518 100644 --- a/services/core/java/com/android/server/wm/ActivityRecord.java +++ b/services/core/java/com/android/server/wm/ActivityRecord.java @@ -86,8 +86,6 @@ import static android.content.pm.ActivityInfo.SCREEN_ORIENTATION_UNSET; import static android.content.pm.ActivityInfo.SIZE_CHANGES_SUPPORTED_METADATA; import static android.content.pm.ActivityInfo.SIZE_CHANGES_SUPPORTED_OVERRIDE; import static android.content.pm.ActivityInfo.SIZE_CHANGES_UNSUPPORTED_OVERRIDE; -import static android.content.pm.ActivityInfo.isFixedOrientationLandscape; -import static android.content.pm.ActivityInfo.isFixedOrientationPortrait; import static android.content.res.Configuration.ASSETS_SEQ_UNDEFINED; import static android.content.res.Configuration.EMPTY; import static android.content.res.Configuration.ORIENTATION_LANDSCAPE; @@ -4160,29 +4158,6 @@ final class ActivityRecord extends WindowToken implements WindowManagerService.A true /* topToBottom */); } - WindowState getImeTargetBelowWindow(WindowState w) { - final int index = mChildren.indexOf(w); - if (index > 0) { - return mChildren.get(index - 1) - .getWindow(WindowState::canBeImeTarget); - } - return null; - } - - WindowState getHighestAnimLayerWindow(WindowState currentTarget) { - WindowState candidate = null; - for (int i = mChildren.indexOf(currentTarget); i >= 0; i--) { - final WindowState w = mChildren.get(i); - if (w.mRemoved) { - continue; - } - if (candidate == null) { - candidate = w; - } - } - return candidate; - } - @Override boolean forAllActivities(Predicate<ActivityRecord> callback, boolean traverseTopToBottom) { return callback.test(this); @@ -7017,11 +6992,6 @@ final class ActivityRecord extends WindowToken implements WindowManagerService.A clearThumbnail(); } - @VisibleForTesting - WindowContainerThumbnail getThumbnail() { - return mThumbnail; - } - private void clearThumbnail() { if (mThumbnail == null) { return; @@ -7034,9 +7004,6 @@ final class ActivityRecord extends WindowToken implements WindowManagerService.A return mTransit; } - int getTransitFlags() { - return mTransitFlags; - } void registerRemoteAnimations(RemoteAnimationDefinition definition) { mRemoteAnimationDefinition = definition; @@ -8089,20 +8056,6 @@ final class ActivityRecord extends WindowToken implements WindowManagerService.A super.onResize(); } - /** Returns true if the configuration is compatible with this activity. */ - boolean isConfigurationCompatible(Configuration config) { - final int orientation = getRequestedOrientation(); - if (isFixedOrientationPortrait(orientation) - && config.orientation != ORIENTATION_PORTRAIT) { - return false; - } - if (isFixedOrientationLandscape(orientation) - && config.orientation != ORIENTATION_LANDSCAPE) { - return false; - } - return true; - } - private boolean applyAspectRatio(Rect outBounds, Rect containingAppBounds, Rect containingBounds) { return applyAspectRatio(outBounds, containingAppBounds, containingBounds, diff --git a/services/core/java/com/android/server/wm/ActivityTaskManagerService.java b/services/core/java/com/android/server/wm/ActivityTaskManagerService.java index ff5dcc743c56..690397fa3e86 100644 --- a/services/core/java/com/android/server/wm/ActivityTaskManagerService.java +++ b/services/core/java/com/android/server/wm/ActivityTaskManagerService.java @@ -501,9 +501,6 @@ public class ActivityTaskManagerService extends IActivityTaskManager.Stub { */ private Configuration mTempConfig = new Configuration(); - /** Temporary to avoid allocations. */ - final StringBuilder mStringBuilder = new StringBuilder(256); - /** * Whether normal application switches are allowed; a call to {@link #stopAppSwitches() * disables this. @@ -3096,11 +3093,6 @@ public class ActivityTaskManagerService extends IActivityTaskManager.Stub { throw new SecurityException(msg); } - @VisibleForTesting - int checkGetTasksPermission(String permission, int pid, int uid) { - return checkPermission(permission, pid, uid); - } - static int checkPermission(String permission, int pid, int uid) { if (permission == null) { return PackageManager.PERMISSION_DENIED; @@ -3120,10 +3112,10 @@ public class ActivityTaskManagerService extends IActivityTaskManager.Stub { return true; } - boolean allowed = checkGetTasksPermission(android.Manifest.permission.REAL_GET_TASKS, + boolean allowed = checkPermission(android.Manifest.permission.REAL_GET_TASKS, callingPid, callingUid) == PackageManager.PERMISSION_GRANTED; if (!allowed) { - if (checkGetTasksPermission(android.Manifest.permission.GET_TASKS, + if (checkPermission(android.Manifest.permission.GET_TASKS, callingPid, callingUid) == PackageManager.PERMISSION_GRANTED) { // Temporary compatibility: some existing apps on the system image may // still be requesting the old permission and not switched to the new diff --git a/services/core/java/com/android/server/wm/DisplayContent.java b/services/core/java/com/android/server/wm/DisplayContent.java index 52546affa51e..806d27a554ce 100644 --- a/services/core/java/com/android/server/wm/DisplayContent.java +++ b/services/core/java/com/android/server/wm/DisplayContent.java @@ -555,9 +555,6 @@ class DisplayContent extends RootDisplayArea implements WindowManagerPolicy.Disp /** Windows removed since {@link #mCurrentFocus} was set to null. Used for ANR blaming. */ final ArrayList<WindowState> mWinRemovedSinceNullFocus = new ArrayList<>(); - /** Windows whose client's insets states are not up-to-date. */ - final ArrayList<WindowState> mWinInsetsChanged = new ArrayList<>(); - private ScreenRotationAnimation mScreenRotationAnimation; /** @@ -637,9 +634,6 @@ class DisplayContent extends RootDisplayArea implements WindowManagerPolicy.Disp /** The surface parent of the IME container. */ private SurfaceControl mInputMethodSurfaceParent; - /** If {@code true} hold off on modifying the animation layer of {@link #mImeLayeringTarget} */ - boolean mImeLayeringTargetWaitingAnim; - /** The screenshot IME surface to place on the task while transitioning to the next task. */ SurfaceControl mImeScreenshot; @@ -4976,12 +4970,6 @@ class DisplayContent extends RootDisplayArea implements WindowManagerPolicy.Disp } } - void assignRootTaskOrdering() { - forAllTaskDisplayAreas(taskDisplayArea -> { - taskDisplayArea.assignRootTaskOrdering(getPendingTransaction()); - }); - } - /** * Increment the deferral count to determine whether to update the IME target. */ diff --git a/services/core/java/com/android/server/wm/DisplayPolicy.java b/services/core/java/com/android/server/wm/DisplayPolicy.java index 750c890ec066..180ee6109cc1 100644 --- a/services/core/java/com/android/server/wm/DisplayPolicy.java +++ b/services/core/java/com/android/server/wm/DisplayPolicy.java @@ -164,7 +164,6 @@ import com.android.server.policy.WindowManagerPolicy.ScreenOnListener; import com.android.server.policy.WindowManagerPolicy.WindowManagerFuncs; import com.android.server.statusbar.StatusBarManagerInternal; import com.android.server.wallpaper.WallpaperManagerInternal; -import com.android.server.wm.InputMonitor.EventReceiverInputConsumer; import java.io.PrintWriter; import java.util.ArrayList; @@ -395,7 +394,6 @@ public class DisplayPolicy { // -------- PolicyHandler -------- private static final int MSG_REQUEST_TRANSIENT_BARS = 2; - private static final int MSG_DISPOSE_INPUT_CONSUMER = 3; private static final int MSG_ENABLE_POINTER_LOCATION = 4; private static final int MSG_DISABLE_POINTER_LOCATION = 5; @@ -424,9 +422,6 @@ public class DisplayPolicy { } } break; - case MSG_DISPOSE_INPUT_CONSUMER: - disposeInputConsumer((EventReceiverInputConsumer) msg.obj); - break; case MSG_ENABLE_POINTER_LOCATION: enablePointerLocation(); break; @@ -2573,12 +2568,6 @@ public class DisplayPolicy { mImmersiveModeConfirmation.confirmCurrentPrompt(); } - private void disposeInputConsumer(EventReceiverInputConsumer inputConsumer) { - if (inputConsumer != null) { - inputConsumer.dispose(); - } - } - boolean isKeyguardShowing() { return mService.mPolicy.isKeyguardShowing(); } diff --git a/services/core/java/com/android/server/wm/InputMonitor.java b/services/core/java/com/android/server/wm/InputMonitor.java index fa4d27c68f5a..d17c10906f06 100644 --- a/services/core/java/com/android/server/wm/InputMonitor.java +++ b/services/core/java/com/android/server/wm/InputMonitor.java @@ -54,14 +54,12 @@ import android.graphics.Rect; import android.graphics.Region; import android.os.Handler; import android.os.IBinder; -import android.os.Looper; import android.os.Trace; import android.os.UserHandle; import android.util.ArrayMap; import android.util.EventLog; import android.util.Slog; import android.view.InputChannel; -import android.view.InputEventReceiver; import android.view.InputWindowHandle; import android.view.SurfaceControl; @@ -112,44 +110,6 @@ final class InputMonitor { private WeakReference<ActivityRecord> mActiveRecentsActivity = null; private WeakReference<ActivityRecord> mActiveRecentsLayerRef = null; - /** - * Representation of a input consumer that the policy has added to the window manager to consume - * input events going to windows below it. - */ - static final class EventReceiverInputConsumer extends InputConsumerImpl { - private InputMonitor mInputMonitor; - private final InputEventReceiver mInputEventReceiver; - - EventReceiverInputConsumer(WindowManagerService service, InputMonitor monitor, - Looper looper, String name, - InputEventReceiver.Factory inputEventReceiverFactory, - int clientPid, UserHandle clientUser, int displayId) { - super(service, null /* token */, name, null /* inputChannel */, clientPid, clientUser, - displayId); - mInputMonitor = monitor; - mInputEventReceiver = inputEventReceiverFactory.createInputEventReceiver( - mClientChannel, looper); - } - - /** Removes the input consumer from the window manager. */ - void dismiss() { - synchronized (mService.mGlobalLock) { - mInputMonitor.mInputConsumers.remove(mName); - hide(mInputMonitor.mInputTransaction); - mInputMonitor.updateInputWindowsLw(true /* force */); - } - } - - /** Disposes the input consumer and input receiver from the associated thread. */ - void dispose() { - synchronized (mService.mGlobalLock) { - disposeChannelsLw(mInputMonitor.mInputTransaction); - mInputEventReceiver.dispose(); - mInputMonitor.updateInputWindowsLw(true /* force */); - } - } - } - private class UpdateInputWindows implements Runnable { @Override public void run() { diff --git a/services/core/java/com/android/server/wm/InsetsStateController.java b/services/core/java/com/android/server/wm/InsetsStateController.java index b46b2f7adceb..3f573fa0fabf 100644 --- a/services/core/java/com/android/server/wm/InsetsStateController.java +++ b/services/core/java/com/android/server/wm/InsetsStateController.java @@ -291,19 +291,10 @@ class InsetsStateController { for (int i = mProviders.size() - 1; i >= 0; i--) { mProviders.valueAt(i).onPostLayout(); } - final ArrayList<WindowState> winInsetsChanged = mDisplayContent.mWinInsetsChanged; if (!mLastState.equals(mState)) { mLastState.set(mState, true /* copySources */); notifyInsetsChanged(); - } else { - // The global insets state has not changed but there might be windows whose conditions - // (e.g., z-order) have changed. They can affect the insets states that we dispatch to - // the clients. - for (int i = winInsetsChanged.size() - 1; i >= 0; i--) { - mDispatchInsetsChanged.accept(winInsetsChanged.get(i)); - } } - winInsetsChanged.clear(); Trace.traceEnd(TRACE_TAG_WINDOW_MANAGER); } diff --git a/services/core/java/com/android/server/wm/Session.java b/services/core/java/com/android/server/wm/Session.java index 6b7f92a102d9..b8b9bcc6c655 100644 --- a/services/core/java/com/android/server/wm/Session.java +++ b/services/core/java/com/android/server/wm/Session.java @@ -16,7 +16,6 @@ package com.android.server.wm; -import static android.Manifest.permission.DEVICE_POWER; import static android.Manifest.permission.HIDE_NON_SYSTEM_OVERLAY_WINDOWS; import static android.Manifest.permission.HIDE_OVERLAY_WINDOWS; import static android.Manifest.permission.INTERNAL_SYSTEM_WINDOW; @@ -107,7 +106,6 @@ class Session extends IWindowSession.Stub implements IBinder.DeathRecipient { final boolean mCanCreateSystemApplicationOverlay; final boolean mCanHideNonSystemOverlayWindows; - final boolean mCanAcquireSleepToken; private AlertWindowNotification mAlertWindowNotification; private boolean mShowingAlertWindowNotificationAllowed; private boolean mClientDead = false; @@ -134,8 +132,6 @@ class Session extends IWindowSession.Stub implements IBinder.DeathRecipient { == PERMISSION_GRANTED; mCanStartTasksFromRecents = service.mContext.checkCallingOrSelfPermission( START_TASKS_FROM_RECENTS) == PERMISSION_GRANTED; - mCanAcquireSleepToken = service.mContext.checkCallingOrSelfPermission(DEVICE_POWER) - == PERMISSION_GRANTED; mShowingAlertWindowNotificationAllowed = mService.mShowAlertWindowNotifications; mDragDropController = mService.mDragDropController; StringBuilder sb = new StringBuilder(); diff --git a/services/core/java/com/android/server/wm/Task.java b/services/core/java/com/android/server/wm/Task.java index 6987cdb45c88..8370b86b5929 100644 --- a/services/core/java/com/android/server/wm/Task.java +++ b/services/core/java/com/android/server/wm/Task.java @@ -471,12 +471,6 @@ class Task extends TaskFragment { // to layout without loading all the task snapshots final PersistedTaskSnapshotData mLastTaskSnapshotData; - // If set to true, the task will report that it is not in the floating - // state regardless of it's root task affiliation. As the floating state drives - // production of content insets this can be used to preserve them across - // root task moves and we in fact do so when moving from full screen to pinned. - private boolean mPreserveNonFloatingState = false; - private Dimmer mDimmer = new Dimmer(this); private final Rect mTmpDimBoundsRect = new Rect(); @@ -2582,11 +2576,6 @@ class Task extends TaskFragment { reparent(rootTask, position); rootTask.positionChildAt(position, this, moveParents); - - // If we are moving from the fullscreen root task to the root pinned task then we want to - // preserve our insets so that there will not be a jump in the area covered by system - // decorations. We rely on the pinned animation to later unset this value. - mPreserveNonFloatingState = rootTask.inPinnedWindowingMode(); } public int setBounds(Rect bounds, boolean forceResize) { @@ -2899,16 +2888,6 @@ class Task extends TaskFragment { mForceShowForAllUsers = forceShowForAllUsers; } - /** - * When we are in a floating root task (Freeform, Pinned, ...) we calculate - * insets differently. However if we are animating to the fullscreen root task - * we need to begin calculating insets as if we were fullscreen, otherwise - * we will have a jump at the end. - */ - boolean isFloating() { - return getWindowConfiguration().tasksAreFloating() && !mPreserveNonFloatingState; - } - /** Returns the top-most activity that occludes the given one, or {@code null} if none. */ @Nullable ActivityRecord getOccludingActivityAbove(ActivityRecord activity) { @@ -3246,10 +3225,6 @@ class Task extends TaskFragment { return "Task=" + mTaskId; } - void clearPreserveNonFloatingState() { - mPreserveNonFloatingState = false; - } - @Override Dimmer getDimmer() { // If the window is in multi-window mode, we want to dim at the Task level to ensure the dim diff --git a/services/core/java/com/android/server/wm/WallpaperController.java b/services/core/java/com/android/server/wm/WallpaperController.java index 4b2aa0f76272..08b1a2f39953 100644 --- a/services/core/java/com/android/server/wm/WallpaperController.java +++ b/services/core/java/com/android/server/wm/WallpaperController.java @@ -97,12 +97,6 @@ class WallpaperController { // Time we wait after a timeout before trying to wait again. private static final long WALLPAPER_TIMEOUT_RECOVERY = 10000; - // Set to the wallpaper window we would like to hide once the transition animations are done. - // This is useful in cases where we don't want the wallpaper to be hidden when the close app - // is a wallpaper target and is done animating out, but the opening app isn't a wallpaper - // target and isn't done animating in. - WindowState mDeferredHideWallpaper = null; - // We give a wallpaper up to 500ms to finish drawing before playing app transitions. private static final long WALLPAPER_DRAW_PENDING_TIMEOUT_DURATION = 500; private static final int WALLPAPER_DRAW_NORMAL = 0; diff --git a/services/core/java/com/android/server/wm/WindowManagerService.java b/services/core/java/com/android/server/wm/WindowManagerService.java index 67df0b933337..ac00520ef02d 100644 --- a/services/core/java/com/android/server/wm/WindowManagerService.java +++ b/services/core/java/com/android/server/wm/WindowManagerService.java @@ -169,10 +169,8 @@ import android.content.res.TypedArray; import android.database.ContentObserver; import android.graphics.Bitmap; import android.graphics.Insets; -import android.graphics.Matrix; import android.graphics.Point; import android.graphics.Rect; -import android.graphics.RectF; import android.graphics.Region; import android.hardware.configstore.V1_0.OptionalBool; import android.hardware.configstore.V1_1.DisplayOrientation; @@ -343,8 +341,6 @@ public class WindowManagerService extends IWindowManager.Stub implements Watchdog.Monitor, WindowManagerPolicy.WindowManagerFuncs { private static final String TAG = TAG_WITH_CLASS_NAME ? "WindowManagerService" : TAG_WM; - private static final String WM_USE_BLAST_ADAPTER_FLAG = "wm_use_blast_adapter"; - static final int LAYOUT_REPEAT_THRESHOLD = 4; static final boolean PROFILE_ORIENTATION = false; @@ -646,13 +642,7 @@ public class WindowManagerService extends IWindowManager.Stub StrictModeFlash mStrictModeFlash; EmulatorDisplayOverlay mEmulatorDisplayOverlay; - final float[] mTmpFloats = new float[9]; final Rect mTmpRect = new Rect(); - final Rect mTmpRect2 = new Rect(); - final Rect mTmpRect3 = new Rect(); - final RectF mTmpRectF = new RectF(); - - final Matrix mTmpTransform = new Matrix(); boolean mDisplayReady; boolean mSafeMode; @@ -1059,8 +1049,6 @@ public class WindowManagerService extends IWindowManager.Stub public void focusChanged(); } - final Configuration mTempConfiguration = new Configuration(); - final HighRefreshRateDenylist mHighRefreshRateDenylist; // Maintainer of a collection of all possible DisplayInfo for all configurations of the @@ -1156,11 +1144,6 @@ public class WindowManagerService extends IWindowManager.Stub void onAppFreezeTimeout(); } - private static WindowManagerService sInstance; - static WindowManagerService getInstance() { - return sInstance; - } - public static WindowManagerService main(final Context context, final InputManagerService im, final boolean showBootMsgs, final boolean onlyCore, WindowManagerPolicy policy, ActivityTaskManagerService atm) { @@ -1180,11 +1163,12 @@ public class WindowManagerService extends IWindowManager.Stub displayWindowSettingsProvider, Supplier<SurfaceControl.Transaction> transactionFactory, Supplier<Surface> surfaceFactory, Function<SurfaceSession, SurfaceControl.Builder> surfaceControlFactory) { + final WindowManagerService[] wms = new WindowManagerService[1]; DisplayThread.getHandler().runWithScissors(() -> - sInstance = new WindowManagerService(context, im, showBootMsgs, onlyCore, policy, + wms[0] = new WindowManagerService(context, im, showBootMsgs, onlyCore, policy, atm, displayWindowSettingsProvider, transactionFactory, surfaceFactory, surfaceControlFactory), 0); - return sInstance; + return wms[0]; } private void initPolicy() { @@ -3015,15 +2999,6 @@ public class WindowManagerService extends IWindowManager.Stub aspectRatio); } - void getRootTaskBounds(int windowingMode, int activityType, Rect bounds) { - final Task rootTask = mRoot.getRootTask(windowingMode, activityType); - if (rootTask != null) { - rootTask.getBounds(bounds); - return; - } - bounds.setEmpty(); - } - /** * Notifies window manager that {@link DisplayPolicy#isShowingDreamLw} has changed. */ @@ -6995,12 +6970,6 @@ public class WindowManagerService extends IWindowManager.Stub } } - void intersectDisplayInsetBounds(Rect display, Rect insets, Rect inOutBounds) { - mTmpRect3.set(display); - mTmpRect3.inset(insets); - inOutBounds.intersect(mTmpRect3); - } - MousePositionTracker mMousePositionTracker = new MousePositionTracker(); private static class MousePositionTracker implements PointerEventListener { diff --git a/services/core/java/com/android/server/wm/WindowState.java b/services/core/java/com/android/server/wm/WindowState.java index 65389f0385d5..cd4a0de0f421 100644 --- a/services/core/java/com/android/server/wm/WindowState.java +++ b/services/core/java/com/android/server/wm/WindowState.java @@ -58,7 +58,6 @@ import static android.view.WindowManager.LayoutParams.LAST_SUB_WINDOW; import static android.view.WindowManager.LayoutParams.LAYOUT_IN_DISPLAY_CUTOUT_MODE_ALWAYS; import static android.view.WindowManager.LayoutParams.MATCH_PARENT; import static android.view.WindowManager.LayoutParams.PRIVATE_FLAG_COMPATIBLE_WINDOW; -import static android.view.WindowManager.LayoutParams.PRIVATE_FLAG_LAYOUT_CHILD_WINDOW_IN_PARENT_FRAME; import static android.view.WindowManager.LayoutParams.PRIVATE_FLAG_NOT_MAGNIFIABLE; import static android.view.WindowManager.LayoutParams.PRIVATE_FLAG_NO_MOVE_ANIMATION; import static android.view.WindowManager.LayoutParams.PRIVATE_FLAG_TRUSTED_OVERLAY; @@ -651,7 +650,6 @@ class WindowState extends WindowContainer<WindowState> implements WindowManagerP private PowerManager.WakeLock mDrawLock; private final Rect mTmpRect = new Rect(); - private final Rect mTmpRect2 = new Rect(); private final Point mTmpPoint = new Point(); private final Transaction mTmpTransaction; @@ -1229,15 +1227,6 @@ class WindowState extends WindowContainer<WindowState> implements WindowManagerP return mOwnerCanAddInternalSystemWindow; } - /** - * Returns {@code true} if the window owner has the permission to acquire a sleep token when - * it's visible. That is, they have the permission - * {@link androidManifest.permission#DEVICE_POWER}. - */ - boolean canAcquireSleepToken() { - return mSession.mCanAcquireSleepToken; - } - boolean skipLayout() { if (mWillReplaceWindow && (mAnimatingExit || !mReplacingRemoveRequested)) { // This window is being replaced and either already got information that it's being @@ -1378,21 +1367,11 @@ class WindowState extends WindowContainer<WindowState> implements WindowManagerP return mDisableFlags; } - /** Gets the layer at which this window's surface will be Z-ordered. */ - int getSurfaceLayer() { - return mLayer; - } - @Override public int getBaseType() { return getTopParentWindow().mAttrs.type; } - /** Returns true if this window is participating in voice interaction. */ - boolean isVoiceInteraction() { - return mActivityRecord != null && mActivityRecord.mVoiceInteraction; - } - boolean setReportResizeHints() { return mWindowFrames.setReportResizeHints(); } @@ -1719,14 +1698,6 @@ class WindowState extends WindowContainer<WindowState> implements WindowManagerP && (mActivityRecord.firstWindowDrawn || mActivityRecord.startingDisplayed); } - boolean isIdentityMatrix(float dsdx, float dtdx, float dsdy, float dtdy) { - if (dsdx < .99999f || dsdx > 1.00001f) return false; - if (dtdy < .99999f || dtdy > 1.00001f) return false; - if (dtdx < -.000001f || dtdx > .000001f) return false; - if (dsdy < -.000001f || dsdy > .000001f) return false; - return true; - } - void prelayout() { if (hasCompatScale()) { if (mOverrideScale != 1f) { @@ -3326,15 +3297,6 @@ class WindowState extends WindowContainer<WindowState> implements WindowManagerP return mAnimatingExit || (mActivityRecord != null && mActivityRecord.isClosingOrEnteringPip()); } - void addWinAnimatorToList(ArrayList<WindowStateAnimator> animators) { - animators.add(mWinAnimator); - - for (int i = mChildren.size() - 1; i >= 0; --i) { - final WindowState c = mChildren.get(i); - c.addWinAnimatorToList(animators); - } - } - void sendAppVisibilityToClients() { super.sendAppVisibilityToClients(); @@ -4286,11 +4248,6 @@ class WindowState extends WindowContainer<WindowState> implements WindowManagerP return mIsChildWindow; } - boolean layoutInParentFrame() { - return mIsChildWindow - && (mAttrs.privateFlags & PRIVATE_FLAG_LAYOUT_CHILD_WINDOW_IN_PARENT_FRAME) != 0; - } - /** * Returns true if any window added by an application process that if of type * {@link android.view.WindowManager.LayoutParams#TYPE_TOAST} or that requires that requires diff --git a/services/core/java/com/android/server/wm/WindowStateAnimator.java b/services/core/java/com/android/server/wm/WindowStateAnimator.java index 4db853ecf50b..b147455e83cd 100644 --- a/services/core/java/com/android/server/wm/WindowStateAnimator.java +++ b/services/core/java/com/android/server/wm/WindowStateAnimator.java @@ -118,9 +118,6 @@ class WindowStateAnimator { * window is first added or shown, cleared when the callback has been made. */ boolean mEnteringAnimation; - /** The pixel format of the underlying SurfaceControl */ - int mSurfaceFormat; - /** This is set when there is no Surface */ static final int NO_SURFACE = 0; /** This is set after the Surface has been created but before the window has been drawn. During @@ -347,8 +344,6 @@ class WindowStateAnimator { mSurfaceController.setColorSpaceAgnostic((attrs.privateFlags & WindowManager.LayoutParams.PRIVATE_FLAG_COLOR_SPACE_AGNOSTIC) != 0); - mSurfaceFormat = format; - w.setHasSurface(true); // The surface instance is changed. Make sure the input info can be applied to the // new surface, e.g. relaunch activity. @@ -584,27 +579,6 @@ class WindowStateAnimator { } } - /** - * Try to change the pixel format without recreating the surface. This - * will be common in the case of changing from PixelFormat.OPAQUE to - * PixelFormat.TRANSLUCENT in the hardware-accelerated case as both - * requested formats resolve to the same underlying SurfaceControl format - * @return True if format was succesfully changed, false otherwise - */ - boolean tryChangeFormatInPlaceLocked() { - if (mSurfaceController == null) { - return false; - } - final LayoutParams attrs = mWin.getAttrs(); - final boolean isHwAccelerated = (attrs.flags & FLAG_HARDWARE_ACCELERATED) != 0; - final int format = isHwAccelerated ? PixelFormat.TRANSLUCENT : attrs.format; - if (format == mSurfaceFormat) { - setOpaqueLocked(!PixelFormat.formatHasAlpha(attrs.format)); - return true; - } - return false; - } - void setOpaqueLocked(boolean isOpaque) { if (mSurfaceController == null) { return; diff --git a/services/core/java/com/android/server/wm/WindowToken.java b/services/core/java/com/android/server/wm/WindowToken.java index 123141711aa2..34b63ac09214 100644 --- a/services/core/java/com/android/server/wm/WindowToken.java +++ b/services/core/java/com/android/server/wm/WindowToken.java @@ -365,11 +365,6 @@ class WindowToken extends WindowContainer<WindowState> { } @Override - public void onConfigurationChanged(Configuration newParentConfig) { - super.onConfigurationChanged(newParentConfig); - } - - @Override void assignLayer(SurfaceControl.Transaction t, int layer) { if (windowType == TYPE_DOCK_DIVIDER) { // See {@link DisplayContent#mSplitScreenDividerAnchor} |