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

Commit 9966913b authored by Jack Yu's avatar Jack Yu Committed by android-build-merger
Browse files

Merge "Fixed IWLAN related APIs issue"

am: 9d651e75

Change-Id: Id29882b21e2e2949f292ce9485433af3befaadfe
parents 68761d25 9d651e75
Loading
Loading
Loading
Loading
+6 −6
Original line number Diff line number Diff line
@@ -71,7 +71,7 @@ public class CellularNetworkService extends NetworkService {
        CellularNetworkServiceProvider(int slotId) {
            super(slotId);

            mPhone = PhoneFactory.getPhone(getSlotId());
            mPhone = PhoneFactory.getPhone(getSlotIndex());

            mHandlerThread = new HandlerThread(CellularNetworkService.class.getSimpleName());
            mHandlerThread.start();
@@ -488,13 +488,13 @@ public class CellularNetworkService extends NetworkService {
    }

    @Override
    protected NetworkServiceProvider createNetworkServiceProvider(int slotId) {
        if (DBG) log("Cellular network service created for slot " + slotId);
        if (!SubscriptionManager.isValidSlotIndex(slotId)) {
            loge("Tried to Cellular network service with invalid slotId " + slotId);
    public NetworkServiceProvider onCreateNetworkServiceProvider(int slotIndex) {
        if (DBG) log("Cellular network service created for slot " + slotIndex);
        if (!SubscriptionManager.isValidSlotIndex(slotIndex)) {
            loge("Tried to Cellular network service with invalid slotId " + slotIndex);
            return null;
        }
        return new CellularNetworkServiceProvider(slotId);
        return new CellularNetworkServiceProvider(slotIndex);
    }

    private void log(String s) {
+11 −11
Original line number Diff line number Diff line
@@ -67,7 +67,7 @@ public class CellularDataService extends DataService {
        private CellularDataServiceProvider(int slotId) {
            super(slotId);

            mPhone = PhoneFactory.getPhone(getSlotId());
            mPhone = PhoneFactory.getPhone(getSlotIndex());

            mHandlerThread = new HandlerThread(CellularDataService.class.getSimpleName());
            mHandlerThread.start();
@@ -128,7 +128,7 @@ public class CellularDataService extends DataService {
        public void setupDataCall(int accessNetworkType, DataProfile dataProfile, boolean isRoaming,
                                  boolean allowRoaming, int reason, LinkProperties linkProperties,
                                  DataServiceCallback callback) {
            if (DBG) log("setupDataCall " + getSlotId());
            if (DBG) log("setupDataCall " + getSlotIndex());

            Message message = null;
            // Only obtain the message when the caller wants a callback. If the caller doesn't care
@@ -144,7 +144,7 @@ public class CellularDataService extends DataService {

        @Override
        public void deactivateDataCall(int cid, int reason, DataServiceCallback callback) {
            if (DBG) log("deactivateDataCall " + getSlotId());
            if (DBG) log("deactivateDataCall " + getSlotIndex());

            Message message = null;
            // Only obtain the message when the caller wants a callback. If the caller doesn't care
@@ -160,7 +160,7 @@ public class CellularDataService extends DataService {
        @Override
        public void setInitialAttachApn(DataProfile dataProfile, boolean isRoaming,
                                        DataServiceCallback callback) {
            if (DBG) log("setInitialAttachApn " + getSlotId());
            if (DBG) log("setInitialAttachApn " + getSlotIndex());

            Message message = null;
            // Only obtain the message when the caller wants a callback. If the caller doesn't care
@@ -176,7 +176,7 @@ public class CellularDataService extends DataService {
        @Override
        public void setDataProfile(List<DataProfile> dps, boolean isRoaming,
                                   DataServiceCallback callback) {
            if (DBG) log("setDataProfile " + getSlotId());
            if (DBG) log("setDataProfile " + getSlotIndex());

            Message message = null;
            // Only obtain the message when the caller wants a callback. If the caller doesn't care
@@ -191,7 +191,7 @@ public class CellularDataService extends DataService {

        @Override
        public void getDataCallList(DataServiceCallback callback) {
            if (DBG) log("getDataCallList " + getSlotId());
            if (DBG) log("getDataCallList " + getSlotIndex());

            Message message = null;
            // Only obtain the message when the caller wants a callback. If the caller doesn't care
@@ -211,13 +211,13 @@ public class CellularDataService extends DataService {
    }

    @Override
    public DataServiceProvider createDataServiceProvider(int slotId) {
        log("Cellular data service created for slot " + slotId);
        if (!SubscriptionManager.isValidSlotIndex(slotId)) {
            loge("Tried to cellular data service with invalid slotId " + slotId);
    public DataServiceProvider onCreateDataServiceProvider(int slotIndex) {
        log("Cellular data service created for slot " + slotIndex);
        if (!SubscriptionManager.isValidSlotIndex(slotIndex)) {
            loge("Tried to cellular data service with invalid slotId " + slotIndex);
            return null;
        }
        return new CellularDataServiceProvider(slotId);
        return new CellularDataServiceProvider(slotIndex);
    }

    private void log(String s) {