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

Commit 9ad4a898 authored by Wink Saville's avatar Wink Saville Committed by Jean-Baptiste Queru
Browse files

Use telephony-common - DO NOT MERGE

Change-Id: Ic95136fd5934afdd53a08bfd640d40add67fdb44
parent 51b2fef2
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
LOCAL_PATH:= $(call my-dir)
include $(CLEAR_VARS)

LOCAL_JAVA_LIBRARIES := bouncycastle
LOCAL_JAVA_LIBRARIES := bouncycastle telephony-common
LOCAL_STATIC_JAVA_LIBRARIES := guava android-support-v4

LOCAL_MODULE_TAGS := optional
+2 −1
Original line number Diff line number Diff line
@@ -40,6 +40,7 @@ import android.view.Menu;
import android.view.MenuItem;

import com.android.internal.telephony.Phone;
import com.android.internal.telephony.PhoneConstants;
import com.android.internal.telephony.RILConstants;
import com.android.internal.telephony.TelephonyProperties;

@@ -170,7 +171,7 @@ public class ApnEditor extends PreferenceActivity
        // types.  (This screen is not normally accessible on CDMA phones, but is useful for
        // testing.)
        TelephonyManager tm = (TelephonyManager)getSystemService(TELEPHONY_SERVICE);
        if (tm.getCurrentPhoneType() == Phone.PHONE_TYPE_CDMA) {
        if (tm.getCurrentPhoneType() == PhoneConstants.PHONE_TYPE_CDMA) {
            mRoamingProtocol.setOnPreferenceChangeListener(this);
        } else {
            getPreferenceScreen().removePreference(mRoamingProtocol);
+6 −5
Original line number Diff line number Diff line
@@ -43,6 +43,7 @@ import android.view.MenuItem;
import android.widget.Toast;

import com.android.internal.telephony.Phone;
import com.android.internal.telephony.PhoneConstants;
import com.android.internal.telephony.TelephonyIntents;
import com.android.internal.telephony.TelephonyProperties;

@@ -90,7 +91,7 @@ public class ApnSettings extends PreferenceActivity implements
        public void onReceive(Context context, Intent intent) {
            if (intent.getAction().equals(
                    TelephonyIntents.ACTION_ANY_DATA_CONNECTION_STATE_CHANGED)) {
                Phone.DataState state = getMobileDataState(intent);
                PhoneConstants.DataState state = getMobileDataState(intent);
                switch (state) {
                case CONNECTED:
                    if (!mRestoreDefaultApnMode) {
@@ -104,12 +105,12 @@ public class ApnSettings extends PreferenceActivity implements
        }
    };

    private static Phone.DataState getMobileDataState(Intent intent) {
        String str = intent.getStringExtra(Phone.STATE_KEY);
    private static PhoneConstants.DataState getMobileDataState(Intent intent) {
        String str = intent.getStringExtra(PhoneConstants.STATE_KEY);
        if (str != null) {
            return Enum.valueOf(Phone.DataState.class, str);
            return Enum.valueOf(PhoneConstants.DataState.class, str);
        } else {
            return Phone.DataState.DISCONNECTED;
            return PhoneConstants.DataState.DISCONNECTED;
        }
    }

+2 −1
Original line number Diff line number Diff line
@@ -56,6 +56,7 @@ import android.widget.TextView;

import com.android.internal.telephony.ITelephony;
import com.android.internal.telephony.Phone;
import com.android.internal.telephony.PhoneConstants;

import java.util.List;

@@ -637,7 +638,7 @@ public class CryptKeeper extends Activity implements TextView.OnEditorActionList
     */
    private final void setAirplaneModeIfNecessary() {
        final boolean isLteDevice =
                TelephonyManager.getDefault().getLteOnCdmaMode() == Phone.LTE_ON_CDMA_TRUE;
                TelephonyManager.getDefault().getLteOnCdmaMode() == PhoneConstants.LTE_ON_CDMA_TRUE;
        if (!isLteDevice) {
            Log.d(TAG, "Going into airplane mode.");
            Settings.System.putInt(getContentResolver(), Settings.System.AIRPLANE_MODE_ON, 1);
+2 −1
Original line number Diff line number Diff line
@@ -128,6 +128,7 @@ import android.widget.TabWidget;
import android.widget.TextView;

import com.android.internal.telephony.Phone;
import com.android.internal.telephony.PhoneConstants;
import com.android.settings.drawable.InsetBoundsDrawable;
import com.android.settings.net.ChartData;
import com.android.settings.net.ChartDataLoader;
@@ -2193,7 +2194,7 @@ public class DataUsageSummary extends Fragment {
        final TelephonyManager tele = TelephonyManager.from(context);

        final boolean hasWimax = conn.isNetworkSupported(TYPE_WIMAX);
        final boolean hasLte = (tele.getLteOnCdmaMode() == Phone.LTE_ON_CDMA_TRUE)
        final boolean hasLte = (tele.getLteOnCdmaMode() == PhoneConstants.LTE_ON_CDMA_TRUE)
                && hasReadyMobileRadio(context);
        return hasWimax || hasLte;
    }
Loading