Merge "Add missing nullability annotations."

This commit is contained in:
Aurimas Liutikas
2019-08-30 18:30:39 +00:00
committed by Gerrit Code Review
101 changed files with 266 additions and 85 deletions

View File

@@ -26836,7 +26836,7 @@ package android.media.tv {
method public android.media.tv.TvTrackInfo.Builder setAudioChannelCount(int);
method public android.media.tv.TvTrackInfo.Builder setAudioSampleRate(int);
method public android.media.tv.TvTrackInfo.Builder setDescription(CharSequence);
method public android.media.tv.TvTrackInfo.Builder setEncrypted(boolean);
method @NonNull public android.media.tv.TvTrackInfo.Builder setEncrypted(boolean);
method public android.media.tv.TvTrackInfo.Builder setExtra(android.os.Bundle);
method public android.media.tv.TvTrackInfo.Builder setLanguage(String);
method public android.media.tv.TvTrackInfo.Builder setVideoActiveFormatDescription(byte);
@@ -42142,7 +42142,7 @@ package android.telephony {
public class CarrierConfigManager {
method @Nullable public android.os.PersistableBundle getConfig();
method @Nullable public android.os.PersistableBundle getConfigByComponentForSubId(String, int);
method @Nullable public android.os.PersistableBundle getConfigByComponentForSubId(@NonNull String, int);
method @Nullable public android.os.PersistableBundle getConfigForSubId(int);
method public static boolean isConfigForIdentifiedCarrier(android.os.PersistableBundle);
method public void notifyConfigChangedForSubId(int);

View File

@@ -695,7 +695,7 @@ package android.app.usage {
}
public static final class UsageEvents.Event {
method public String getNotificationChannelId();
method @Nullable public String getNotificationChannelId();
field public static final int NOTIFICATION_INTERRUPTION = 12; // 0xc
field public static final int NOTIFICATION_SEEN = 10; // 0xa
field public static final int SLICE_PINNED = 14; // 0xe
@@ -1661,7 +1661,7 @@ package android.hardware.location {
method @Deprecated public void setMsgType(int);
method @Deprecated public void setVersion(int);
method @Deprecated public void writeToParcel(android.os.Parcel, int);
field @Deprecated public static final android.os.Parcelable.Creator<android.hardware.location.ContextHubMessage> CREATOR;
field @Deprecated @NonNull public static final android.os.Parcelable.Creator<android.hardware.location.ContextHubMessage> CREATOR;
}
public class ContextHubTransaction<T> {
@@ -1749,7 +1749,7 @@ package android.hardware.location {
method public int getMonitoringType();
method public int getSourceTechnologies();
method public void writeToParcel(android.os.Parcel, int);
field public static final android.os.Parcelable.Creator<android.hardware.location.GeofenceHardwareMonitorEvent> CREATOR;
field @NonNull public static final android.os.Parcelable.Creator<android.hardware.location.GeofenceHardwareMonitorEvent> CREATOR;
}
public final class GeofenceHardwareRequest {
@@ -1872,7 +1872,7 @@ package android.hardware.location {
method public long getNanoAppId();
method public boolean isBroadcastMessage();
method public void writeToParcel(android.os.Parcel, int);
field public static final android.os.Parcelable.Creator<android.hardware.location.NanoAppMessage> CREATOR;
field @NonNull public static final android.os.Parcelable.Creator<android.hardware.location.NanoAppMessage> CREATOR;
}
public final class NanoAppState implements android.os.Parcelable {

View File

@@ -16,6 +16,8 @@
package android.app;
import android.annotation.NonNull;
import android.annotation.Nullable;
import android.annotation.UnsupportedAppUsage;
import android.os.Parcel;
import android.os.Parcelable;
@@ -63,6 +65,7 @@ public final class Vr2dDisplayProperties implements Parcelable {
return result;
}
@NonNull
@Override
public String toString() {
return "Vr2dDisplayProperties{"
@@ -75,7 +78,7 @@ public final class Vr2dDisplayProperties implements Parcelable {
}
@Override
public boolean equals(Object o) {
public boolean equals(@Nullable Object o) {
if (this == o) return true;
if (o == null || getClass() != o.getClass()) return false;

View File

@@ -16,6 +16,7 @@
package android.app.backup;
import android.annotation.NonNull;
import android.annotation.SystemApi;
import android.os.Parcel;
import android.os.Parcelable;
@@ -52,6 +53,7 @@ public class RestoreDescription implements Parcelable {
/** This package's restore data is a tarball-type full data stream */
public static final int TYPE_FULL_STREAM = 2;
@NonNull
@Override
public String toString() {
return "RestoreDescription{" + mPackageName + " : "

View File

@@ -81,7 +81,7 @@ public final class CacheQuotaHint implements Parcelable {
}
@Override
public boolean equals(Object o) {
public boolean equals(@Nullable Object o) {
if (o instanceof CacheQuotaHint) {
final CacheQuotaHint other = (CacheQuotaHint) o;
return Objects.equals(mUuid, other.mUuid)

View File

@@ -16,6 +16,7 @@
package android.app.usage;
import android.annotation.IntDef;
import android.annotation.Nullable;
import android.annotation.SystemApi;
import android.annotation.UnsupportedAppUsage;
import android.content.res.Configuration;
@@ -366,6 +367,7 @@ public final class UsageEvents implements Parcelable {
* event is of type {@link #NOTIFICATION_INTERRUPTION}, otherwise it returns null;
* @hide
*/
@Nullable
@SystemApi
public String getNotificationChannelId() {
return mNotificationChannelId;

View File

@@ -18,6 +18,7 @@ package android.content.om;
import android.annotation.IntDef;
import android.annotation.NonNull;
import android.annotation.Nullable;
import android.annotation.UnsupportedAppUsage;
import android.os.Build;
import android.os.Parcel;
@@ -310,7 +311,7 @@ public final class OverlayInfo implements Parcelable {
}
@Override
public boolean equals(Object obj) {
public boolean equals(@Nullable Object obj) {
if (this == obj) {
return true;
}
@@ -342,6 +343,7 @@ public final class OverlayInfo implements Parcelable {
return true;
}
@NonNull
@Override
public String toString() {
return "OverlayInfo { overlay=" + packageName + ", target=" + targetPackageName + ", state="

View File

@@ -17,6 +17,7 @@
package android.hardware.display;
import android.annotation.NonNull;
import android.annotation.Nullable;
import android.annotation.SystemApi;
import android.annotation.TestApi;
import android.os.Parcel;
@@ -136,7 +137,7 @@ public final class AmbientBrightnessDayStats implements Parcelable {
};
@Override
public boolean equals(Object obj) {
public boolean equals(@Nullable Object obj) {
if (this == obj) {
return true;
}
@@ -161,6 +162,7 @@ public final class AmbientBrightnessDayStats implements Parcelable {
return result;
}
@NonNull
@Override
public String toString() {
StringBuilder bucketBoundariesString = new StringBuilder();

View File

@@ -16,6 +16,7 @@
package android.hardware.display;
import android.annotation.NonNull;
import android.annotation.Nullable;
import android.annotation.SystemApi;
import android.annotation.TestApi;
@@ -75,6 +76,7 @@ public final class BrightnessConfiguration implements Parcelable {
return 0;
}
@NonNull
@Override
public String toString() {
StringBuilder sb = new StringBuilder("BrightnessConfiguration{[");
@@ -105,7 +107,7 @@ public final class BrightnessConfiguration implements Parcelable {
}
@Override
public boolean equals(Object o) {
public boolean equals(@Nullable Object o) {
if (o == this) {
return true;
}

View File

@@ -16,6 +16,8 @@
package android.hardware.hdmi;
import android.annotation.NonNull;
import android.annotation.Nullable;
import android.annotation.SystemApi;
import android.os.Parcel;
import android.os.Parcelable;
@@ -458,6 +460,7 @@ public class HdmiDeviceInfo implements Parcelable {
}
}
@NonNull
@Override
public String toString() {
StringBuffer s = new StringBuffer();
@@ -493,7 +496,7 @@ public class HdmiDeviceInfo implements Parcelable {
}
@Override
public boolean equals(Object obj) {
public boolean equals(@Nullable Object obj) {
if (!(obj instanceof HdmiDeviceInfo)) {
return false;
}

View File

@@ -15,6 +15,8 @@
*/
package android.hardware.hdmi;
import android.annotation.NonNull;
import android.annotation.Nullable;
import android.annotation.SystemApi;
import android.os.Parcel;
import android.os.Parcelable;
@@ -162,6 +164,7 @@ public final class HdmiPortInfo implements Parcelable {
dest.writeInt(mMhlSupported ? 1 : 0);
}
@NonNull
@Override
public String toString() {
StringBuffer s = new StringBuffer();
@@ -174,7 +177,7 @@ public final class HdmiPortInfo implements Parcelable {
}
@Override
public boolean equals(Object o) {
public boolean equals(@Nullable Object o) {
if (!(o instanceof HdmiPortInfo)) {
return false;
}

View File

@@ -15,6 +15,7 @@
*/
package android.hardware.location;
import android.annotation.NonNull;
import android.annotation.SystemApi;
import android.hardware.contexthub.V1_0.ContextHub;
import android.os.Parcel;
@@ -247,6 +248,7 @@ public class ContextHubInfo implements Parcelable {
return mChrePatchVersion;
}
@NonNull
@Override
public String toString() {
String retVal = "";

View File

@@ -16,6 +16,7 @@
package android.hardware.location;
import android.annotation.NonNull;
import android.annotation.SystemApi;
import android.os.Parcel;
import android.os.Parcelable;
@@ -127,7 +128,7 @@ public class ContextHubMessage implements Parcelable {
out.writeByteArray(mData);
}
public static final Parcelable.Creator<ContextHubMessage> CREATOR
public static final @NonNull Parcelable.Creator<ContextHubMessage> CREATOR
= new Parcelable.Creator<ContextHubMessage>() {
public ContextHubMessage createFromParcel(Parcel in) {
return new ContextHubMessage(in);
@@ -138,6 +139,7 @@ public class ContextHubMessage implements Parcelable {
}
};
@NonNull
@Override
public String toString() {
int length = mData.length;

View File

@@ -16,6 +16,7 @@
package android.hardware.location;
import android.annotation.NonNull;
import android.annotation.SystemApi;
import android.location.Location;
import android.os.Parcel;
@@ -72,7 +73,7 @@ public class GeofenceHardwareMonitorEvent implements Parcelable {
return mLocation;
}
public static final Creator<GeofenceHardwareMonitorEvent> CREATOR =
public static final @NonNull Creator<GeofenceHardwareMonitorEvent> CREATOR =
new Creator<GeofenceHardwareMonitorEvent>() {
@Override
public GeofenceHardwareMonitorEvent createFromParcel(Parcel source) {
@@ -108,6 +109,7 @@ public class GeofenceHardwareMonitorEvent implements Parcelable {
parcel.writeParcelable(mLocation, flags);
}
@NonNull
@Override
public String toString() {
return String.format(

View File

@@ -16,6 +16,7 @@
package android.hardware.location;
import android.annotation.NonNull;
import android.annotation.SystemApi;
import android.os.Parcel;
import android.os.Parcelable;
@@ -78,6 +79,7 @@ public class MemoryRegion implements Parcelable{
return mIsExecutable;
}
@NonNull
@Override
public String toString() {
String mask = "";

View File

@@ -15,6 +15,7 @@
*/
package android.hardware.location;
import android.annotation.NonNull;
import android.annotation.SystemApi;
import android.os.Parcel;
import android.os.Parcelable;
@@ -366,6 +367,7 @@ public class NanoApp implements Parcelable {
}
};
@NonNull
@Override
public String toString() {
String retVal = "Id : " + mAppId;

View File

@@ -16,6 +16,7 @@
package android.hardware.location;
import android.annotation.NonNull;
import android.annotation.SystemApi;
import android.os.Parcel;
import android.os.Parcelable;
@@ -131,6 +132,7 @@ public class NanoAppFilter implements Parcelable {
(versionsMatch(mVersionRestrictionMask, mAppVersion, info.getAppVersion()));
}
@NonNull
@Override
public String toString() {
return "nanoAppId: 0x" + Long.toHexString(mAppId)

View File

@@ -219,6 +219,7 @@ public class NanoAppInstanceInfo implements Parcelable {
}
};
@NonNull
@Override
public String toString() {
String retVal = "handle : " + mHandle;

View File

@@ -15,6 +15,7 @@
*/
package android.hardware.location;
import android.annotation.NonNull;
import android.annotation.SystemApi;
import android.os.Parcel;
import android.os.Parcelable;
@@ -133,7 +134,7 @@ public final class NanoAppMessage implements Parcelable {
out.writeByteArray(mMessageBody);
}
public static final Creator<NanoAppMessage> CREATOR =
public static final @NonNull Creator<NanoAppMessage> CREATOR =
new Creator<NanoAppMessage>() {
@Override
public NanoAppMessage createFromParcel(Parcel in) {
@@ -146,6 +147,7 @@ public final class NanoAppMessage implements Parcelable {
}
};
@NonNull
@Override
public String toString() {
int length = mMessageBody.length;

View File

@@ -485,6 +485,7 @@ public final class ProgramSelector implements Parcelable {
return new ProgramSelector(programType, primary, secondary, null);
}
@NonNull
@Override
public String toString() {
StringBuilder sb = new StringBuilder("ProgramSelector(type=").append(mProgramType)
@@ -502,7 +503,7 @@ public final class ProgramSelector implements Parcelable {
}
@Override
public boolean equals(Object obj) {
public boolean equals(@Nullable Object obj) {
if (this == obj) return true;
if (!(obj instanceof ProgramSelector)) return false;
ProgramSelector other = (ProgramSelector) obj;
@@ -598,6 +599,7 @@ public final class ProgramSelector implements Parcelable {
return mValue;
}
@NonNull
@Override
public String toString() {
return "Identifier(" + mType + ", " + mValue + ")";
@@ -609,7 +611,7 @@ public final class ProgramSelector implements Parcelable {
}
@Override
public boolean equals(Object obj) {
public boolean equals(@Nullable Object obj) {
if (this == obj) return true;
if (!(obj instanceof Identifier)) return false;
Identifier other = (Identifier) obj;

View File

@@ -485,6 +485,7 @@ public class RadioManager {
return 0;
}
@NonNull
@Override
public String toString() {
return "ModuleProperties [mId=" + mId
@@ -507,7 +508,7 @@ public class RadioManager {
}
@Override
public boolean equals(Object obj) {
public boolean equals(@Nullable Object obj) {
if (this == obj) return true;
if (!(obj instanceof ModuleProperties)) return false;
ModuleProperties other = (ModuleProperties) obj;
@@ -660,6 +661,7 @@ public class RadioManager {
return 0;
}
@NonNull
@Override
public String toString() {
return "BandDescriptor [mRegion=" + mRegion + ", mType=" + mType + ", mLowerLimit="
@@ -679,7 +681,7 @@ public class RadioManager {
}
@Override
public boolean equals(Object obj) {
public boolean equals(@Nullable Object obj) {
if (this == obj)
return true;
if (!(obj instanceof BandDescriptor))
@@ -788,6 +790,7 @@ public class RadioManager {
return 0;
}
@NonNull
@Override
public String toString() {
return "FmBandDescriptor [ "+ super.toString() + " mStereo=" + mStereo
@@ -808,7 +811,7 @@ public class RadioManager {
}
@Override
public boolean equals(Object obj) {
public boolean equals(@Nullable Object obj) {
if (this == obj)
return true;
if (!super.equals(obj))
@@ -877,6 +880,7 @@ public class RadioManager {
return 0;
}
@NonNull
@Override
public String toString() {
return "AmBandDescriptor [ "+ super.toString() + " mStereo=" + mStereo + "]";
@@ -891,7 +895,7 @@ public class RadioManager {
}
@Override
public boolean equals(Object obj) {
public boolean equals(@Nullable Object obj) {
if (this == obj)
return true;
if (!super.equals(obj))
@@ -997,6 +1001,7 @@ public class RadioManager {
return 0;
}
@NonNull
@Override
public String toString() {
return "BandConfig [ " + mDescriptor.toString() + "]";
@@ -1011,7 +1016,7 @@ public class RadioManager {
}
@Override
public boolean equals(Object obj) {
public boolean equals(@Nullable Object obj) {
if (this == obj)
return true;
if (!(obj instanceof BandConfig))
@@ -1125,6 +1130,7 @@ public class RadioManager {
return 0;
}
@NonNull
@Override
public String toString() {
return "FmBandConfig [" + super.toString()
@@ -1145,7 +1151,7 @@ public class RadioManager {
}
@Override
public boolean equals(Object obj) {
public boolean equals(@Nullable Object obj) {
if (this == obj)
return true;
if (!super.equals(obj))
@@ -1317,6 +1323,7 @@ public class RadioManager {
return 0;
}
@NonNull
@Override
public String toString() {
return "AmBandConfig [" + super.toString()
@@ -1332,7 +1339,7 @@ public class RadioManager {
}
@Override
public boolean equals(Object obj) {
public boolean equals(@Nullable Object obj) {
if (this == obj)
return true;
if (!super.equals(obj))
@@ -1656,6 +1663,7 @@ public class RadioManager {
return 0;
}
@NonNull
@Override
public String toString() {
return "ProgramInfo"
@@ -1676,7 +1684,7 @@ public class RadioManager {
}
@Override
public boolean equals(Object obj) {
public boolean equals(@Nullable Object obj) {
if (this == obj) return true;
if (!(obj instanceof ProgramInfo)) return false;
ProgramInfo other = (ProgramInfo) obj;

View File

@@ -269,6 +269,7 @@ public final class RadioMetadata implements Parcelable {
mBundle = in.readBundle();
}
@NonNull
@Override
public String toString() {
StringBuilder sb = new StringBuilder("RadioMetadata[");

View File

@@ -22,6 +22,7 @@ import static android.system.OsConstants.ENOSYS;
import static android.system.OsConstants.EPERM;
import static android.system.OsConstants.EPIPE;
import android.annotation.NonNull;
import android.annotation.Nullable;
import android.annotation.SystemApi;
import android.annotation.UnsupportedAppUsage;
@@ -821,7 +822,7 @@ public class SoundTrigger {
}
@Override
public boolean equals(Object obj) {
public boolean equals(@Nullable Object obj) {
if (this == obj)
return true;
if (obj == null)
@@ -861,6 +862,7 @@ public class SoundTrigger {
return true;
}
@NonNull
@Override
public String toString() {
return "RecognitionEvent [status=" + status + ", soundModelHandle=" + soundModelHandle

View File

@@ -16,6 +16,7 @@
package android.hardware.usb;
import android.annotation.NonNull;
import android.hardware.usb.V1_0.Constants;
import android.os.Parcel;
import android.os.Parcelable;
@@ -271,7 +272,7 @@ public final class UsbPort implements Parcelable {
return false;
}
@NonNull
@Override
public String toString() {
return "UsbPort{id=" + mId + ", supportedModes=" + modeToString(mSupportedModes) + "}";

View File

@@ -16,6 +16,7 @@
package android.hardware.usb;
import android.annotation.NonNull;
import android.annotation.UnsupportedAppUsage;
import android.os.Parcel;
import android.os.Parcelable;
@@ -107,6 +108,7 @@ public final class UsbPortStatus implements Parcelable {
return mSupportedRoleCombinations;
}
@NonNull
@Override
public String toString() {
return "UsbPortStatus{connected=" + isConnected()
@@ -131,7 +133,7 @@ public final class UsbPortStatus implements Parcelable {
dest.writeInt(mSupportedRoleCombinations);
}
public static final Parcelable.Creator<UsbPortStatus> CREATOR =
public static final @NonNull Parcelable.Creator<UsbPortStatus> CREATOR =
new Parcelable.Creator<UsbPortStatus>() {
@Override
public UsbPortStatus createFromParcel(Parcel in) {

View File

@@ -853,6 +853,7 @@ public final class IpSecManager {
return mResourceId;
}
@NonNull
@Override
public String toString() {
return new StringBuilder()

View File

@@ -16,6 +16,7 @@
package android.net;
import android.annotation.NonNull;
import android.annotation.Nullable;
import android.annotation.SystemApi;
import android.net.wifi.ScanResult;
@@ -152,7 +153,7 @@ public class NetworkKey implements Parcelable {
}
@Override
public boolean equals(Object o) {
public boolean equals(@Nullable Object o) {
if (this == o) return true;
if (o == null || getClass() != o.getClass()) return false;
@@ -166,6 +167,7 @@ public class NetworkKey implements Parcelable {
return Objects.hash(type, wifiKey);
}
@NonNull
@Override
public String toString() {
switch (type) {

View File

@@ -16,6 +16,8 @@
package android.net;
import android.annotation.NonNull;
import android.annotation.Nullable;
import android.annotation.SystemApi;
import android.os.Parcel;
import android.os.Parcelable;
@@ -170,7 +172,7 @@ public class RssiCurve implements Parcelable {
* not considered equal to each other.
*/
@Override
public boolean equals(Object o) {
public boolean equals(@Nullable Object o) {
if (this == o) return true;
if (o == null || getClass() != o.getClass()) return false;
@@ -187,6 +189,7 @@ public class RssiCurve implements Parcelable {
return Objects.hash(start, bucketWidth, activeNetworkRssiBoost) ^ Arrays.hashCode(rssiBuckets);
}
@NonNull
@Override
public String toString() {
StringBuilder sb = new StringBuilder();

View File

@@ -16,6 +16,7 @@
package android.net;
import android.annotation.NonNull;
import android.annotation.Nullable;
import android.annotation.SystemApi;
import android.os.Bundle;
@@ -182,7 +183,7 @@ public class ScoredNetwork implements Parcelable {
}
@Override
public boolean equals(Object o) {
public boolean equals(@Nullable Object o) {
if (this == o) return true;
if (o == null || getClass() != o.getClass()) return false;
@@ -220,6 +221,7 @@ public class ScoredNetwork implements Parcelable {
return Objects.hash(networkKey, rssiCurve, meteredHint, attributes);
}
@NonNull
@Override
public String toString() {
StringBuilder out = new StringBuilder(

View File

@@ -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;

View File

@@ -18,6 +18,7 @@ package android.net;
import static android.util.Patterns.GOOD_IRI_CHAR;
import android.annotation.NonNull;
import android.annotation.SystemApi;
import android.annotation.UnsupportedAppUsage;
import android.os.Build;
@@ -132,6 +133,7 @@ public class WebAddress {
if (mScheme.equals("")) mScheme = "http";
}
@NonNull
@Override
public String toString() {
String port = "";

View File

@@ -16,6 +16,8 @@
package android.net;
import android.annotation.NonNull;
import android.annotation.Nullable;
import android.annotation.SystemApi;
import android.os.Parcel;
import android.os.Parcelable;
@@ -91,7 +93,7 @@ public class WifiKey implements Parcelable {
}
@Override
public boolean equals(Object o) {
public boolean equals(@Nullable Object o) {
if (this == o) return true;
if (o == null || getClass() != o.getClass()) return false;
@@ -105,6 +107,7 @@ public class WifiKey implements Parcelable {
return Objects.hash(ssid, bssid);
}
@NonNull
@Override
public String toString() {
return "WifiKey[SSID=" + ssid + ",BSSID=" + bssid + "]";

View File

@@ -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

View File

@@ -18,6 +18,7 @@ package android.net.metrics;
import android.annotation.IntDef;
import android.annotation.NonNull;
import android.annotation.Nullable;
import android.annotation.SystemApi;
import android.annotation.TestApi;
import android.annotation.UnsupportedAppUsage;
@@ -185,6 +186,7 @@ public final class ApfProgramEvent implements IpConnectivityLog.Event {
return 0;
}
@NonNull
@Override
public String toString() {
String lifetimeString = (lifetime < Long.MAX_VALUE) ? lifetime + "s" : "forever";
@@ -193,7 +195,7 @@ public final class ApfProgramEvent implements IpConnectivityLog.Event {
}
@Override
public boolean equals(Object obj) {
public boolean equals(@Nullable Object obj) {
if (obj == null || !(obj.getClass().equals(ApfProgramEvent.class))) return false;
final ApfProgramEvent other = (ApfProgramEvent) obj;
return lifetime == other.lifetime

View File

@@ -17,6 +17,7 @@
package android.net.metrics;
import android.annotation.NonNull;
import android.annotation.Nullable;
import android.annotation.SystemApi;
import android.annotation.TestApi;
import android.annotation.UnsupportedAppUsage;
@@ -260,6 +261,7 @@ public final class ApfStats implements IpConnectivityLog.Event {
return 0;
}
@NonNull
@Override
public String toString() {
return new StringBuilder("ApfStats(")
@@ -276,7 +278,7 @@ public final class ApfStats implements IpConnectivityLog.Event {
}
@Override
public boolean equals(Object obj) {
public boolean equals(@Nullable Object obj) {
if (obj == null || !(obj.getClass().equals(ApfStats.class))) return false;
final ApfStats other = (ApfStats) obj;
return durationMs == other.durationMs

View File

@@ -17,6 +17,7 @@
package android.net.metrics;
import android.annotation.NonNull;
import android.annotation.Nullable;
import android.annotation.SystemApi;
import android.annotation.TestApi;
import android.annotation.UnsupportedAppUsage;
@@ -97,13 +98,14 @@ public final class DhcpClientEvent implements IpConnectivityLog.Event {
return 0;
}
@NonNull
@Override
public String toString() {
return String.format("DhcpClientEvent(%s, %dms)", msg, durationMs);
}
@Override
public boolean equals(Object obj) {
public boolean equals(@Nullable Object obj) {
if (obj == null || !(obj.getClass().equals(DhcpClientEvent.class))) return false;
final DhcpClientEvent other = (DhcpClientEvent) obj;
return TextUtils.equals(msg, other.msg)

View File

@@ -16,6 +16,7 @@
package android.net.metrics;
import android.annotation.NonNull;
import android.annotation.SystemApi;
import android.annotation.TestApi;
import android.os.Parcel;
@@ -108,6 +109,7 @@ public final class DhcpErrorEvent implements IpConnectivityLog.Event {
return (0xFFFF0000 & errorCode) | (0xFF & option);
}
@NonNull
@Override
public String toString() {
return String.format("DhcpErrorEvent(%s)", Decoder.constants.get(errorCode));

View File

@@ -17,6 +17,8 @@
package android.net.metrics;
import android.annotation.IntDef;
import android.annotation.NonNull;
import android.annotation.Nullable;
import android.annotation.SystemApi;
import android.annotation.TestApi;
import android.os.Parcel;
@@ -95,6 +97,7 @@ public final class IpManagerEvent implements IpConnectivityLog.Event {
}
};
@NonNull
@Override
public String toString() {
return String.format("IpManagerEvent(%s, %dms)",
@@ -102,7 +105,7 @@ public final class IpManagerEvent implements IpConnectivityLog.Event {
}
@Override
public boolean equals(Object obj) {
public boolean equals(@Nullable Object obj) {
if (obj == null || !(obj.getClass().equals(IpManagerEvent.class))) return false;
final IpManagerEvent other = (IpManagerEvent) obj;
return eventType == other.eventType

View File

@@ -16,6 +16,8 @@
package android.net.metrics;
import android.annotation.NonNull;
import android.annotation.Nullable;
import android.annotation.SystemApi;
import android.annotation.TestApi;
import android.os.Parcel;
@@ -85,6 +87,7 @@ public final class IpReachabilityEvent implements IpConnectivityLog.Event {
}
};
@NonNull
@Override
public String toString() {
int hi = eventType & 0xff00;
@@ -94,7 +97,7 @@ public final class IpReachabilityEvent implements IpConnectivityLog.Event {
}
@Override
public boolean equals(Object obj) {
public boolean equals(@Nullable Object obj) {
if (obj == null || !(obj.getClass().equals(IpReachabilityEvent.class))) return false;
final IpReachabilityEvent other = (IpReachabilityEvent) obj;
return eventType == other.eventType;

View File

@@ -17,6 +17,8 @@
package android.net.metrics;
import android.annotation.IntDef;
import android.annotation.NonNull;
import android.annotation.Nullable;
import android.annotation.SystemApi;
import android.annotation.TestApi;
import android.os.Parcel;
@@ -115,6 +117,7 @@ public final class NetworkEvent implements IpConnectivityLog.Event {
}
};
@NonNull
@Override
public String toString() {
return String.format("NetworkEvent(%s, %dms)",
@@ -122,7 +125,7 @@ public final class NetworkEvent implements IpConnectivityLog.Event {
}
@Override
public boolean equals(Object obj) {
public boolean equals(@Nullable Object obj) {
if (obj == null || !(obj.getClass().equals(NetworkEvent.class))) return false;
final NetworkEvent other = (NetworkEvent) obj;
return eventType == other.eventType

View File

@@ -17,6 +17,7 @@
package android.net.metrics;
import android.annotation.NonNull;
import android.annotation.Nullable;
import android.annotation.SystemApi;
import android.annotation.TestApi;
import android.os.Parcel;
@@ -85,6 +86,7 @@ public final class RaEvent implements IpConnectivityLog.Event {
return 0;
}
@NonNull
@Override
public String toString() {
return new StringBuilder("RaEvent(lifetimes: ")
@@ -98,7 +100,7 @@ public final class RaEvent implements IpConnectivityLog.Event {
}
@Override
public boolean equals(Object obj) {
public boolean equals(@Nullable Object obj) {
if (obj == null || !(obj.getClass().equals(RaEvent.class))) return false;
final RaEvent other = (RaEvent) obj;
return routerLifetime == other.routerLifetime

View File

@@ -18,6 +18,7 @@ package android.net.metrics;
import android.annotation.IntDef;
import android.annotation.NonNull;
import android.annotation.Nullable;
import android.annotation.SystemApi;
import android.annotation.TestApi;
import android.os.Parcel;
@@ -164,6 +165,7 @@ public final class ValidationProbeEvent implements IpConnectivityLog.Event {
return Decoder.constants.get(probeType & 0xff00, "UNKNOWN");
}
@NonNull
@Override
public String toString() {
return String.format("ValidationProbeEvent(%s:%d %s, %dms)",
@@ -171,7 +173,7 @@ public final class ValidationProbeEvent implements IpConnectivityLog.Event {
}
@Override
public boolean equals(Object obj) {
public boolean equals(@Nullable Object obj) {
if (obj == null || !(obj.getClass().equals(ValidationProbeEvent.class))) return false;
final ValidationProbeEvent other = (ValidationProbeEvent) obj;
return durationMs == other.durationMs

View File

@@ -16,6 +16,7 @@
package android.os;
import android.annotation.NonNull;
import android.annotation.SystemApi;
import android.annotation.TestApi;
import android.os.Parcel;
@@ -110,6 +111,7 @@ public final class IncidentReportArgs implements Parcelable {
/**
* Print this report as a string.
*/
@NonNull
@Override
public String toString() {
final StringBuilder sb = new StringBuilder("Incident(");

View File

@@ -15,6 +15,7 @@
*/
package android.os;
import android.annotation.NonNull;
import android.annotation.Nullable;
import android.annotation.SystemApi;
@@ -44,6 +45,7 @@ public class ServiceSpecificException extends RuntimeException {
this.errorCode = errorCode;
}
@NonNull
@Override
public String toString() {
return super.toString() + " (code " + errorCode + ")";

View File

@@ -1,5 +1,6 @@
package android.os;
import android.annotation.NonNull;
import android.annotation.Nullable;
import android.annotation.SystemApi;
import android.annotation.UnsupportedAppUsage;
@@ -186,7 +187,7 @@ public class WorkSource implements Parcelable {
}
@Override
public boolean equals(Object o) {
public boolean equals(@Nullable Object o) {
if (o instanceof WorkSource) {
WorkSource other = (WorkSource) o;
@@ -968,6 +969,7 @@ public class WorkSource implements Parcelable {
mTags = tags;
}
@NonNull
@Override
public String toString() {
StringBuilder result = new StringBuilder("WorkChain{");
@@ -994,7 +996,7 @@ public class WorkSource implements Parcelable {
}
@Override
public boolean equals(Object o) {
public boolean equals(@Nullable Object o) {
if (o instanceof WorkChain) {
WorkChain other = (WorkChain) o;

View File

@@ -17,6 +17,7 @@
package android.printservice;
import android.annotation.NonNull;
import android.annotation.Nullable;
import android.annotation.SystemApi;
import android.content.ComponentName;
import android.content.Context;
@@ -292,7 +293,7 @@ public final class PrintServiceInfo implements Parcelable {
}
@Override
public boolean equals(Object obj) {
public boolean equals(@Nullable Object obj) {
if (this == obj) {
return true;
}
@@ -313,6 +314,7 @@ public final class PrintServiceInfo implements Parcelable {
return true;
}
@NonNull
@Override
public String toString() {
StringBuilder builder = new StringBuilder();

View File

@@ -16,6 +16,7 @@
package android.provider;
import android.annotation.NonNull;
import android.annotation.SystemApi;
import android.content.Context;
@@ -139,6 +140,7 @@ public abstract class SearchIndexableData {
context = ctx;
}
@NonNull
@Override
public String toString() {
final StringBuilder sb = new StringBuilder();

View File

@@ -16,6 +16,7 @@
package android.provider;
import android.annotation.NonNull;
import android.annotation.SystemApi;
import android.content.Context;
@@ -66,6 +67,7 @@ public class SearchIndexableResource extends SearchIndexableData {
super(context);
}
@NonNull
@Override
public String toString() {
final StringBuilder sb = new StringBuilder();

View File

@@ -16,6 +16,7 @@
package android.service.euicc;
import android.annotation.IntDef;
import android.annotation.NonNull;
import android.annotation.Nullable;
import android.annotation.SystemApi;
import android.annotation.UnsupportedAppUsage;
@@ -395,7 +396,7 @@ public final class EuiccProfileInfo implements Parcelable {
}
@Override
public boolean equals(Object obj) {
public boolean equals(@Nullable Object obj) {
if (this == obj) {
return true;
}
@@ -430,6 +431,7 @@ public final class EuiccProfileInfo implements Parcelable {
return result;
}
@NonNull
@Override
public String toString() {
return "EuiccProfileInfo (nickname="

View File

@@ -15,6 +15,7 @@
*/
package android.service.notification;
import android.annotation.NonNull;
import android.annotation.SystemApi;
import android.annotation.TestApi;
import android.app.Notification;
@@ -162,6 +163,7 @@ public final class Adjustment implements Parcelable {
dest.writeInt(mUser);
}
@NonNull
@Override
public String toString() {
return "Adjustment{"

View File

@@ -16,6 +16,8 @@
package android.service.notification;
import android.annotation.IntDef;
import android.annotation.NonNull;
import android.annotation.Nullable;
import android.annotation.SystemApi;
import android.annotation.TestApi;
import android.app.RemoteInput;
@@ -213,7 +215,7 @@ public final class NotificationStats implements Parcelable {
}
@Override
public boolean equals(Object o) {
public boolean equals(@Nullable Object o) {
if (this == o) return true;
if (o == null || getClass() != o.getClass()) return false;
@@ -240,6 +242,7 @@ public final class NotificationStats implements Parcelable {
return result;
}
@NonNull
@Override
public String toString() {
final StringBuilder sb = new StringBuilder("NotificationStats{");

View File

@@ -15,6 +15,7 @@
*/
package android.service.notification;
import android.annotation.Nullable;
import android.annotation.SystemApi;
import android.annotation.TestApi;
import android.os.Parcel;
@@ -118,7 +119,7 @@ public final class SnoozeCriterion implements Parcelable {
}
@Override
public boolean equals(Object o) {
public boolean equals(@Nullable Object o) {
if (this == o) return true;
if (o == null || getClass() != o.getClass()) return false;

View File

@@ -16,13 +16,10 @@
package android.service.resolver;
import android.annotation.NonNull;
import android.annotation.SystemApi;
import android.os.Bundle;
import android.os.Parcel;
import android.os.Parcelable;
import android.util.ArrayMap;
import java.util.Map;
/**
* A ResolverTarget contains features by which an app or option will be ranked, in
@@ -173,6 +170,7 @@ public final class ResolverTarget implements Parcelable {
}
// serialize the class to a string.
@NonNull
@Override
public String toString() {
return "ResolverTarget{"

View File

@@ -16,6 +16,7 @@
package android.location;
import android.annotation.NonNull;
import android.annotation.SystemApi;
import android.os.Parcel;
import android.os.Parcelable;
@@ -437,6 +438,7 @@ public class GpsClock implements Parcelable {
return 0;
}
@NonNull
@Override
public String toString() {
final String format = " %-15s = %s\n";

View File

@@ -16,6 +16,7 @@
package android.location;
import android.annotation.NonNull;
import android.annotation.SystemApi;
import android.os.Parcel;
import android.os.Parcelable;
@@ -1244,6 +1245,7 @@ public class GpsMeasurement implements Parcelable {
return 0;
}
@NonNull
@Override
public String toString() {
final String format = " %-29s = %s\n";

View File

@@ -140,6 +140,7 @@ public class GpsMeasurementsEvent implements Parcelable {
parcel.writeTypedArray(measurementsArray, flags);
}
@NonNull
@Override
public String toString() {
StringBuilder builder = new StringBuilder("[ GpsMeasurementsEvent:\n\n");

View File

@@ -290,6 +290,7 @@ public class GpsNavigationMessage implements Parcelable {
return 0;
}
@NonNull
@Override
public String toString() {
final String format = " %-15s = %s\n";

View File

@@ -109,6 +109,7 @@ public class GpsNavigationMessageEvent implements Parcelable {
parcel.writeParcelable(mNavigationMessage, flags);
}
@NonNull
@Override
public String toString() {
StringBuilder builder = new StringBuilder("[ GpsNavigationMessageEvent:\n\n");

View File

@@ -16,6 +16,7 @@
package android.location;
import android.annotation.NonNull;
import android.annotation.SystemApi;
import android.annotation.UnsupportedAppUsage;
import android.os.Build;
@@ -705,6 +706,7 @@ public final class LocationRequest implements Parcelable {
}
}
@NonNull
@Override
public String toString() {
StringBuilder s = new StringBuilder();

View File

@@ -16,6 +16,7 @@
package android.media;
import android.annotation.Nullable;
import android.annotation.SystemApi;
import android.os.Parcel;
import android.os.Parcelable;
@@ -144,7 +145,7 @@ public final class AudioFocusInfo implements Parcelable {
}
@Override
public boolean equals(Object obj) {
public boolean equals(@Nullable Object obj) {
if (this == obj)
return true;
if (obj == null)

View File

@@ -41,7 +41,6 @@ import android.os.ServiceManager;
import android.os.UserHandle;
import android.service.media.MediaBrowserService;
import android.service.notification.NotificationListenerService;
import android.text.TextUtils;
import android.util.ArrayMap;
import android.util.Log;
import android.view.KeyEvent;
@@ -882,7 +881,7 @@ public final class MediaSessionManager {
* @return {@code true} if equals, {@code false} otherwise
*/
@Override
public boolean equals(Object obj) {
public boolean equals(@Nullable Object obj) {
if (!(obj instanceof RemoteUserInfo)) {
return false;
}

View File

@@ -19,12 +19,14 @@ package android.media.tv;
import static java.lang.annotation.RetentionPolicy.SOURCE;
import android.annotation.IntDef;
import android.annotation.NonNull;
import android.annotation.SystemApi;
import android.hardware.tv.input.V1_0.Constants;
import android.media.AudioManager;
import android.os.Parcel;
import android.os.Parcelable;
import android.util.Log;
import java.lang.annotation.Retention;
/**
@@ -141,6 +143,7 @@ public final class TvInputHardwareInfo implements Parcelable {
return mCableConnectionStatus;
}
@NonNull
@Override
public String toString() {
StringBuilder b = new StringBuilder(128);

View File

@@ -16,6 +16,8 @@
package android.media.tv;
import android.annotation.NonNull;
import android.annotation.Nullable;
import android.annotation.SystemApi;
import android.os.Parcel;
import android.os.Parcelable;
@@ -87,6 +89,7 @@ public class TvStreamConfig implements Parcelable {
return mGeneration;
}
@NonNull
@Override
public String toString() {
return "TvStreamConfig {mStreamId=" + mStreamId + ";" + "mType=" + mType + ";mGeneration="
@@ -163,7 +166,7 @@ public class TvStreamConfig implements Parcelable {
}
@Override
public boolean equals(Object obj) {
public boolean equals(@Nullable Object obj) {
if (obj == null) return false;
if (!(obj instanceof TvStreamConfig)) return false;

View File

@@ -394,6 +394,7 @@ public final class TvTrackInfo implements Parcelable {
*
* @param encrypted The encryption status of the track.
*/
@NonNull
public Builder setEncrypted(boolean encrypted) {
mEncrypted = encrypted;
return this;

View File

@@ -16,6 +16,8 @@
package android.telecom;
import android.annotation.NonNull;
import android.annotation.Nullable;
import android.annotation.SystemApi;
import android.annotation.UnsupportedAppUsage;
import android.os.Build;
@@ -81,7 +83,7 @@ public class AudioState implements Parcelable {
}
@Override
public boolean equals(Object obj) {
public boolean equals(@Nullable Object obj) {
if (obj == null) {
return false;
}
@@ -93,6 +95,7 @@ public class AudioState implements Parcelable {
getSupportedRouteMask() == state.getSupportedRouteMask();
}
@NonNull
@Override
public String toString() {
return String.format(Locale.US,

View File

@@ -17,6 +17,7 @@
package android.telephony;
import android.annotation.NonNull;
import android.annotation.Nullable;
import android.annotation.SystemApi;
import android.os.Parcel;
import android.os.Parcelable;
@@ -44,6 +45,7 @@ public final class CallAttributes implements Parcelable {
this.mCallQuality = callQuality;
}
@NonNull
@Override
public String toString() {
return "mPreciseCallState=" + mPreciseCallState + " mNetworkType=" + mNetworkType
@@ -109,7 +111,7 @@ public final class CallAttributes implements Parcelable {
}
@Override
public boolean equals(Object o) {
public boolean equals(@Nullable Object o) {
if (o == null || !(o instanceof CallAttributes) || hashCode() != o.hashCode()) {
return false;
}

View File

@@ -17,6 +17,8 @@
package android.telephony;
import android.annotation.IntDef;
import android.annotation.NonNull;
import android.annotation.Nullable;
import android.annotation.SystemApi;
import android.os.Parcel;
import android.os.Parcelable;
@@ -252,6 +254,7 @@ public final class CallQuality implements Parcelable {
}
// Parcelable things
@NonNull
@Override
public String toString() {
return "CallQuality: {downlinkCallQualityLevel=" + mDownlinkCallQualityLevel
@@ -285,7 +288,7 @@ public final class CallQuality implements Parcelable {
}
@Override
public boolean equals(Object o) {
public boolean equals(@Nullable Object o) {
if (o == null || !(o instanceof CallQuality) || hashCode() != o.hashCode()) {
return false;
}

View File

@@ -3480,7 +3480,7 @@ public class CarrierConfigManager {
* @see #getConfigForSubId
*/
@Nullable
public PersistableBundle getConfigByComponentForSubId(String prefix, int subId) {
public PersistableBundle getConfigByComponentForSubId(@NonNull String prefix, int subId) {
PersistableBundle configs = getConfigForSubId(subId);
if (configs == null) {

View File

@@ -323,6 +323,7 @@ public final class CarrierRestrictionRules implements Parcelable {
}
};
@NonNull
@Override
public String toString() {
return "CarrierRestrictionRules(allowed:" + mAllowedCarriers + ", excluded:"

View File

@@ -17,6 +17,7 @@
package android.telephony;
import android.annotation.NonNull;
import android.annotation.Nullable;
import android.annotation.SystemApi;
import android.annotation.TestApi;
import android.os.Parcel;
@@ -134,6 +135,7 @@ public final class DataSpecificRegistrationInfo implements Parcelable {
return 0;
}
@NonNull
@Override
public String toString() {
return new StringBuilder().append(this.getClass().getName())
@@ -155,7 +157,7 @@ public final class DataSpecificRegistrationInfo implements Parcelable {
}
@Override
public boolean equals(Object o) {
public boolean equals(@Nullable Object o) {
if (this == o) return true;
if (!(o instanceof DataSpecificRegistrationInfo)) return false;

View File

@@ -17,6 +17,8 @@
package android.telephony;
import android.annotation.IntDef;
import android.annotation.NonNull;
import android.annotation.Nullable;
import android.annotation.SystemApi;
import android.annotation.TestApi;
import android.os.Parcel;
@@ -94,7 +96,7 @@ public final class LteVopsSupportInfo implements Parcelable {
}
@Override
public boolean equals(Object o) {
public boolean equals(@Nullable Object o) {
if (o == null || !(o instanceof LteVopsSupportInfo)) {
return false;
}
@@ -112,6 +114,7 @@ public final class LteVopsSupportInfo implements Parcelable {
/**
* @return string representation.
*/
@NonNull
@Override
public String toString() {
return ("LteVopsSupportInfo : "

View File

@@ -501,6 +501,7 @@ public final class NetworkRegistrationInfo implements Parcelable {
}
}
@NonNull
@Override
public String toString() {
return new StringBuilder("NetworkRegistrationInfo{")
@@ -531,7 +532,7 @@ public final class NetworkRegistrationInfo implements Parcelable {
}
@Override
public boolean equals(Object o) {
public boolean equals(@Nullable Object o) {
if (this == o) return true;
if (!(o instanceof NetworkRegistrationInfo)) {

View File

@@ -17,6 +17,7 @@
package android.telephony;
import android.annotation.NonNull;
import android.annotation.Nullable;
import android.annotation.SystemApi;
import android.os.Parcel;
import android.os.Parcelable;
@@ -104,7 +105,7 @@ public final class PhoneNumberRange implements Parcelable {
}
@Override
public boolean equals(Object o) {
public boolean equals(@Nullable Object o) {
if (this == o) return true;
if (o == null || getClass() != o.getClass()) return false;
PhoneNumberRange that = (PhoneNumberRange) o;
@@ -119,6 +120,7 @@ public final class PhoneNumberRange implements Parcelable {
return Objects.hash(mCountryCode, mPrefix, mLowerBound, mUpperBound);
}
@NonNull
@Override
public String toString() {
return "PhoneNumberRange{"

View File

@@ -17,6 +17,8 @@
package android.telephony;
import android.annotation.IntDef;
import android.annotation.NonNull;
import android.annotation.Nullable;
import android.annotation.SystemApi;
import android.annotation.UnsupportedAppUsage;
import android.os.Parcel;
@@ -276,7 +278,7 @@ public final class PreciseCallState implements Parcelable {
}
@Override
public boolean equals(Object obj) {
public boolean equals(@Nullable Object obj) {
if (this == obj) {
return true;
}
@@ -294,6 +296,7 @@ public final class PreciseCallState implements Parcelable {
&& mPreciseDisconnectCause == other.mPreciseDisconnectCause);
}
@NonNull
@Override
public String toString() {
StringBuffer sb = new StringBuffer();

View File

@@ -177,7 +177,7 @@ public final class PreciseDataConnectionState implements Parcelable {
}
@Override
public boolean equals(Object obj) {
public boolean equals(@Nullable Object obj) {
if (!(obj instanceof PreciseDataConnectionState)) {
return false;
@@ -191,6 +191,7 @@ public final class PreciseDataConnectionState implements Parcelable {
&& mState == other.mState;
}
@NonNull
@Override
public String toString() {
StringBuilder sb = new StringBuilder();

View File

@@ -131,7 +131,7 @@ public final class SubscriptionPlan implements Parcelable {
}
@Override
public boolean equals(Object obj) {
public boolean equals(@Nullable Object obj) {
if (obj instanceof SubscriptionPlan) {
final SubscriptionPlan other = (SubscriptionPlan) obj;
return Objects.equals(cycleRule, other.cycleRule)

View File

@@ -15,13 +15,12 @@
*/
package android.telephony;
import android.annotation.NonNull;
import android.annotation.SystemApi;
import android.os.Parcel;
import android.os.Parcelable;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
/**
* Parcelable class to store Telephony histogram.
@@ -238,6 +237,8 @@ public final class TelephonyHistogram implements Parcelable {
}
}
@NonNull
@Override
public String toString() {
String basic = " Histogram id = " + mId + " Time(ms): min = " + mMinTimeMs + " max = "
+ mMaxTimeMs + " avg = " + mAverageTimeMs + " Count = " + mSampleCount;

View File

@@ -15,6 +15,7 @@
*/
package android.telephony;
import android.annotation.NonNull;
import android.annotation.Nullable;
import android.annotation.SystemApi;
import android.content.pm.PackageInfo;
@@ -213,7 +214,7 @@ public final class UiccAccessRule implements Parcelable {
}
@Override
public boolean equals(Object obj) {
public boolean equals(@Nullable Object obj) {
if (this == obj) {
return true;
}
@@ -236,6 +237,7 @@ public final class UiccAccessRule implements Parcelable {
return result;
}
@NonNull
@Override
public String toString() {
return "cert: " + IccUtils.bytesToHexString(mCertificateHash) + " pkg: " +

View File

@@ -16,6 +16,8 @@
package android.telephony;
import android.annotation.IntDef;
import android.annotation.NonNull;
import android.annotation.Nullable;
import android.annotation.SystemApi;
import android.os.Parcel;
import android.os.Parcelable;
@@ -179,7 +181,7 @@ public class UiccSlotInfo implements Parcelable {
}
@Override
public boolean equals(Object obj) {
public boolean equals(@Nullable Object obj) {
if (this == obj) {
return true;
}
@@ -210,6 +212,7 @@ public class UiccSlotInfo implements Parcelable {
return result;
}
@NonNull
@Override
public String toString() {
return "UiccSlotInfo (mIsActive="

View File

@@ -213,6 +213,7 @@ public final class DataCallResponse implements Parcelable {
*/
public int getMtu() { return mMtu; }
@NonNull
@Override
public String toString() {
StringBuffer sb = new StringBuffer();
@@ -233,7 +234,7 @@ public final class DataCallResponse implements Parcelable {
}
@Override
public boolean equals (Object o) {
public boolean equals(@Nullable Object o) {
if (this == o) return true;
if (!(o instanceof DataCallResponse)) {

View File

@@ -257,6 +257,7 @@ public final class DataProfile implements Parcelable {
return 0;
}
@NonNull
@Override
public String toString() {
return "DataProfile=" + mProfileId + "/" + mProtocolType + "/" + mAuthType
@@ -303,7 +304,7 @@ public final class DataProfile implements Parcelable {
};
@Override
public boolean equals(Object o) {
public boolean equals(@Nullable Object o) {
if (this == o) return true;
if (o == null || getClass() != o.getClass()) return false;
DataProfile that = (DataProfile) o;

View File

@@ -16,6 +16,7 @@
package android.telephony.euicc;
import android.annotation.IntDef;
import android.annotation.NonNull;
import android.annotation.Nullable;
import android.annotation.SystemApi;
import android.os.Parcel;
@@ -107,7 +108,7 @@ public final class EuiccNotification implements Parcelable {
}
@Override
public boolean equals(Object obj) {
public boolean equals(@Nullable Object obj) {
if (this == obj) {
return true;
}
@@ -132,6 +133,7 @@ public final class EuiccNotification implements Parcelable {
return result;
}
@NonNull
@Override
public String toString() {
return "EuiccNotification (seq="

View File

@@ -16,6 +16,7 @@
package android.telephony.euicc;
import android.annotation.IntDef;
import android.annotation.Nullable;
import android.annotation.SystemApi;
import android.os.Parcel;
import android.os.Parcelable;
@@ -28,7 +29,6 @@ import com.android.internal.annotations.VisibleForTesting;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.util.Arrays;
import java.util.ArrayList;
import java.util.List;
/**
@@ -204,7 +204,7 @@ public final class EuiccRulesAuthTable implements Parcelable {
}
@Override
public boolean equals(Object obj) {
public boolean equals(@Nullable Object obj) {
if (this == obj) {
return true;
}

View File

@@ -185,6 +185,7 @@ public final class ImsCallForwardInfo implements Parcelable {
out.writeInt(mServiceClass);
}
@NonNull
@Override
public String toString() {
return super.toString() + ", Condition: " + mCondition

View File

@@ -534,7 +534,7 @@ public final class ImsCallProfile implements Parcelable {
mMediaProfile = profile.mMediaProfile;
}
@NonNull
@Override
public String toString() {
return "{ serviceType=" + mServiceType

View File

@@ -16,6 +16,7 @@
package android.telephony.ims;
import android.annotation.NonNull;
import android.annotation.SystemApi;
import android.os.Bundle;
import android.os.Parcel;
@@ -176,6 +177,7 @@ public final class ImsConferenceState implements Parcelable {
return Call.STATE_ACTIVE;
}
@NonNull
@Override
public String toString() {
StringBuilder sb = new StringBuilder();

View File

@@ -213,6 +213,7 @@ public final class ImsExternalCallState implements Parcelable {
return mIsHeld;
}
@NonNull
@Override
public String toString() {
return "ImsExternalCallState { mCallId = " + mCallId +

View File

@@ -17,6 +17,7 @@
package android.telephony.ims;
import android.annotation.IntDef;
import android.annotation.NonNull;
import android.annotation.SystemApi;
import android.annotation.UnsupportedAppUsage;
import android.os.Parcel;
@@ -1170,6 +1171,8 @@ public final class ImsReasonInfo implements Parcelable {
/**
* @return the string format of {@link ImsReasonInfo}
*/
@NonNull
@Override
public String toString() {
return "ImsReasonInfo :: {" + mCode + ", " + mExtraCode + ", " + mExtraMessage + "}";
}

View File

@@ -570,6 +570,8 @@ public final class ImsSsData implements Parcelable {
return mCfInfo;
}
@NonNull
@Override
public String toString() {
return "[ImsSsData] " + "ServiceType: " + getServiceType()
+ " RequestType: " + getRequestType()

View File

@@ -254,6 +254,7 @@ public final class ImsSsInfo implements Parcelable {
out.writeInt(mClirOutgoingState);
}
@NonNull
@Override
public String toString() {
return super.toString() + ", Status: " + ((mStatus == 0) ? "disabled" : "enabled")

View File

@@ -16,6 +16,7 @@
package android.telephony.ims;
import android.annotation.NonNull;
import android.annotation.SystemApi;
import android.annotation.UnsupportedAppUsage;
import android.os.Parcel;
@@ -194,6 +195,7 @@ public final class ImsStreamMediaProfile implements Parcelable {
mRttMode = profile.mRttMode;
}
@NonNull
@Override
public String toString() {
return "{ audioQuality=" + mAudioQuality +

View File

@@ -17,6 +17,7 @@
package android.telephony.ims;
import android.annotation.NonNull;
import android.annotation.SystemApi;
import android.os.Parcel;
import android.os.Parcelable;
@@ -67,6 +68,7 @@ public final class ImsSuppServiceNotification implements Parcelable {
history = in.createStringArray();
}
@NonNull
@Override
public String toString() {
return "{ notificationType=" + notificationType +

View File

@@ -16,6 +16,7 @@
package android.telephony.ims.feature;
import android.annotation.NonNull;
import android.annotation.SystemApi;
import android.os.Parcel;
import android.os.Parcelable;
@@ -98,6 +99,7 @@ public final class CapabilityChangeRequest implements Parcelable {
return radioTech;
}
@NonNull
@Override
public String toString() {
return "CapabilityPair{"
@@ -219,6 +221,7 @@ public final class CapabilityChangeRequest implements Parcelable {
}
}
@NonNull
@Override
public String toString() {
return "CapabilityChangeRequest{"

View File

@@ -291,6 +291,7 @@ public class MmTelFeature extends ImsFeature {
return super.isCapable(capabilities);
}
@NonNull
@Override
public String toString() {
StringBuilder builder = new StringBuilder("MmTel Capabilities - [");

View File

@@ -16,6 +16,8 @@
package android.telephony.ims.stub;
import android.annotation.NonNull;
import android.annotation.Nullable;
import android.annotation.SystemApi;
import android.os.Parcel;
import android.os.Parcelable;
@@ -60,7 +62,7 @@ public final class ImsFeatureConfiguration implements Parcelable {
}
@Override
public boolean equals(Object o) {
public boolean equals(@Nullable Object o) {
if (this == o) return true;
if (o == null || getClass() != o.getClass()) return false;
@@ -77,6 +79,7 @@ public final class ImsFeatureConfiguration implements Parcelable {
return result;
}
@NonNull
@Override
public String toString() {
return "{s=" + slotId + ", f=" + ImsFeature.FEATURE_LOG_MAP.get(featureType) + "}";

View File

@@ -17,6 +17,7 @@
package android.telephony.mbms;
import android.annotation.NonNull;
import android.annotation.Nullable;
import android.annotation.SystemApi;
import android.annotation.TestApi;
import android.content.Intent;
@@ -381,7 +382,7 @@ public final class DownloadRequest implements Parcelable {
}
@Override
public boolean equals(Object o) {
public boolean equals(@Nullable Object o) {
if (this == o) return true;
if (o == null) {
return false;

View File

@@ -211,6 +211,7 @@ public class RttManager {
/** Draft 11mc version supported, including major and minor version. e.g, draft 4.3 is 43 */
public int mcVersion;
@NonNull
@Override
public String toString() {
StringBuffer sb = new StringBuffer();
@@ -1130,6 +1131,7 @@ public class RttManager {
*/
public int preamble;
@NonNull
@Override
public String toString() {
StringBuilder builder = new StringBuilder();

View File

@@ -16,8 +16,8 @@
package android.net.wifi;
import android.annotation.NonNull;
import android.annotation.SystemApi;
import android.os.Parcel;
import android.os.Parcelable;
@@ -39,7 +39,7 @@ public class WifiNetworkConnectionStatistics implements Parcelable {
public WifiNetworkConnectionStatistics() { }
@NonNull
@Override
public String toString() {
StringBuilder sbuf = new StringBuilder();

View File

@@ -16,6 +16,8 @@
package android.net.wifi.hotspot2;
import android.annotation.NonNull;
import android.annotation.Nullable;
import android.graphics.drawable.Icon;
import android.net.Uri;
import android.net.wifi.WifiSsid;
@@ -171,7 +173,7 @@ public final class OsuProvider implements Parcelable {
}
@Override
public boolean equals(Object thatObject) {
public boolean equals(@Nullable Object thatObject) {
if (this == thatObject) {
return true;
}
@@ -196,6 +198,7 @@ public final class OsuProvider implements Parcelable {
mNetworkAccessIdentifier, mMethodList, mIcon);
}
@NonNull
@Override
public String toString() {
return "OsuProvider{mOsuSsid=" + mOsuSsid

View File

@@ -17,6 +17,7 @@
package android.net.wifi.rtt;
import android.annotation.NonNull;
import android.annotation.Nullable;
import android.annotation.SystemApi;
import android.net.MacAddress;
import android.net.wifi.ScanResult;
@@ -245,7 +246,7 @@ public final class RangingRequest implements Parcelable {
}
@Override
public boolean equals(Object o) {
public boolean equals(@Nullable Object o) {
if (this == o) {
return true;
}

Some files were not shown because too many files have changed in this diff Show More