Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit bed5f6e8 authored by Daniel Bright's avatar Daniel Bright Committed by Gerrit Code Review
Browse files

Merge "Partial hal support for secondary link bandwidth"

parents d6d96a46 db95bcf8
Loading
Loading
Loading
Loading
+2 −0
Original line number Original line Diff line number Diff line
@@ -10426,6 +10426,7 @@ package android.telephony {
    method @Deprecated @RequiresPermission(anyOf={android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE, android.Manifest.permission.READ_PHONE_STATE}) public boolean isOffhook();
    method @Deprecated @RequiresPermission(anyOf={android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE, android.Manifest.permission.READ_PHONE_STATE}) public boolean isOffhook();
    method @RequiresPermission(android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE) public boolean isOpportunisticNetworkEnabled();
    method @RequiresPermission(android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE) public boolean isOpportunisticNetworkEnabled();
    method @RequiresPermission(android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE) public boolean isPotentialEmergencyNumber(@NonNull String);
    method @RequiresPermission(android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE) public boolean isPotentialEmergencyNumber(@NonNull String);
    method public boolean isRadioInterfaceCapabilitySupported(@NonNull String);
    method @Deprecated @RequiresPermission(anyOf={android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE, android.Manifest.permission.READ_PHONE_STATE}) public boolean isRadioOn();
    method @Deprecated @RequiresPermission(anyOf={android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE, android.Manifest.permission.READ_PHONE_STATE}) public boolean isRadioOn();
    method @Deprecated @RequiresPermission(anyOf={android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE, android.Manifest.permission.READ_PHONE_STATE}) public boolean isRinging();
    method @Deprecated @RequiresPermission(anyOf={android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE, android.Manifest.permission.READ_PHONE_STATE}) public boolean isRinging();
    method @RequiresPermission(android.Manifest.permission.MODIFY_PHONE_STATE) public boolean isTetheringApnRequired();
    method @RequiresPermission(android.Manifest.permission.MODIFY_PHONE_STATE) public boolean isTetheringApnRequired();
@@ -10499,6 +10500,7 @@ package android.telephony {
    field public static final int CALL_WAITING_STATUS_ENABLED = 1; // 0x1
    field public static final int CALL_WAITING_STATUS_ENABLED = 1; // 0x1
    field public static final int CALL_WAITING_STATUS_NOT_SUPPORTED = 4; // 0x4
    field public static final int CALL_WAITING_STATUS_NOT_SUPPORTED = 4; // 0x4
    field public static final int CALL_WAITING_STATUS_UNKNOWN_ERROR = 3; // 0x3
    field public static final int CALL_WAITING_STATUS_UNKNOWN_ERROR = 3; // 0x3
    field public static final String CAPABILITY_SECONDARY_LINK_BANDWIDTH_VISIBLE = "CAPABILITY_SECONDARY_LINK_BANDWIDTH_VISIBLE";
    field public static final int CARRIER_PRIVILEGE_STATUS_ERROR_LOADING_RULES = -2; // 0xfffffffe
    field public static final int CARRIER_PRIVILEGE_STATUS_ERROR_LOADING_RULES = -2; // 0xfffffffe
    field public static final int CARRIER_PRIVILEGE_STATUS_HAS_ACCESS = 1; // 0x1
    field public static final int CARRIER_PRIVILEGE_STATUS_HAS_ACCESS = 1; // 0x1
    field public static final int CARRIER_PRIVILEGE_STATUS_NO_ACCESS = 0; // 0x0
    field public static final int CARRIER_PRIVILEGE_STATUS_NO_ACCESS = 0; // 0x0
+23 −5
Original line number Original line Diff line number Diff line
@@ -18,6 +18,7 @@ package android.telephony;


import android.annotation.NonNull;
import android.annotation.NonNull;
import android.annotation.Nullable;
import android.annotation.Nullable;
import android.annotation.RequiresFeature;
import android.annotation.SystemApi;
import android.annotation.SystemApi;
import android.os.Parcel;
import android.os.Parcel;
import android.os.Parcelable;
import android.os.Parcelable;
@@ -102,7 +103,7 @@ public final class CarrierBandwidth implements Parcelable {
    /**
    /**
     * Retrieves the upstream bandwidth for the primary network in Kbps.  This always only refers to
     * Retrieves the upstream bandwidth for the primary network in Kbps.  This always only refers to
     * the estimated first hop transport bandwidth.
     * the estimated first hop transport bandwidth.
     * This will be INVALID if the network is not connected
     * This will be {@link #INVALID} if the network is not connected
     *
     *
     * @return The estimated first hop upstream (device to network) bandwidth.
     * @return The estimated first hop upstream (device to network) bandwidth.
     */
     */
@@ -113,7 +114,7 @@ public final class CarrierBandwidth implements Parcelable {
    /**
    /**
     * Retrieves the downstream bandwidth for the primary network in Kbps.  This always only refers
     * Retrieves the downstream bandwidth for the primary network in Kbps.  This always only refers
     * to the estimated first hop transport bandwidth.
     * to the estimated first hop transport bandwidth.
     * This will be INVALID if the network is not connected
     * This will be {@link #INVALID} if the network is not connected
     *
     *
     * @return The estimated first hop downstream (network to device) bandwidth.
     * @return The estimated first hop downstream (network to device) bandwidth.
     */
     */
@@ -124,10 +125,19 @@ public final class CarrierBandwidth implements Parcelable {
    /**
    /**
     * Retrieves the upstream bandwidth for the secondary network in Kbps.  This always only refers
     * Retrieves the upstream bandwidth for the secondary network in Kbps.  This always only refers
     * to the estimated first hop transport bandwidth.
     * to the estimated first hop transport bandwidth.
     * This will be INVALID if the network is not connected
     * <p/>
     * This will be {@link #INVALID} if either are the case:
     * <ol>
     *  <li>The network is not connected</li>
     *  <li>The device does not support
     * {@link android.telephony.TelephonyManager#CAPABILITY_SECONDARY_LINK_BANDWIDTH_VISIBLE}.</li>
     * </ol>
     *
     *
     * @return The estimated first hop upstream (device to network) bandwidth.
     * @return The estimated first hop upstream (device to network) bandwidth.
     */
     */
    @RequiresFeature(
            enforcement = "android.telephony.TelephonyManager#isRadioInterfaceCapabilitySupported",
            value = TelephonyManager.CAPABILITY_SECONDARY_LINK_BANDWIDTH_VISIBLE)
    public int getSecondaryDownlinkCapacityKbps() {
    public int getSecondaryDownlinkCapacityKbps() {
        return mSecondaryDownlinkCapacityKbps;
        return mSecondaryDownlinkCapacityKbps;
    }
    }
@@ -135,10 +145,18 @@ public final class CarrierBandwidth implements Parcelable {
    /**
    /**
     * Retrieves the downstream bandwidth for the secondary network in Kbps.  This always only
     * Retrieves the downstream bandwidth for the secondary network in Kbps.  This always only
     * refers to the estimated first hop transport bandwidth.
     * refers to the estimated first hop transport bandwidth.
     * This will be INVALID if the network is not connected
     * <p/>
     *
     * This will be {@link #INVALID} if either are the case:
     * <ol>
     *  <li>The network is not connected</li>
     *  <li>The device does not support
     * {@link android.telephony.TelephonyManager#CAPABILITY_SECONDARY_LINK_BANDWIDTH_VISIBLE}.</li>
     * </ol>
     * @return The estimated first hop downstream (network to device) bandwidth.
     * @return The estimated first hop downstream (network to device) bandwidth.
     */
     */
    @RequiresFeature(
            enforcement = "android.telephony.TelephonyManager#isRadioInterfaceCapabilitySupported",
            value = TelephonyManager.CAPABILITY_SECONDARY_LINK_BANDWIDTH_VISIBLE)
    public int getSecondaryUplinkCapacityKbps() {
    public int getSecondaryUplinkCapacityKbps() {
        return mSecondaryUplinkCapacityKbps;
        return mSecondaryUplinkCapacityKbps;
    }
    }
+17 −2
Original line number Original line Diff line number Diff line
@@ -31,6 +31,7 @@ import android.annotation.Nullable;
import android.annotation.RequiresPermission;
import android.annotation.RequiresPermission;
import android.annotation.SdkConstant;
import android.annotation.SdkConstant;
import android.annotation.SdkConstant.SdkConstantType;
import android.annotation.SdkConstant.SdkConstantType;
import android.annotation.StringDef;
import android.annotation.SuppressAutoDoc;
import android.annotation.SuppressAutoDoc;
import android.annotation.SuppressLint;
import android.annotation.SuppressLint;
import android.annotation.SystemApi;
import android.annotation.SystemApi;
@@ -14344,9 +14345,22 @@ public class TelephonyManager {
        return Collections.emptyList();
        return Collections.emptyList();
    }
    }
    /**
     * Indicates whether {@link CarrierBandwidth#getSecondaryDownlinkCapacityKbps()} and
     * {@link CarrierBandwidth#getSecondaryUplinkCapacityKbps()} are visible.  See comments
     * on respective methods for more information.
     *
     * @hide
     */
    @SystemApi
    public static final String CAPABILITY_SECONDARY_LINK_BANDWIDTH_VISIBLE =
            "CAPABILITY_SECONDARY_LINK_BANDWIDTH_VISIBLE";
    /** @hide */
    /** @hide */
    @IntDef(prefix = {"RADIO_INTERFACE_CAPABILITY_"},
    @Retention(RetentionPolicy.SOURCE)
            value = {})
    @StringDef(prefix = "CAPABILITY_", value = {
            CAPABILITY_SECONDARY_LINK_BANDWIDTH_VISIBLE,
    })
    public @interface RadioInterfaceCapability {}
    public @interface RadioInterfaceCapability {}
    /**
    /**
@@ -14359,6 +14373,7 @@ public class TelephonyManager {
     *
     *
     * @hide
     * @hide
     */
     */
    @SystemApi
    public boolean isRadioInterfaceCapabilitySupported(
    public boolean isRadioInterfaceCapabilitySupported(
            @NonNull @RadioInterfaceCapability String capability) {
            @NonNull @RadioInterfaceCapability String capability) {
        try {
        try {