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

Commit a6aa1975 authored by Malcolm Chen's avatar Malcolm Chen Committed by android-build-merger
Browse files

Merge "Add TransportManager."

am: dacc21b5

Change-Id: I2272210fb2b689e8844def69b725a8d561a06d5b
parents a3267c08 dacc21b5
Loading
Loading
Loading
Loading
+50 −0
Original line number Diff line number Diff line
/*
 * Copyright 2018 The Android Open Source Project
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package com.android.internal.telephony.dataconnection;

import android.telephony.AccessNetworkConstants.TransportType;
import android.telephony.Rlog;

import java.util.ArrayList;
import java.util.List;

/**
 * This class represents the transport manager which manages available transports and
 * route requests to correct transport.
 */
public class TransportManager {
    private static final String TAG = TransportManager.class.getSimpleName();

    private List<Integer> mAvailableTransports = new ArrayList<>();

    public TransportManager() {
        // TODO: get transpot list from AccessNetworkManager.
        mAvailableTransports.add(TransportType.WWAN);
    }

    public List<Integer> getAvailableTransports() {
        return new ArrayList<>(mAvailableTransports);
    }

    private void log(String s) {
        Rlog.d(TAG, s);
    }

    private void loge(String s) {
        Rlog.e(TAG, s);
    }
}