Loading libs/WindowManager/Shell/src/com/android/wm/shell/common/split/MagneticDividerUtils.kt +4 −10 Original line number Diff line number Diff line Loading @@ -55,13 +55,6 @@ object MagneticDividerUtils { */ @JvmStatic val SNAP_POSITION_KEY = SemanticKey<Int?>() /** * Key used for identity regions which don't have drop zones associated with them. Need to keep * this key separate for the SemanticKeys we create with null values as it seems like this * overwrites the semantics created with real snapTarget values */ @JvmStatic private val SNAP_POSITION_KEY_IDENTITY = SemanticKey<Int?>() /** * Create a MotionSpec that has "snap zones" for each of the SnapTargets provided. * Loading @@ -87,7 +80,7 @@ object MagneticDividerUtils { // "effects" movement). spatialDirectionalMotionSpec( initialMapping = Mapping.Fixed(topLeftDismissPosition), semantics = listOf(SNAP_POSITION_KEY_IDENTITY with null), semantics = listOf(SNAP_POSITION_KEY with topLeftDismissTarget.snapPosition), defaultSpring = MagneticSpring, ) { // NOTE: This block is a trailing lambda passed in as the "init" parameter. Loading Loading @@ -145,7 +138,7 @@ object MagneticDividerUtils { // Create another identity zone. identity( breakpoint = targetPosition + snapThreshold, semantics = listOf(SNAP_POSITION_KEY_IDENTITY with null), semantics = listOf(SNAP_POSITION_KEY with null), ) } Loading @@ -156,7 +149,8 @@ object MagneticDividerUtils { fixedValue( breakpoint = bottomRightDismissPosition, value = bottomRightDismissPosition, semantics = listOf(SNAP_POSITION_KEY_IDENTITY with null), semantics = listOf(SNAP_POSITION_KEY with bottomRightDismissTarget.snapPosition), ) } ) Loading Loading
libs/WindowManager/Shell/src/com/android/wm/shell/common/split/MagneticDividerUtils.kt +4 −10 Original line number Diff line number Diff line Loading @@ -55,13 +55,6 @@ object MagneticDividerUtils { */ @JvmStatic val SNAP_POSITION_KEY = SemanticKey<Int?>() /** * Key used for identity regions which don't have drop zones associated with them. Need to keep * this key separate for the SemanticKeys we create with null values as it seems like this * overwrites the semantics created with real snapTarget values */ @JvmStatic private val SNAP_POSITION_KEY_IDENTITY = SemanticKey<Int?>() /** * Create a MotionSpec that has "snap zones" for each of the SnapTargets provided. * Loading @@ -87,7 +80,7 @@ object MagneticDividerUtils { // "effects" movement). spatialDirectionalMotionSpec( initialMapping = Mapping.Fixed(topLeftDismissPosition), semantics = listOf(SNAP_POSITION_KEY_IDENTITY with null), semantics = listOf(SNAP_POSITION_KEY with topLeftDismissTarget.snapPosition), defaultSpring = MagneticSpring, ) { // NOTE: This block is a trailing lambda passed in as the "init" parameter. Loading Loading @@ -145,7 +138,7 @@ object MagneticDividerUtils { // Create another identity zone. identity( breakpoint = targetPosition + snapThreshold, semantics = listOf(SNAP_POSITION_KEY_IDENTITY with null), semantics = listOf(SNAP_POSITION_KEY with null), ) } Loading @@ -156,7 +149,8 @@ object MagneticDividerUtils { fixedValue( breakpoint = bottomRightDismissPosition, value = bottomRightDismissPosition, semantics = listOf(SNAP_POSITION_KEY_IDENTITY with null), semantics = listOf(SNAP_POSITION_KEY with bottomRightDismissTarget.snapPosition), ) } ) Loading