Merge "Register remote transitions on activity start" into sc-v2-dev am: 26c596b813

Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Launcher3/+/15847881

Change-Id: Idad928c2d632ed79a6065cc8f6ec4ebfdaaae70f
This commit is contained in:
Evan Rosky
2021-09-20 22:46:45 +00:00
committed by Automerger Merge Worker
5 changed files with 11 additions and 19 deletions
@@ -353,6 +353,7 @@ public abstract class BaseQuickstepLauncher extends Launcher
mAppTransitionManager = new QuickstepTransitionManager(this);
mAppTransitionManager.registerRemoteAnimations();
mAppTransitionManager.registerRemoteTransitions();
internalBindToTIS();
}
@@ -536,9 +536,4 @@ public abstract class BaseActivityInterface<STATE_TYPE extends BaseState<STATE_T
pa.addFloat(recentsView, FULLSCREEN_PROGRESS, 1, 0, LINEAR);
}
}
/** Called when OverviewService is bound to this process */
void onOverviewServiceBound() {
// Do nothing
}
}
@@ -308,13 +308,6 @@ public final class LauncherActivityInterface extends
}
}
@Override
void onOverviewServiceBound() {
final BaseQuickstepLauncher activity = getCreatedActivity();
if (activity == null) return;
activity.getAppTransitionManager().registerRemoteTransitions();
}
@Override
public @Nullable Animator getParallelAnimationToLauncher(GestureEndTarget endTarget,
long duration, RecentsAnimationCallbacks callbacks) {
@@ -17,7 +17,6 @@ package com.android.quickstep;
import static com.android.launcher3.util.Executors.MAIN_EXECUTOR;
import android.app.ActivityManager;
import android.app.PendingIntent;
import android.app.PictureInPictureParams;
import android.content.ComponentName;
@@ -54,6 +53,8 @@ import com.android.wm.shell.startingsurface.IStartingWindow;
import com.android.wm.shell.startingsurface.IStartingWindowListener;
import com.android.wm.shell.transition.IShellTransitions;
import java.util.ArrayList;
/**
* Holds the reference to SystemUI.
*/
@@ -81,6 +82,7 @@ public class SystemUiProxy implements ISystemUiProxy,
private ISplitScreenListener mPendingSplitScreenListener;
private IStartingWindowListener mPendingStartingWindowListener;
private ISmartspaceCallback mPendingSmartspaceCallback;
private final ArrayList<RemoteTransitionCompat> mPendingRemoteTransitions = new ArrayList<>();
// Used to dedupe calls to SystemUI
private int mLastShelfHeight;
@@ -161,6 +163,10 @@ public class SystemUiProxy implements ISystemUiProxy,
setSmartspaceCallback(mPendingSmartspaceCallback);
mPendingSmartspaceCallback = null;
}
for (int i = mPendingRemoteTransitions.size() - 1; i >= 0; --i) {
registerRemoteTransition(mPendingRemoteTransitions.get(i));
}
mPendingRemoteTransitions.clear();
if (mPendingSetNavButtonAlpha != null) {
mPendingSetNavButtonAlpha.run();
@@ -688,6 +694,8 @@ public class SystemUiProxy implements ISystemUiProxy,
} catch (RemoteException e) {
Log.w(TAG, "Failed call registerRemoteTransition");
}
} else {
mPendingRemoteTransitions.add(remoteTransition);
}
}
@@ -699,6 +707,7 @@ public class SystemUiProxy implements ISystemUiProxy,
Log.w(TAG, "Failed call registerRemoteTransition");
}
}
mPendingRemoteTransitions.remove(remoteTransition);
}
//
@@ -179,12 +179,6 @@ public class TouchInteractionService extends Service implements PluginListener<O
smartspaceTransitionController);
TouchInteractionService.this.initInputMonitor();
preloadOverview(true /* fromInit */);
mDeviceState.runOnUserUnlocked(() -> {
final BaseActivityInterface ai =
mOverviewComponentObserver.getActivityInterface();
if (ai == null) return;
ai.onOverviewServiceBound();
});
});
sIsInitialized = true;
}