Commit 25c5d1c authored and committed Jan 31, 2024 · 32 / 34
1 parent 6cae417 commit 25c5d1c Copy full SHA for 25c5d1c
File tree 6 files changed +17
-5
lines changed
packages/react-native/ReactAndroid/src/main/java/com/facebook/react/animated
6 files changed +17
-5
lines changed Original file line number Diff line number Diff line change 9
9
10
10
import androidx .annotation .Nullable ;
11
11
import com .facebook .infer .annotation .Assertions ;
12
+ import com .facebook .infer .annotation .Nullsafe ;
12
13
import java .util .ArrayList ;
13
14
import java .util .List ;
14
15
15
16
/** Base class for all Animated.js library node types that can be created on the "native" side. */
16
- /*package*/ abstract class AnimatedNode {
17
+ /*package*/ @ Nullsafe (Nullsafe .Mode .LOCAL )
18
+ abstract class AnimatedNode {
17
19
18
20
public static final int INITIAL_BFS_COLOR = 0 ;
19
21
Original file line number Diff line number Diff line change 7
7
8
8
package com .facebook .react .animated ;
9
9
10
+ import com .facebook .infer .annotation .Nullsafe ;
10
11
import com .facebook .react .bridge .ReadableMap ;
11
12
12
13
/**
13
14
* Implementation of {@link AnimationDriver} providing support for decay animations. The
14
15
* implementation is copied from the JS version in {@code AnimatedImplementation.js}.
15
16
*/
17
+ @ Nullsafe (Nullsafe .Mode .LOCAL )
16
18
class DecayAnimation extends AnimationDriver {
17
19
18
20
private final double mVelocity ;
Original file line number Diff line number Diff line change 7
7
8
8
package com .facebook .react .animated ;
9
9
10
+ import com .facebook .infer .annotation .Nullsafe ;
10
11
import com .facebook .react .bridge .JSApplicationCausedNativeException ;
11
12
import com .facebook .react .bridge .ReadableMap ;
12
13
13
- /*package*/ class DiffClampAnimatedNode extends ValueAnimatedNode {
14
+ /*package*/ @ Nullsafe (Nullsafe .Mode .LOCAL )
15
+ class DiffClampAnimatedNode extends ValueAnimatedNode {
14
16
private final NativeAnimatedNodesManager mNativeAnimatedNodesManager ;
15
17
private final int mInputNodeTag ;
16
18
private final double mMin ;
Original file line number Diff line number Diff line change 7
7
8
8
package com .facebook .react .animated ;
9
9
10
+ import com .facebook .infer .annotation .Nullsafe ;
10
11
import com .facebook .react .bridge .JSApplicationCausedNativeException ;
11
12
import com .facebook .react .bridge .ReadableMap ;
12
13
13
- /*package*/ class ModulusAnimatedNode extends ValueAnimatedNode {
14
+ /*package*/ @ Nullsafe (Nullsafe .Mode .LOCAL )
15
+ class ModulusAnimatedNode extends ValueAnimatedNode {
14
16
15
17
private final NativeAnimatedNodesManager mNativeAnimatedNodesManager ;
16
18
private final int mInputNode ;
Original file line number Diff line number Diff line change 8
8
package com .facebook .react .animated ;
9
9
10
10
import androidx .annotation .Nullable ;
11
+ import com .facebook .infer .annotation .Nullsafe ;
11
12
import com .facebook .react .bridge .JavaOnlyArray ;
12
13
import com .facebook .react .bridge .JavaOnlyMap ;
13
14
import com .facebook .react .bridge .ReadableArray ;
19
20
* Native counterpart of object animated node (see AnimatedObject class in
20
21
* AnimatedImplementation.js)
21
22
*/
22
- /* package */ class ObjectAnimatedNode extends AnimatedNode {
23
+ /* package */ @ Nullsafe (Nullsafe .Mode .LOCAL )
24
+ class ObjectAnimatedNode extends AnimatedNode {
23
25
24
26
private static final String VALUE_KEY = "value" ;
25
27
private static final String NODE_TAG_KEY = "nodeTag" ;
Original file line number Diff line number Diff line change 7
7
8
8
package com .facebook .react .animated ;
9
9
10
+ import com .facebook .infer .annotation .Nullsafe ;
10
11
import com .facebook .react .bridge .ReadableMap ;
11
12
12
13
/**
13
14
* Implementation of {@link AnimationDriver} providing support for spring animations. The
14
15
* implementation has been copied from android implementation of Rebound library (see <a
15
16
* href="http://facebook.github.io/rebound/">http://facebook.github.io/rebound/</a>)
16
17
*/
17
- /*package*/ class SpringAnimation extends AnimationDriver {
18
+ /*package*/ @ Nullsafe (Nullsafe .Mode .LOCAL )
19
+ class SpringAnimation extends AnimationDriver {
18
20
19
21
// maximum amount of time to simulate per physics iteration in seconds (4 frames at 60 FPS)
20
22
private static final double MAX_DELTA_TIME_SEC = 0.064 ;
You can’t perform that action at this time.
0 commit comments