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

Commit a402e89c authored by Malcolm Chen's avatar Malcolm Chen Committed by Xiangyu/Malcolm Chen
Browse files

Remove DATA_ENABLED_PROP system property.

DATA_ENABLED_PROP system property is used inclusively to
ImsManager to keep track of whether mobile data is enabled. Now
we have a system API that ImsManager can use. So we are removing
it.

Bug: 67602046
Test: manual and existing unit-tests
Change-Id: I0e1100a72674737adcc06fe36110f4dc3ed25056
Merged-In: I0e1100a72674737adcc06fe36110f4dc3ed25056
parent 45904b5d
Loading
Loading
Loading
Loading
+1 −14
Original line number Original line Diff line number Diff line
@@ -194,10 +194,6 @@ public class ImsManager {
    private Set<MmTelFeatureConnection.IFeatureUpdate> mStatusCallbacks =
    private Set<MmTelFeatureConnection.IFeatureUpdate> mStatusCallbacks =
            new CopyOnWriteArraySet<>();
            new CopyOnWriteArraySet<>();


    // Flag indicating data enabled or not. This flag should be in sync with
    // DcTracker.isDataEnabled(). The flag will be set later during boot up.
    private static final String DATA_ENABLED_PROP = "net.lte.ims.data.enabled";

    public static final String TRUE = "true";
    public static final String TRUE = "true";
    public static final String FALSE = "false";
    public static final String FALSE = "false";


@@ -2094,16 +2090,7 @@ public class ImsManager {
    }
    }


    private boolean isDataEnabled() {
    private boolean isDataEnabled() {
        return SystemProperties.getBoolean(DATA_ENABLED_PROP, true);
        return new TelephonyManager(mContext, getSubId()).isMobileDataEnabled();
    }

    /**
     * Set data enabled/disabled flag.
     * @param enabled True if data is enabled, otherwise disabled.
     */
    public void setDataEnabled(boolean enabled) {
        log("setDataEnabled: " + enabled);
        SystemProperties.set(DATA_ENABLED_PROP, enabled ? TRUE : FALSE);
    }
    }


    private boolean isVolteProvisioned() {
    private boolean isVolteProvisioned() {