Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 438b6686 authored by Jared Duke's avatar Jared Duke
Browse files

Add global checknotnull.flags Proguard config

This config is conditionally used based on the build flag,
allowing `-convertchecknotnull` R8 optimizations for a class of common
null checks.

Bug: 280633711
Test: build-flag set RELEASE_R8_GLOBAL_CHECK_NOT_NULL_FLAGS && m
Flag: RELEASE_R8_GLOBAL_CHECK_NOT_NULL_FLAGS
Change-Id: If17e7fc2c5b3306f4abaa28f310b3260c6d6294a
parent 334dfb7e
Loading
Loading
Loading
Loading
+25 −0
Original line number Diff line number Diff line
# Tell R8 that the following methods are check not null methods, and to
# replace invocations to them with a more concise nullness check that produces
# (slightly) less informative error messages

-convertchecknotnull class com.google.common.base.Preconditions {
  ** checkNotNull(...);
}

-convertchecknotnull class java.util.Objects {
  ** requireNonNull(...);
}

-convertchecknotnull class kotlin.jvm.internal.Intrinsics {
  void checkNotNull(...);
  void checkExpressionValueIsNotNull(...);
  void checkNotNullExpressionValue(...);
  void checkReturnedValueIsNotNull(...);
  void checkFieldIsNotNull(...);
  void checkParameterIsNotNull(...);
  void checkNotNullParameter(...);
}

-convertchecknotnull class dagger.internal.Preconditions {
  ** checkNotNull*(...);
}