Merge change I87d7f224 into eclair

* changes:
  Correct "on-screen" to "onscreen"; fix tts screen title
diff --git a/res/layout/compute_sizes.xml b/res/layout/compute_sizes.xml
index 1c8e966..b32ba58 100755
--- a/res/layout/compute_sizes.xml
+++ b/res/layout/compute_sizes.xml
@@ -23,7 +23,7 @@
         android:drawSelectorOnTop="false"
         android:layout_width="fill_parent"
         android:layout_height="wrap_content" />
-    <TextView android:id="@+id/empty_view"
+    <TextView android:id="@android:id/empty"
         android:layout_width="fill_parent"
         android:layout_height="wrap_content"
         android:paddingLeft="20dip"
diff --git a/src/com/android/settings/ManageApplications.java b/src/com/android/settings/ManageApplications.java
index 21647a8..a71d17b 100644
--- a/src/com/android/settings/ManageApplications.java
+++ b/src/com/android/settings/ManageApplications.java
@@ -212,9 +212,6 @@
     // Cache application attributes
     private AppInfoCache mCache = new AppInfoCache();
     
-    // empty message displayed when list is empty
-    private TextView mEmptyView;
-    
     // Boolean variables indicating state
     private boolean mLoadLabels = false;
     private boolean mSizesFirst = false;
@@ -776,17 +773,6 @@
         }
     }
     
-    private void showEmptyViewIfListEmpty() {
-        if (localLOGV) Log.i(TAG, "Checking for empty view");
-        if (mAppInfoAdapter.getCount() > 0) {
-            mListView.setVisibility(View.VISIBLE);
-            mEmptyView.setVisibility(View.GONE);
-        } else {
-            mListView.setVisibility(View.GONE);
-            mEmptyView.setVisibility(View.VISIBLE);
-        }
-    }
-    
     // internal structure used to track added and deleted packages when
     // the activity has focus
     static class AddRemoveInfo {
@@ -1192,7 +1178,6 @@
            } else {
                notifyDataSetChanged();
            }
-           showEmptyViewIfListEmpty();
            return true;
         }
         
@@ -1594,7 +1579,6 @@
         // initialize the inflater
         mInflater = (LayoutInflater)getSystemService(Context.LAYOUT_INFLATER_SERVICE);
         mReceiver = new PackageIntentReceiver();
-        mEmptyView = (TextView) findViewById(R.id.empty_view);
         mObserver = new PkgSizeObserver();
         // Create adapter and list view here
         List<ApplicationInfo> appList = getInstalledApps(mSortOrder);
diff --git a/src/com/android/settings/RadioInfo.java b/src/com/android/settings/RadioInfo.java
index 4665471..ce236fd 100644
--- a/src/com/android/settings/RadioInfo.java
+++ b/src/com/android/settings/RadioInfo.java
@@ -37,6 +37,7 @@
 import android.telephony.ServiceState;
 import android.telephony.TelephonyManager;
 import android.telephony.NeighboringCellInfo;
+import android.telephony.cdma.CdmaCellLocation;
 import android.telephony.gsm.GsmCellLocation;
 import android.text.format.DateUtils;
 import android.util.Log;
@@ -621,21 +622,42 @@
     }
 
     private final void updateLocation(CellLocation location) {
-        int lac = -1;
-        int cid = -1;
+        Resources r = getResources();
         if (location instanceof GsmCellLocation) {
             GsmCellLocation loc = (GsmCellLocation)location;
-            lac = loc.getLac();
-            cid = loc.getCid();
+            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");
         }
 
-        Resources r = getResources();
 
-        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)));
     }
 
     private final void updateNeighboringCids(ArrayList<NeighboringCellInfo> cids) {
diff --git a/src/com/android/settings/bluetooth/BluetoothSettings.java b/src/com/android/settings/bluetooth/BluetoothSettings.java
index 1203a42..4175a82 100644
--- a/src/com/android/settings/bluetooth/BluetoothSettings.java
+++ b/src/com/android/settings/bluetooth/BluetoothSettings.java
@@ -21,7 +21,7 @@
 import android.bluetooth.BluetoothDevice;
 import android.bluetooth.BluetoothDevicePicker;
 import android.bluetooth.BluetoothUuid;
-import android.bluetooth.ParcelUuid;
+import android.os.ParcelUuid;
 import android.content.BroadcastReceiver;
 import android.content.Context;
 import android.content.Intent;
@@ -71,6 +71,8 @@
     private String mLaunchPackage;
     private String mLaunchClass;
 
+    private BluetoothDevice mSelectedDevice= null;
+
     private LocalBluetoothManager mLocalManager;
 
     private BluetoothEnabler mEnabler;
@@ -95,9 +97,12 @@
                 int bondState = intent
                         .getIntExtra(BluetoothDevice.EXTRA_BOND_STATE, BluetoothDevice.ERROR);
                 if (bondState == BluetoothDevice.BOND_BONDED) {
-                    BluetoothDevice device = intent.getParcelableExtra(BluetoothDevice.EXTRA_DEVICE);
-                    sendDevicePickedIntent(device);
-                    finish();
+                    BluetoothDevice device = intent
+                            .getParcelableExtra(BluetoothDevice.EXTRA_DEVICE);
+                    if (device.equals(mSelectedDevice)) {
+                        sendDevicePickedIntent(device);
+                        finish();
+                    }
                 }
             }
         }
