Merge "Add missing nullability annotations." into stage-aosp-master am: 85c0a5a2be

am: ed5beec21b

Change-Id: I202951d51820be47b9195734601830553215bdd7
This commit is contained in:
Aurimas Liutikas
2019-08-30 08:43:01 -07:00
committed by android-build-merger
124 changed files with 290 additions and 96 deletions

View File

@@ -28139,7 +28139,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);
@@ -44004,7 +44004,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

@@ -1191,7 +1191,7 @@ package android.app.usage {
public static final class UsageEvents.Event {
method public int getInstanceId();
method public String getNotificationChannelId();
method @Nullable public String getNotificationChannelId();
method @Nullable public String getTaskRootClassName();
method @Nullable public String getTaskRootPackageName();
method public boolean isInstantApp();

View File

@@ -3199,7 +3199,7 @@ public class AppOpsManager {
}
@Override
public boolean equals(Object obj) {
public boolean equals(@Nullable Object obj) {
if (this == obj) {
return true;
}
@@ -3230,6 +3230,7 @@ public class AppOpsManager {
return result;
}
@NonNull
@Override
public String toString() {
return getClass().getSimpleName() + "[from:"
@@ -3465,7 +3466,7 @@ public class AppOpsManager {
};
@Override
public boolean equals(Object obj) {
public boolean equals(@Nullable Object obj) {
if (this == obj) {
return true;
}
@@ -3697,7 +3698,7 @@ public class AppOpsManager {
};
@Override
public boolean equals(Object obj) {
public boolean equals(@Nullable Object obj) {
if (this == obj) {
return true;
}
@@ -4051,7 +4052,7 @@ public class AppOpsManager {
}
@Override
public boolean equals(Object obj) {
public boolean equals(@Nullable Object obj) {
if (this == obj) {
return true;
}

View File

@@ -620,6 +620,7 @@ public class StatusBarManager {
mNotificationIcons = true;
}
@NonNull
@Override
public String toString() {
StringBuilder sb = new StringBuilder();

View File

@@ -18,6 +18,7 @@ package android.app;
import android.annotation.IntDef;
import android.annotation.NonNull;
import android.annotation.Nullable;
import android.annotation.SystemApi;
import android.os.Parcel;
import android.os.Parcelable;
@@ -74,6 +75,7 @@ public final class Vr2dDisplayProperties implements Parcelable {
return result;
}
@NonNull
@Override
public String toString() {
return "Vr2dDisplayProperties{"
@@ -86,7 +88,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

@@ -90,7 +90,7 @@ public final class AppPredictionContext implements Parcelable {
}
@Override
public boolean equals(Object o) {
public boolean equals(@Nullable Object o) {
if (o == this) return true;
if (!getClass().equals(o != null ? o.getClass() : null)) return false;

View File

@@ -16,6 +16,7 @@
package android.app.prediction;
import android.annotation.NonNull;
import android.annotation.Nullable;
import android.annotation.SystemApi;
import android.annotation.TestApi;
import android.os.Parcel;
@@ -46,7 +47,7 @@ public final class AppPredictionSessionId implements Parcelable {
}
@Override
public boolean equals(Object o) {
public boolean equals(@Nullable Object o) {
if (!getClass().equals(o != null ? o.getClass() : null)) return false;
AppPredictionSessionId other = (AppPredictionSessionId) o;

View File

@@ -151,7 +151,7 @@ public final class AppTarget implements Parcelable {
}
@Override
public boolean equals(Object o) {
public boolean equals(@Nullable Object o) {
if (!getClass().equals(o != null ? o.getClass() : null)) return false;
AppTarget other = (AppTarget) o;

View File

@@ -98,7 +98,7 @@ public final class AppTargetEvent implements Parcelable {
}
@Override
public boolean equals(Object o) {
public boolean equals(@Nullable Object o) {
if (!getClass().equals(o != null ? o.getClass() : null)) return false;
AppTargetEvent other = (AppTargetEvent) o;

View File

@@ -16,6 +16,7 @@
package android.app.prediction;
import android.annotation.NonNull;
import android.annotation.Nullable;
import android.annotation.SystemApi;
import android.annotation.TestApi;
import android.os.Parcel;
@@ -59,7 +60,7 @@ public final class AppTargetId implements Parcelable {
}
@Override
public boolean equals(Object o) {
public boolean equals(@Nullable Object o) {
if (!getClass().equals(o != null ? o.getClass() : null)) return false;
AppTargetId other = (AppTargetId) o;

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

@@ -554,6 +554,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

@@ -413,7 +413,7 @@ public final class OverlayInfo implements Parcelable {
}
@Override
public boolean equals(Object obj) {
public boolean equals(@Nullable Object obj) {
if (this == obj) {
return true;
}
@@ -448,6 +448,7 @@ public final class OverlayInfo implements Parcelable {
return true;
}
@NonNull
@Override
public String toString() {
return "OverlayInfo { overlay=" + packageName + ", targetPackage=" + targetPackageName

View File

@@ -185,7 +185,7 @@ public final class SuspendDialogInfo implements Parcelable {
}
@Override
public boolean equals(Object obj) {
public boolean equals(@Nullable Object obj) {
if (this == obj) {
return true;
}
@@ -200,6 +200,7 @@ public final class SuspendDialogInfo implements Parcelable {
&& Objects.equals(mDialogMessage, otherDialogInfo.mDialogMessage);
}
@NonNull
@Override
public String toString() {
final StringBuilder builder = new StringBuilder("SuspendDialogInfo: {");

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

@@ -145,6 +145,7 @@ public final class BrightnessConfiguration implements Parcelable {
return 0;
}
@NonNull
@Override
public String toString() {
StringBuilder sb = new StringBuilder("BrightnessConfiguration{[");
@@ -184,7 +185,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

@@ -18,6 +18,7 @@ package android.hardware.display;
import android.annotation.FloatRange;
import android.annotation.NonNull;
import android.annotation.Nullable;
import android.annotation.SystemApi;
import android.annotation.TestApi;
import android.os.Parcel;
@@ -98,13 +99,13 @@ public final class BrightnessCorrection implements Parcelable {
*
* @return A string representation.
*/
@NonNull
public String toString() {
return mImplementation.toString();
}
@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.Nullable;
import android.annotation.SystemApi;
import android.hardware.contexthub.V1_0.ContextHub;
@@ -248,6 +249,7 @@ public class ContextHubInfo implements Parcelable {
return mChrePatchVersion;
}
@NonNull
@Override
public String toString() {
String retVal = "";

View File

@@ -192,6 +192,7 @@ public class ContextHubIntentEvent {
return mNanoAppMessage;
}
@NonNull
@Override
public String toString() {
String out = "ContextHubIntentEvent[eventType = " + mEventType

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 @android.annotation.NonNull 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 @android.annotation.NonNull 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.Nullable;
import android.annotation.SystemApi;
import android.os.Parcel;
@@ -79,6 +80,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;
@@ -370,6 +371,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.Nullable;
import android.annotation.SystemApi;
import android.os.Parcel;
@@ -136,7 +137,7 @@ public final class NanoAppMessage implements Parcelable {
out.writeByteArray(mMessageBody);
}
public static final @android.annotation.NonNull Creator<NanoAppMessage> CREATOR =
public static final @NonNull Creator<NanoAppMessage> CREATOR =
new Creator<NanoAppMessage>() {
@Override
public NanoAppMessage createFromParcel(Parcel in) {
@@ -149,6 +150,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;
@@ -829,7 +830,7 @@ public class SoundTrigger {
}
@Override
public boolean equals(Object obj) {
public boolean equals(@Nullable Object obj) {
if (this == obj)
return true;
if (obj == null)
@@ -869,6 +870,7 @@ public class SoundTrigger {
return true;
}
@NonNull
@Override
public String toString() {
return "RecognitionEvent [status=" + status + ", soundModelHandle=" + soundModelHandle

View File

@@ -327,7 +327,7 @@ public final class UsbPort {
return false;
}
@NonNull
@Override
public String toString() {
return "UsbPort{id=" + mId + ", supportedModes=" + modeToString(mSupportedModes)

View File

@@ -17,6 +17,7 @@
package android.hardware.usb;
import android.annotation.IntDef;
import android.annotation.NonNull;
import android.annotation.SystemApi;
import android.hardware.usb.V1_0.Constants;
import android.os.Parcel;
@@ -322,6 +323,7 @@ public final class UsbPortStatus implements Parcelable {
return mContaminantProtectionStatus;
}
@NonNull
@Override
public String toString() {
return "UsbPortStatus{connected=" + isConnected()
@@ -352,7 +354,7 @@ public final class UsbPortStatus implements Parcelable {
dest.writeInt(mContaminantDetectionStatus);
}
public static final @android.annotation.NonNull Parcelable.Creator<UsbPortStatus> CREATOR =
public static final @NonNull Parcelable.Creator<UsbPortStatus> CREATOR =
new Parcelable.Creator<UsbPortStatus>() {
@Override
public UsbPortStatus createFromParcel(Parcel in) {

View File

@@ -861,6 +861,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

@@ -161,6 +161,7 @@ public final class BatterySaverPolicyConfig implements Parcelable {
dest.writeInt(mLocationMode);
}
@NonNull
@Override
public String toString() {
StringBuilder sb = new StringBuilder();

View File

@@ -255,7 +255,7 @@ public class IncidentManager {
* @inheritDoc
*/
@Override
public boolean equals(Object obj) {
public boolean equals(@Nullable Object obj) {
if (this == obj) {
return true;
}

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;
@@ -117,6 +118,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.TestApi;
@@ -202,7 +203,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;
@@ -985,6 +986,7 @@ public class WorkSource implements Parcelable {
mTags = tags;
}
@NonNull
@Override
public String toString() {
StringBuilder result = new StringBuilder("WorkChain{");
@@ -1011,7 +1013,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

@@ -19,6 +19,7 @@ package android.permission;
import android.Manifest;
import android.annotation.IntRange;
import android.annotation.NonNull;
import android.annotation.Nullable;
import android.annotation.RequiresPermission;
import android.annotation.SystemApi;
import android.annotation.SystemService;
@@ -136,7 +137,7 @@ public final class PermissionManager {
private final int mTargetSdk;
@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;
SplitPermissionInfo that = (SplitPermissionInfo) 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

@@ -81,6 +81,7 @@ public final class FillRequest {
return mProxy.getSmartSuggestionParams();
}
@NonNull
@Override
public String toString() {
return "FillRequest[act=" + getActivityComponent().flattenToShortString()

View File

@@ -82,6 +82,7 @@ public abstract class PresentationParams {
return mBounds;
}
@NonNull
@Override
public String toString() {
return mBounds.toString();

View File

@@ -111,6 +111,7 @@ public final class ActivityEvent implements Parcelable {
}
}
@NonNull
@Override
public String toString() {
return new StringBuilder("ActivityEvent[").append(mComponentName.toShortString())

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

@@ -257,6 +257,7 @@ public final class Adjustment implements Parcelable {
dest.writeString(mIssuer);
}
@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;
@@ -266,7 +268,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;
@@ -293,6 +295,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

@@ -229,13 +229,14 @@ public abstract class ExplicitHealthCheckService extends Service {
return mHealthCheckTimeoutMillis;
}
@NonNull
@Override
public String toString() {
return "PackageConfig{" + mPackageName + ", " + mHealthCheckTimeoutMillis + "}";
}
@Override
public boolean equals(Object other) {
public boolean equals(@Nullable Object other) {
if (other == this) {
return true;
}

View File

@@ -373,6 +373,7 @@ public final class ContentCaptureEvent implements Parcelable {
}
}
@NonNull
@Override
public String toString() {
final StringBuilder string = new StringBuilder("ContentCaptureEvent[type=")

View File

@@ -16,6 +16,7 @@
package android.location;
import android.annotation.NonNull;
import android.annotation.SystemApi;
/**
@@ -164,6 +165,7 @@ public final class GnssCapabilities {
return hasCapability(MEASUREMENT_CORRECTIONS_REFLECTING_PLANE);
}
@NonNull
@Override
public String toString() {
StringBuilder sb = new StringBuilder("GnssCapabilities: ( ");

View File

@@ -176,6 +176,7 @@ public final class GnssMeasurementCorrections implements Parcelable {
}
};
@NonNull
@Override
public String toString() {
final String format = " %-29s = %s\n";

View File

@@ -107,6 +107,7 @@ public final class GnssReflectingPlane implements Parcelable {
}
};
@NonNull
@Override
public String toString() {
final String format = " %-29s = %s\n";

View File

@@ -268,6 +268,7 @@ public final class GnssSingleSatCorrection implements Parcelable {
}
};
@NonNull
@Override
public String toString() {
final String format = " %-29s = %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;
@@ -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

@@ -734,6 +734,7 @@ public final class LocationRequest implements Parcelable {
}
}
@NonNull
@Override
public String toString() {
StringBuilder s = new StringBuilder();

View File

@@ -17,6 +17,7 @@
package android.media;
import android.annotation.NonNull;
import android.annotation.Nullable;
import android.annotation.SystemApi;
import android.annotation.TestApi;
import android.os.Parcel;
@@ -155,7 +156,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

@@ -299,6 +299,7 @@ public final class AudioProductStrategy implements Parcelable {
}
};
@NonNull
@Override
public String toString() {
StringBuilder s = new StringBuilder();

View File

@@ -933,7 +933,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

@@ -3748,7 +3748,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;

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