Initialize RotationTouchHelper with RecentsAnimationDeviceState ctor

Added logs to debug why multiple instances of RotationTouchHelper
are being created to begin with.
Ran labtest on CF, passes.

Fixes: 177316094
Change-Id: Ibb980980c61965f456a84a9d85a72ec4ec6e0b19
This commit is contained in:
Vinit Nayak
2021-04-26 15:15:18 -07:00
parent a7fc3ee4c7
commit 3f6c3e134f
4 changed files with 95 additions and 23 deletions
@@ -300,7 +300,9 @@ public class TouchInteractionService extends Service implements PluginListener<O
// Everything else should be initialized in onUserUnlocked() below.
mMainChoreographer = Choreographer.getInstance();
mAM = ActivityManagerWrapper.getInstance();
mDeviceState = new RecentsAnimationDeviceState(this);
mDeviceState = new RecentsAnimationDeviceState(this, true);
Log.d(TestProtocol.NO_SWIPE_TO_HOME, "RADS OTT instance: " +
mDeviceState.getRotationTouchHelper().getOrientationTouchTransformer());
mRotationTouchHelper = mDeviceState.getRotationTouchHelper();
mDeviceState.addNavigationModeChangedCallback(this::onNavigationModeChanged);
mDeviceState.addOneHandedModeChangedCallback(this::onOneHandedModeOverlayChanged);