| 1 |
|
| 2 |
|
| 3 |
|
| 4 |
|
| 5 |
|
| 6 |
|
| 7 |
|
| 8 |
|
| 9 |
|
| 10 |
|
| 11 |
|
| 12 |
|
| 13 |
|
| 14 |
|
| 15 |
|
| 16 |
|
| 17 |
package android.net; |
| 18 |
|
| 19 |
import android.annotation.NonNull; |
| 20 |
import android.annotation.Nullable; |
| 21 |
import android.annotation.SystemApi; |
| 22 |
import android.os.Parcel; |
| 23 |
import android.os.Parcelable; |
| 24 |
|
| 25 |
|
| 26 |
|
| 27 |
|
| 28 |
|
| 29 |
|
| 30 |
|
| 31 |
|
| 32 |
|
| 33 |
@SystemApi |
| 34 |
public final class MatchAllNetworkSpecifier extends NetworkSpecifier implements Parcelable { |
| 35 |
|
| 36 |
@Override |
| 37 |
public boolean canBeSatisfiedBy(NetworkSpecifier other) { |
| 38 |
|
| 39 |
|
| 40 |
|
| 41 |
|
| 42 |
|
| 43 |
throw new IllegalStateException( |
| 44 |
"MatchAllNetworkSpecifier must not be used in NetworkRequests"); |
| 45 |
} |
| 46 |
|
| 47 |
@Override |
| 48 |
public boolean equals(@Nullable Object o) { |
| 49 |
return o instanceof MatchAllNetworkSpecifier; |
| 50 |
} |
| 51 |
|
| 52 |
@Override |
| 53 |
public int hashCode() { |
| 54 |
return 0; |
| 55 |
} |
| 56 |
|
| 57 |
@Override |
| 58 |
public int describeContents() { |
| 59 |
return 0; |
| 60 |
} |
| 61 |
|
| 62 |
@Override |
| 63 |
public void writeToParcel(@NonNull Parcel dest, int flags) { |
| 64 |
|
| 65 |
} |
| 66 |
|
| 67 |
public static final @NonNull Parcelable.Creator<MatchAllNetworkSpecifier> CREATOR = |
| 68 |
new Parcelable.Creator<MatchAllNetworkSpecifier>() { |
| 69 |
public MatchAllNetworkSpecifier createFromParcel(Parcel in) { |
| 70 |
return new MatchAllNetworkSpecifier(); |
| 71 |
} |
| 72 |
public MatchAllNetworkSpecifier[] newArray(int size) { |
| 73 |
return new MatchAllNetworkSpecifier[size]; |
| 74 |
} |
| 75 |
}; |
| 76 |
} |