Merge change 3491 into donut

* changes:
  Moving the Tts java class from the android.tts package to the android.speech.tts package. The Tts class (still hidden at this point) is the only Text-To-Speech class that will be exposed to application developers.
diff --git a/core/java/android/backup/BackupManager.java b/core/java/android/backup/BackupManager.java
index 30f781e..c3b6a02 100644
--- a/core/java/android/backup/BackupManager.java
+++ b/core/java/android/backup/BackupManager.java
@@ -32,8 +32,9 @@
  * until the backup operation actually occurs.
  *
  * <p>The backup operation itself begins with the system launching the
- * {@link BackupService} subclass declared in your manifest.  See the documentation
- * for {@link BackupService} for a detailed description of how the backup then proceeds.
+ * {@link android.app.BackupAgent} subclass declared in your manifest.  See the
+ * documentation for {@link android.app.BackupAgent} for a detailed description
+ * of how the backup then proceeds.
  *
  * @hide pending API solidification
  */
@@ -64,7 +65,7 @@
     /**
      * Notifies the Android backup system that your application wishes to back up
      * new changes to its data.  A backup operation using your application's
-     * {@link BackupService} subclass will be scheduled when you call this method.
+     * {@link android.app.BackupAgent} subclass will be scheduled when you call this method.
      */
     public void dataChanged() {
         try {
@@ -72,4 +73,20 @@
         } catch (RemoteException e) {
         }
     }
+
+    /**
+     * Begin the process of restoring system data from backup.  This method requires
+     * that the application hold the "android.permission.BACKUP" permission, and is
+     * not public.
+     *
+     * {@hide}
+     */
+    public IRestoreSession beginRestoreSession(int transportID) {
+        IRestoreSession binder = null;
+        try {
+            binder = mService.beginRestoreSession(transportID);
+        } catch (RemoteException e) {
+        }
+        return binder;
+    }
 }
diff --git a/core/java/android/backup/IRestoreSession.aidl b/core/java/android/backup/IRestoreSession.aidl
index 63b29a2..6bca865 100644
--- a/core/java/android/backup/IRestoreSession.aidl
+++ b/core/java/android/backup/IRestoreSession.aidl
@@ -16,7 +16,7 @@
 
 package android.backup;
 
-import android.os.Bundle;
+import android.backup.RestoreSet;
 
 /**
  * Binder interface used by clients who wish to manage a restore operation.  Every
@@ -33,7 +33,7 @@
      *   and a String array under the key "names" whose entries are the user-meaningful
      *   text corresponding to the backup sets at each index in the tokens array.
      */
-    Bundle getAvailableRestoreSets();
+    RestoreSet[] getAvailableRestoreSets();
 
     /**
      * Restore the given set onto the device, replacing the current data of any app
diff --git a/core/java/android/backup/RestoreSet.aidl b/core/java/android/backup/RestoreSet.aidl
new file mode 100644
index 0000000..42e77bf
--- /dev/null
+++ b/core/java/android/backup/RestoreSet.aidl
@@ -0,0 +1,19 @@
+/*
+ * 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 android.backup;
+
+parcelable RestoreSet;
\ No newline at end of file
diff --git a/core/java/android/backup/RestoreSet.java b/core/java/android/backup/RestoreSet.java
new file mode 100644
index 0000000..7f09af3
--- /dev/null
+++ b/core/java/android/backup/RestoreSet.java
@@ -0,0 +1,87 @@
+/*
+ * 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 android.backup;
+
+import android.os.Parcel;
+import android.os.Parcelable;
+
+/**
+ * Descriptive information about a set of backed-up app data available for restore.
+ * Used by IRestoreSession clients.
+ *
+ * @hide
+ */
+public class RestoreSet implements Parcelable {
+    /**
+     * Name of this restore set.  May be user generated, may simply be the name
+     * of the handset model, e.g. "T-Mobile G1".
+     */
+    public String name;
+
+    /**
+     * Identifier of the device whose data this is.  This will be as unique as
+     * is practically possible; for example, it might be an IMEI.
+     */
+    public String device;
+
+    /**
+     * Token that identifies this backup set unambiguously to the backup/restore
+     * transport.  This is guaranteed to be valid for the duration of a restore
+     * session, but is meaningless once the session has ended.
+     */
+    public int token;
+
+
+    RestoreSet() {
+        // Leave everything zero / null
+    }
+
+    RestoreSet(String _name, String _dev, int _token) {
+        name = _name;
+        device = _dev;
+        token = _token;
+    }
+
+
+    // Parcelable implementation
+    public int describeContents() {
+        return 0;
+    }
+
+    public void writeToParcel(Parcel out, int flags) {
+        out.writeString(name);
+        out.writeString(device);
+        out.writeInt(token);
+    }
+
+    public static final Parcelable.Creator<RestoreSet> CREATOR
+            = new Parcelable.Creator<RestoreSet>() {
+        public RestoreSet createFromParcel(Parcel in) {
+            return new RestoreSet(in);
+        }
+
+        public RestoreSet[] newArray(int size) {
+            return new RestoreSet[size];
+        }
+    };
+
+    private RestoreSet(Parcel in) {
+        name = in.readString();
+        device = in.readString();
+        token = in.readInt();
+    }
+}
\ No newline at end of file
diff --git a/core/java/android/widget/AbsListView.java b/core/java/android/widget/AbsListView.java
index f62487f..c0fa64f 100644
--- a/core/java/android/widget/AbsListView.java
+++ b/core/java/android/widget/AbsListView.java
@@ -583,13 +583,7 @@
         boolean smoothScrollbar = a.getBoolean(R.styleable.AbsListView_smoothScrollbar, true);
         setSmoothScrollbarEnabled(smoothScrollbar);
 
-        int defaultGestures = GESTURES_NONE;
-        if (useTextFilter) {
-            defaultGestures = GESTURES_FILTER;
-        } else if (enableFastScroll) {
-            defaultGestures = GESTURES_JUMP;
-        }
-        int gestures = a.getInt(R.styleable.AbsListView_gestures, defaultGestures);
+        int gestures = a.getInt(R.styleable.AbsListView_gestures, GESTURES_NONE);
         setGestures(gestures);
 
         a.recycle();
diff --git a/core/java/com/android/internal/backup/AdbTransport.java b/core/java/com/android/internal/backup/AdbTransport.java
index 46f0ed1..d8a2186 100644
--- a/core/java/com/android/internal/backup/AdbTransport.java
+++ b/core/java/com/android/internal/backup/AdbTransport.java
@@ -1,7 +1,7 @@
 package com.android.internal.backup;
 
+import android.backup.RestoreSet;
 import android.content.pm.PackageInfo;
-import android.os.Bundle;
 import android.os.ParcelFileDescriptor;
 import android.os.RemoteException;
 
@@ -30,12 +30,12 @@
     }
 
     // Restore handling
