Merge "Move QoS API classes to Connectivity" am: 32a606fe54 am: c02f9028be
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1611876 MUST ONLY BE SUBMITTED BY AUTOMERGER Change-Id: I774c494d6e0f136547cf9175abb6662fd106a6a3
This commit is contained in:
21
framework/aidl-export/android/net/QosFilterParcelable.aidl
Normal file
21
framework/aidl-export/android/net/QosFilterParcelable.aidl
Normal file
@@ -0,0 +1,21 @@
|
|||||||
|
/*
|
||||||
|
**
|
||||||
|
** Copyright (C) 2020 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 QosFilterParcelable;
|
||||||
|
|
||||||
21
framework/aidl-export/android/net/QosSession.aidl
Normal file
21
framework/aidl-export/android/net/QosSession.aidl
Normal file
@@ -0,0 +1,21 @@
|
|||||||
|
/*
|
||||||
|
**
|
||||||
|
** Copyright (C) 2020 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 QosSession;
|
||||||
|
|
||||||
21
framework/aidl-export/android/net/QosSocketInfo.aidl
Normal file
21
framework/aidl-export/android/net/QosSocketInfo.aidl
Normal file
@@ -0,0 +1,21 @@
|
|||||||
|
/*
|
||||||
|
**
|
||||||
|
** Copyright (C) 2020 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 QosSocketInfo;
|
||||||
|
|
||||||
@@ -308,6 +308,9 @@ package android.net {
|
|||||||
field public static final int ID_NONE = -1; // 0xffffffff
|
field public static final int ID_NONE = -1; // 0xffffffff
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public class NetworkReleasedException extends java.lang.Exception {
|
||||||
|
}
|
||||||
|
|
||||||
public class NetworkRequest implements android.os.Parcelable {
|
public class NetworkRequest implements android.os.Parcelable {
|
||||||
method @Nullable public String getRequestorPackageName();
|
method @Nullable public String getRequestorPackageName();
|
||||||
method public int getRequestorUid();
|
method public int getRequestorUid();
|
||||||
@@ -317,6 +320,47 @@ package android.net {
|
|||||||
method @NonNull @RequiresPermission(android.Manifest.permission.NETWORK_SIGNAL_STRENGTH_WAKEUP) public android.net.NetworkRequest.Builder setSignalStrength(int);
|
method @NonNull @RequiresPermission(android.Manifest.permission.NETWORK_SIGNAL_STRENGTH_WAKEUP) public android.net.NetworkRequest.Builder setSignalStrength(int);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public abstract class QosCallback {
|
||||||
|
ctor public QosCallback();
|
||||||
|
method public void onError(@NonNull android.net.QosCallbackException);
|
||||||
|
method public void onQosSessionAvailable(@NonNull android.net.QosSession, @NonNull android.net.QosSessionAttributes);
|
||||||
|
method public void onQosSessionLost(@NonNull android.net.QosSession);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static class QosCallback.QosCallbackRegistrationException extends java.lang.RuntimeException {
|
||||||
|
}
|
||||||
|
|
||||||
|
public final class QosCallbackException extends java.lang.Exception {
|
||||||
|
}
|
||||||
|
|
||||||
|
public abstract class QosFilter {
|
||||||
|
method @NonNull public abstract android.net.Network getNetwork();
|
||||||
|
method public abstract boolean matchesLocalAddress(@NonNull java.net.InetAddress, int, int);
|
||||||
|
}
|
||||||
|
|
||||||
|
public final class QosSession implements android.os.Parcelable {
|
||||||
|
ctor public QosSession(int, int);
|
||||||
|
method public int describeContents();
|
||||||
|
method public int getSessionId();
|
||||||
|
method public int getSessionType();
|
||||||
|
method public long getUniqueId();
|
||||||
|
method public void writeToParcel(@NonNull android.os.Parcel, int);
|
||||||
|
field @NonNull public static final android.os.Parcelable.Creator<android.net.QosSession> CREATOR;
|
||||||
|
field public static final int TYPE_EPS_BEARER = 1; // 0x1
|
||||||
|
}
|
||||||
|
|
||||||
|
public interface QosSessionAttributes {
|
||||||
|
}
|
||||||
|
|
||||||
|
public final class QosSocketInfo implements android.os.Parcelable {
|
||||||
|
ctor public QosSocketInfo(@NonNull android.net.Network, @NonNull java.net.Socket) throws java.io.IOException;
|
||||||
|
method public int describeContents();
|
||||||
|
method @NonNull public java.net.InetSocketAddress getLocalSocketAddress();
|
||||||
|
method @NonNull public android.net.Network getNetwork();
|
||||||
|
method public void writeToParcel(@NonNull android.os.Parcel, int);
|
||||||
|
field @NonNull public static final android.os.Parcelable.Creator<android.net.QosSocketInfo> CREATOR;
|
||||||
|
}
|
||||||
|
|
||||||
public final class RouteInfo implements android.os.Parcelable {
|
public final class RouteInfo implements android.os.Parcelable {
|
||||||
ctor public RouteInfo(@Nullable android.net.IpPrefix, @Nullable java.net.InetAddress, @Nullable String, int);
|
ctor public RouteInfo(@Nullable android.net.IpPrefix, @Nullable java.net.InetAddress, @Nullable String, int);
|
||||||
ctor public RouteInfo(@Nullable android.net.IpPrefix, @Nullable java.net.InetAddress, @Nullable String, int, int);
|
ctor public RouteInfo(@Nullable android.net.IpPrefix, @Nullable java.net.InetAddress, @Nullable String, int, int);
|
||||||
@@ -331,6 +375,12 @@ package android.net {
|
|||||||
field public static final int SUCCESS = 0; // 0x0
|
field public static final int SUCCESS = 0; // 0x0
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public class SocketLocalAddressChangedException extends java.lang.Exception {
|
||||||
|
}
|
||||||
|
|
||||||
|
public class SocketNotBoundException extends java.lang.Exception {
|
||||||
|
}
|
||||||
|
|
||||||
public final class StaticIpConfiguration implements android.os.Parcelable {
|
public final class StaticIpConfiguration implements android.os.Parcelable {
|
||||||
ctor public StaticIpConfiguration();
|
ctor public StaticIpConfiguration();
|
||||||
ctor public StaticIpConfiguration(@Nullable android.net.StaticIpConfiguration);
|
ctor public StaticIpConfiguration(@Nullable android.net.StaticIpConfiguration);
|
||||||
|
|||||||
34
framework/src/android/net/IQosCallback.aidl
Normal file
34
framework/src/android/net/IQosCallback.aidl
Normal file
@@ -0,0 +1,34 @@
|
|||||||
|
/*
|
||||||
|
* Copyright (C) 2020 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.os.Bundle;
|
||||||
|
import android.net.QosSession;
|
||||||
|
import android.telephony.data.EpsBearerQosSessionAttributes;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* AIDL interface for QosCallback
|
||||||
|
*
|
||||||
|
* @hide
|
||||||
|
*/
|
||||||
|
oneway interface IQosCallback
|
||||||
|
{
|
||||||
|
void onQosEpsBearerSessionAvailable(in QosSession session,
|
||||||
|
in EpsBearerQosSessionAttributes attributes);
|
||||||
|
void onQosSessionLost(in QosSession session);
|
||||||
|
void onError(in int type);
|
||||||
|
}
|
||||||
32
framework/src/android/net/NetworkReleasedException.java
Normal file
32
framework/src/android/net/NetworkReleasedException.java
Normal file
@@ -0,0 +1,32 @@
|
|||||||
|
/*
|
||||||
|
* 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.SystemApi;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Indicates that the {@link Network} was released and is no longer available.
|
||||||
|
*
|
||||||
|
* @hide
|
||||||
|
*/
|
||||||
|
@SystemApi
|
||||||
|
public class NetworkReleasedException extends Exception {
|
||||||
|
/** @hide */
|
||||||
|
public NetworkReleasedException() {
|
||||||
|
super("The network was released and is no longer available");
|
||||||
|
}
|
||||||
|
}
|
||||||
30
framework/src/android/net/QosSessionAttributes.java
Normal file
30
framework/src/android/net/QosSessionAttributes.java
Normal file
@@ -0,0 +1,30 @@
|
|||||||
|
/*
|
||||||
|
* Copyright (C) 2020 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.SystemApi;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Implemented by classes that encapsulate Qos related attributes that describe a Qos Session.
|
||||||
|
*
|
||||||
|
* Use the instanceof keyword to determine the underlying type.
|
||||||
|
*
|
||||||
|
* @hide
|
||||||
|
*/
|
||||||
|
@SystemApi
|
||||||
|
public interface QosSessionAttributes {
|
||||||
|
}
|
||||||
@@ -0,0 +1,32 @@
|
|||||||
|
/*
|
||||||
|
* 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.SystemApi;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Thrown when the local address of the socket has changed.
|
||||||
|
*
|
||||||
|
* @hide
|
||||||
|
*/
|
||||||
|
@SystemApi
|
||||||
|
public class SocketLocalAddressChangedException extends Exception {
|
||||||
|
/** @hide */
|
||||||
|
public SocketLocalAddressChangedException() {
|
||||||
|
super("The local address of the socket changed");
|
||||||
|
}
|
||||||
|
}
|
||||||
32
framework/src/android/net/SocketNotBoundException.java
Normal file
32
framework/src/android/net/SocketNotBoundException.java
Normal file
@@ -0,0 +1,32 @@
|
|||||||
|
/*
|
||||||
|
* 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.SystemApi;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Thrown when a previously bound socket becomes unbound.
|
||||||
|
*
|
||||||
|
* @hide
|
||||||
|
*/
|
||||||
|
@SystemApi
|
||||||
|
public class SocketNotBoundException extends Exception {
|
||||||
|
/** @hide */
|
||||||
|
public SocketNotBoundException() {
|
||||||
|
super("The socket is unbound");
|
||||||
|
}
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user