diff options
Diffstat (limited to 'core')
-rw-r--r-- | core/java/android/net/IOnCompleteListener.aidl | 23 | ||||
-rw-r--r-- | core/java/android/net/NetworkScore.aidl | 20 | ||||
-rw-r--r-- | core/java/android/net/NetworkScore.java | 108 |
3 files changed, 0 insertions, 151 deletions
diff --git a/core/java/android/net/IOnCompleteListener.aidl b/core/java/android/net/IOnCompleteListener.aidl deleted file mode 100644 index 4bb89f6c89e4..000000000000 --- a/core/java/android/net/IOnCompleteListener.aidl +++ /dev/null @@ -1,23 +0,0 @@ -/** - * - * Copyright (C) 2021 The Android Open Source Project - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package android.net; - -/** @hide */ -oneway interface IOnCompleteListener { - void onComplete(); -} diff --git a/core/java/android/net/NetworkScore.aidl b/core/java/android/net/NetworkScore.aidl deleted file mode 100644 index af12dcf7f17a..000000000000 --- a/core/java/android/net/NetworkScore.aidl +++ /dev/null @@ -1,20 +0,0 @@ -/** - * Copyright (c) 2021, The Android Open Source Project - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package android.net; - -parcelable NetworkScore; - diff --git a/core/java/android/net/NetworkScore.java b/core/java/android/net/NetworkScore.java deleted file mode 100644 index f47801002296..000000000000 --- a/core/java/android/net/NetworkScore.java +++ /dev/null @@ -1,108 +0,0 @@ -/* - * Copyright (C) 2021 The Android Open Source Project - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package android.net; - -import android.annotation.NonNull; -import android.os.Parcel; -import android.os.Parcelable; - -/** - * Object representing the quality of a network as perceived by the user. - * - * A NetworkScore object represents the characteristics of a network that affects how good the - * network is considered for a particular use. - * @hide - */ -// TODO : @SystemApi when the implementation is complete -public final class NetworkScore implements Parcelable { - // This will be removed soon. Do *NOT* depend on it for any new code that is not part of - // a migration. - private final int mLegacyInt; - - /** @hide */ - NetworkScore(final int legacyInt) { - this.mLegacyInt = legacyInt; - } - - private NetworkScore(@NonNull final Parcel in) { - mLegacyInt = in.readInt(); - } - - public int getLegacyInt() { - return mLegacyInt; - } - - @Override - public String toString() { - return "Score(" + mLegacyInt + ")"; - } - - @Override - public void writeToParcel(@NonNull final Parcel dest, final int flags) { - dest.writeInt(mLegacyInt); - } - - @Override - public int describeContents() { - return 0; - } - - @NonNull public static final Creator<NetworkScore> CREATOR = new Creator<>() { - @Override - @NonNull - public NetworkScore createFromParcel(@NonNull final Parcel in) { - return new NetworkScore(in); - } - - @Override - @NonNull - public NetworkScore[] newArray(int size) { - return new NetworkScore[size]; - } - }; - - /** - * A builder for NetworkScore. - */ - public static final class Builder { - private static final int INVALID_LEGACY_INT = Integer.MIN_VALUE; - private int mLegacyInt = INVALID_LEGACY_INT; - - /** - * Sets the legacy int for this score. - * - * Do not rely on this. It will be gone by the time S is released. - * - * @param score the legacy int - * @return this - */ - @NonNull - public Builder setLegacyInt(final int score) { - mLegacyInt = score; - return this; - } - - /** - * Builds this NetworkScore. - * @return The built NetworkScore object. - */ - @NonNull - public NetworkScore build() { - return new NetworkScore(mLegacyInt); - } - } -} |