Merge "Fix @Nullability mismatch with PipTransition" into udc-qpr-dev am: f62a0e11d6

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/24263643

Change-Id: Ifd21e3ce70eec1ce23960867af17cd70c1d279b1
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
Jernej Virag
2023-08-03 12:00:37 +00:00
committed by Automerger Merge Worker
2 changed files with 6 additions and 5 deletions

View File

@@ -16,7 +16,6 @@
package com.android.wm.shell.dagger.pip;
import android.annotation.Nullable;
import android.content.Context;
import android.os.Handler;
@@ -229,7 +228,6 @@ public abstract class Pip1Module {
@WMSingleton
@Provides
@Nullable
static PipTransition providePipTransition(Context context,
ShellInit shellInit, ShellTaskOrganizer shellTaskOrganizer, Transitions transitions,
PipAnimationController pipAnimationController, PipBoundsAlgorithm pipBoundsAlgorithm,

View File

@@ -36,10 +36,13 @@ import dagger.Provides;
public abstract class PipModule {
@WMSingleton
@Provides
@Nullable
static PipTransitionController providePipTransitionController(
com.android.wm.shell.pip.PipTransition legacyPipTransition,
com.android.wm.shell.pip2.PipTransition newPipTransition) {
return PipUtils.isPip2ExperimentEnabled() ? newPipTransition : legacyPipTransition;
@Nullable com.android.wm.shell.pip2.PipTransition newPipTransition) {
if (PipUtils.isPip2ExperimentEnabled() && newPipTransition != null) {
return newPipTransition;
} else {
return legacyPipTransition;
}
}
}