Use telephony-common
Change-Id: Ic95136fd5934afdd53a08bfd640d40add67fdb44
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
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
|
||||
|
@@ -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);
|
||||
|
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -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);
|
||||
|
@@ -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;
|
||||
}
|
||||
|
@@ -55,6 +55,7 @@ import android.widget.EditText;
|
||||
|
||||
import com.android.internal.telephony.DataConnection;
|
||||
import com.android.internal.telephony.Phone;
|
||||
import com.android.internal.telephony.PhoneConstants;
|
||||
import com.android.internal.telephony.PhoneFactory;
|
||||
import com.android.internal.telephony.PhoneStateIntentReceiver;
|
||||
import com.android.internal.telephony.TelephonyProperties;
|
||||
@@ -551,7 +552,7 @@ public class RadioInfo extends Activity {
|
||||
|
||||
private final void
|
||||
updatePhoneState() {
|
||||
Phone.State state = mPhoneStateReceiver.getPhoneState();
|
||||
PhoneConstants.State state = mPhoneStateReceiver.getPhoneState();
|
||||
Resources r = getResources();
|
||||
String display = r.getString(R.string.radioInfo_unknown);
|
||||
|
||||
|
@@ -17,7 +17,6 @@
|
||||
package com.android.settings;
|
||||
|
||||
import static android.os.BatteryManager.BATTERY_STATUS_UNKNOWN;
|
||||
import static android.provider.Telephony.Intents.SPN_STRINGS_UPDATED_ACTION;
|
||||
|
||||
import com.android.internal.telephony.TelephonyIntents;
|
||||
|
||||
|
@@ -1,7 +1,7 @@
|
||||
package com.android.settings;
|
||||
|
||||
import android.provider.Telephony;
|
||||
import static android.provider.Telephony.Intents.SECRET_CODE_ACTION;
|
||||
import static com.android.internal.telephony.TelephonyIntents.SECRET_CODE_ACTION;
|
||||
|
||||
import android.content.Context;
|
||||
import android.content.Intent;
|
||||
|
@@ -43,6 +43,7 @@ import android.telephony.TelephonyManager;
|
||||
import android.text.TextUtils;
|
||||
|
||||
import com.android.internal.telephony.Phone;
|
||||
import com.android.internal.telephony.PhoneConstants;
|
||||
import com.android.internal.telephony.PhoneFactory;
|
||||
import com.android.internal.telephony.PhoneStateIntentReceiver;
|
||||
import com.android.internal.telephony.TelephonyProperties;
|
||||
@@ -211,7 +212,7 @@ public class Status extends PreferenceActivity {
|
||||
setSummaryText(KEY_PRL_VERSION, mPhone.getCdmaPrlVersion());
|
||||
removePreferenceFromScreen(KEY_IMEI_SV);
|
||||
|
||||
if (mPhone.getLteOnCdmaMode() == Phone.LTE_ON_CDMA_TRUE) {
|
||||
if (mPhone.getLteOnCdmaMode() == PhoneConstants.LTE_ON_CDMA_TRUE) {
|
||||
// Show ICC ID and IMEI for LTE device
|
||||
setSummaryText(KEY_ICC_ID, mPhone.getIccSerialNumber());
|
||||
setSummaryText(KEY_IMEI, mPhone.getImei());
|
||||
|
Reference in New Issue
Block a user