summaryrefslogtreecommitdiff
path: root/core/java/android
diff options
context:
space:
mode:
authorRemi NGUYEN VAN <reminv@google.com>2021-03-18 23:57:34 +0000
committerGerrit Code Review <noreply-gerritcodereview@google.com>2021-03-18 23:57:34 +0000
commitc9f553c7ed3eb217b0f1bcd9c02d8864af027eab (patch)
tree453bdf1c01a7ecc8e3b68921816a7b3b077b06b9 /core/java/android
parentbe1b1d5550b1edfc63013117e3c8aafcddb929eb (diff)
parent3e6dde82a995162111fb2135532a85da0b7f8127 (diff)
Merge "Move network selection utils to Connectivity"
Diffstat (limited to 'core/java/android')
-rw-r--r--core/java/android/net/IOnCompleteListener.aidl23
-rw-r--r--core/java/android/net/NetworkScore.aidl20
-rw-r--r--core/java/android/net/NetworkScore.java108
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);
- }
- }
-}