Call FallbackRecentsView#init() before setContentView()
* Init sets mSplitSelectStateController which RecentsView then uses in onAttachedToWindow(). That needs to be set before it gets attached to the window, which happens in RecentsActivity#setContentView() Fixes: 332643607 Test: Only presubmit, issue not reproducible Flag: EXEMPT bugfix Change-Id: Icc555cad17b734e2a9c035991c19bbdc6b02de5d
This commit is contained in:
@@ -57,6 +57,7 @@ import com.android.launcher3.InvariantDeviceProfile;
|
|||||||
import com.android.launcher3.LauncherAnimationRunner;
|
import com.android.launcher3.LauncherAnimationRunner;
|
||||||
import com.android.launcher3.LauncherAnimationRunner.AnimationResult;
|
import com.android.launcher3.LauncherAnimationRunner.AnimationResult;
|
||||||
import com.android.launcher3.LauncherAnimationRunner.RemoteAnimationFactory;
|
import com.android.launcher3.LauncherAnimationRunner.RemoteAnimationFactory;
|
||||||
|
import com.android.launcher3.LauncherRootView;
|
||||||
import com.android.launcher3.R;
|
import com.android.launcher3.R;
|
||||||
import com.android.launcher3.anim.AnimatorPlaybackController;
|
import com.android.launcher3.anim.AnimatorPlaybackController;
|
||||||
import com.android.launcher3.anim.PendingAnimation;
|
import com.android.launcher3.anim.PendingAnimation;
|
||||||
@@ -139,14 +140,14 @@ public final class RecentsActivity extends StatefulActivity<RecentsState> implem
|
|||||||
null /* depthController */, getStatsLogManager(),
|
null /* depthController */, getStatsLogManager(),
|
||||||
systemUiProxy, RecentsModel.INSTANCE.get(this),
|
systemUiProxy, RecentsModel.INSTANCE.get(this),
|
||||||
null /*activityBackCallback*/);
|
null /*activityBackCallback*/);
|
||||||
|
// Setup root and child views
|
||||||
inflateRootView(R.layout.fallback_recents_activity);
|
inflateRootView(R.layout.fallback_recents_activity);
|
||||||
setContentView(getRootView());
|
LauncherRootView rootView = getRootView();
|
||||||
mDragLayer = findViewById(R.id.drag_layer);
|
mDragLayer = rootView.findViewById(R.id.drag_layer);
|
||||||
mScrimView = findViewById(R.id.scrim_view);
|
mScrimView = rootView.findViewById(R.id.scrim_view);
|
||||||
mFallbackRecentsView = findViewById(R.id.overview_panel);
|
mFallbackRecentsView = rootView.findViewById(R.id.overview_panel);
|
||||||
mActionsView = findViewById(R.id.overview_actions_view);
|
mActionsView = rootView.findViewById(R.id.overview_actions_view);
|
||||||
getRootView().getSysUiScrim().getSysUIProgress().updateValue(0);
|
|
||||||
mDragLayer.recreateControllers();
|
|
||||||
if (DESKTOP_WINDOWING_MODE.isEnabled(this)) {
|
if (DESKTOP_WINDOWING_MODE.isEnabled(this)) {
|
||||||
mDesktopRecentsTransitionController = new DesktopRecentsTransitionController(
|
mDesktopRecentsTransitionController = new DesktopRecentsTransitionController(
|
||||||
getStateManager(), systemUiProxy, getIApplicationThread(),
|
getStateManager(), systemUiProxy, getIApplicationThread(),
|
||||||
@@ -156,6 +157,10 @@ public final class RecentsActivity extends StatefulActivity<RecentsState> implem
|
|||||||
mFallbackRecentsView.init(mActionsView, mSplitSelectStateController,
|
mFallbackRecentsView.init(mActionsView, mSplitSelectStateController,
|
||||||
mDesktopRecentsTransitionController);
|
mDesktopRecentsTransitionController);
|
||||||
|
|
||||||
|
setContentView(rootView);
|
||||||
|
rootView.getSysUiScrim().getSysUIProgress().updateValue(0);
|
||||||
|
mDragLayer.recreateControllers();
|
||||||
|
|
||||||
mTISBindHelper = new TISBindHelper(this, this::onTISConnected);
|
mTISBindHelper = new TISBindHelper(this, this::onTISConnected);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user