@@ -249,9 +254,10 @@
             } else if (mScreenType == SCREEN_TYPE_DEVICEPICKER) {
                 CachedBluetoothDevice device = btPreference.getCachedDevice();
 
-                if ((device.getBondState() == BluetoothDevice.BOND_BONDED) || (mNeedAuth == false)) {
-                    BluetoothDevice btAddress = btPreference.getCachedDevice().getDevice();
-                    sendDevicePickedIntent(btAddress);
+                mSelectedDevice = device.getDevice();
+                if ((device.getBondState() == BluetoothDevice.BOND_BONDED) ||
+                        (mNeedAuth == false)) {
+                    sendDevicePickedIntent(mSelectedDevice);
                     finish();
                 } else {
                     btPreference.getCachedDevice().onClicked();
diff --git a/src/com/android/settings/bluetooth/CachedBluetoothDevice.java b/src/com/android/settings/bluetooth/CachedBluetoothDevice.java
index 0582aa1..859cf67 100644
--- a/src/com/android/settings/bluetooth/CachedBluetoothDevice.java
+++ b/src/com/android/settings/bluetooth/CachedBluetoothDevice.java
@@ -20,7 +20,7 @@
 import android.bluetooth.BluetoothAdapter;
 import android.bluetooth.BluetoothClass;
 import android.bluetooth.BluetoothDevice;
-import android.bluetooth.ParcelUuid;
+import android.os.ParcelUuid;
 import android.content.Context;
 import android.content.DialogInterface;
 import android.content.Intent;
diff --git a/src/com/android/settings/bluetooth/LocalBluetoothProfileManager.java b/src/com/android/settings/bluetooth/LocalBluetoothProfileManager.java
index f3dea85..a6258e2 100644
--- a/src/com/android/settings/bluetooth/LocalBluetoothProfileManager.java
+++ b/src/com/android/settings/bluetooth/LocalBluetoothProfileManager.java
@@ -20,7 +20,7 @@
 import android.bluetooth.BluetoothDevice;
 import android.bluetooth.BluetoothHeadset;
 import android.bluetooth.BluetoothUuid;
-import android.bluetooth.ParcelUuid;
+import android.os.ParcelUuid;
 import android.os.Handler;
 import android.util.Log;
 
diff --git a/src/com/android/settings/widget/SettingsAppWidgetProvider.java b/src/com/android/settings/widget/SettingsAppWidgetProvider.java
index ab77b05..37896bf 100644
--- a/src/com/android/settings/widget/SettingsAppWidgetProvider.java
+++ b/src/com/android/settings/widget/SettingsAppWidgetProvider.java
@@ -390,8 +390,14 @@
                 }
                 power.setBacklightBrightness(brightness);
                 Settings.System.putInt(cr, Settings.System.SCREEN_BRIGHTNESS, brightness);
-                brightness = Settings.System.getInt(cr,
-                        Settings.System.SCREEN_BRIGHTNESS);
+                if (context.getResources().getBoolean(
+                        com.android.internal.R.bool.config_automatic_brightness_available)) {
+                    // Disable automatic brightness
+                    power.setAutoBrightness(false);
+                    Settings.System.putInt(context.getContentResolver(),
+                            Settings.System.SCREEN_BRIGHTNESS_MODE,
+                            0);
+                }
             }
         } catch (RemoteException e) {
             Log.d(TAG, "toggleBrightness: " + e);