Merge "Create a new instance of rotation touch helper per device state" into ub-launcher3-rvc-qpr-dev am: a64362ee73
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Launcher3/+/12193665 Change-Id: Ic7bb4172f923cae64535d1de4a38faf3cbcdbb25
This commit is contained in:
commit
175f8b99c6
2 files changed
+2
-4
No files matched your search
@@ -114,7 +114,7 @@ public class RecentsAnimationDeviceState implements
|
|||||||
mDefaultDisplay = DefaultDisplay.INSTANCE.get(context);
|
mDefaultDisplay = DefaultDisplay.INSTANCE.get(context);
|
||||||
mDisplayId = mDefaultDisplay.getInfo().id;
|
mDisplayId = mDefaultDisplay.getInfo().id;
|
||||||
runOnDestroy(() -> mDefaultDisplay.removeChangeListener(this));
|
runOnDestroy(() -> mDefaultDisplay.removeChangeListener(this));
|
||||||
mRotationTouchHelper = RotationTouchHelper.INSTANCE.get(context);
|
mRotationTouchHelper = new RotationTouchHelper(context);
|
||||||
runOnDestroy(mRotationTouchHelper::destroy);
|
runOnDestroy(mRotationTouchHelper::destroy);
|
||||||
|
|
||||||
// Register for user unlocked if necessary
|
// Register for user unlocked if necessary
|
||||||
|
|||||||
@@ -41,8 +41,6 @@ import java.util.ArrayList;
|
|||||||
public class RotationTouchHelper implements
|
public class RotationTouchHelper implements
|
||||||
SysUINavigationMode.NavigationModeChangeListener,
|
SysUINavigationMode.NavigationModeChangeListener,
|
||||||
DefaultDisplay.DisplayInfoChangeListener {
|
DefaultDisplay.DisplayInfoChangeListener {
|
||||||
public static final MainThreadInitializedObject<RotationTouchHelper> INSTANCE =
|
|
||||||
new MainThreadInitializedObject<>(RotationTouchHelper::new);
|
|
||||||
|
|
||||||
private final OrientationTouchTransformer mOrientationTouchTransformer;
|
private final OrientationTouchTransformer mOrientationTouchTransformer;
|
||||||
private final DefaultDisplay mDefaultDisplay;
|
private final DefaultDisplay mDefaultDisplay;
|
||||||
@@ -122,7 +120,7 @@ public class RotationTouchHelper implements
|
|||||||
|
|
||||||
private final Context mContext;
|
private final Context mContext;
|
||||||
|
|
||||||
private RotationTouchHelper(Context context) {
|
public RotationTouchHelper(Context context) {
|
||||||
mContext = context;
|
mContext = context;
|
||||||
Resources resources = mContext.getResources();
|
Resources resources = mContext.getResources();
|
||||||
mSysUiNavMode = SysUINavigationMode.INSTANCE.get(context);
|
mSysUiNavMode = SysUINavigationMode.INSTANCE.get(context);
|
||||||
|
|||||||
Reference in new issue
Block a user