Merge "Customize the service class for Call barring"
diff --git a/res/layout/radio_info.xml b/res/layout/radio_info.xml
index 71cd32a..72627a3 100644
--- a/res/layout/radio_info.xml
+++ b/res/layout/radio_info.xml
@@ -334,11 +334,6 @@
             android:background="?android:attr/listDivider" />
 
         <!-- CellInfoListRate Selection -->
-        <!-- Location -->
-        <LinearLayout style="@style/RadioInfo_entry_layout">
-            <TextView android:text="@string/radio_info_signal_location_label" style="@style/info_label" />
-            <TextView android:id="@+id/location" style="@style/info_value" />
-        </LinearLayout>
 
         <TextView
                 android:layout_width="match_parent"
diff --git a/res/values/strings.xml b/res/values/strings.xml
index d1ab127..83a5673 100644
--- a/res/values/strings.xml
+++ b/res/values/strings.xml
@@ -2079,8 +2079,6 @@
     <!-- Radio Info screen. Label for a status item.  Used for diagnostic info screens, precise translation isn't needed -->
     <string name="radio_info_ul_kbps">UL Bandwidth (kbps):</string>
     <!-- Radio Info screen. Label for a status item.  Used for diagnostic info screens, precise translation isn't needed -->
-    <string name="radio_info_signal_location_label">Cell Location Info (deprecated):</string>
-    <!-- Radio Info screen. Label for a status item.  Used for diagnostic info screens, precise translation isn't needed -->
     <string name="radio_info_phy_chan_config">LTE Physical Channel Configuration:</string>
     <!-- Radio Info screen. Label for a status item.  Used for diagnostic info screens, precise translation isn't needed -->
     <string name="radio_info_cell_info_refresh_rate">Cell Info Refresh Rate:</string>
diff --git a/src/com/android/phone/settings/RadioInfo.java b/src/com/android/phone/settings/RadioInfo.java
index f20da59..b774ac6 100644
--- a/src/com/android/phone/settings/RadioInfo.java
+++ b/src/com/android/phone/settings/RadioInfo.java
@@ -52,7 +52,6 @@
 import android.telephony.CellInfoGsm;
 import android.telephony.CellInfoLte;
 import android.telephony.CellInfoWcdma;
-import android.telephony.CellLocation;
 import android.telephony.CellSignalStrengthCdma;
 import android.telephony.CellSignalStrengthGsm;
 import android.telephony.CellSignalStrengthLte;
@@ -66,8 +65,6 @@
 import android.telephony.SignalStrength;
 import android.telephony.SubscriptionManager;
 import android.telephony.TelephonyManager;
-import android.telephony.cdma.CdmaCellLocation;
-import android.telephony.gsm.GsmCellLocation;
 import android.text.TextUtils;
 import android.util.Log;
 import android.view.Menu;
@@ -232,7 +229,6 @@
     private TextView mDBm;
     private TextView mMwi;
     private TextView mCfi;
-    private TextView mLocation;
     private TextView mCellInfo;
     private TextView mSent;
     private TextView mReceived;
@@ -284,7 +280,6 @@
     private boolean mCfiValue = false;
 
     private List<CellInfo> mCellInfoResult = null;
-    private CellLocation mCellLocationResult = null;
 
     private int mPreferredNetworkTypeResult;
     private int mCellInfoRefreshRateIndex;
@@ -329,11 +324,6 @@
         }
 
         @Override
-        public void onCellLocationChanged(CellLocation location) {
-            updateLocation(location);
-        }
-
-        @Override
         public void onMessageWaitingIndicatorChanged(boolean mwi) {
             mMwiValue = mwi;
             updateMessageWaiting();
@@ -499,7 +489,6 @@
         mDBm = (TextView) findViewById(R.id.dbm);
         mMwi = (TextView) findViewById(R.id.mwi);
         mCfi = (TextView) findViewById(R.id.cfi);
-        mLocation = (TextView) findViewById(R.id.location);
         mCellInfo = (TextView) findViewById(R.id.cellinfo);
         mCellInfo.setTypeface(Typeface.MONOSPACE);
 
@@ -655,7 +644,6 @@
         updateNetworkType();
         updateNrStats(null);
 
-        updateLocation(mCellLocationResult);
         updateCellInfo(mCellInfoResult);
         updateSubscriptionIds();
 
@@ -815,7 +803,6 @@
         mSent.setText("");
         mReceived.setText("");
         mCallState.setText("");
-        mLocation.setText("");
         mMwiValue = false;
         mMwi.setText("");
         mCfiValue = false;
@@ -873,45 +860,6 @@
                 + r.getString(R.string.radioInfo_display_asu));
     }
 
-    private void updateLocation(CellLocation location) {
-        Resources r = getResources();
-        if (location instanceof GsmCellLocation) {
-            GsmCellLocation loc = (GsmCellLocation) location;
-            int lac = loc.getLac();
-            int cid = loc.getCid();
-            mLocation.setText(r.getString(R.string.radioInfo_lac) + " = "
-                    + ((lac == -1) ? "unknown" : Integer.toHexString(lac))
-                    + "   "
-                    + r.getString(R.string.radioInfo_cid) + " = "
-                    + ((cid == -1) ? "unknown" : Integer.toHexString(cid)));
-        } else if (location instanceof CdmaCellLocation) {
-            CdmaCellLocation loc = (CdmaCellLocation) location;
-            int bid = loc.getBaseStationId();
-            int sid = loc.getSystemId();
-            int nid = loc.getNetworkId();
-            int lat = loc.getBaseStationLatitude();
-            int lon = loc.getBaseStationLongitude();
-            mLocation.setText("BID = "
-                    + ((bid == -1) ? "unknown" : Integer.toHexString(bid))
-                    + "   "
-                    + "SID = "
-                    + ((sid == -1) ? "unknown" : Integer.toHexString(sid))
-                    + "   "
-                    + "NID = "
-                    + ((nid == -1) ? "unknown" : Integer.toHexString(nid))
-                    + "\n"
-                    + "LAT = "
-                    + ((lat == -1) ? "unknown" : Integer.toHexString(lat))
-                    + "   "
-                    + "LONG = "
-                    + ((lon == -1) ? "unknown" : Integer.toHexString(lon)));
-        } else {
-            mLocation.setText("unknown");
-        }
-
-
-    }
-
     private String getCellInfoDisplayString(int i) {
         return (i != Integer.MAX_VALUE) ? Integer.toString(i) : "";
     }
@@ -1287,11 +1235,9 @@
     private void updateAllCellInfo() {
 
         mCellInfo.setText("");
-        mLocation.setText("");
 
         final Runnable updateAllCellInfoResults = new Runnable() {
             public void run() {
-                updateLocation(mCellLocationResult);
                 updateCellInfo(mCellInfoResult);
             }
         };
@@ -1300,7 +1246,6 @@
             @Override
             public void run() {
                 mCellInfoResult = mTelephonyManager.getAllCellInfo();
-                mCellLocationResult = mTelephonyManager.getCellLocation();
 
                 mHandler.post(updateAllCellInfoResults);
             }