-    public Bundle getAvailableRestoreSets() throws android.os.RemoteException {
-        // !!! TODO: real implementation
-        Bundle b = new Bundle();
-        b.putIntArray("tokens", new int[0]);
-        b.putStringArray("names", new String[0]);
-        return b;
+    public RestoreSet[] getAvailableRestoreSets() throws android.os.RemoteException {
+        RestoreSet[] set = new RestoreSet[1];
+        set[0].device = "USB";
+        set[0].name = "adb";
+        set[0].token = 0;
+        return set;
     }
 
     public PackageInfo[] getAppSet(int token) throws android.os.RemoteException {
diff --git a/core/java/com/android/internal/backup/GoogleTransport.java b/core/java/com/android/internal/backup/GoogleTransport.java
index c20a957..06deec4 100644
--- a/core/java/com/android/internal/backup/GoogleTransport.java
+++ b/core/java/com/android/internal/backup/GoogleTransport.java
@@ -1,7 +1,7 @@
 package com.android.internal.backup;
 
+import android.backup.RestoreSet;
 import android.content.pm.PackageInfo;
-import android.os.Bundle;
 import android.os.ParcelFileDescriptor;
 import android.os.RemoteException;
 
@@ -28,12 +28,9 @@
     }
 
     // Restore handling
-    public Bundle getAvailableRestoreSets() throws android.os.RemoteException {
+    public RestoreSet[] getAvailableRestoreSets() throws android.os.RemoteException {
         // !!! TODO: real implementation
-        Bundle b = new Bundle();
-        b.putIntArray("tokens", new int[0]);
-        b.putStringArray("names", new String[0]);
-        return b;
+        return null;
     }
 
     public PackageInfo[] getAppSet(int token) throws android.os.RemoteException {
diff --git a/core/java/com/android/internal/backup/IBackupTransport.aidl b/core/java/com/android/internal/backup/IBackupTransport.aidl
index 1d59175..4821fd0 100644
--- a/core/java/com/android/internal/backup/IBackupTransport.aidl
+++ b/core/java/com/android/internal/backup/IBackupTransport.aidl
@@ -16,8 +16,8 @@
 
 package com.android.internal.backup;
 
+import android.backup.RestoreSet;
 import android.content.pm.PackageInfo;
-import android.os.Bundle;
 import android.os.ParcelFileDescriptor;
 
 /** {@hide} */
@@ -69,7 +69,7 @@
      *   and a String array under the key "names" whose entries are the user-meaningful
      *   names corresponding to the backup sets at each index in the tokens array.
      **/
-    Bundle getAvailableRestoreSets();
+    RestoreSet[] getAvailableRestoreSets();
 
     /**
      * Get the set of applications from a given backup image.
diff --git a/core/res/res/values/attrs.xml b/core/res/res/values/attrs.xml
index cda7431..6a9ca83 100644
--- a/core/res/res/values/attrs.xml
+++ b/core/res/res/values/attrs.xml
@@ -4,9 +4,9 @@
      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.
@@ -64,7 +64,7 @@
 
         <!-- Inverse hint text color -->
         <attr name="textColorHintInverse" format="reference|color" />
-        
+
         <!-- Bright text color. Only differentiates based on the disabled state. -->
         <attr name="textColorPrimaryDisableOnly" format="reference|color" />
 
@@ -79,7 +79,7 @@
         <attr name="textColorPrimaryInverseNoDisable" format="reference|color" />
         <!-- Dim inverse text color. This does not differentiate the disabled state. -->
         <attr name="textColorSecondaryInverseNoDisable" format="reference|color" />
-        
+
         <!-- Text color for urls in search suggestions, used by things like global search and the browser. @hide -->
         <attr name="textColorSearchUrl" format="reference|color" />
 
@@ -97,28 +97,28 @@
         <!-- Text color, typeface, size, and style for "small" inverse text. Defaults to secondary inverse text color. -->
         <attr name="textAppearanceSmallInverse" format="reference" />
 
-        <!-- Text color, typeface, size, and style for system search result title. Defaults to primary inverse text color. @hide -->	
-        <attr name="textAppearanceSearchResultTitle" format="reference" />	
-        <!-- Text color, typeface, size, and style for system search result subtitle. Defaults to primary inverse text color. @hide -->	
+        <!-- Text color, typeface, size, and style for system search result title. Defaults to primary inverse text color. @hide -->
+        <attr name="textAppearanceSearchResultTitle" format="reference" />
+        <!-- Text color, typeface, size, and style for system search result subtitle. Defaults to primary inverse text color. @hide -->
         <attr name="textAppearanceSearchResultSubtitle" format="reference" />
 
 
         <!-- Text color, typeface, size, and style for the text inside of a button. -->
         <attr name="textAppearanceButton" format="reference" />
-        
+
         <!-- A styled string, specifying the style to be used for showing
              inline candidate text when composing with an input method.  The
              text itself will be ignored, but the style spans will be applied
              to the candidate text as it is edited. -->
         <attr name="candidatesTextStyleSpans" format="reference|string" />
-        
+
         <!-- Drawable to use for check marks -->
         <attr name="textCheckMark" format="reference" />
         <attr name="textCheckMarkInverse" format="reference" />
 
         <!-- Drawable to use for multiple choice indicators-->
         <attr name="listChoiceIndicatorMultiple" format="reference" />
-        
+
         <!-- Drawable to use for single choice indicators-->
         <attr name="listChoiceIndicatorSingle" format="reference" />
 
@@ -143,7 +143,7 @@
         <!-- Gallery styles -->
         <!-- ============== -->
         <eat-comment />
-        
+
         <!-- The preferred background for gallery items. This should be set
              as the background of any Views you provide from the Adapter. -->
         <attr name="galleryItemBackground" format="reference" />
@@ -163,20 +163,20 @@
         <attr name="listSeparatorTextViewStyle" format="reference" />
         <!-- The preferred left padding for an expandable list item (for child-specific layouts,
              use expandableListPreferredChildPaddingLeft). This takes into account
-             the indicator that will be shown to next to the item. --> 
+             the indicator that will be shown to next to the item. -->
         <attr name="expandableListPreferredItemPaddingLeft" format="dimension" />
         <!-- The preferred left padding for an expandable list item that is a child.
-             If this is not provided, it defaults to the expandableListPreferredItemPaddingLeft. --> 
+             If this is not provided, it defaults to the expandableListPreferredItemPaddingLeft. -->
         <attr name="expandableListPreferredChildPaddingLeft" format="dimension" />
         <!-- The preferred left bound for an expandable list item's indicator. For a child-specific
-             indicator, use expandableListPreferredChildIndicatorLeft. --> 
+             indicator, use expandableListPreferredChildIndicatorLeft. -->
         <attr name="expandableListPreferredItemIndicatorLeft" format="dimension" />
         <!-- The preferred right bound for an expandable list item's indicator. For a child-specific
-             indicator, use expandableListPreferredChildIndicatorRight. --> 
+             indicator, use expandableListPreferredChildIndicatorRight. -->
         <attr name="expandableListPreferredItemIndicatorRight" format="dimension" />
-        <!-- The preferred left bound for an expandable list child's indicator. --> 
+        <!-- The preferred left bound for an expandable list child's indicator. -->
         <attr name="expandableListPreferredChildIndicatorLeft" format="dimension" />
-        <!-- The preferred right bound for an expandable list child's indicator. --> 
+        <!-- The preferred right bound for an expandable list child's indicator. -->
         <attr name="expandableListPreferredChildIndicatorRight" format="dimension" />
 
         <!-- ============= -->
@@ -225,7 +225,7 @@
              any of the attributes defined by
              {@link android.R.styleable#WindowAnimation}. -->
         <attr name="windowAnimationStyle" format="reference" />
-    
+
         <!-- Defines the default soft input state that this window would
              like when it is displayed. -->
         <attr name="windowSoftInputMode">
@@ -247,7 +247,7 @@
             <!-- Always make the soft input area visible when this window
                  has input focus. -->
             <flag name="stateAlwaysVisible" value="5" />
-            
+
             <!-- The window resize/pan adjustment has not been specified,
                  the system will automatically select between resize and pan
                  modes, depending
@@ -274,7 +274,7 @@
              use the window's theme to show a preview of it before your
              actual instance is shown to the user. -->
         <attr name="windowDisablePreview" format="boolean" />
-        
+
         <!-- Flag indicating that this window should not be displayed at all.
              The default value is false; if set to true, and this window is
              the main window of an Activity, then it will never actually
@@ -282,13 +282,13 @@
              must immediately quit without waiting for user interaction,
              because there will be no such interaction coming. -->
         <attr name="windowNoDisplay" format="boolean" />
-        
+
         <!-- ============ -->
         <!-- Alert Dialog styles -->
         <!-- ============ -->
         <eat-comment />
         <attr name="alertDialogStyle" format="reference" />
-        
+
         <!-- ============ -->
         <!-- Panel styles -->
         <!-- ============ -->
@@ -387,7 +387,7 @@
         <!-- Preference styles   -->
         <!-- =================== -->
         <eat-comment />
-        
+
         <!-- Default style for PreferenceScreen. -->
         <attr name="preferenceScreenStyle" format="reference" />
         <!-- Default style for PreferenceCategory. -->
@@ -408,7 +408,7 @@
         <attr name="ringtonePreferenceStyle" format="reference" />
         <!-- The preference layout that has the child/tabbed effect. -->
         <attr name="preferenceLayoutChild" format="reference" />
-        
+
     </declare-styleable>
 
     <!-- **************************************************************** -->
@@ -426,7 +426,7 @@
     </ul>
         -->
     <attr name="textSize" format="dimension" />
-    
+
     <!-- Default text typeface. -->
     <attr name="typeface">
         <enum name="normal" value="0" />
@@ -434,26 +434,26 @@
         <enum name="serif" value="2" />
         <enum name="monospace" value="3" />
     </attr>
-    
+
     <!-- Default text typeface style. -->
     <attr name="textStyle">
         <flag name="normal" value="0" />
         <flag name="bold" value="1" />
         <flag name="italic" value="2" />
     </attr>
-    
+
     <!-- Color of text (usually same as colorForeground). -->
     <attr name="textColor" format="reference|color" />
-    
+
     <!-- Color of highlighted text. -->
     <attr name="textColorHighlight" format="reference|color" />
-    
+
     <!-- Color of hint text (displayed when the field is empty). -->
     <attr name="textColorHint" format="reference|color" />
-    
+
     <!-- Color of link text (URLs). -->
     <attr name="textColorLink" format="reference|color" />
-    
+
     <!-- Where to ellipsize text. -->
     <attr name="ellipsize">
         <enum name="none" value="0" />
@@ -462,7 +462,7 @@
         <enum name="end" value="3" />
         <enum name="marquee" value="4" />
     </attr>
-    
+
     <!-- The type of data being placed in a text field, used to help an
          input method decide how to let the user enter text.  The constants
          here correspond to those defined by
@@ -669,7 +669,7 @@
     <attr name="x" format="dimension" />
     <!-- A coordinate in the Y dimension. -->
     <attr name="y" format="dimension" />
-          
+
     <!-- Specifies how to place the content of an object, both
          on the x and y axis, within the object itself. -->
     <attr name="gravity">
@@ -774,11 +774,11 @@
     <!-- ========================== -->
     <eat-comment />
 
-    <!-- This enum provides the same keycode values as can be found in 
+    <!-- This enum provides the same keycode values as can be found in
         {@link android.view.KeyEvent} -->
     <attr name="keycode">
         <enum name="KEYCODE_UNKNOWN" value="0" />
-        <enum name="KEYCODE_SOFT_LEFT" value="1" />    
+        <enum name="KEYCODE_SOFT_LEFT" value="1" />
         <enum name="KEYCODE_SOFT_RIGHT" value="2" />
         <enum name="KEYCODE_HOME" value="3" />
         <enum name="KEYCODE_BACK" value="4" />
@@ -911,7 +911,7 @@
         <attr name="bottomMedium" format="reference|color" />
         <attr name="centerMedium" format="reference|color" />
     </declare-styleable>
-    
+
     <!-- Window animation class attributes. -->
     <declare-styleable name="WindowAnimation">
         <!-- The animation used when a window is being added. -->
@@ -955,7 +955,7 @@
              allows you to later retrieve the view
              with <code>findViewById(R.id.my_id)</code>. -->
         <attr name="id" format="reference" />
-        
+
         <!-- Supply a tag for this view containing a String, to be retrieved
              later with {@link android.view.View#getTag View.getTag()} or
              searched for with {@link android.view.View#findViewWithTag
@@ -963,7 +963,7 @@
              IDs (through the android:id attribute) instead of tags because
              they are faster and allow for compile-time type checking. -->
         <attr name="tag" format="string" />
-        
+
         <!-- The initial horizontal scroll offset, in pixels.-->
         <attr name="scrollX" format="dimension" />
 
@@ -977,7 +977,7 @@
         <attr name="background" format="reference|color" />
 
         <!-- Sets the padding, in pixels, of all four edges.  Padding is defined as
-             space between the edges of the view and the view's content. A views size 
+             space between the edges of the view and the view's content. A views size
              will include it's padding.  If a {@link android.R.attr#background}
              is provided, the padding will initially be set to that (0 if the
              drawable does not have padding).  Explicitly setting a padding value
@@ -1032,12 +1032,12 @@
         </attr>
 
         <!-- Controls the scrollbar style and position. The scrollbars can be overlaid or
-             inset. When inset, they add to the padding of the view. And the 
-             scrollbars can be drawn inside the padding area or on the edge of 
-             the view. For example, if a view has a background drawable and you 
-             want to draw the scrollbars inside the padding specified by the 
-             drawable, you can use insideOverlay or insideInset. If you want them 
-             to appear at the edge of the view, ignoring the padding, then you can 
+             inset. When inset, they add to the padding of the view. And the
+             scrollbars can be drawn inside the padding area or on the edge of
+             the view. For example, if a view has a background drawable and you
+             want to draw the scrollbars inside the padding specified by the
+             drawable, you can use insideOverlay or insideInset. If you want them
+             to appear at the edge of the view, ignoring the padding, then you can
              use outsideOverlay or outsideInset.-->
         <attr name="scrollbarStyle">
             <!-- Inside the padding and overlaid -->
@@ -1049,14 +1049,14 @@
             <!-- Edge of the view and inset -->
             <enum name="outsideInset" value="0x03000000" />
         </attr>
-        
+
         <!-- Set this if the view will serve as a scrolling container, meaing
              that it can be resized to shrink its overall window so that there
              will be space for an input method.  If not set, the default
              value will be true if "scrollbars" has the vertical scrollbar
              set, else it will be false. -->
         <attr name="isScrollContainer" format="boolean" />
-        
+
         <!-- Sets the width of vertical scrollbars and height of horizontal scrollbars. -->
         <attr name="scrollbarSize" format="dimension" />
         <!-- Defines the horizontal scrollbar thumb drawable. -->
@@ -1118,10 +1118,10 @@
 
         <!-- Defines whether this view reacts to click events. -->
         <attr name="clickable" format="boolean" />
-        
+
         <!-- Defines whether this view reacts to long click events. -->
         <attr name="longClickable" format="boolean" />
-        
+
         <!-- If unset, no state will be saved for this view when it is being
              frozen. The default is true, allowing the view to be saved
              (however it also must have an ID assigned to it for its
@@ -1129,7 +1129,7 @@
              state for this view, not for its children which may still
              be saved. -->
         <attr name="saveEnabled" format="boolean" />
-        
+
         <!-- Defines the quality of translucent drawing caches. This property is used
              only when the drawing cache is enabled and translucent. The default value is auto. -->
         <attr name="drawingCacheQuality">
@@ -1147,16 +1147,16 @@
         <!-- Controls whether the view's window should keep the screen on
              while visible. -->
         <attr name="keepScreenOn" format="boolean" />
-        
+
         <!-- When this attribute is set to true, the view gets its drawable state
              (focused, pressed, etc.) from its direct parent rather than from itself. -->
         <attr name="duplicateParentState" format="boolean" />
-        
+
         <!-- Defines the minimum height of the view. It is not guaranteed
              the view will be able to achieve this minimum height (for example,
              if its parent layout constrains it with less available height). -->
         <attr name="minHeight" />
-        
+
         <!-- Defines the minimum width of the view. It is not guaranteed
              the view will be able to achieve this minimum width (for example,
              if its parent layout constrains it with less available width). -->
@@ -1218,7 +1218,7 @@
             <flag name="animation" value="0x1" />
             <!-- The drawing cache is persisted after a scroll. -->
             <flag name="scrolling" value="0x2" />
-            <!-- The drawing cache is always persisted. -->            
+            <!-- The drawing cache is always persisted. -->
             <flag name="all" value="0x3" />
         </attr>
         <!-- Defines whether the ViewGroup should always draw its children using their
@@ -1331,7 +1331,7 @@
              method should be considered an option as the default. -->
         <attr name="isDefault" format="boolean" />
     </declare-styleable>
-    
+
     <!-- =============================== -->
     <!-- Widget package class attributes -->
     <!-- =============================== -->
@@ -1340,7 +1340,7 @@
     <declare-styleable name="AbsListView">
          <!-- Drawable used to indicate the currently selected item in the list. -->
         <attr name="listSelector" format="color|reference" />
-        <!-- When set to true, the selector will be drawn over the selected item. 
+        <!-- When set to true, the selector will be drawn over the selected item.
              Otherwise the selector is drawn behind the selected item. The default
              value is false. -->
         <attr name="drawSelectorOnTop" format="boolean" />
@@ -1363,13 +1363,13 @@
                  already visible on screen. -->
             <enum name="normal" value="1" />
             <!-- The list will automatically scroll to the bottom, no matter what items
-                 are currently visible. --> 
+                 are currently visible. -->
             <enum name="alwaysScroll" value="2" />
         </attr>
         <!-- Indicates that this list will always be drawn on top of solid, single-color
              opaque background. This allows the list to optimize drawing. -->
         <attr name="cacheColorHint" format="color" />
-        <!-- Enables the fast scroll thumb that can be dragged to quickly scroll through 
+        <!-- Enables the fast scroll thumb that can be dragged to quickly scroll through
              the list. -->
         <attr name="fastScrollEnabled" format="boolean" />
         <!-- When set to true, the list will use a more refined calculation
@@ -1386,12 +1386,9 @@
             <!-- No gesture -->
             <enum name="none" value="0" />
             <!-- Gestures jump to a specific position in the content. This requires
-                  fast scroll to be enabled. If fast scroll is enabled from XML,
-                  jump gestures will be enabled automatically. -->
+                  fast scroll to be enabled. -->
             <enum name="jump" value="1" />
-            <!-- Gestures filter the content. This requires text filtering to be enabled.
-                 If text filtering is enabled from XML, filter gestures will be enabled
-                 automatically. -->
+            <!-- Gestures filter the content. This requires text filtering to be enabled. -->
             <enum name="filter" value="2" />
         </attr>
     </declare-styleable>
@@ -1471,7 +1468,7 @@
         <!-- Defines whether the foreground drawable should be drawn inside the padding.
              This property is turned on by default. -->
         <attr name="foregroundInsidePadding" format="boolean" />
-        <!-- Determines whether to measure all children or just those in 
+        <!-- Determines whether to measure all children or just those in
              the VISIBLE or INVISIBLE state when measuring. Defaults to false. -->
         <attr name="measureAllChildren" format="boolean" />
     </declare-styleable>
@@ -1481,14 +1478,14 @@
         <!-- Indicator shown beside the child View. This can be a stateful Drawable. -->
         <attr name="childIndicator" format="reference" />
         <!-- The left bound for an item's indicator. To specify a left bound specific to children,
-             use childIndicatorLeft. --> 
+             use childIndicatorLeft. -->
         <attr name="indicatorLeft" format="dimension" />
         <!-- The right bound for an item's indicator. To specify a right bound specific to children,
-             use childIndicatorRight. --> 
+             use childIndicatorRight. -->
         <attr name="indicatorRight" format="dimension" />
-        <!-- The left bound for a child's indicator. --> 
+        <!-- The left bound for a child's indicator. -->
         <attr name="childIndicatorLeft" format="dimension" />
-        <!-- The right bound for a child's indicator. --> 
+        <!-- The right bound for a child's indicator. -->
         <attr name="childIndicatorRight" format="dimension" />
         <!-- Drawable or color that is used as a divider for children. (It will drawn
              below and above child items.) The height of this will be the same as
@@ -1539,10 +1536,10 @@
         <!-- Set this to true if you want the ImageView to adjust its bounds
              to preserve the aspect ratio of its drawable. -->
         <attr name="adjustViewBounds" format="boolean" />
-        <!-- An optional argument to supply a maximum width for this view. 
+        <!-- An optional argument to supply a maximum width for this view.
              See {see android.widget.ImageView#setMaxWidth} for details. -->
         <attr name="maxWidth" format="dimension" />
-        <!-- An optional argument to supply a maximum height for this view. 
+        <!-- An optional argument to supply a maximum height for this view.
              See {see android.widget.ImageView#setMaxHeight} for details. -->
         <attr name="maxHeight" format="dimension" />
         <!-- Set a tinting color for the image -->
@@ -1598,7 +1595,7 @@
         <attr name="dividerHeight" format="dimension" />
         <!-- Defines the choice behavior for the ListView. By default, lists do not have
              any choice behavior. By setting the choiceMode to singleChoice, the List
-             allows up to one item to be in a chosen state. By setting the choiceMode to 
+             allows up to one item to be in a chosen state. By setting the choiceMode to
              multipleChoice, the list allows any number of items to be chosen. -->
         <attr name="choiceMode">
             <!-- Normal list that does not indicate choices -->
@@ -1643,7 +1640,7 @@
         <!-- 'More' icon -->
         <attr name="moreIcon" format="reference" />
     </declare-styleable>
-    
+
     <declare-styleable name="ProgressBar">
         <!-- Defines the maximum value the progress can take. -->
         <attr name="max" format="integer" />
@@ -1676,27 +1673,27 @@
         <attr name="maxWidth" />
         <attr name="minHeight" format="dimension" />
         <attr name="maxHeight" />
-        <attr name="interpolator" format="reference" />        
+        <attr name="interpolator" format="reference" />
     </declare-styleable>
-    
+
     <declare-styleable name="SeekBar">
-        <!-- Draws the thumb on a seekbar -->    
+        <!-- Draws the thumb on a seekbar -->
         <attr name="thumb" format="reference" />
         <!-- An offset for the thumb that allows it to extend out of the range of the track. -->
-        <attr name="thumbOffset" format="dimension" /> 
+        <attr name="thumbOffset" format="dimension" />
     </declare-styleable>
-    
+
     <declare-styleable name="RatingBar">
-        <!-- The number of stars (or rating items) to show. -->    
-        <attr name="numStars" format="integer" /> 
-        <!-- The rating to set by default. -->    
-        <attr name="rating" format="float" /> 
-        <!-- The step size of the rating. -->    
-        <attr name="stepSize" format="float" /> 
-        <!-- Whether this rating bar is an indicator (and non-changeable by the user). -->    
-        <attr name="isIndicator" format="boolean" /> 
+        <!-- The number of stars (or rating items) to show. -->
+        <attr name="numStars" format="integer" />
+        <!-- The rating to set by default. -->
+        <attr name="rating" format="float" />
+        <!-- The step size of the rating. -->
+        <attr name="stepSize" format="float" />
+        <!-- Whether this rating bar is an indicator (and non-changeable by the user). -->
+        <attr name="isIndicator" format="boolean" />
     </declare-styleable>
-    
+
     <declare-styleable name="RadioGroup">
         <!-- The id of the child radio button that should be checked by default
              within this radio group. -->
@@ -1718,7 +1715,7 @@
              indices are ignored. You can shrink all columns by using the
              value "*" instead. Note that a column can be marked stretchable
              and shrinkable at the same time. -->
-        <attr name="shrinkColumns" format="string" /> 
+        <attr name="shrinkColumns" format="string" />
         <!-- The 0 based index of the columns to collapse. The column indices
              must be separated by a comma: 1, 2, 5. Illegal and duplicate
              indices are ignored. -->
@@ -1819,7 +1816,7 @@
         <attr name="minEms" format="integer" min="0" />
         <!-- Makes the TextView be at least this many pixels wide -->
         <attr name="minWidth" />
-        <!-- Specifies how to align the text by the view's x and/or y axis 
+        <!-- Specifies how to align the text by the view's x and/or y axis
              when the text is smaller than the view. -->
         <attr name="gravity" />
         <!-- Whether the text is allowed to be wider than the view (and
@@ -1837,10 +1834,10 @@
              attribute.  (If both singleLine and inputType are supplied,
              the inputType flags will override the value of singleLine.)
              {@deprecated This attribute is deprecated and is replaced by the textMultiLine flag
-             in the inputType attribute.  Use caution when altering existing layouts, as the 
-             default value of singeLine is false (multi-line mode), but if you specify any 
-             value for inputType, the default is single-line mode.  (If both singleLine and 
-             inputType attributes are found,  the inputType flags will override the value of 
+             in the inputType attribute.  Use caution when altering existing layouts, as the
+             default value of singeLine is false (multi-line mode), but if you specify any
+             value for inputType, the default is single-line mode.  (If both singleLine and
+             inputType attributes are found,  the inputType flags will override the value of
              singleLine.) } -->
         <attr name="singleLine" format="boolean" />
         <!-- {@deprecated Use state_enabled instead.} -->
@@ -1944,7 +1941,7 @@
         <attr name="lineSpacingExtra" format="dimension" />
         <!-- Extra spacing between lines of text, as a multiplier. -->
         <attr name="lineSpacingMultiplier" format="float" />
-        <!-- The number of times to repeat the marquee animation. Only applied if the 
+        <!-- The number of times to repeat the marquee animation. Only applied if the
              TextView has marquee enabled. -->
         <attr name="marqueeRepeatLimit" format="integer">
             <!-- Indicates that marquee should repeat indefinitely  -->
@@ -2035,7 +2032,7 @@
         <!-- The prompt to display when the spinner's dialog is shown. -->
         <attr name="prompt" format="reference" />
     </declare-styleable>
-    <declare-styleable name="DatePicker">  
+    <declare-styleable name="DatePicker">
         <!-- The first year (inclusive) i.e. 1940 -->
         <attr name="startYear" format="integer" />
         <!-- The last year (inclusive) i.e. 2010 -->
@@ -2197,7 +2194,7 @@
              {@link android.graphics.drawable.Drawable#setVisible} -->
         <attr name="visible" format="boolean" />
     </declare-styleable>
-    
+
     <declare-styleable name="StateListDrawable">
         <attr name="visible" />
         <!-- If true, allows the drawable's padding to change based on the
@@ -2213,7 +2210,7 @@
              current state. -->
         <attr name="constantSize" format="boolean" />
     </declare-styleable>
-    
+
     <declare-styleable name="AnimationDrawable">
         <attr name="visible" />
         <attr name="variablePadding" />
@@ -2222,15 +2219,15 @@
              restarting at the first frame after the last has finished. -->
         <attr name="oneshot" format="boolean" />
     </declare-styleable>
-    
+
     <declare-styleable name="AnimationDrawableItem">
         <!-- Amount of time (in milliseconds) to display this frame. -->
-        <attr name="duration" format="integer" /> 
+        <attr name="duration" format="integer" />
         <!-- Reference to a drawable resource to use for the frame.  If not
              given, the drawable must be defined by the first child tag. -->
         <attr name="drawable" format="reference" />
     </declare-styleable>
-    
+
     <declare-styleable name="GradientDrawable">
         <attr name="visible" />
         <attr name="shape">
@@ -2253,18 +2250,18 @@
         <attr name="thickness" format="dimension" />
         <attr name="useLevel" />
     </declare-styleable>
-    
+
     <declare-styleable name="GradientDrawableSize">
         <attr name="width" />
         <attr name="height" />
     </declare-styleable>
-    
+
     <declare-styleable name="GradientDrawableGradient">
         <attr name="startColor" format="color" />
         <!-- Optional center color. For linear gradients, use centerX or centerY to place the center color. -->
         <attr name="centerColor" format="color" />
         <attr name="endColor" format="color" />
-        <attr name="useLevel" format="boolean" />        
+        <attr name="useLevel" format="boolean" />
         <attr name="angle" format="float" />
         <attr name="type">
             <enum name="linear" value="0" />
@@ -2275,18 +2272,18 @@
         <attr name="centerY" format="float|fraction" />
         <attr name="gradientRadius" format="float|fraction" />
     </declare-styleable>
-    
+
     <declare-styleable name="GradientDrawableSolid">
         <attr name="color" format="color" />
     </declare-styleable>
-    
+
     <declare-styleable name="GradientDrawableStroke">
         <attr name="width" />
         <attr name="color" />
         <attr name="dashWidth" format="dimension" />
         <attr name="dashGap" format="dimension" />
     </declare-styleable>
-    
+
     <declare-styleable name="DrawableCorners">
         <attr name="radius" format="dimension" />
         <attr name="topLeftRadius" format="dimension" />
@@ -2294,14 +2291,14 @@
         <attr name="bottomLeftRadius" format="dimension" />
         <attr name="bottomRightRadius" format="dimension" />
     </declare-styleable>
-    
+
     <declare-styleable name="GradientDrawablePadding">
         <attr name="left" format="dimension" />
         <attr name="top" format="dimension" />
         <attr name="right" format="dimension" />
         <attr name="bottom" format="dimension" />
     </declare-styleable>
-    
+
     <declare-styleable name="LayerDrawableItem">
         <attr name="left" />
         <attr name="top" />
@@ -2310,7 +2307,7 @@
         <attr name="drawable" />
         <attr name="id" />
     </declare-styleable>
-    
+
     <declare-styleable name="LevelListDrawableItem">
         <!-- The minimum level allowed for this item. -->
         <attr name="minLevel" format="integer" />
@@ -2318,7 +2315,7 @@
         <attr name="maxLevel" format="integer" />
         <attr name="drawable" />
     </declare-styleable>
-    
+
     <declare-styleable name="RotateDrawable">
         <attr name="visible" />
         <attr name="fromDegrees" format="float" />
@@ -2474,7 +2471,7 @@
     <declare-styleable name="AnimationSet">
         <attr name="shareInterpolator" format="boolean" />
     </declare-styleable>
-    
+
     <declare-styleable name="Animation">
         <!-- Defines the interpolator used to smooth the animation movement in time. -->
         <attr name="interpolator" />
@@ -2517,14 +2514,14 @@
             <enum name="bottom" value="-1" />
         </attr>
     </declare-styleable>
-    
+
     <declare-styleable name="RotateAnimation">
         <attr name="fromDegrees" />
         <attr name="toDegrees" />
         <attr name="pivotX" />
         <attr name="pivotY" />
     </declare-styleable>
-    
+
     <declare-styleable name="ScaleAnimation">
         <attr name="fromXScale" format="float" />
         <attr name="toXScale" format="float" />
@@ -2533,14 +2530,14 @@
         <attr name="pivotX" />
         <attr name="pivotY" />
     </declare-styleable>
-    
+
     <declare-styleable name="TranslateAnimation">
         <attr name="fromXDelta" format="float|fraction" />
         <attr name="toXDelta" format="float|fraction" />
         <attr name="fromYDelta" format="float|fraction" />
         <attr name="toYDelta" format="float|fraction" />
     </declare-styleable>
-    
+
     <declare-styleable name="AlphaAnimation">
         <attr name="fromAlpha" format="float" />
         <attr name="toAlpha" format="float" />
@@ -2602,12 +2599,12 @@
         <!-- This is the amount of deceleration to add when easing in. -->
         <attr name="factor" format="float" />
     </declare-styleable>
-    
+
     <declare-styleable name="DecelerateInterpolator">
         <!-- This is the amount of acceleration to add when easing out. -->
         <attr name="factor" />
     </declare-styleable>
-    
+
     <declare-styleable name="CycleInterpolator">
         <attr name="cycles" format="float" />
     </declare-styleable>
@@ -2717,18 +2714,18 @@
     </declare-styleable>
     <!-- State array representing an expandable list child's indicator. -->
     <declare-styleable name="ExpandableListChildIndicatorState">
-        <!-- State identifier indicating the child is the last child within its group. --> 
+        <!-- State identifier indicating the child is the last child within its group. -->
         <attr name="state_last" />
     </declare-styleable>
     <!-- State array representing an expandable list group's indicator. -->
     <declare-styleable name="ExpandableListGroupIndicatorState">
-        <!-- State identifier indicating the group is expanded. --> 
+        <!-- State identifier indicating the group is expanded. -->
         <attr name="state_expanded" format="boolean" />
-        <!-- State identifier indicating the group is empty (has no children). --> 
+        <!-- State identifier indicating the group is empty (has no children). -->
         <attr name="state_empty" format="boolean" />
     </declare-styleable>
     <declare-styleable name="PopupWindowBackgroundState">
-        <!-- State identifier indicating the popup will be above the anchor. --> 
+        <!-- State identifier indicating the popup will be above the anchor. -->
         <attr name="state_above_anchor" format="boolean" />
     </declare-styleable>
 
@@ -2738,7 +2735,7 @@
     <eat-comment />
 
     <!-- Searchable activities and applications must provide search configuration information
-        in an XML file, typically called searchable.xml.  This file is referenced in your manifest. 
+        in an XML file, typically called searchable.xml.  This file is referenced in your manifest.
         For a more in-depth discussion of search configuration, please refer to
         {@link android.app.SearchManager}. -->
     <declare-styleable name="Searchable">
@@ -2747,29 +2744,29 @@
              plain text.  This is a reference to a drawable (icon) resource.
              <i>Optional attribute.</i> -->
         <attr name="icon" />
-        <!-- This is the user-displayed name of the searchable activity.  <i>Required 
+        <!-- This is the user-displayed name of the searchable activity.  <i>Required
             attribute.</i> -->
         <attr name="label" />
-        <!-- If supplied, this string will be displayed as a hint to the user.  <i>Optional 
+        <!-- If supplied, this string will be displayed as a hint to the user.  <i>Optional
             attribute.</i> -->
         <attr name="hint" />
         <!-- If supplied, this string will be displayed as the text of the "Search" button.
-          <i>Optional attribute.</i> 
+          <i>Optional attribute.</i>
           {@deprecated This will create a non-standard UI appearance, because the search bar UI is
                        changing to use only icons for its buttons.}-->
         <attr name="searchButtonText" format="string" />
         <attr name="inputType" />
         <attr name="imeOptions" />
-        
+
         <!-- Additional features are controlled by mode bits in this field.  Omitting
-            this field, or setting to zero, provides default behavior.  <i>Optional attribute.</i> 
+            this field, or setting to zero, provides default behavior.  <i>Optional attribute.</i>
         -->
         <attr name="searchMode">
           <!-- If set, this flag enables the display of the search target (label) within the
                search bar.  If neither bad mode is selected, no badge will be shown. -->
           <flag name="showSearchLabelAsBadge" value="0x04" />
           <!-- If set, this flag enables the display of the search target (icon) within the
-               search bar.  (Note, overrides showSearchLabel)  If neither bad mode is selected, 
+               search bar.  (Note, overrides showSearchLabel)  If neither bad mode is selected,
                no badge will be shown.-->
           <flag name="showSearchIconAsBadge" value="0x08" />
           <!-- If set, this flag causes the suggestion column SUGGEST_COLUMN_INTENT_DATA to
@@ -2783,11 +2780,11 @@
                values are not suitable for user inspection and editing. -->
           <flag name="queryRewriteFromText" value="0x20" />
         </attr>
-        
+
         <!-- Voice search features are controlled by mode bits in this field.  Omitting
             this field, or setting to zero, provides default behavior.
             If showVoiceSearchButton is set, then launchWebSearch or launchRecognizer must
-            also be set.  <i>Optional attribute.</i> 
+            also be set.  <i>Optional attribute.</i>
         -->
         <attr name="voiceSearchMode">
           <!-- If set, display a voice search button.  This only takes effect if voice search is
@@ -2806,9 +2803,9 @@
         </attr>
 
         <!-- If provided, this specifies the language model that should be used by the
-             voice recognition system.  See 
-             {@link android.speech.RecognizerIntent#EXTRA_LANGUAGE_MODEL } for more information. 
-             If not provided, the default value 
+             voice recognition system.  See
+             {@link android.speech.RecognizerIntent#EXTRA_LANGUAGE_MODEL } for more information.
+             If not provided, the default value
              {@link android.speech.RecognizerIntent#LANGUAGE_MODEL_FREE_FORM } will be used. -->
         <attr name="voiceLanguageModel" format="string" />
         <!-- If provided, this specifies a prompt that will be displayed during voice input. -->
@@ -2818,14 +2815,14 @@
         <attr name="voiceLanguage" format="string" />
         <!-- If provided, enforces the maximum number of results to return, including the "best"
              result which will always be provided as the SEARCH intent's primary query.  Must be one
-             or greater.  If not provided, the recognizer will choose how many results to return. 
+             or greater.  If not provided, the recognizer will choose how many results to return.
              -->
         <attr name="voiceMaxResults" format="integer" />
 
         <!-- If provided, this is the trigger indicating that the searchable activity
             provides suggestions as well.  The value must be a fully-qualified content provider
-            authority (e.g. "com.example.android.apis.SuggestionProvider") and should match the 
-            "android:authorities" tag in your content provider's manifest entry.  <i>Optional 
+            authority (e.g. "com.example.android.apis.SuggestionProvider") and should match the
+            "android:authorities" tag in your content provider's manifest entry.  <i>Optional
             attribute.</i> -->
         <attr name="searchSuggestAuthority" format="string" />
         <!-- If provided, this will be inserted in the suggestions query Uri, after the authority
@@ -2833,31 +2830,31 @@
             -->
         <attr name="searchSuggestPath" format="string" />
         <!-- If provided, suggestion queries will be passed into your query function
-            as the <i>selection</i> parameter.  Typically this will be a WHERE clause for your 
-            database, and will contain a single question mark, which represents the actual query 
+            as the <i>selection</i> parameter.  Typically this will be a WHERE clause for your
+            database, and will contain a single question mark, which represents the actual query
             string that has been typed by the user.  If not provided, then the user query text
-            will be appended to the query Uri (after an additional "/".)  <i>Optional 
+            will be appended to the query Uri (after an additional "/".)  <i>Optional
             attribute.</i> -->
         <attr name="searchSuggestSelection" format="string" />
 
-        <!-- If provided, and not overridden by an action in the selected suggestion, this 
+        <!-- If provided, and not overridden by an action in the selected suggestion, this
             string will be placed in the action field of the {@link android.content.Intent Intent}
             when the user clicks a suggestion.  <i>Optional attribute.</i> -->
         <attr name="searchSuggestIntentAction" format="string" />
-        <!-- If provided, and not overridden by an action in the selected suggestion, this 
-            string will be placed in the data field of the {@link android.content.Intent Intent} 
+        <!-- If provided, and not overridden by an action in the selected suggestion, this
+            string will be placed in the data field of the {@link android.content.Intent Intent}
             when the user clicks a suggestion.  <i>Optional attribute.</i> -->
         <attr name="searchSuggestIntentData" format="string" />
-        
+
         <!-- If provided, this is the minimum number of characters needed to trigger
              search suggestions. The default value is 0. <i>Optional attribute.</i> -->
         <attr name="searchSuggestThreshold" format="integer" />
-        
+
         <!-- If provided and <code>true</code>, this searchable activity will be
              included in any global lists of search targets.
              The default value is <code>false</code>. <i>Optional attribute.</i>. -->
         <attr name="includeInGlobalSearch" format="boolean" />
-        
+
     </declare-styleable>
 
     <!-- In order to process special action keys during search, you must define them using
@@ -2867,70 +2864,70 @@
     <declare-styleable name="SearchableActionKey">
         <!-- This attribute denotes the action key you wish to respond to.  Note that not
             all action keys are actually supported using this mechanism, as many of them are
-            used for typing, navigation, or system functions.  This will be added to the 
+            used for typing, navigation, or system functions.  This will be added to the
             {@link android.content.Intent#ACTION_SEARCH ACTION_SEARCH} intent that is passed to your
-            searchable activity.  To examine the key code, use 
+            searchable activity.  To examine the key code, use
             {@link android.content.Intent#getIntExtra getIntExtra(SearchManager.ACTION_KEY)}.
-            <p>Note, in addition to the keycode, you must also provide one or more of the action 
+            <p>Note, in addition to the keycode, you must also provide one or more of the action
             specifier attributes.  <i>Required attribute.</i> -->
         <attr name="keycode" />
-        
+
         <!-- If you wish to handle an action key during normal search query entry, you
-            must define an action string here.  This will be added to the 
+            must define an action string here.  This will be added to the
             {@link android.content.Intent#ACTION_SEARCH ACTION_SEARCH} intent that is passed to your
-            searchable activity.  To examine the string, use 
+            searchable activity.  To examine the string, use
             {@link android.content.Intent#getStringExtra getStringExtra(SearchManager.ACTION_MSG)}.
             <i>Optional attribute.</i> -->
         <attr name="queryActionMsg"  format="string" />
-        
+
         <!-- If you wish to handle an action key while a suggestion is being displayed <i>and
             selected</i>, there are two ways to handle this.  If <i>all</i> of your suggestions
-            can handle the action key, you can simply define the action message using this 
-            attribute.  This will be added to the 
+            can handle the action key, you can simply define the action message using this
+            attribute.  This will be added to the
             {@link android.content.Intent#ACTION_SEARCH ACTION_SEARCH} intent that is passed to your
-            searchable activity.  To examine the string, use 
+            searchable activity.  To examine the string, use
             {@link android.content.Intent#getStringExtra getStringExtra(SearchManager.ACTION_MSG)}.
             <i>Optional attribute.</i> -->
         <attr name="suggestActionMsg"  format="string" />
-        
+
         <!-- If you wish to handle an action key while a suggestion is being displayed <i>and
-            selected</i>, but you do not wish to enable this action key for every suggestion, 
+            selected</i>, but you do not wish to enable this action key for every suggestion,
             then you can use this attribute to control it on a suggestion-by-suggestion basis.
-            First, you must define a column (and name it here) where your suggestions will include 
+            First, you must define a column (and name it here) where your suggestions will include
             the action string.  Then, in your content provider, you must provide this column, and
             when desired, provide data in this column.
-            The search manager will look at your suggestion cursor, using the string 
-            provided here in order to select a column, and will use that to select a string from 
-            the cursor.  That string will be added to the 
-            {@link android.content.Intent#ACTION_SEARCH ACTION_SEARCH} intent that is passed to 
-            your searchable activity.  To examine the string, use 
-            {@link android.content.Intent#getStringExtra 
+            The search manager will look at your suggestion cursor, using the string
+            provided here in order to select a column, and will use that to select a string from
+            the cursor.  That string will be added to the
+            {@link android.content.Intent#ACTION_SEARCH ACTION_SEARCH} intent that is passed to
+            your searchable activity.  To examine the string, use
+            {@link android.content.Intent#getStringExtra
             getStringExtra(SearchManager.ACTION_MSG)}.  <i>If the data does not exist for the
             selection suggestion, the action key will be ignored.</i><i>Optional attribute.</i> -->
         <attr name="suggestActionMsgColumn" format="string" />
 
     </declare-styleable>
-    
+
     <!-- ***************************************************************** -->
     <!-- Support for MapView. -->
     <!-- ***************************************************************** -->
     <eat-comment />
-    
+
     <!-- The set of attributes for a MapView. -->
     <declare-styleable name="MapView">
         <!-- Value is a string that specifies the Maps API Key to use. -->
         <attr name="apiKey" format="string" />
     </declare-styleable>
-    
+
     <!-- **************************************************************** -->
     <!-- Menu XML inflation. -->
     <!-- **************************************************************** -->
     <eat-comment />
-    
+
     <!-- Base attributes that are available to all Menu objects. -->
     <declare-styleable name="Menu">
     </declare-styleable>
-    
+
     <!-- Base attributes that are available to all groups. -->
     <declare-styleable name="MenuGroup">
 
@@ -2949,11 +2946,11 @@
             <!-- Items are alternative actions. -->
             <enum name="alternative" value="0x00040000" />
         </attr>
-        
+
         <!-- The order within the category applied to all items within this group.
              (This will be or'ed with the category attribute.) -->
         <attr name="orderInCategory" format="integer" />
-        
+
         <!-- Whether the items are capable of displaying a check mark. -->
         <attr name="checkableBehavior">
             <!-- The items are not checkable. -->
@@ -2964,7 +2961,7 @@
                  this group. -->
             <enum name="single" value="2" />
         </attr>
-                
+
         <!-- Whether the items are shown/visible. -->
         <attr name="visible" />
 
@@ -2978,7 +2975,7 @@
 
         <!-- The ID of the item. -->
         <attr name="id" />
-        
+
         <!-- The category applied to the item.
              (This will be or'ed with the orderInCategory attribute.) -->
         <attr name="menuCategory" />
@@ -2989,15 +2986,15 @@
 
         <!-- The title associated with the item. -->
         <attr name="title" format="string" />
-        
+
         <!-- The condensed title associated with the item.  This is used in situations where the
              normal title may be too long to be displayed. -->
         <attr name="titleCondensed" format="string" />
 
         <!-- The icon associated with this item.  This icon will not always be shown, so
-             the title should be sufficient in describing this item. -->        
+             the title should be sufficient in describing this item. -->
         <attr name="icon" />
-        
+
         <!-- The alphabetic shortcut key.  This is the shortcut when using a keyboard
              with alphabetic keys. -->
         <attr name="alphabeticShortcut" format="string" />
@@ -3005,14 +3002,14 @@
         <!-- The numeric shortcut key.  This is the shortcut when using a numeric (e.g., 12-key)
              keyboard. -->
         <attr name="numericShortcut" format="string" />
-        
+
         <!-- Whether the item is capable of displaying a check mark. -->
         <attr name="checkable" format="boolean" />
-        
-        <!-- Whether the item is checked.  Note that you must first have enabled checking with 
+
+        <!-- Whether the item is checked.  Note that you must first have enabled checking with
              the checkable attribute or else the check mark will not appear. -->
         <attr name="checked" />
-        
+
         <!-- Whether the item is shown/visible. -->
         <attr name="visible" />
 
@@ -3038,7 +3035,7 @@
                    with a View's attributes.  Some subclasses (e.g., EditTextPreference)
                    proxy all attributes to its EditText widget. -->
     <eat-comment />
-    
+
     <!-- Base attributes available to Preference. -->
     <declare-styleable name="Preference">
         <!-- The key to store the Preference value. -->
@@ -3167,7 +3164,7 @@
              it had previously been shown. -->
         <attr name="imeExtractExitAnimation" format="reference" />
     </declare-styleable>
-    
+
     <declare-styleable name="KeyboardView">
         <!-- Default KeyboardView style. -->
         <attr name="keyboardViewStyle" format="reference" />
@@ -3200,13 +3197,13 @@
 
         <!-- Layout resource for popup keyboards -->
         <attr name="popupLayout" format="reference" />
-        
+
         <attr name="shadowColor" />
         <attr name="shadowRadius" />
     </declare-styleable>
-    
+
     <declare-styleable name="KeyboardViewPreviewState">
-        <!-- State for {@link android.inputmethodservice.KeyboardView KeyboardView} 
+        <!-- State for {@link android.inputmethodservice.KeyboardView KeyboardView}
                 key preview background -->
         <attr name="state_long_pressable" format="boolean" />
     </declare-styleable>
@@ -3289,7 +3286,7 @@
              If not supplied, then no activity will be launched. -->
         <attr name="configure" format="string" />
     </declare-styleable>
-    
-    
+
+
 </resources>
 
diff --git a/include/media/mediarecorder.h b/include/media/mediarecorder.h
index aebe191..9b54ca9 100644
--- a/include/media/mediarecorder.h
+++ b/include/media/mediarecorder.h
@@ -30,7 +30,7 @@
 typedef void (*media_completion_f)(status_t status, void *cookie);
 
 /* Do not change these values without updating their counterparts
- * in java/android/android/media/MediaRecorder.java!
+ * in media/java/android/media/MediaRecorder.java!
  */
 enum audio_source {
     AUDIO_SOURCE_DEFAULT = 0,
@@ -38,26 +38,47 @@
     AUDIO_SOURCE_VOICE_UPLINK = 2,
     AUDIO_SOURCE_VOICE_DOWNLINK = 3,
     AUDIO_SOURCE_VOICE_CALL = 4,
-    AUDIO_SOURCE_MAX = AUDIO_SOURCE_VOICE_CALL
+    AUDIO_SOURCE_MAX = AUDIO_SOURCE_VOICE_CALL,
+
+    AUDIO_SOURCE_LIST_END  // must be last - used to validate audio source type
 };
 
 enum video_source {
     VIDEO_SOURCE_DEFAULT = 0,
     VIDEO_SOURCE_CAMERA = 1,
+
+    VIDEO_SOURCE_LIST_END  // must be last - used to validate audio source type
 };
 
-//Please update java/android/android/media/MediaRecorder.java if the following is updated.
+//Please update media/java/android/media/MediaRecorder.java if the following is updated.
 enum output_format {
     OUTPUT_FORMAT_DEFAULT = 0,
-    OUTPUT_FORMAT_THREE_GPP,
-    OUTPUT_FORMAT_MPEG_4,
-    OUTPUT_FORMAT_RAW_AMR,
+    OUTPUT_FORMAT_THREE_GPP = 1,
+    OUTPUT_FORMAT_MPEG_4 = 2,
+
+
+    OUTPUT_FORMAT_AUDIO_ONLY_START = 3, // Used in validating the output format.  Should be the
+                                        //  at the start of the audio only output formats.
+
+    /* These are audio only file formats */
+    OUTPUT_FORMAT_RAW_AMR = 3, //to be backward compatible
+    OUTPUT_FORMAT_AMR_NB = 3,
+    OUTPUT_FORMAT_AMR_WB = 4,
+    OUTPUT_FORMAT_AAC_ADIF = 5,
+    OUTPUT_FORMAT_AAC_ADTS = 6,
+
     OUTPUT_FORMAT_LIST_END // must be last - used to validate format type
 };
 
 enum audio_encoder {
     AUDIO_ENCODER_DEFAULT = 0,
     AUDIO_ENCODER_AMR_NB = 1,
+    AUDIO_ENCODER_AMR_WB = 2,
+    AUDIO_ENCODER_AAC = 3,
+    AUDIO_ENCODER_AAC_PLUS = 4,
+    AUDIO_ENCODER_EAAC_PLUS = 5,
+
+    AUDIO_ENCODER_LIST_END // must be the last - used to validate the audio encoder type
 };
 
 enum video_encoder {
@@ -65,8 +86,11 @@
     VIDEO_ENCODER_H263 = 1,
     VIDEO_ENCODER_H264 = 2,
     VIDEO_ENCODER_MPEG_4_SP = 3,
+
+    VIDEO_ENCODER_LIST_END // must be the last - used to validate the video encoder type
 };
 
+
 // Maximum frames per second is 24
 #define MEDIA_RECORDER_MAX_FRAME_RATE         24
 
@@ -105,7 +129,7 @@
 // The codes are distributed as follow:
 //   0xx: Reserved
 //   8xx: General info/warning
-// 
+//
 enum media_recorder_info_type {
     MEDIA_RECORDER_INFO_UNKNOWN                   = 1,
     MEDIA_RECORDER_INFO_MAX_DURATION_REACHED      = 800,
diff --git a/media/java/android/media/MediaRecorder.java b/media/java/android/media/MediaRecorder.java
index 44f21c8..be4b489 100644
--- a/media/java/android/media/MediaRecorder.java
+++ b/media/java/android/media/MediaRecorder.java
@@ -164,8 +164,19 @@
         public static final int THREE_GPP = 1;
         /** MPEG4 media file format*/
         public static final int MPEG_4 = 2;
-        /** Raw AMR file format */
+
+        /** The following formats are audio only .aac or .amr formats **/
+        /** @deprecated  Deprecated in favor of AMR_NB */
+        /** @todo change link when AMR_NB is exposed. Deprecated in favor of {@link MediaRecorder.OutputFormat#AMR_NB} */
         public static final int RAW_AMR = 3;
+        /** @hide AMR NB file format */
+        public static final int AMR_NB = 3;
+        /** @hide AMR WB file format */
+        public static final int AMR_WB = 4;
+        /** @hide AAC ADIF file format */
+        public static final int AAC_ADIF = 5;
+        /** @hide AAC ADTS file format */
+        public static final int AAC_ADTS = 6;
     };
 
     /**
@@ -180,7 +191,14 @@
         public static final int DEFAULT = 0;
         /** AMR (Narrowband) audio codec */
         public static final int AMR_NB = 1;
-        //public static final AAC = 2;  currently unsupported
+        /** @hide AMR (Wideband) audio codec */
+        public static final int AMR_WB = 2;
+        /** @hide AAC audio codec */
+        public static final int AAC = 3;
+        /** @hide enhanced AAC audio codec */
+        public static final int AAC_PLUS = 4;
+        /** @hide enhanced AAC plus audio codec */
+        public static final int EAAC_PLUS = 5;
     }
 
     /**
@@ -198,6 +216,46 @@
         public static final int MPEG_4_SP = 3;
     }
 
+
+    /**
+     * @hide Defines the audio sampling rate. This must be set before
+     * setAudioEncoder() or it will be ignored.
+     * This parameter is used with
+     * {@link MediaRecorder#setParameters(String)}.
+     */
+    public final class AudioParamSamplingRate {
+      /* Do not change these values without updating their counterparts
+       * in include/media/mediarecorder.h!
+       */
+        private AudioParamSamplingRate() {}
+        public static final String AUDIO_PARAM_SAMPLING_RATE_KEY = "audio-param-sampling-rate=";
+    }
+
+     /**
+     * @hide Defines the audio number of channels. This must be set before
+     * setAudioEncoder() or it will be ignored.
+     * This parameter is used with
+     * {@link MediaRecorder#setParameters(String)}.
+     */
+    public final class AudioParamChannels {
+      /* Do not change these values without updating their counterparts
+       * in include/media/mediarecorder.h!
+       */
+        private AudioParamChannels() {}
+        public static final String AUDIO_PARAM_NUMBER_OF_CHANNELS = "audio-param-number-of-channels=";
+    }
+
+     /**
+     * @hide Defines the audio encoding bitrate. This must be set before
+     * setAudioEncoder() or it will be ignored.
+     * This parameter is used with
+     * {@link MediaRecorder#setParameters(String)}.
+     */
+    public final class AudioParamEncodingBitrate{
+        private AudioParamEncodingBitrate() {}
+        public static final String AUDIO_PARAM_ENCODING_BITRATE = "audio-param-encoding-bitrate=";
+    }
+
     /**
      * Sets the audio source to be used for recording. If this method is not
      * called, the output file will not contain an audio track. The source needs
@@ -332,6 +390,16 @@
             throws IllegalStateException;
 
     /**
+     * @hide Sets a parameter in the author engine.
+     *
+     * @param params the parameter to set.
+     * @see android.media.MediaRecorder.AudioParamSamplingRate
+     * @see android.media.MediaRecorder.AudioParamChannels
+     * @see android.media.MediaRecorder.AudioParamEncodingBitrate
+     */
+    public native void setParameters(String params);
+
+    /**
      * Pass in the file descriptor of the file to be written. Call this after
      * setOutputFormat() but before prepare().
      *
@@ -448,7 +516,7 @@
     {
         /**
          * Called when an error occurs while recording.
-         * 
+         *
          * @param mr the MediaRecorder that encountered the error
          * @param what    the type of error that has occurred:
          * <ul>
@@ -494,7 +562,7 @@
     {
         /**
          * Called when an error occurs while recording.
-         * 
+         *
          * @param mr the MediaRecorder that encountered the error
          * @param what    the type of error that has occurred:
          * <ul>
diff --git a/media/jni/android_media_MediaRecorder.cpp b/media/jni/android_media_MediaRecorder.cpp
index 7561af1..7bfeb83 100644
--- a/media/jni/android_media_MediaRecorder.cpp
+++ b/media/jni/android_media_MediaRecorder.cpp
@@ -165,7 +165,7 @@
 android_media_MediaRecorder_setVideoSource(JNIEnv *env, jobject thiz, jint vs)
 {
     LOGV("setVideoSource(%d)", vs);
-    if (vs < VIDEO_SOURCE_DEFAULT || vs > VIDEO_SOURCE_CAMERA) {
+    if (vs < VIDEO_SOURCE_DEFAULT || vs >= VIDEO_SOURCE_LIST_END) {
         jniThrowException(env, "java/lang/IllegalArgumentException", "Invalid video source");
         return;
     }
@@ -177,10 +177,11 @@
 android_media_MediaRecorder_setAudioSource(JNIEnv *env, jobject thiz, jint as)
 {
     LOGV("setAudioSource(%d)", as);
-    if (as < AUDIO_SOURCE_DEFAULT || as > AUDIO_SOURCE_MAX) {
+    if (as < AUDIO_SOURCE_DEFAULT || as >= AUDIO_SOURCE_LIST_END) {
         jniThrowException(env, "java/lang/IllegalArgumentException", "Invalid audio source");
         return;
     }
+
     sp<MediaRecorder> mr = getMediaRecorder(env, thiz);
     process_media_recorder_call(env, mr->setAudioSource(as), "java/lang/RuntimeException", "setAudioSource failed.");
 }
@@ -201,7 +202,7 @@
 android_media_MediaRecorder_setVideoEncoder(JNIEnv *env, jobject thiz, jint ve)
 {
     LOGV("setVideoEncoder(%d)", ve);
-    if (ve < VIDEO_ENCODER_DEFAULT || ve > VIDEO_ENCODER_MPEG_4_SP) {
+    if (ve < VIDEO_ENCODER_DEFAULT || ve >= VIDEO_ENCODER_LIST_END) {
         jniThrowException(env, "java/lang/IllegalArgumentException", "Invalid video encoder");
         return;
     }
@@ -213,7 +214,7 @@
 android_media_MediaRecorder_setAudioEncoder(JNIEnv *env, jobject thiz, jint ae)
 {
     LOGV("setAudioEncoder(%d)", ae);
-    if (ae < AUDIO_ENCODER_DEFAULT || ae > AUDIO_ENCODER_AMR_NB) {
+    if (ae < AUDIO_ENCODER_DEFAULT || ae >= AUDIO_ENCODER_LIST_END) {
         jniThrowException(env, "java/lang/IllegalArgumentException", "Invalid audio encoder");
         return;
     }
@@ -222,6 +223,29 @@
 }
 
 static void
+android_media_MediaRecorder_setParameters(JNIEnv *env, jobject thiz, jstring params)
+{
+    LOGV("setParameters()");
+    if (params == NULL)
+    {
+        LOGE("Invalid or empty params string.  This parameter will be ignored.");
+        return;
+    }
+
+    sp<MediaRecorder> mr = getMediaRecorder(env, thiz);
+
+    const char* params8 = env->GetStringUTFChars(params, NULL);
+    if (params8 == NULL)
+    {
+        LOGE("Failed to covert jstring to String8.  This parameter will be ignored.");
+        return;
+    }
+
+    process_media_recorder_call(env, mr->setParameters(String8(params8)), "java/lang/RuntimeException", "setParameter failed.");
+    env->ReleaseStringUTFChars(params,params8);
+}
+
+static void
 android_media_MediaRecorder_setOutputFileFD(JNIEnv *env, jobject thiz, jobject fileDescriptor, jlong offset, jlong length)
 {
     LOGV("setOutputFile");
@@ -384,6 +408,7 @@
     {"setOutputFormat",      "(I)V",                            (void *)android_media_MediaRecorder_setOutputFormat},
     {"setVideoEncoder",      "(I)V",                            (void *)android_media_MediaRecorder_setVideoEncoder},
     {"setAudioEncoder",      "(I)V",                            (void *)android_media_MediaRecorder_setAudioEncoder},
+    {"setParameters",        "(Ljava/lang/String;)V",           (void *)android_media_MediaRecorder_setParameters},
     {"_setOutputFile",       "(Ljava/io/FileDescriptor;JJ)V",   (void *)android_media_MediaRecorder_setOutputFileFD},
     {"setVideoSize",         "(II)V",                           (void *)android_media_MediaRecorder_setVideoSize},
     {"setVideoFrameRate",    "(I)V",                            (void *)android_media_MediaRecorder_setVideoFrameRate},
diff --git a/media/libmedia/mediarecorder.cpp b/media/libmedia/mediarecorder.cpp
index 6b26faf..5093f0e 100644
--- a/media/libmedia/mediarecorder.cpp
+++ b/media/libmedia/mediarecorder.cpp
@@ -180,7 +180,7 @@
         LOGE("setOutputFormat called in an invalid state: %d", mCurrentState);
         return INVALID_OPERATION;
     }
-    if (mIsVideoSourceSet && of >= OUTPUT_FORMAT_RAW_AMR) {
+    if (mIsVideoSourceSet && of >= OUTPUT_FORMAT_AUDIO_ONLY_START) { //first non-video output format
         LOGE("output format (%d) is meant for audio recording only and incompatible with video recording", of);
         return INVALID_OPERATION;
     }
@@ -345,7 +345,7 @@
     }
     if (!mIsVideoSourceSet) {
         LOGE("try to set video frame rate without setting video source first");
-        return INVALID_OPERATION; 
+        return INVALID_OPERATION;
     }
 
     status_t ret = mMediaRecorder->setVideoFrameRate(frames_per_second);
@@ -475,7 +475,7 @@
         mCurrentState = MEDIA_RECORDER_ERROR;
         return ret;
     }
- 
+
     // FIXME:
     // stop and reset are semantically different.
     // We treat them the same for now, and will change this in the future.
@@ -492,7 +492,7 @@
         LOGE("media recorder is not initialized yet");
         return INVALID_OPERATION;
     }
-    
+
     doCleanUp();
     status_t ret = UNKNOWN_ERROR;
     switch(mCurrentState) {
diff --git a/services/java/com/android/server/BackupManagerService.java b/services/java/com/android/server/BackupManagerService.java
index cbec1b4..e90e0ad 100644
--- a/services/java/com/android/server/BackupManagerService.java
+++ b/services/java/com/android/server/BackupManagerService.java
@@ -44,6 +44,7 @@
 import android.backup.IBackupManager;
 import android.backup.IRestoreSession;
 import android.backup.BackupManager;
+import android.backup.RestoreSet;
 
 import com.android.internal.backup.AdbTransport;
 import com.android.internal.backup.GoogleTransport;
@@ -617,6 +618,36 @@
         return null;
     }
 
+    // ----- Restore session -----
+
+    class RestoreSession extends IRestoreSession.Stub {
+        private IBackupTransport mRestoreTransport = null;
+        RestoreSet[] mRestoreSets = null;
+
+        RestoreSession(int transportID) {
+            mRestoreTransport = createTransport(transportID);
+        }
+
+        // --- Binder interface ---
+        public RestoreSet[] getAvailableRestoreSets() throws android.os.RemoteException {
+            synchronized(this) {
+                if (mRestoreSets == null) {
+                    mRestoreSets = mRestoreTransport.getAvailableRestoreSets();
+                }
+                return mRestoreSets;
+            }
+        }
+
+        public int performRestore(int token) throws android.os.RemoteException {
+            return -1;
+        }
+
+        public void endRestoreSession() throws android.os.RemoteException {
+            mRestoreTransport.endSession();
+            mRestoreTransport = null;
+        }
+    }
+
 
     @Override
     public void dump(FileDescriptor fd, PrintWriter pw, String[] args) {
diff --git a/telephony/java/com/android/internal/telephony/SMSDispatcher.java b/telephony/java/com/android/internal/telephony/SMSDispatcher.java
index 12808ce..ca03f47 100644
--- a/telephony/java/com/android/internal/telephony/SMSDispatcher.java
+++ b/telephony/java/com/android/internal/telephony/SMSDispatcher.java
@@ -26,6 +26,7 @@
 import android.content.Context;
 import android.content.Intent;
 import android.content.DialogInterface;
+import android.content.IntentFilter;
 import android.content.res.Resources;
 import android.database.Cursor;
 import android.database.SQLException;
@@ -142,6 +143,7 @@
     private static SmsMessage mSmsMessage;
     private static SmsMessageBase mSmsMessageBase;
     private SmsMessageBase.SubmitPduBase mSubmitPduBase;
+    private boolean mStorageAvailable = true;
 
     protected static int getNextConcatenatedRef() {
         sConcatenatedRef += 1;
@@ -229,6 +231,15 @@
 
         // Don't always start message ref at 0.
         sConcatenatedRef = new Random().nextInt(256);
+
+        // Register for device storage intents.  Use these to notify the RIL
+        // that storage for SMS is or is not available.
+        // TODO: Revisit this for a later release.  Storage reporting should
+        // rely more on application indication.
+        IntentFilter filter = new IntentFilter();
+        filter.addAction(Intent.ACTION_DEVICE_STORAGE_LOW);
+        filter.addAction(Intent.ACTION_DEVICE_STORAGE_OK);
+        mContext.registerReceiver(mResultReceiver, filter);
     }
 
     public void dispose() {
@@ -277,7 +288,11 @@
 
             sms = (SmsMessage) ar.result;
             try {
-                dispatchMessage(sms.mWrappedSmsMessage);
+                if (mStorageAvailable) {
+                    dispatchMessage(sms.mWrappedSmsMessage);
+                } else {
+                    acknowledgeLastIncomingSms(false, Intents.RESULT_SMS_OUT_OF_MEMORY, null);
+                }
             } catch (RuntimeException ex) {
                 acknowledgeLastIncomingSms(false, Intents.RESULT_SMS_GENERIC_ERROR, null);
             }
@@ -795,12 +810,23 @@
         private BroadcastReceiver mResultReceiver = new BroadcastReceiver() {
             @Override
             public void onReceive(Context context, Intent intent) {
-                int rc = getResultCode();
-                boolean success = (rc == Activity.RESULT_OK) || (rc == Intents.RESULT_SMS_HANDLED);
+                if (intent.getAction().equals(Intent.ACTION_DEVICE_STORAGE_LOW)) {
+                    mStorageAvailable = false;
+                    mCm.reportSmsMemoryStatus(false, null);
+                } else if (intent.getAction().equals(Intent.ACTION_DEVICE_STORAGE_OK)) {
+                    mStorageAvailable = true;
+                    mCm.reportSmsMemoryStatus(true, null);
+                } else {
+                    // Assume the intent is one of the SMS receive intents that
+                    // was sent as an ordered broadcast.  Check result and ACK.
+                    int rc = getResultCode();
+                    boolean success = (rc == Activity.RESULT_OK)
+                                        || (rc == Intents.RESULT_SMS_HANDLED);
 
-                // For a multi-part message, this only ACKs the last part.
-                // Previous parts were ACK'd as they were received.
-                acknowledgeLastIncomingSms(success, rc, null);
+                    // For a multi-part message, this only ACKs the last part.
+                    // Previous parts were ACK'd as they were received.
+                    acknowledgeLastIncomingSms(success, rc, null);
+                }
             }
 
         };