Loading libs/WindowManager/Shell/src/com/android/wm/shell/dagger/WMShellBaseModule.java +18 −0 Original line number Diff line number Diff line Loading @@ -107,6 +107,7 @@ import com.android.wm.shell.taskview.TaskViewFactory; import com.android.wm.shell.taskview.TaskViewFactoryController; import com.android.wm.shell.taskview.TaskViewTransitions; import com.android.wm.shell.transition.HomeTransitionObserver; import com.android.wm.shell.transition.MixedTransitionHandler; import com.android.wm.shell.transition.Transitions; import com.android.wm.shell.unfold.ShellUnfoldProgressProvider; import com.android.wm.shell.unfold.UnfoldAnimationController; Loading Loading @@ -675,6 +676,22 @@ public abstract class WMShellBaseModule { return new TaskViewTransitions(transitions); } // Workaround for dynamic overriding with a default implementation, see {@link DynamicOverride} @BindsOptionalOf @DynamicOverride abstract MixedTransitionHandler optionalMixedTransitionHandler(); @WMSingleton @Provides static Optional<MixedTransitionHandler> provideMixedTransitionHandler( @DynamicOverride Optional<MixedTransitionHandler> mixedTransitionHandler ) { if (mixedTransitionHandler.isPresent()) { return mixedTransitionHandler; } return Optional.empty(); } // // Keyguard transitions (optional feature) // Loading Loading @@ -934,6 +951,7 @@ public abstract class WMShellBaseModule { Optional<OneHandedController> oneHandedControllerOptional, Optional<HideDisplayCutoutController> hideDisplayCutoutControllerOptional, Optional<ActivityEmbeddingController> activityEmbeddingOptional, Optional<MixedTransitionHandler> mixedTransitionHandler, Transitions transitions, StartingWindowController startingWindow, ProtoLogController protoLogController, Loading libs/WindowManager/Shell/src/com/android/wm/shell/dagger/WMShellModule.java +3 −2 Original line number Diff line number Diff line Loading @@ -87,6 +87,7 @@ import com.android.wm.shell.sysui.ShellInit; import com.android.wm.shell.taskview.TaskViewTransitions; import com.android.wm.shell.transition.DefaultMixedHandler; import com.android.wm.shell.transition.HomeTransitionObserver; import com.android.wm.shell.transition.MixedTransitionHandler; import com.android.wm.shell.transition.Transitions; import com.android.wm.shell.unfold.ShellUnfoldProgressProvider; import com.android.wm.shell.unfold.UnfoldAnimationController; Loading Loading @@ -373,8 +374,9 @@ public abstract class WMShellModule { // @WMSingleton @DynamicOverride @Provides static DefaultMixedHandler provideDefaultMixedHandler( static MixedTransitionHandler provideMixedTransitionHandler( ShellInit shellInit, Optional<SplitScreenController> splitScreenOptional, @Nullable PipTransitionController pipTransitionController, Loading Loading @@ -655,7 +657,6 @@ public abstract class WMShellModule { @Provides static Object provideIndependentShellComponentsToCreate( DragAndDropController dragAndDropController, DefaultMixedHandler defaultMixedHandler, Optional<DesktopTasksTransitionObserver> desktopTasksTransitionObserverOptional) { return new Object(); } Loading libs/WindowManager/Shell/src/com/android/wm/shell/transition/DefaultMixedHandler.java +5 −4 Original line number Diff line number Diff line Loading @@ -61,9 +61,10 @@ import java.util.function.Consumer; /** * A handler for dealing with transitions involving multiple other handlers. For example: an * activity in split-screen going into PiP. * activity in split-screen going into PiP. Note this is provided as a handset-specific * implementation of {@code MixedTransitionHandler}. */ public class DefaultMixedHandler implements Transitions.TransitionHandler, public class DefaultMixedHandler implements MixedTransitionHandler, RecentsTransitionHandler.RecentsMixedHandler { private final Transitions mPlayer; Loading Loading @@ -116,7 +117,7 @@ public class DefaultMixedHandler implements Transitions.TransitionHandler, final IBinder mTransition; protected final Transitions mPlayer; protected final DefaultMixedHandler mMixedHandler; protected final MixedTransitionHandler mMixedHandler; protected final PipTransitionController mPipHandler; protected final StageCoordinator mSplitHandler; protected final KeyguardTransitionHandler mKeyguardHandler; Loading @@ -142,7 +143,7 @@ public class DefaultMixedHandler implements Transitions.TransitionHandler, int mInFlightSubAnimations = 0; MixedTransition(int type, IBinder transition, Transitions player, DefaultMixedHandler mixedHandler, PipTransitionController pipHandler, MixedTransitionHandler mixedHandler, PipTransitionController pipHandler, StageCoordinator splitHandler, KeyguardTransitionHandler keyguardHandler) { mType = type; mTransition = transition; Loading libs/WindowManager/Shell/src/com/android/wm/shell/transition/DefaultMixedTransition.java +1 −1 Original line number Diff line number Diff line Loading @@ -41,7 +41,7 @@ class DefaultMixedTransition extends DefaultMixedHandler.MixedTransition { private final ActivityEmbeddingController mActivityEmbeddingController; DefaultMixedTransition(int type, IBinder transition, Transitions player, DefaultMixedHandler mixedHandler, PipTransitionController pipHandler, MixedTransitionHandler mixedHandler, PipTransitionController pipHandler, StageCoordinator splitHandler, KeyguardTransitionHandler keyguardHandler, UnfoldTransitionHandler unfoldHandler, ActivityEmbeddingController activityEmbeddingController) { Loading libs/WindowManager/Shell/src/com/android/wm/shell/transition/MixedTransitionHandler.java 0 → 100644 +31 −0 Original line number Diff line number Diff line /* * Copyright (C) 2024 The Android Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package com.android.wm.shell.transition; /** * Interface for a {@link Transitions.TransitionHandler} that can take the subset of transitions * that it handles and further decompose those transitions into sub-transitions which can be * independently delegated to separate handlers. */ public interface MixedTransitionHandler extends Transitions.TransitionHandler { // TODO(b/335685449) this currently exists purely as a marker interface for use in form-factor // specific/sysui dagger modules. Going forward, we should define this in a meaningful // way so as to provide a clear basis for expectations/behaviours associated with mixed // transitions and their default handlers. } Loading
libs/WindowManager/Shell/src/com/android/wm/shell/dagger/WMShellBaseModule.java +18 −0 Original line number Diff line number Diff line Loading @@ -107,6 +107,7 @@ import com.android.wm.shell.taskview.TaskViewFactory; import com.android.wm.shell.taskview.TaskViewFactoryController; import com.android.wm.shell.taskview.TaskViewTransitions; import com.android.wm.shell.transition.HomeTransitionObserver; import com.android.wm.shell.transition.MixedTransitionHandler; import com.android.wm.shell.transition.Transitions; import com.android.wm.shell.unfold.ShellUnfoldProgressProvider; import com.android.wm.shell.unfold.UnfoldAnimationController; Loading Loading @@ -675,6 +676,22 @@ public abstract class WMShellBaseModule { return new TaskViewTransitions(transitions); } // Workaround for dynamic overriding with a default implementation, see {@link DynamicOverride} @BindsOptionalOf @DynamicOverride abstract MixedTransitionHandler optionalMixedTransitionHandler(); @WMSingleton @Provides static Optional<MixedTransitionHandler> provideMixedTransitionHandler( @DynamicOverride Optional<MixedTransitionHandler> mixedTransitionHandler ) { if (mixedTransitionHandler.isPresent()) { return mixedTransitionHandler; } return Optional.empty(); } // // Keyguard transitions (optional feature) // Loading Loading @@ -934,6 +951,7 @@ public abstract class WMShellBaseModule { Optional<OneHandedController> oneHandedControllerOptional, Optional<HideDisplayCutoutController> hideDisplayCutoutControllerOptional, Optional<ActivityEmbeddingController> activityEmbeddingOptional, Optional<MixedTransitionHandler> mixedTransitionHandler, Transitions transitions, StartingWindowController startingWindow, ProtoLogController protoLogController, Loading
libs/WindowManager/Shell/src/com/android/wm/shell/dagger/WMShellModule.java +3 −2 Original line number Diff line number Diff line Loading @@ -87,6 +87,7 @@ import com.android.wm.shell.sysui.ShellInit; import com.android.wm.shell.taskview.TaskViewTransitions; import com.android.wm.shell.transition.DefaultMixedHandler; import com.android.wm.shell.transition.HomeTransitionObserver; import com.android.wm.shell.transition.MixedTransitionHandler; import com.android.wm.shell.transition.Transitions; import com.android.wm.shell.unfold.ShellUnfoldProgressProvider; import com.android.wm.shell.unfold.UnfoldAnimationController; Loading Loading @@ -373,8 +374,9 @@ public abstract class WMShellModule { // @WMSingleton @DynamicOverride @Provides static DefaultMixedHandler provideDefaultMixedHandler( static MixedTransitionHandler provideMixedTransitionHandler( ShellInit shellInit, Optional<SplitScreenController> splitScreenOptional, @Nullable PipTransitionController pipTransitionController, Loading Loading @@ -655,7 +657,6 @@ public abstract class WMShellModule { @Provides static Object provideIndependentShellComponentsToCreate( DragAndDropController dragAndDropController, DefaultMixedHandler defaultMixedHandler, Optional<DesktopTasksTransitionObserver> desktopTasksTransitionObserverOptional) { return new Object(); } Loading
libs/WindowManager/Shell/src/com/android/wm/shell/transition/DefaultMixedHandler.java +5 −4 Original line number Diff line number Diff line Loading @@ -61,9 +61,10 @@ import java.util.function.Consumer; /** * A handler for dealing with transitions involving multiple other handlers. For example: an * activity in split-screen going into PiP. * activity in split-screen going into PiP. Note this is provided as a handset-specific * implementation of {@code MixedTransitionHandler}. */ public class DefaultMixedHandler implements Transitions.TransitionHandler, public class DefaultMixedHandler implements MixedTransitionHandler, RecentsTransitionHandler.RecentsMixedHandler { private final Transitions mPlayer; Loading Loading @@ -116,7 +117,7 @@ public class DefaultMixedHandler implements Transitions.TransitionHandler, final IBinder mTransition; protected final Transitions mPlayer; protected final DefaultMixedHandler mMixedHandler; protected final MixedTransitionHandler mMixedHandler; protected final PipTransitionController mPipHandler; protected final StageCoordinator mSplitHandler; protected final KeyguardTransitionHandler mKeyguardHandler; Loading @@ -142,7 +143,7 @@ public class DefaultMixedHandler implements Transitions.TransitionHandler, int mInFlightSubAnimations = 0; MixedTransition(int type, IBinder transition, Transitions player, DefaultMixedHandler mixedHandler, PipTransitionController pipHandler, MixedTransitionHandler mixedHandler, PipTransitionController pipHandler, StageCoordinator splitHandler, KeyguardTransitionHandler keyguardHandler) { mType = type; mTransition = transition; Loading
libs/WindowManager/Shell/src/com/android/wm/shell/transition/DefaultMixedTransition.java +1 −1 Original line number Diff line number Diff line Loading @@ -41,7 +41,7 @@ class DefaultMixedTransition extends DefaultMixedHandler.MixedTransition { private final ActivityEmbeddingController mActivityEmbeddingController; DefaultMixedTransition(int type, IBinder transition, Transitions player, DefaultMixedHandler mixedHandler, PipTransitionController pipHandler, MixedTransitionHandler mixedHandler, PipTransitionController pipHandler, StageCoordinator splitHandler, KeyguardTransitionHandler keyguardHandler, UnfoldTransitionHandler unfoldHandler, ActivityEmbeddingController activityEmbeddingController) { Loading
libs/WindowManager/Shell/src/com/android/wm/shell/transition/MixedTransitionHandler.java 0 → 100644 +31 −0 Original line number Diff line number Diff line /* * Copyright (C) 2024 The Android Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package com.android.wm.shell.transition; /** * Interface for a {@link Transitions.TransitionHandler} that can take the subset of transitions * that it handles and further decompose those transitions into sub-transitions which can be * independently delegated to separate handlers. */ public interface MixedTransitionHandler extends Transitions.TransitionHandler { // TODO(b/335685449) this currently exists purely as a marker interface for use in form-factor // specific/sysui dagger modules. Going forward, we should define this in a meaningful // way so as to provide a clear basis for expectations/behaviours associated with mixed // transitions and their default handlers. }