Fix bug 1890426 ERI Text widget appears for 3G devices(dream and Sapphire).

The EriTextWidgetProvider was added by Teleca/Qualcomm and it was done
in such a manner that the widget was available on GSM phones. As it turns
out this widget is not needed for CDMA phones so it is being removed.
diff --git a/AndroidManifest.xml b/AndroidManifest.xml
index 1287b5d..c9ab4b9 100644
--- a/AndroidManifest.xml
+++ b/AndroidManifest.xml
@@ -314,14 +314,6 @@
                 <action android:name="android.bluetooth.IBluetoothHeadset" />
             </intent-filter>
         </service>
-
-        <!-- Broadcast Receiver that will process cdma ERI text updates -->    
-        <receiver android:name="EriTextWidgetProvider" android:label="@string/eri_text_label">
-            <intent-filter>
-                <action android:name="android.appwidget.action.APPWIDGET_UPDATE" />
-            </intent-filter>
-            <meta-data android:name="android.appwidget.provider" android:resource="@xml/eri_text_appwidget" />
-        </receiver>
     </application>
 </manifest>
 
diff --git a/src/com/android/phone/EriTextWidgetProvider.java b/src/com/android/phone/EriTextWidgetProvider.java
deleted file mode 100644
index c44679c..0000000
--- a/src/com/android/phone/EriTextWidgetProvider.java
+++ /dev/null
@@ -1,95 +0,0 @@
-/*
- * Copyright (C) 2009 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.phone;
-
-import android.app.PendingIntent;
-import android.app.Service;
-import android.appwidget.AppWidgetManager;
-import android.appwidget.AppWidgetProvider;
-import android.content.ComponentName;
-import android.content.Context;
-import android.content.Intent;
-import android.content.res.Resources;
-import android.os.IBinder;
-import android.telephony.TelephonyManager;
-import android.text.format.Time;
-import android.util.Log;
-import android.widget.RemoteViews;
-
-public class EriTextWidgetProvider extends AppWidgetProvider {
-    static final String LOG_TAG = "EriTextWidgetProvider";
-
-    static final ComponentName THIS_APPWIDGET =
-        new ComponentName("com.android.phone",
-                "com.android.phone.EriTextWidgetProvider");
-
-    private static EriTextWidgetProvider sInstance;
-
-    static synchronized EriTextWidgetProvider getInstance() {
-        if (sInstance == null) {
-            sInstance = new EriTextWidgetProvider();
-        }
-        return sInstance;
-    }
-
-    @Override
-    public void onEnabled(Context context) {
-        TelephonyManager mPhone;
-        String eriText = "ERI not init";
-
-        try {
-            mPhone = (TelephonyManager)context.getSystemService(Context.TELEPHONY_SERVICE);
-            eriText = mPhone.getCdmaEriText();
-        } catch (Exception ex){
-            Log.e(LOG_TAG, "onEnabled, error setting Cdma Eri Text: " + ex);
-        }
-
-        if (eriText == null) eriText = "ERI not available";
-
-        performUpdate(context,eriText);
-    }
-
-    @Override
-    public void onUpdate(Context context, AppWidgetManager appWidgetManager, int[] appWidgetIds) {
-        TelephonyManager mPhone;
-        String eriText = "ERI not init";
-
-        try {
-            mPhone = (TelephonyManager)context.getSystemService(Context.TELEPHONY_SERVICE);
-            eriText = mPhone.getCdmaEriText();
-        } catch (Exception ex){
-            Log.e(LOG_TAG, "onEnabled, error setting Cdma Eri Text: " + ex);
-        }
-
-        if (eriText == null) eriText = "ERI not available";
-
-        performUpdate(context,eriText);
-    }
-
-    void performUpdate(Context context, String eriText) {
-        final Resources res = context.getResources();
-        final RemoteViews views = new RemoteViews(context.getPackageName(),
-            R.layout.eri_text_layout);
-
-        views.setTextViewText(R.id.message, eriText);
-
-        AppWidgetManager manager = AppWidgetManager.getInstance(context);
-        manager.updateAppWidget(THIS_APPWIDGET, views);
-
-    }
-}
-
diff --git a/src/com/android/phone/PhoneApp.java b/src/com/android/phone/PhoneApp.java
index 5591da2..fc3d7f0 100755
--- a/src/com/android/phone/PhoneApp.java
+++ b/src/com/android/phone/PhoneApp.java
@@ -1169,6 +1169,13 @@
     }
 
     private void handleServiceStateChanged(Intent intent) {
+        /**
+         * This used to handle updating EriTextWidgetProvider this routine
+         * and and listening for ACTION_SERVICE_STATE_CHANGED intents could
+         * be removed. But leaving just in case it might be needed in the near
+         * future.
+         */
+
         // If service just returned, start sending out the queued messages
         ServiceState ss = ServiceState.newFromBundle(intent.getExtras());
 
@@ -1187,29 +1194,5 @@
         } else {
             hasService = false;
         }
-
-        if (ss.getRadioTechnology() == ServiceState.RADIO_TECHNOLOGY_1xRTT
-                || ss.getRadioTechnology() == ServiceState.RADIO_TECHNOLOGY_EVDO_0
-                || ss.getRadioTechnology() == ServiceState.RADIO_TECHNOLOGY_EVDO_A
-                || ss.getRadioTechnology() == ServiceState.RADIO_TECHNOLOGY_IS95A
-                || ss.getRadioTechnology() == ServiceState.RADIO_TECHNOLOGY_IS95B) {
-            isCdma = true;
-        }
-
-        if (!isCdma) {
-            eriText = "";
-        } else {
-            if (!hasService) {
-                eriText = getText(com.android.internal.R.string.roamingTextSearching).toString();
-            } else {
-                eriText = phone.getCdmaEriText();
-            }
-        }
-
-        if (eriText != null) {
-            EriTextWidgetProvider mEriTextWidgetProvider = EriTextWidgetProvider.getInstance();
-            mEriTextWidgetProvider.performUpdate(this, eriText);
-        }
-
     }
 }