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

Commit 9b1ce9c7 authored by Xiangyu/Malcolm Chen's avatar Xiangyu/Malcolm Chen Committed by Gerrit Code Review
Browse files

Merge "Remove some usages of @hide variables or APIs."

parents e08ec8af 5e4e32ec
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -736,7 +736,7 @@ public class PhoneSwitcher extends Handler {
    private void collectRequestNetworkMetrics(NetworkRequest networkRequest) {
        // Request network for MMS will temporary disable the network on default data subscription,
        // this only happen on multi-sim device.
        if (mActiveModemCount > 1 && networkRequest.networkCapabilities.hasCapability(
        if (mActiveModemCount > 1 && networkRequest.hasCapability(
                NetworkCapabilities.NET_CAPABILITY_MMS)) {
            OnDemandDataSwitch onDemandDataSwitch = new OnDemandDataSwitch();
            onDemandDataSwitch.apn = TelephonyEvent.ApnType.APN_TYPE_MMS;
@@ -748,7 +748,7 @@ public class PhoneSwitcher extends Handler {
    private void collectReleaseNetworkMetrics(NetworkRequest networkRequest) {
        // Release network for MMS will recover the network on default data subscription, this only
        // happen on multi-sim device.
        if (mActiveModemCount > 1 && networkRequest.networkCapabilities.hasCapability(
        if (mActiveModemCount > 1 && networkRequest.hasCapability(
                NetworkCapabilities.NET_CAPABILITY_MMS)) {
            OnDemandDataSwitch onDemandDataSwitch = new OnDemandDataSwitch();
            onDemandDataSwitch.apn = TelephonyEvent.ApnType.APN_TYPE_MMS;
+0 −26
Original line number Diff line number Diff line
@@ -16,7 +16,6 @@

package com.android.internal.telephony.dataconnection;

import android.net.ConnectivityManager;
import android.net.NetworkCapabilities;
import android.net.NetworkRequest;
import android.os.Message;
@@ -534,31 +533,6 @@ public class ApnContext {
        return mRetryManager.getRetryAfterDisconnectDelay();
    }

    public static int getApnTypeFromNetworkType(int networkType) {
        switch (networkType) {
            case ConnectivityManager.TYPE_MOBILE:
                return ApnSetting.TYPE_DEFAULT;
            case ConnectivityManager.TYPE_MOBILE_MMS:
                return ApnSetting.TYPE_MMS;
            case ConnectivityManager.TYPE_MOBILE_SUPL:
                return ApnSetting.TYPE_SUPL;
            case ConnectivityManager.TYPE_MOBILE_DUN:
                return ApnSetting.TYPE_DUN;
            case ConnectivityManager.TYPE_MOBILE_FOTA:
                return ApnSetting.TYPE_FOTA;
            case ConnectivityManager.TYPE_MOBILE_IMS:
                return ApnSetting.TYPE_IMS;
            case ConnectivityManager.TYPE_MOBILE_CBS:
                return ApnSetting.TYPE_CBS;
            case ConnectivityManager.TYPE_MOBILE_IA:
                return ApnSetting.TYPE_IA;
            case ConnectivityManager.TYPE_MOBILE_EMERGENCY:
                return ApnSetting.TYPE_EMERGENCY;
            default:
                return ApnSetting.TYPE_NONE;
        }
    }

    static @ApnType int getApnTypeFromNetworkRequest(NetworkRequest nr) {
        NetworkCapabilities nc = nr.networkCapabilities;
        // For now, ignore the bandwidth stuff
+6 −6
Original line number Diff line number Diff line
@@ -382,11 +382,11 @@ public class DcNetworkAgent extends NetworkAgent {
        void handleKeepaliveStarted(final int slot, KeepaliveStatus ks) {
            switch (ks.statusCode) {
                case KeepaliveStatus.STATUS_INACTIVE:
                    DcNetworkAgent.this.onSocketKeepaliveEvent(slot,
                    DcNetworkAgent.this.sendSocketKeepaliveEvent(slot,
                            keepaliveStatusErrorToPacketKeepaliveError(ks.errorCode));
                    break;
                case KeepaliveStatus.STATUS_ACTIVE:
                    DcNetworkAgent.this.onSocketKeepaliveEvent(
                    DcNetworkAgent.this.sendSocketKeepaliveEvent(
                            slot, SocketKeepalive.SUCCESS);
                    // fall through to add record
                case KeepaliveStatus.STATUS_PENDING:
@@ -417,13 +417,13 @@ public class DcNetworkAgent extends NetworkAgent {
            switch (kr.currentStatus) {
                case KeepaliveStatus.STATUS_INACTIVE:
                    logd("Inactive Keepalive received status!");
                    DcNetworkAgent.this.onSocketKeepaliveEvent(
                    DcNetworkAgent.this.sendSocketKeepaliveEvent(
                            kr.slotId, SocketKeepalive.ERROR_HARDWARE_ERROR);
                    break;
                case KeepaliveStatus.STATUS_PENDING:
                    switch (ks.statusCode) {
                        case KeepaliveStatus.STATUS_INACTIVE:
                            DcNetworkAgent.this.onSocketKeepaliveEvent(kr.slotId,
                            DcNetworkAgent.this.sendSocketKeepaliveEvent(kr.slotId,
                                    keepaliveStatusErrorToPacketKeepaliveError(ks.errorCode));
                            kr.currentStatus = KeepaliveStatus.STATUS_INACTIVE;
                            mKeepalives.remove(ks.sessionHandle);
@@ -431,7 +431,7 @@ public class DcNetworkAgent extends NetworkAgent {
                        case KeepaliveStatus.STATUS_ACTIVE:
                            logd("Pending Keepalive received active status!");
                            kr.currentStatus = KeepaliveStatus.STATUS_ACTIVE;
                            DcNetworkAgent.this.onSocketKeepaliveEvent(
                            DcNetworkAgent.this.sendSocketKeepaliveEvent(
                                    kr.slotId, SocketKeepalive.SUCCESS);
                            break;
                        case KeepaliveStatus.STATUS_PENDING:
@@ -445,7 +445,7 @@ public class DcNetworkAgent extends NetworkAgent {
                    switch (ks.statusCode) {
                        case KeepaliveStatus.STATUS_INACTIVE:
                            logd("Keepalive received stopped status!");
                            DcNetworkAgent.this.onSocketKeepaliveEvent(
                            DcNetworkAgent.this.sendSocketKeepaliveEvent(
                                    kr.slotId, SocketKeepalive.SUCCESS);

                            kr.currentStatus = KeepaliveStatus.STATUS_INACTIVE;