Skip to content

Commit

Permalink
Mark MemoryPressureRouter as nullsafe (facebook#48740)
Browse files Browse the repository at this point in the history
Summary:

Mark MemoryPressureRouter as nullsafe

changelog: [internal] internal

Differential Revision: D68275418
  • Loading branch information
mdvacca authored and facebook-github-bot committed Jan 22, 2025
1 parent 4ed2b35 commit 2de3203
Showing 1 changed file with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,16 @@
import android.content.ComponentCallbacks2;
import android.content.Context;
import android.content.res.Configuration;
import androidx.annotation.NonNull;
import com.facebook.infer.annotation.Nullsafe;
import com.facebook.react.bridge.MemoryPressureListener;
import java.util.concurrent.CopyOnWriteArrayList;

/** Translates and routes memory pressure events. */
@Nullsafe(Nullsafe.Mode.LOCAL)
public class MemoryPressureRouter implements ComponentCallbacks2 {
private final CopyOnWriteArrayList<MemoryPressureListener> mListeners =
new CopyOnWriteArrayList();
new CopyOnWriteArrayList<>();

public MemoryPressureRouter(Context context) {
context.getApplicationContext().registerComponentCallbacks(this);
Expand Down Expand Up @@ -44,7 +47,7 @@ public void onTrimMemory(int level) {
}

@Override
public void onConfigurationChanged(Configuration newConfig) {}
public void onConfigurationChanged(@NonNull Configuration newConfig) {}

@Override
public void onLowMemory() {}
Expand Down

0 comments on commit 2de3203

Please sign in to comment.