Add missing nullability annotations.
To prepare for enabling MissingNullability Metalava check this CL works on adding missing nullability issues that metalava flags if we tell it to flag new things since API 29. This is not a complete CL, mostly addresses public api and toString/equals for @SystemApi Exempt-From-Owner-Approval: Large scale nullability clean up Bug: 124515653 Test: make -j checkapi Merged-In: I109260842cfc25f06e40694997fcbb4afa02c867 Change-Id: I109260842cfc25f06e40694997fcbb4afa02c867
This commit is contained in:
@@ -236,6 +236,7 @@ public final class StaticIpConfiguration implements Parcelable {
|
||||
return lp;
|
||||
}
|
||||
|
||||
@NonNull
|
||||
@Override
|
||||
public String toString() {
|
||||
StringBuffer str = new StringBuffer();
|
||||
@@ -267,7 +268,7 @@ public final class StaticIpConfiguration implements Parcelable {
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(Object obj) {
|
||||
public boolean equals(@Nullable Object obj) {
|
||||
if (this == obj) return true;
|
||||
|
||||
if (!(obj instanceof StaticIpConfiguration)) return false;
|
||||
|
||||
@@ -17,6 +17,7 @@
|
||||
package android.net.apf;
|
||||
|
||||
import android.annotation.NonNull;
|
||||
import android.annotation.Nullable;
|
||||
import android.annotation.SystemApi;
|
||||
import android.annotation.TestApi;
|
||||
import android.content.res.Resources;
|
||||
@@ -91,6 +92,7 @@ public final class ApfCapabilities implements Parcelable {
|
||||
}
|
||||
};
|
||||
|
||||
@NonNull
|
||||
@Override
|
||||
public String toString() {
|
||||
return String.format("%s{version: %d, maxSize: %d, format: %d}", getClass().getSimpleName(),
|
||||
@@ -98,7 +100,7 @@ public final class ApfCapabilities implements Parcelable {
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(Object obj) {
|
||||
public boolean equals(@Nullable Object obj) {
|
||||
if (!(obj instanceof ApfCapabilities)) return false;
|
||||
final ApfCapabilities other = (ApfCapabilities) obj;
|
||||
return apfVersionSupported == other.apfVersionSupported
|
||||
|
||||
Reference in New Issue
Block a user