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

Commit e8a82323 authored by Jack Yu's avatar Jack Yu Committed by Gerrit Code Review
Browse files

Merge changes from topics "enterprise_internet", "isDataAllow", "set_data_enabled"

* changes:
  Added internet capability for enterprise slice
  Only disallow data when device in CDMA ECBM
  DataSettingsManager notify when data override rules change
  Notify connectivity service when admin UID changes
  Delay data setup after call end
  Fixed service bound before clients register for bounding update
  Honor NOT_RESTRICTED set by VCN policy
  Fixed race condition when network request removed
  SetDataEnabled indicate calling package
  Retry setup data when reset data throttling
  Allowed emergency SUPL when data is disabled
  Add config_enable_iwlan_handover_policy flag to allow ignoring handover policies defined by carriers
  Align the RecoveryActions between DataStallRecoveryManager and Westworld
  Fixed a race condition when attaching network request
  Support isDataAllow correctly
  Fixed out of boundary exception in data retry
  Fixed unit tests
  Fixed that data network not entering disconnecting
parents c9092789 93a7ff17
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -3266,7 +3266,8 @@ public class GsmCdmaPhone extends Phone {
                boolean enabled = (boolean) ar.result;
                if (isUsingNewDataStack()) {
                    getDataSettingsManager().setDataEnabled(
                            TelephonyManager.DATA_ENABLED_REASON_CARRIER, enabled);
                            TelephonyManager.DATA_ENABLED_REASON_CARRIER, enabled,
                            mContext.getOpPackageName());
                    return;
                }
                mDataEnabledSettings.setDataEnabled(TelephonyManager.DATA_ENABLED_REASON_CARRIER,
+4 −2
Original line number Diff line number Diff line
@@ -792,7 +792,8 @@ public class MultiSimSettingController extends Handler {
                log("setting data to false on " + phone.getSubId());
                if (phone.isUsingNewDataStack()) {
                    phone.getDataSettingsManager().setDataEnabled(
                            TelephonyManager.DATA_ENABLED_REASON_USER, false);
                            TelephonyManager.DATA_ENABLED_REASON_USER, false,
                            mContext.getOpPackageName());
                } else {
                    phone.getDataEnabledSettings().setDataEnabled(
                            TelephonyManager.DATA_ENABLED_REASON_USER, false);
@@ -834,7 +835,8 @@ public class MultiSimSettingController extends Handler {
                if (phone != null) {
                    if (phone.isUsingNewDataStack()) {
                        phone.getDataSettingsManager().setDataEnabled(
                                TelephonyManager.DATA_ENABLED_REASON_USER, enable);
                                TelephonyManager.DATA_ENABLED_REASON_USER, enable,
                                mContext.getOpPackageName());
                    } else {
                        phone.getDataEnabledSettings().setUserDataEnabled(enable, false);
                    }
+5 −0
Original line number Diff line number Diff line
@@ -2935,6 +2935,11 @@ public abstract class Phone extends Handler implements PhoneInternalInterface {
        return false;
    }

    public boolean isInCdmaEcm() {
        return getPhoneType() == PhoneConstants.PHONE_TYPE_CDMA && isInEcm()
                && (mImsPhone == null || !mImsPhone.isInImsEcm());
    }

    public void setIsInEcm(boolean isInEcm) {
        if (!getUnitTestMode()) {
            TelephonyProperties.in_ecm_mode(isInEcm);
+10 −0
Original line number Diff line number Diff line
@@ -713,6 +713,15 @@ public class DataConfigManager extends Handler {
                .config_wlan_data_service_conn_persistence_on_restart);
    }

    /**
     * @return {@code true} if adopt predefined IWLAN handover policy. If {@code false}, handover is
     * allowed by default.
     */
    public boolean isIwlanHandoverPolicyEnabled() {
        return mResources.getBoolean(com.android.internal.R.bool
                .config_enable_iwlan_handover_policy);
    }

    /**
     * @return {@code true} if tearing down IMS data network should be delayed until the voice call
     * ends.
@@ -969,6 +978,7 @@ public class DataConfigManager extends Handler {
        pw.increaseIndent();
        mDataSetupRetryRules.forEach(pw::println);
        pw.decreaseIndent();
        pw.println("isIwlanHandoverPolicyEnabled=" + isIwlanHandoverPolicyEnabled());
        pw.println("Data handover retry rules:");
        pw.increaseIndent();
        mDataHandoverRetryRules.forEach(pw::println);
+8 −2
Original line number Diff line number Diff line
@@ -195,6 +195,8 @@ public class DataEvaluation {
        DATA_SERVICE_STATE_CHANGED,
        /** When data is enabled or disabled (by user, carrier, thermal, etc...) */
        DATA_ENABLED_CHANGED,
        /** When data enabled overrides are changed (MMS always allowed, data on non-DDS sub). */
        DATA_ENABLED_OVERRIDE_CHANGED,
        /** When data roaming is enabled or disabled. */
        ROAMING_ENABLED_CHANGED,
        /** When voice call ended (for concurrent voice/data not supported RAT). */
@@ -259,8 +261,8 @@ public class DataEvaluation {
        NO_SUITABLE_DATA_PROFILE(true),
        /** Current data network type not allowed. */
        DATA_NETWORK_TYPE_NOT_ALLOWED(true),
        /** Device is currently in an emergency call. */
        EMERGENCY_CALL(true),
        /** Device is currently in CDMA ECBM. */
        CDMA_EMERGENCY_CALLBACK_MODE(true),
        /** There is already a retry setup/handover scheduled. */
        RETRY_SCHEDULED(true),
        /** Network has explicitly request to throttle setup attempt. */
@@ -329,6 +331,10 @@ public class DataEvaluation {
         * The network request is restricted (i.e. Only privilege apps can access the network.)
         */
        RESTRICTED_REQUEST,
        /**
         * SUPL is allowed while emergency call is ongoing.
         */
        EMERGENCY_SUPL,
        /**
         * Data is allowed because the network request is for emergency. This should be always at
         * the bottom (i.e. highest priority)
Loading