Add 5G/NR QOS support

Bug: 155176305
Bug: 182317794
Test: atest ConnectivityServiceTest
      atest QosCallbackTrackerTest

Change-Id: Idf6d8a7c3b80bc50a2c1244ceaefea9381d40c2f
This commit is contained in:
Jayachandran C
2021-03-15 15:58:11 -07:00
parent 3ef6584f1b
commit 8ae3bf3f92
10 changed files with 127 additions and 22 deletions

View File

@@ -19,6 +19,7 @@ package android.net;
import android.annotation.NonNull;
import android.annotation.Nullable;
import android.telephony.data.EpsBearerQosSessionAttributes;
import android.telephony.data.NrQosSessionAttributes;
import com.android.internal.annotations.VisibleForTesting;
@@ -83,6 +84,25 @@ class QosCallbackConnection extends android.net.IQosCallback.Stub {
});
}
/**
* Called when either the {@link NrQosSessionAttributes} has changed or on the first time
* the attributes have become available.
*
* @param session the session that is now available
* @param attributes the corresponding attributes of session
*/
@Override
public void onNrQosSessionAvailable(@NonNull final QosSession session,
@NonNull final NrQosSessionAttributes attributes) {
mExecutor.execute(() -> {
final QosCallback callback = mCallback;
if (callback != null) {
callback.onQosSessionAvailable(session, attributes);
}
});
}
/**
* Called when the session is lost.
*