Merge "Fix a typo in image processing test" into ics-mr1
diff --git a/core/java/android/widget/NumberPicker.java b/core/java/android/widget/NumberPicker.java
index 13375bf..750cbaa 100644
--- a/core/java/android/widget/NumberPicker.java
+++ b/core/java/android/widget/NumberPicker.java
@@ -54,14 +54,14 @@
 
 /**
  * A widget that enables the user to select a number form a predefined range.
- * The widget presents an input filed and up and down buttons for selecting the
- * current value. Pressing/long pressing the up and down buttons increments and
- * decrements the current value respectively. Touching the input filed shows a
- * scroll wheel, tapping on which while shown and not moving allows direct edit
- * of the current value. Sliding motions up or down hide the buttons and the
- * input filed, show the scroll wheel, and rotate the latter. Flinging is
+ * The widget presents an input field and up and down buttons for selecting the
+ * current value. Pressing/long-pressing the up and down buttons increments and
+ * decrements the current value respectively. Touching the input field shows a
+ * scroll wheel, which when touched allows direct edit
+ * of the current value. Sliding gestures up or down hide the buttons and the
+ * input filed, show and rotates the scroll wheel. Flinging is
  * also supported. The widget enables mapping from positions to strings such
- * that instead the position index the corresponding string is displayed.
+ * that, instead of the position index, the corresponding string is displayed.
  * <p>
  * For an example of using this widget, see {@link android.widget.TimePicker}.
  * </p>
diff --git a/core/res/res/values/styles.xml b/core/res/res/values/styles.xml
index 73e1a7c..283c30c 100644
--- a/core/res/res/values/styles.xml
+++ b/core/res/res/values/styles.xml
@@ -112,7 +112,7 @@
     </style>
 
     <!-- Standard animations for a translucent window or activity.  This
-         style is <em>not<em> used by default for the translucent theme
+         style is <em>not</em> used by default for the translucent theme
          (since translucent activities are a special case that have no
          clear UI paradigm), but you can make your own specialized theme
          with this animation style if you would like to have the standard
diff --git a/core/res/res/values/themes.xml b/core/res/res/values/themes.xml
index fe5388b..7046fc5 100644
--- a/core/res/res/values/themes.xml
+++ b/core/res/res/values/themes.xml
@@ -29,15 +29,16 @@
 ===============================================================
  -->
 <resources>
-    <!-- The default system theme. This is the theme used for activities
-         that have not explicitly set their own theme.
-         
+    <!-- The default theme for apps on API level 10 and lower. This is the theme used for
+         activities that have not explicitly set their own theme.
          <p>You can count on this being a dark
          background with light text on top, but should try to make no
          other assumptions about its appearance. In particular, the text
          inside of widgets using this theme may be completely different,
          with the widget container being a light color and the text on top
          of it a dark color.
+         <p>If you're developing for API level 11 and higher, you should instead use {@link
+         #Theme_Holo} or {@link #Theme_DeviceDefault}.</p>
     -->
     <style name="Theme">
 
@@ -370,13 +371,12 @@
         <item name="pointerStyle">@android:style/Pointer</item>
     </style>
 
-    <!-- Variant of the default (dark) theme with no title bar -->
+    <!-- Variant of {@link #Theme} with no title bar -->
     <style name="Theme.NoTitleBar">
         <item name="android:windowNoTitle">true</item>
     </style>
 
-    <!-- Variant of the default (dark) theme that has no title bar and
-         fills the entire screen -->
+    <!-- Variant of {@link #Theme} that has no title bar and no status bar -->
     <style name="Theme.NoTitleBar.Fullscreen">
         <item name="android:windowFullscreen">true</item>
         <item name="android:windowContentOverlay">@null</item>
@@ -385,7 +385,8 @@
     <!-- Theme for a light background with dark text on top.  Set your activity
          to this theme if you would like such an appearance.  As with the
          default theme, you should try to assume little more than that the
-         background will be a light color. -->
+         background will be a light color.
+         <p>This is designed for API level 10 and lower.</p>-->
     <style name="Theme.Light">
         <item name="windowBackground">@android:drawable/screen_background_selector_light</item>
         <item name="colorBackground">@android:color/background_light</item>
@@ -457,19 +458,19 @@
         <item name="detailsElementBackground">@android:drawable/panel_bg_holo_light</item>
     </style>
 
-    <!-- Variant of the light theme with no title bar -->
+    <!-- Variant of {@link #Theme_Light} with no title bar -->
     <style name="Theme.Light.NoTitleBar">
         <item name="android:windowNoTitle">true</item>
     </style>
 
-    <!-- Variant of the light theme that has no title bar and
-         fills the entire screen -->
+    <!-- Variant of {@link #Theme_Light} that has no title bar and
+         no status bar -->
     <style name="Theme.Light.NoTitleBar.Fullscreen">
         <item name="android:windowFullscreen">true</item>
         <item name="android:windowContentOverlay">@null</item>
     </style>
     
-    <!-- Special variation on the default theme that ensures the background is
+    <!-- Variant on {@link #Theme} that ensures the background is
          completely black.  This is useful for things like image viewers and
          media players.   If you want the normal (dark background) theme
          do <em>not</em> use this, use {@link #Theme}. -->
@@ -478,40 +479,40 @@
         <item name="android:colorBackground">@android:color/black</item>
     </style>
     
-    <!-- Variant of the black theme with no title bar -->
+    <!-- Variant of {@link #Theme_Black} with no title bar -->
     <style name="Theme.Black.NoTitleBar">
         <item name="android:windowNoTitle">true</item>
     </style>
 
-    <!-- Variant of the black theme that has no title bar and
-         fills the entire screen -->
+    <!-- Variant of {@link #Theme_Black} that has no title bar and
+         no status bar -->
     <style name="Theme.Black.NoTitleBar.Fullscreen">
         <item name="android:windowFullscreen">true</item>
         <item name="android:windowContentOverlay">@null</item>
     </style>
     
-    <!-- Default theme for windows that want to have the user's selected
-         wallpaper appear behind them.  -->
+    <!-- Theme for windows that want to have the user's selected
+         wallpaper appear behind them (for API level 10 and lower).  -->
     <style name="Theme.Wallpaper">
         <item name="android:windowBackground">@android:color/transparent</item>
         <item name="android:colorBackgroundCacheHint">@null</item>
         <item name="android:windowShowWallpaper">true</item>
     </style>
 
-    <!-- Variant of the translucent theme with no title bar -->
+    <!-- Variant of {@link #Theme_Wallpaper} that has no title bar -->
     <style name="Theme.Wallpaper.NoTitleBar">
         <item name="android:windowNoTitle">true</item>
     </style>
 
-    <!-- Variant of the translucent theme that has no title bar and
-         fills the entire screen -->
+    <!-- Variant of {@link #Theme_Wallpaper} that
+         has no title bar or status bar. -->
     <style name="Theme.Wallpaper.NoTitleBar.Fullscreen">
         <item name="android:windowFullscreen">true</item>
         <item name="android:windowContentOverlay">@null</item>
     </style>
 
-    <!-- Theme for a wallpaper's setting activity that is designed to be on
-         top of a dark background. -->
+    <!-- Theme for a wallpaper's setting activity, which is designed to be a transparent
+         background with a dark shade, so the previous Activity is visible in the background. -->
     <style name="Theme.WallpaperSettings">
         <item name="android:windowBackground">@android:drawable/screen_background_dark_transparent</item>
         <item name="android:colorBackgroundCacheHint">@null</item>
@@ -519,8 +520,8 @@
         <item name="android:windowAnimationStyle">@android:style/Animation.Translucent</item>
     </style>
 
-    <!-- Theme for a wallpaper's setting activity that is designed to be on
-         top of a light background. -->
+    <!-- Theme for a wallpaper's setting activity, which is designed to be a transparent
+         background with a light shade, so the previous Activity is visible in the background. -->
     <style name="Theme.Light.WallpaperSettings">
         <item name="android:windowBackground">@android:drawable/screen_background_light_transparent</item>
         <item name="android:colorBackgroundCacheHint">@null</item>
@@ -538,8 +539,8 @@
     <style name="PreviewWallpaperSettings">
     </style>
     
-    <!-- Default theme for translucent activities, that is windows that allow you
-         to see through them to the windows behind.  This sets up the translucent
+    <!-- Theme for translucent activities (on API level 10 and lower). That is, windows
+         that allow you to see through them to the windows behind.  This sets up the translucent
          flag and appropriate animations for your windows.  -->
     <style name="Theme.Translucent">
         <item name="android:windowBackground">@android:color/transparent</item>
@@ -551,14 +552,14 @@
         <item name="android:windowAnimationStyle">@android:style/Animation</item>
     </style>
 
-    <!-- Variant of the translucent theme with no title bar -->
+    <!-- Variant of {@link #Theme_Translucent} with no title bar -->
     <style name="Theme.Translucent.NoTitleBar">
         <item name="android:windowNoTitle">true</item>
         <item name="android:windowContentOverlay">@null</item>
     </style>
 
-    <!-- Variant of the translucent theme that has no title bar and
-         fills the entire screen -->
+    <!-- Variant of {@link #Theme_Translucent} that has no title bar and
+         no status bar -->
     <style name="Theme.Translucent.NoTitleBar.Fullscreen">
         <item name="android:windowFullscreen">true</item>
     </style>
@@ -574,7 +575,8 @@
         <item name="android:windowNoDisplay">true</item>
     </style>
 
-    <!-- Default theme for dialog windows and activities, which is used by the
+    <!-- Default theme for dialog windows and activities (on API level 10 and lower),
+         which is used by the
          {@link android.app.Dialog} class.  This changes the window to be
          floating (not fill the entire screen), and puts a frame around its
          contents.  You can set this theme on an activity if you would like to
@@ -622,7 +624,7 @@
         <item name="listPreferredItemPaddingRight">10dip</item>
     </style>
 
-    <!-- Variation of Theme.Dialog that does not include a frame (or background).
+    <!-- Variant of {@link Theme_Dialog} that does not include a frame (or background).
          The view hierarchy of the dialog is responsible for drawing all of
          its pixels. -->
     <style name="Theme.Dialog.NoFrame">
@@ -636,7 +638,7 @@
         <item name="android:windowCloseOnTouchOutside">false</item>
     </style>
 
-    <!-- Default theme for alert dialog windows, which is used by the
+    <!-- Default theme for alert dialog windows (on API level 10 and lower), which is used by the
          {@link android.app.AlertDialog} class.  This is basically a dialog
          but sets the background to empty so it can do two-tone backgrounds. -->
     <style name="Theme.Dialog.Alert">
@@ -648,8 +650,8 @@
         <item name="textAppearanceListItemSmall">@android:style/TextAppearance.Large.Inverse</item>
     </style>
     
-    <!-- Default dark theme for panel windows.  This removes all extraneous
-         window decorations, so you basically have an empty rectangle in which
+    <!-- Default dark theme for panel windows (on API level 10 and lower).  This removes all
+         extraneous window decorations, so you basically have an empty rectangle in which
          to place your content.  It makes the window floating, with a transparent
          background, and turns off dimming behind the window. -->
     <style name="Theme.Panel">
@@ -664,8 +666,8 @@
         <item name="android:windowNoTitle">true</item>
     </style>
 
-    <!-- Default light theme for panel windows.  This removes all extraneous
-         window decorations, so you basically have an empty rectangle in which
+    <!-- Default light theme for panel windows (on API level 10 and lower).  This removes all
+         extraneous window decorations, so you basically have an empty rectangle in which
          to place your content.  It makes the window floating, with a transparent
          background, and turns off dimming behind the window. -->
     <style name="Theme.Light.Panel">
@@ -712,7 +714,7 @@
         <item name="android:windowNoTitle">true</item>
     </style>
 
-    <!-- Default theme for input methods, which is used by the
+    <!-- Default theme for input methods (on API level 10 and lower), which is used by the
          {@link android.inputmethodservice.InputMethodService} class.
          this inherits from Theme.Panel, but sets up IME appropriate animations
          and a few custom attributes. -->
@@ -723,7 +725,7 @@
         <item name="android:imeExtractExitAnimation">@android:anim/input_method_extract_exit</item>
     </style>
 
-    <!-- Default theme for modern holo style input methods, which is used by the
+    <!-- Default theme for holo style input methods, which is used by the
          {@link android.inputmethodservice.InputMethodService} class.
          this inherits from Theme.Panel, but sets up IME appropriate animations
          and a few custom attributes. -->
@@ -842,14 +844,23 @@
         <item name="android:windowActionModeOverlay">true</item>
     </style>
     
-    <!-- New Honeycomb holographic theme. Dark version.  The widgets in the
-         holographic theme are translucent on their brackground, so applications
-         must ensure that any background they use with this theme is itself
-         dark; otherwise, it will be difficult to see the widgets.  The new
-         UI style also includes a full action bar by default.
+    <!-- Honeycomb holographic theme (dark version).
+         <p>This is the default system theme for apps that target API level 11 - 13. Starting
+         with API level 14, the default system theme is supplied by {@link #Theme_DeviceDefault},
+         which might apply a different style on different devices. If you want to ensure that your
+         app consistenly uses the Holo theme at all times, you must explicitly declare it in your
+         manifest. For example, {@code &lt;application android:theme="@android:style/Theme.Holo"&gt;}.
+         For more information, read <a
+         href="http://android-developers.blogspot.com/2012/01/holo-everywhere.html">Holo
+         Everywhere</a>.</p>
+         <p>The widgets in the holographic theme are translucent on their brackground, so
+         applications must ensure that any background they use with this theme is itself
+         dark; otherwise, it will be difficult to see the widgets. This UI style also includes a
+         full action bar by default.</p>
 
-         Styles used by the Holo theme are named using the convention Type.Holo.Etc.
-         (For example, Widget.Holo.Button, TextAppearance.Holo.Widget.PopupMenu.Large.)
+         <p>Styles used by the Holo theme are named using the convention Type.Holo.Etc
+         (for example, {@code Widget.Holo.Button} and {@code
+         TextAppearance.Holo.Widget.PopupMenu.Large}).
          Specific resources used by Holo are named using the convention @type/foo_bar_baz_holo
          with trailing _dark or _light specifiers if they are not shared between both light and
          dark versions of the theme. -->
@@ -951,15 +962,12 @@
         <item name="listDividerAlertDialog">@android:drawable/list_divider_holo_dark</item>
 
         <item name="expandableListPreferredItemPaddingLeft">40dip</item>
-        <item name="expandableListPreferredChildPaddingLeft">
-                ?android:attr/expandableListPreferredItemPaddingLeft</item>
+        <item name="expandableListPreferredChildPaddingLeft">?android:attr/expandableListPreferredItemPaddingLeft</item>
 
         <item name="expandableListPreferredItemIndicatorLeft">3dip</item>
         <item name="expandableListPreferredItemIndicatorRight">0dip</item>
-        <item name="expandableListPreferredChildIndicatorLeft">
-                ?android:attr/expandableListPreferredItemIndicatorLeft</item>
-        <item name="expandableListPreferredChildIndicatorRight">
-                ?android:attr/expandableListPreferredItemIndicatorRight</item>
+        <item name="expandableListPreferredChildIndicatorLeft">?android:attr/expandableListPreferredItemIndicatorLeft</item>
+        <item name="expandableListPreferredChildIndicatorRight">?android:attr/expandableListPreferredItemIndicatorRight</item>
 
         <!-- Gallery attributes -->
         <item name="galleryItemBackground">@android:drawable/gallery_item_background</item>
@@ -1156,10 +1164,10 @@
 
     </style>
 
-    <!-- New Honeycomb holographic theme. Light version.  The widgets in the
+    <!-- Honeycomb holographic theme (light version).  The widgets in the
          holographic theme are translucent on their brackground, so applications
          must ensure that any background they use with this theme is itself
-         light; otherwise, it will be difficult to see the widgets.  The new
+         light; otherwise, it will be difficult to see the widgets.  This
          UI style also includes a full action bar by default. -->
     <style name="Theme.Holo.Light" parent="Theme.Light">
         <item name="colorForeground">@android:color/bright_foreground_holo_light</item>
@@ -1257,15 +1265,12 @@
         <item name="activatedBackgroundIndicator">@android:drawable/activated_background_holo_light</item>
 
         <item name="expandableListPreferredItemPaddingLeft">40dip</item>
-        <item name="expandableListPreferredChildPaddingLeft">
-                ?android:attr/expandableListPreferredItemPaddingLeft</item>
+        <item name="expandableListPreferredChildPaddingLeft">?android:attr/expandableListPreferredItemPaddingLeft</item>
 
         <item name="expandableListPreferredItemIndicatorLeft">3dip</item>
         <item name="expandableListPreferredItemIndicatorRight">0dip</item>
-        <item name="expandableListPreferredChildIndicatorLeft">
-                ?android:attr/expandableListPreferredItemIndicatorLeft</item>
-        <item name="expandableListPreferredChildIndicatorRight">
-                ?android:attr/expandableListPreferredItemIndicatorRight</item>
+        <item name="expandableListPreferredChildIndicatorLeft">?android:attr/expandableListPreferredItemIndicatorLeft</item>
+        <item name="expandableListPreferredChildIndicatorRight">?android:attr/expandableListPreferredItemIndicatorRight</item>
 
         <item name="listDividerAlertDialog">@android:drawable/list_divider_holo_light</item>
 
@@ -1522,6 +1527,7 @@
     </style>
  
     <!-- Dialog themes for Holo -->
+    <eat-comment />
 
     <!-- Holo theme for dialog windows and activities, which is used by the
          {@link android.app.Dialog} class.  This changes the window to be
@@ -1554,27 +1560,27 @@
         <item name="listPreferredItemPaddingRight">16dip</item>
     </style>
 
-    <!-- Variation of Theme.Holo.Dialog that has a nice minumum width for
+    <!-- Variant of Theme.Holo.Dialog that has a nice minimum width for
          a regular dialog. -->
     <style name="Theme.Holo.Dialog.MinWidth">
         <item name="android:windowMinWidthMajor">@android:dimen/dialog_min_width_major</item>
         <item name="android:windowMinWidthMinor">@android:dimen/dialog_min_width_minor</item>
     </style>
 
-    <!-- Variation of Theme.Holo.Dialog that does not include a title bar. -->
+    <!-- Variant of Theme.Holo.Dialog that does not include a title bar. -->
     <style name="Theme.Holo.Dialog.NoActionBar">
         <item name="android:windowActionBar">false</item>
         <item name="android:windowNoTitle">true</item>
     </style>
 
-    <!-- Variation of Theme.Holo.Dialog.NoActionVar that has a nice minumum width for
+    <!-- Variant of Theme.Holo.Dialog.NoActionBar that has a nice minimum width for
          a regular dialog. -->
     <style name="Theme.Holo.Dialog.NoActionBar.MinWidth">
         <item name="android:windowMinWidthMajor">@android:dimen/dialog_min_width_major</item>
         <item name="android:windowMinWidthMinor">@android:dimen/dialog_min_width_minor</item>
     </style>
 
-    <!-- Variation of Theme.Holo.Dialog that does not include a frame (or background).
+    <!-- Variant of Theme.Holo.Dialog that does not include a frame (or background).
          The view hierarchy of the dialog is responsible for drawing all of
          its pixels. -->
     <style name="Theme.Holo.Dialog.NoFrame">
@@ -1646,20 +1652,20 @@
         <item name="listPreferredItemPaddingRight">16dip</item>
     </style>
 
-    <!-- Variation of Theme.Holo.Light.Dialog that has a nice minumum width for
+    <!-- Variant of Theme.Holo.Light.Dialog that has a nice minimum width for
          a regular dialog. -->
     <style name="Theme.Holo.Light.Dialog.MinWidth">
         <item name="android:windowMinWidthMajor">@android:dimen/dialog_min_width_major</item>
         <item name="android:windowMinWidthMinor">@android:dimen/dialog_min_width_minor</item>
     </style>
 
-    <!-- Variation of Theme.Holo.Light.Dialog that does not include a title bar. -->
+    <!-- Variant of Theme.Holo.Light.Dialog that does not include a title bar. -->
     <style name="Theme.Holo.Light.Dialog.NoActionBar">
         <item name="android:windowActionBar">false</item>
         <item name="android:windowNoTitle">true</item>
     </style>
 
-    <!-- Variation of Theme.Holo.Light.Dialog.NoActionBar that has a nice minumum width for
+    <!-- Variant of Theme.Holo.Light.Dialog.NoActionBar that has a nice minimum width for
          a regular dialog. -->
     <style name="Theme.Holo.Light.Dialog.NoActionBar.MinWidth">
         <item name="android:windowMinWidthMajor">@android:dimen/dialog_min_width_major</item>
@@ -1700,7 +1706,8 @@
         <item name="android:windowShowWallpaper">true</item>
     </style>
 
-    <!-- Variant of the holographic (dark) theme with no title bar -->
+    <!--Default holographic (dark) for windows that want to have the user's selected
+         wallpaper appear behind them and without an action bar. -->
     <style name="Theme.Holo.Wallpaper.NoTitleBar">
         <item name="android:windowNoTitle">true</item>
     </style>
diff --git a/core/res/res/values/themes_device_defaults.xml b/core/res/res/values/themes_device_defaults.xml
index 8135986..abe4aad 100644
--- a/core/res/res/values/themes_device_defaults.xml
+++ b/core/res/res/values/themes_device_defaults.xml
@@ -31,6 +31,24 @@
 ===============================================================
  -->
 <resources>
+
+    <!-- The default theme for apps that target API level 14 and higher.
+         <p>The DeviceDefault themes are aliases for a specific device’s native look and feel. The
+         DeviceDefault theme family and widget style family offer ways for you to target your app
+         to a device’s native theme with all device customizations intact.</p>
+         <p>For example, when you set your app's {@code targetSdkVersion} to 14 or higher, this
+         theme is applied to your application by default. As such, your app might appear with the
+         {@link #Theme_Holo Holo} styles on one device, but with a different set of styles on
+         another device. This is great if you want your app to fit with the device's native look and
+         feel. If, however, you prefer to keep your UI style the same across all devices, you should
+         apply a specific theme such as {@link #Theme_Holo Holo} or one of your own design. For more
+         information, read <a
+         href="http://android-developers.blogspot.com/2012/01/holo-everywhere.html">Holo
+         Everywhere</a>.</p>
+         <p>Styles used by the DeviceDefault theme are named using the convention
+         Type.DeviceDefault.Etc (for example, {@code Widget.DeviceDefault.Button} and
+         {@code TextAppearance.DeviceDefault.Widget.PopupMenu.Large}).</p>
+          -->
     <style name="Theme.DeviceDefault" parent="Theme.Holo" >
         <!-- Text styles -->
         <item name="textAppearance">@android:style/TextAppearance.DeviceDefault</item>
@@ -176,12 +194,16 @@
         <!-- DatePicker style -->
         <item name="datePickerStyle">@style/Widget.DeviceDefault.DatePicker</item>
     </style>
+
+    <!-- Variant of {@link #Theme_DeviceDefault} with no action bar -->
     <style name="Theme.DeviceDefault.NoActionBar" parent="Theme.Holo.NoActionBar" >
 
     </style>
+    <!-- Variant of {@link #Theme_DeviceDefault} with no action bar and no status bar -->
     <style name="Theme.DeviceDefault.NoActionBar.Fullscreen" parent="Theme.Holo.NoActionBar.Fullscreen" >
 
     </style>
+    <!-- Variant of {@link #Theme_DeviceDefault} with a light-colored style -->
     <style name="Theme.DeviceDefault.Light" parent="Theme.Holo.Light" >
         <!-- Text styles -->
         <item name="textAppearance">@android:style/TextAppearance.DeviceDefault.Light</item>
@@ -322,12 +344,17 @@
         <!-- DatePicker style -->
         <item name="datePickerStyle">@style/Widget.DeviceDefault.Light.DatePicker</item>
     </style>
+    <!-- Variant of {@link #Theme_DeviceDefault_Light} with no action bar -->
     <style name="Theme.DeviceDefault.Light.NoActionBar" parent="Theme.Holo.Light.NoActionBar" >
 
     </style>
+    <!-- Variant of {@link #Theme_DeviceDefault_Light} with no action bar and no status bar -->
     <style name="Theme.DeviceDefault.Light.NoActionBar.Fullscreen" parent="Theme.Holo.Light.NoActionBar.Fullscreen" >
 
     </style>
+    <!-- DeviceDefault theme for dialog windows and activities. This changes the window to be
+    floating (not fill the entire screen), and puts a frame around its contents. You can set this
+    theme on an activity if you would like to make an activity that looks like a Dialog. -->
     <style name="Theme.DeviceDefault.Dialog" parent="Theme.Holo.Dialog" >
         <item name="android:windowTitleStyle">@android:style/DialogWindowTitle.DeviceDefault</item>
         <item name="android:windowAnimationStyle">@android:style/Animation.DeviceDefault.Dialog</item>
@@ -338,15 +365,23 @@
         <item name="textAppearance">@android:style/TextAppearance.DeviceDefault</item>
         <item name="textAppearanceInverse">@android:style/TextAppearance.DeviceDefault.Inverse</item>
     </style>
+    <!-- Variant of {@link #Theme_DeviceDefault_Dialog} that has a nice minimum width for a
+    regular dialog. -->
     <style name="Theme.DeviceDefault.Dialog.MinWidth" parent="Theme.Holo.Dialog.MinWidth" >
 
     </style>
+    <!-- Variant of {@link #Theme_DeviceDefault_Dialog} without an action bar -->
     <style name="Theme.DeviceDefault.Dialog.NoActionBar" parent="Theme.Holo.Dialog.NoActionBar" >
 
     </style>
+    <!-- Variant of {@link #Theme_DeviceDefault_Dialog_NoActionBar} that has a nice minimum width
+    for a regular dialog. -->
     <style name="Theme.DeviceDefault.Dialog.NoActionBar.MinWidth" parent="Theme.Holo.Dialog.NoActionBar.MinWidth" >
 
     </style>
+    <!-- DeviceDefault light theme for dialog windows and activities. This changes the window to be
+    floating (not fill the entire screen), and puts a frame around its contents. You can set this
+    theme on an activity if you would like to make an activity that looks like a Dialog.-->
     <style name="Theme.DeviceDefault.Light.Dialog" parent="Theme.Holo.Light.Dialog" >
         <item name="android:windowTitleStyle">@android:style/DialogWindowTitle.DeviceDefault.Light</item>
         <item name="android:windowAnimationStyle">@android:style/Animation.DeviceDefault.Dialog</item>
@@ -357,42 +392,71 @@
         <item name="textAppearance">@android:style/TextAppearance.DeviceDefault.Light</item>
         <item name="textAppearanceInverse">@android:style/TextAppearance.DeviceDefault.Light.Inverse</item>
     </style>
+    <!-- Variant of {@link #Theme_DeviceDefault_Light_Dialog} that has a nice minimum width for a
+    regular dialog. -->
     <style name="Theme.DeviceDefault.Light.Dialog.MinWidth" parent="Theme.Holo.Light.Dialog.MinWidth" >
 
     </style>
+     <!-- Variant of {@link #Theme_DeviceDefault_Light_Dialog} without an action bar -->
     <style name="Theme.DeviceDefault.Light.Dialog.NoActionBar" parent="Theme.Holo.Light.Dialog.NoActionBar" >
 
     </style>
+    <!-- Variant of {@link #Theme_DeviceDefault_Light_Dialog_NoActionBar} that has a nice minimum
+    width for a regular dialog. -->
     <style name="Theme.DeviceDefault.Light.Dialog.NoActionBar.MinWidth" parent="Theme.Holo.Light.Dialog.NoActionBar.MinWidth" >
 
     </style>
+    <!-- DeviceDefault theme for a window that will be displayed either full-screen on smaller
+    screens (small, normal) or as a dialog on larger screens (large, xlarge). -->
     <style name="Theme.DeviceDefault.DialogWhenLarge" parent="Theme.Holo.DialogWhenLarge" >
 
     </style>
+    <!-- DeviceDefault theme for a window without an action bar that will be displayed either
+    full-screen on smaller screens (small, normal) or as a dialog on larger screens (large,
+    xlarge). -->
     <style name="Theme.DeviceDefault.DialogWhenLarge.NoActionBar" parent="Theme.Holo.DialogWhenLarge.NoActionBar" >
 
     </style>
+    <!-- DeviceDefault light theme for a window that will be displayed either full-screen on smaller
+    screens (small, normal) or as a dialog on larger screens (large, xlarge). -->
     <style name="Theme.DeviceDefault.Light.DialogWhenLarge" parent="Theme.Holo.Light.DialogWhenLarge" >
 
     </style>
+    <!-- DeviceDefault light theme for a window without an action bar that will be displayed either
+    full-screen on smaller screens (small, normal) or as a dialog on larger screens (large,
+    xlarge). -->
     <style name="Theme.DeviceDefault.Light.DialogWhenLarge.NoActionBar" parent="Theme.Holo.Light.DialogWhenLarge.NoActionBar" >
 
     </style>
+    <!-- DeviceDefault theme for panel windows. This removes all extraneous window
+    decorations, so you basically have an empty rectangle in which to place your content. It makes
+    the window floating, with a transparent background, and turns off dimming behind the window. -->
     <style name="Theme.DeviceDefault.Panel" parent="Theme.Holo.Panel" >
 
     </style>
+    <!-- DeviceDefault light theme for panel windows. This removes all extraneous window
+    decorations, so you basically have an empty rectangle in which to place your content. It makes
+    the window floating, with a transparent background, and turns off dimming behind the window. -->
     <style name="Theme.DeviceDefault.Light.Panel" parent="Theme.Holo.Light.Panel" >
 
     </style>
+    <!-- DeviceDefault theme for windows that want to have the user's selected wallpaper appear
+    behind them. -->
     <style name="Theme.DeviceDefault.Wallpaper" parent="Theme.Holo.Wallpaper" >
 
     </style>
+    <!-- DeviceDefault theme for windows that want to have the user's selected wallpaper appear
+    behind them and without an action bar. -->
     <style name="Theme.DeviceDefault.Wallpaper.NoTitleBar" parent="Theme.Holo.Wallpaper.NoTitleBar" >
 
     </style>
+    <!-- DeviceDefault style for input methods, which is used by the
+         {@link android.inputmethodservice.InputMethodService} class.-->
     <style name="Theme.DeviceDefault.InputMethod" parent="Theme.Holo.InputMethod" >
 
     </style>
+    <!-- Variant of the DeviceDefault (light) theme that has a solid (opaque) action bar with an
+    inverse color profile. -->
     <style name="Theme.DeviceDefault.Light.DarkActionBar" parent="Theme.Holo.Light.DarkActionBar" >
         <item name="android:actionBarStyle">@android:style/Widget.DeviceDefault.Light.ActionBar.Solid.Inverse</item>
 
diff --git a/docs/html/design/get-started/ui-overview.html b/docs/html/design/get-started/ui-overview.html
index b08c743..bd5ff9c 100644
--- a/docs/html/design/get-started/ui-overview.html
+++ b/docs/html/design/get-started/ui-overview.html
@@ -153,12 +153,12 @@
   </div>
 </div>
 
-<h2>UI Bars</h2>
+<h2>System Bars</h2>
 
-<p>The UI bars are screen areas dedicated to the display of notifications, communication of device
-status, and device navigation. Typically the UI bars are displayed concurrently with your app. Apps
-that display immersive content, such as movies or images, can temporarily hide the UI bars to allow
-the user to enjoy full screen content without distraction.</p>
+<p>The system bars are screen areas dedicated to the display of notifications, communication of device
+status, and device navigation. Typically the system bars are displayed concurrently with your app.
+Apps that display immersive content, such as movies or images, can temporarily hide the system bars
+to allow the user to enjoy full screen content without distraction.</p>
 
 <img src="../static/content/ui_overview_system_ui.png">
 
@@ -177,8 +177,9 @@
   Recents, and also displays a menu for apps written for Android 2.3 or earlier.</p>
 </li>
 <li>
-<h4>System Bar</h4>
-<p>Combines the status and navigation bars for display on tablet form factors.</p>
+<h4>Combined Bar</h4>
+<p>On tablet form factors the status and navigation bars are combined into a single bar at the
+  bottom of the screen.</p>
 </li>
 </ol>
 
diff --git a/docs/html/design/patterns/actionbar.html b/docs/html/design/patterns/actionbar.html
index 99ae2d7..911c549 100644
--- a/docs/html/design/patterns/actionbar.html
+++ b/docs/html/design/patterns/actionbar.html
@@ -133,7 +133,7 @@
 you wish.
 Important: If the app is currently not displaying the top-level screen, be sure to display the Up
 caret to the left of the app icon, so the user can navigate up the hierarchy. For more discussion of
-Up navigation, see the "Navigation" pattern.
+Up navigation, see the <a href="../patterns/navigation.html">Navigation</a> pattern.
 
 <div class="figure">
   <img src="../static/content/action_bar_pattern_up_app_icon.png">
@@ -369,6 +369,22 @@
 <p>If either F, I, or T apply, then it's appropriate for the action bar. Otherwise, it belongs in the
 action overflow.</p>
 
+<p>
+
+Pre-defined glyphs should be used for certain common actions such as "refresh" and "share." The
+download link below provides a package with icons that are scaled for various screen densities and
+are suitable for use with the Holo Light and Holo Dark themes. The package also includes unstyled
+icons that you can modify to match your theme, in addition to Adobe&reg; Illustrator&reg; source
+files for further customization.
+
+</p>
+<p>
+
+<a href="../static/download/action_bar_icons-v4.0.zip">Download the Action Bar Icon
+Pack</a>
+
+</p>
+
 <div class="layout-content-row">
   <div class="layout-content-col span-6">
 
diff --git a/docs/html/design/patterns/app-structure.html b/docs/html/design/patterns/app-structure.html
index b87f402..fb9205b 100644
--- a/docs/html/design/patterns/app-structure.html
+++ b/docs/html/design/patterns/app-structure.html
@@ -159,9 +159,9 @@
 
     <img src="../static/content/app_structure_market.png">
     <div class="figure-caption">
-      Market's start screen primarily allows navigation into the stores for Apps, Music, Books, and
-      Games. It is also enriched with tailored recommendations and promotions that surface content
-      of interest to the user. Search is readily available from the action bar.
+      Market's start screen primarily allows navigation into the stores for Apps, Music, Books,
+      Movies and Games. It is also enriched with tailored recommendations and promotions that
+      surface content of interest to the user. Search is readily available from the action bar.
     </div>
 
   </div>
diff --git a/docs/html/design/patterns/navigation.html b/docs/html/design/patterns/navigation.html
index aabfc39..cad3682 100644
--- a/docs/html/design/patterns/navigation.html
+++ b/docs/html/design/patterns/navigation.html
@@ -131,7 +131,7 @@
 <p>The Back key also supports a few behaviors not directly tied to screen-to-screen navigation:</p>
 <ul>
 <li>Back dismisses floating windows (dialogs, popups)</li>
-<li>Back dismisses contextual action bars, and remove highlight from selected items</li>
+<li>Back dismisses contextual action bars, and removes the highlight from the selected items</li>
 <li>Back hides the onscreen keyboard (IME)</li>
 </ul>
 <h2>Navigation Within Your App</h2>
@@ -189,18 +189,19 @@
 <h4>App-to-app navigation</h4>
 <p>When navigating deep into your app's hierarchy directly from another app via an intent, Back will
 return to the referring app.</p>
-<p>The Up button is handled is follows:
+<p>The Up button is handled as follows:
 - If the destination screen is typically reached from one particular screen within your app, Up
   should navigate to that screen.
 - Otherwise, Up should navigate to the topmost ("Home") screen of your app.</p>
-<p>For example, after choosing to share a book being view in Market, the user navigates directly to the
-Gmail's compose screen. From there, Up returns to the Inbox (which happens to be both the typical
-referrer to compose, as well as the topmost screen of the app), while Back returns to Market.</p>
+<p>For example, after choosing to share a book being viewed in Market, the user navigates directly to
+Gmail's compose screen. From there, Up returns to the Inbox (which happens to be both the
+typical referrer to compose, as well as the topmost screen of the app), while Back returns to
+Market.</p>
 
 <img src="../static/content/navigation_from_outside_up.png">
 
 <h4>System-to-app navigation</h4>
-<p>If the your app was reached via the system mechanisms of notifications or home screen widgets, Up
+<p>If your app was reached via the system mechanisms of notifications or home screen widgets, Up
 behaves as described for app-to-app navigation, above.</p>
 <p>For the Back key, you should make navigation more predictably by inserting into the task's back
 stack the complete upward navigation path to the app's topmost screen. This way, a user who has
diff --git a/docs/html/design/patterns/notifications.html b/docs/html/design/patterns/notifications.html
index acec306..c5045aed 100644
--- a/docs/html/design/patterns/notifications.html
+++ b/docs/html/design/patterns/notifications.html
@@ -200,7 +200,7 @@
 the user is taken to a hierarchy level below your app's top-level, insert navigation into your app's
 back stack to allow them to navigate to your app's top level using the system back key. For more
 information, see the chapter on <em>System-to-app navigation</em> in the
-<a href="../patterns/notifications.html">Navigation</a> design pattern.</p>
+<a href="../patterns/navigation.html">Navigation</a> design pattern.</p>
 <h4>Timestamps for time sensitive events</h4>
 <p>By default, standard Android notifications include a timestamp in the upper right corner. Consider
 whether the timestamp is valuable in the context of your notification. If the timestamp is not
diff --git a/docs/html/design/static/download/action_bar_icons-v4.0.zip b/docs/html/design/static/download/action_bar_icons-v4.0.zip
new file mode 100644
index 0000000..4568894
--- /dev/null
+++ b/docs/html/design/static/download/action_bar_icons-v4.0.zip
Binary files differ
diff --git a/docs/html/design/style/iconography.html b/docs/html/design/style/iconography.html
index 663770b..5d5d200 100644
--- a/docs/html/design/style/iconography.html
+++ b/docs/html/design/style/iconography.html
@@ -193,10 +193,28 @@
 
 <h2 id="actionbar">Action Bar</h2>
 
-<p>Action bar icons are graphic buttons that represent the most important actions people can take
-within your app. Each one should employ a simple metaphor representing a single concept that most
-people can grasp at a glance.</p>
+<p>
 
+Action bar icons are graphic buttons that represent the most important actions people can take
+within your app. Each one should employ a simple metaphor representing a single concept that most
+people can grasp at a glance.
+
+</p>
+<p>
+
+Pre-defined glyphs should be used for certain common actions such as "refresh" and "share." The
+download link below provides a package with icons that are scaled for various screen densities and
+are suitable for use with the Holo Light and Holo Dark themes. The package also includes unstyled
+icons that you can modify to match your theme, in addition to Adobe&reg; Illustrator&reg; source
+files for further customization.
+
+</p>
+<p>
+
+<a href="../static/download/action_bar_icons-v4.0.zip">Download the Action Bar Icon
+Pack</a>
+
+</p>
 
 <div class="layout-content-row">
   <div class="layout-content-col span-4">
diff --git a/docs/html/guide/appendix/market-filters.jd b/docs/html/guide/appendix/market-filters.jd
index 07b9370..d9b2155 100644
--- a/docs/html/guide/appendix/market-filters.jd
+++ b/docs/html/guide/appendix/market-filters.jd
@@ -165,10 +165,10 @@
 
     <p><strong>Example 1</strong><br />
     The manifest declares <code>&lt;uses-sdk android:minSdkVersion="3"&gt;</code>
-    and does not does not include a <code>&lt;supports-screens&gt;</code> element.
-    <strong>Result</strong>: Android Market will not show the app to a user of a
-    small-screen device, but will show it to users of normal and large-screen
-    devices,  users, unless  other filters apply. </p>
+    and does not include a <code>&lt;supports-screens&gt;</code> element.
+    <strong>Result</strong>: Android Market does not show the app to a user of a
+    small-screen device, but does show it to users of normal and large-screen
+    devices, unless  other filters also exclude those devices. </p>
     <p><strong>Example 2<br />
     </strong>The manifest declares <code>&lt;uses-sdk android:minSdkVersion="3"
     android:targetSdkVersion="4"&gt;</code> and does not include a
diff --git a/docs/html/guide/developing/device.jd b/docs/html/guide/developing/device.jd
index c4d08ed..e46d07c 100644
--- a/docs/html/guide/developing/device.jd
+++ b/docs/html/guide/developing/device.jd
@@ -154,6 +154,14 @@
     <td><code>0489</code></td>
   </tr>
   <tr>
+    <td>Fujitsu</td>
+    <td><code>04C5</code></td>
+  </tr>
+  <tr>
+    <td>Fujitsu Toshiba</td>
+    <td><code>04C5</code></td>
+  </tr>
+  <tr>
     <td>Garmin-Asus</td>
     <td><code>091E</code></td>
   </tr>
diff --git a/docs/html/guide/guide_toc.cs b/docs/html/guide/guide_toc.cs
index ee4c48e..6c01d44 100644
--- a/docs/html/guide/guide_toc.cs
+++ b/docs/html/guide/guide_toc.cs
@@ -8,15 +8,16 @@
 <ul>
 
   <li>
-    <h2><span class="en">Android Basics</span>
-        <span class="de" style="display:none">Einführung in Android</span>
-        <span class="es" style="display:none">Información básica sobre Android</span>
-        <span class="fr" style="display:none">Présentation d'Android</span>
-        <span class="it" style="display:none">Nozioni di base su Android</span>
-        <span class="ja" style="display:none">Android の基本</span>
-        <span class="zh-CN" style="display:none">Android 基础知识</span>
-        <span class="zh-TW" style="display:none">Android 簡介</span>
-    </h2>
+    <span class="heading">
+      <span class="en">Android Basics</span>
+      <span class="de" style="display:none">Einführung in Android</span>
+      <span class="es" style="display:none">Información básica sobre Android</span>
+      <span class="fr" style="display:none">Présentation d'Android</span>
+      <span class="it" style="display:none">Nozioni di base su Android</span>
+      <span class="ja" style="display:none">Android の基本</span>
+      <span class="zh-CN" style="display:none">Android 基础知识</span>
+      <span class="zh-TW" style="display:none">Android 簡介</span>
+    </span>
     <ul>
       <li><a href="<?cs var:toroot ?>guide/basics/what-is-android.html">
         <span class="en">What Is Android?</span>
@@ -46,7 +47,7 @@
   </li>
 
   <li>
-    <h2>
+    <span class="heading">
       <span class="en">Framework Topics</span>
       <span class="de" style="display:none">Framework-Themen</span>
       <span class="es" style="display:none">Temas sobre el framework</span>
@@ -55,7 +56,7 @@
       <span class="ja" style="display:none">フレームワーク トピック</span>
       <span class="zh-CN" style="display:none">框架主题</span>
       <span class="zh-TW" style="display:none">架構主題</span>
-    </h2>
+    </span>
     <ul>
       <li class="toggle-list">
         <div><a href="<?cs var:toroot ?>guide/topics/fundamentals/activities.html">
@@ -87,10 +88,24 @@
             <span class="en">Content Providers</span>
           </a></div>
           <ul>
-            <li><a href="<?cs var:toroot ?>guide/topics/providers/calendar-provider.html">
-                  <span class="en">Calendar Provider</span></a>
-                  <span class="new">new!</span>
-                </li>
+            <li>
+                <a href="<?cs var:toroot ?>guide/topics/providers/content-provider-basics.html">
+                    <span class="en">Content Provider Basics</span>
+                </a>
+                <span class="new">new!</span>
+            </li>
+            <li>
+                <a href="<?cs var:toroot ?>guide/topics/providers/content-provider-creating.html">
+                    <span class="en">Creating a Content Provider</span>
+                </a>
+                <span class="new">new!</span>
+            </li>
+            <li>
+                <a href="<?cs var:toroot ?>guide/topics/providers/calendar-provider.html">
+                    <span class="en">Calendar Provider</span>
+                </a>
+                <span class="new">new!</span>
+            </li>
           </ul>
       </li>
       <li><a href="<?cs var:toroot ?>guide/topics/intents/intents-filters.html">
@@ -429,9 +444,9 @@
   </li>
 
   <li>
-    <h2>
+    <span class="heading">
       <span class="en">Android Market Topics</span>
-    </h2>
+    </span>
     <ul>
       <li><a href="<?cs var:toroot ?>guide/publishing/publishing.html">
           <span class="en">Publishing on Android Market</span>
@@ -475,15 +490,16 @@
 
 
   <li>
-    <h2><span class="en">Developing</span>
-               <span class="de" style="display:none">Entwicklung</span>
-               <span class="es" style="display:none">Desarrollo</span>
-               <span class="fr" style="display:none">Développement</span>
-               <span class="it" style="display:none">Sviluppo</span>
-               <span class="ja" style="display:none">開発</span>
-               <span class="zh-CN" style="display:none">开发</span>
-               <span class="zh-TW" style="display:none">開發</span>
-    </h2>
+    <span class="heading">
+      <span class="en">Developing</span>
+      <span class="de" style="display:none">Entwicklung</span>
+      <span class="es" style="display:none">Desarrollo</span>
+      <span class="fr" style="display:none">Développement</span>
+      <span class="it" style="display:none">Sviluppo</span>
+      <span class="ja" style="display:none">開発</span>
+      <span class="zh-CN" style="display:none">开发</span>
+      <span class="zh-TW" style="display:none">開發</span>
+    </span>
     <ul>
   <!--<li><a href="">Developing for Android</a></li>
       signing, upgrading, selecting a package name, select device profile, touch, trackball, dpad available, etc. -->
@@ -669,15 +685,16 @@
   </li>
 
   <li>
-    <h2><span class="en">Publishing</span>
-        <span class="de" style="display:none">Veröffentlichung</span>
-        <span class="es" style="display:none">Publicación</span>
-        <span class="fr" style="display:none">Publication</span>
-        <span class="it" style="display:none">Pubblicazione</span>
-        <span class="ja" style="display:none">公開</span>
-        <span class="zh-CN" style="display:none">发布</span>
-        <span class="zh-TW" style="display:none">發佈</span>
-    </h2>
+    <span class="heading">
+      <span class="en">Publishing</span>
+      <span class="de" style="display:none">Veröffentlichung</span>
+      <span class="es" style="display:none">Publicación</span>
+      <span class="fr" style="display:none">Publication</span>
+      <span class="it" style="display:none">Pubblicazione</span>
+      <span class="ja" style="display:none">公開</span>
+      <span class="zh-CN" style="display:none">发布</span>
+      <span class="zh-TW" style="display:none">發佈</span>
+    </span>
     <ul>
       <li><a href="<?cs var:toroot ?>guide/publishing/publishing_overview.html">
             <span class="en">Publishing Overview</span>
@@ -719,15 +736,16 @@
   </li>
 
   <li>
-    <h2><span class="en">Best Practices</span>
-               <span class="de" style="display:none">Bewährte Verfahren</span>
-               <span class="es" style="display:none">Prácticas recomendadas</span>
-               <span class="fr" style="display:none">Meilleures pratiques</span>
-               <span class="it" style="display:none">Best practice</span>
-               <span class="ja" style="display:none">ベスト プラクティス</span>
-               <span class="zh-CN" style="display:none">最佳实践</span>
-               <span class="zh-TW" style="display:none">最佳實務</span>
-    </h2>
+    <span class="heading">
+      <span class="en">Best Practices</span>
+      <span class="de" style="display:none">Bewährte Verfahren</span>
+      <span class="es" style="display:none">Prácticas recomendadas</span>
+      <span class="fr" style="display:none">Meilleures pratiques</span>
+      <span class="it" style="display:none">Best practice</span>
+      <span class="ja" style="display:none">ベスト プラクティス</span>
+      <span class="zh-CN" style="display:none">最佳实践</span>
+      <span class="zh-TW" style="display:none">最佳實務</span>
+    </span>
     <ul>
       <li><a href="<?cs var:toroot ?>guide/practices/compatibility.html">
             <span class="en">Compatibility</span>
@@ -823,8 +841,9 @@
   </li>
 
   <li>
-    <h2><span class="en">Web Applications</span>
-    </h2>
+    <span class="heading">
+      <span class="en">Web Applications</span>
+    </span>
     <ul>
       <li><a href="<?cs var:toroot ?>guide/webapps/index.html">
             <span class="en">Web Apps Overview</span>
@@ -845,15 +864,16 @@
   </li>
 
   <li>
-    <h2><span class="en">Appendix</span>
-               <span class="de" style="display:none">Anhang</span>
-               <span class="es" style="display:none">Apéndice</span>
-               <span class="fr" style="display:none">Annexes</span>
-               <span class="it" style="display:none">Appendice</span>
-               <span class="ja" style="display:none">付録</span>
-               <span class="zh-CN" style="display:none">附录</span>
-               <span class="zh-TW" style="display:none">附錄</span>
-    </h2>
+    <span class="heading">
+      <span class="en">Appendix</span>
+      <span class="de" style="display:none">Anhang</span>
+      <span class="es" style="display:none">Apéndice</span>
+      <span class="fr" style="display:none">Annexes</span>
+      <span class="it" style="display:none">Appendice</span>
+      <span class="ja" style="display:none">付録</span>
+      <span class="zh-CN" style="display:none">附录</span>
+      <span class="zh-TW" style="display:none">附錄</span>
+    </span>
     <ul>
       <li><a href="<?cs var:toroot ?>guide/appendix/api-levels.html">
             <span class="en">Android API Levels</span>
diff --git a/docs/html/guide/practices/ui_guidelines/icon_design.jd b/docs/html/guide/practices/ui_guidelines/icon_design.jd
index 96aecf5..1c66185 100644
--- a/docs/html/guide/practices/ui_guidelines/icon_design.jd
+++ b/docs/html/guide/practices/ui_guidelines/icon_design.jd
@@ -42,8 +42,6 @@
 Templates Pack, v2.3 &raquo;</a></li>
 <li><a href="{@docRoot}shareables/icon_templates-v2.0.zip">Android Icon
 Templates Pack, v2.0 &raquo;</a></li>
-<li><a href="{@docRoot}shareables/icon_templates-v1.0.zip">Android Icon
-Templates Pack, v1.0 &raquo;</a></li>
 </ol>
 
 <h2>See also</h2>
diff --git a/docs/html/guide/publishing/preparing.jd b/docs/html/guide/publishing/preparing.jd
index 4d3bffa..83aa5ee 100644
--- a/docs/html/guide/publishing/preparing.jd
+++ b/docs/html/guide/publishing/preparing.jd
@@ -117,6 +117,9 @@
 certificate requirements, see <a href="{@docRoot}guide/publishing/app-signing.html#cert">Obtain a
 suitable private key</a>.</p>
 
+<p class="caution"><strong>Important:</strong> Your application must be signed with a cryptographic
+key whose validity period ends after 22 October 2033.</p>
+
 <p>You may also have to obtain other release keys if your application accesses a service or uses a
 third-party library that requires you to use a key that is based on your private key. For example,
 if your application uses the <a
diff --git a/docs/html/guide/publishing/publishing.jd b/docs/html/guide/publishing/publishing.jd
index fa677e6..49b34d8 100644
--- a/docs/html/guide/publishing/publishing.jd
+++ b/docs/html/guide/publishing/publishing.jd
@@ -7,9 +7,9 @@
 <h2>Quickview</h2>
 
 <ul>
-<li>You can publish your application using a hosted service such as Android Market or through a web server.</li>
-<li>Before you publish, make sure you have prepared your application properly.</li>
-<li>Android Market makes it easy for users of Android-powered devices to see and download your application.</li>
+<li>Learn how to publish and update apps on Android Market.</li>
+<li>Find out how to create links to apps that are published on Android Market.</li>
+<li>Learn about Android Market features.</li>
 </ul>
 
 
@@ -17,97 +17,201 @@
 
 <ol>
 <li><a href="#overview">About Android Market</a>
+<li><A href="#marketpublish">Publishing Apps on Android Market</a></li>
 <li><a href="#marketupgrade">Publishing Updates on Android Market</a></li>
 <li><a href="#marketLicensing">Using Android Market Licensing Service</a></li>
+<li><a href="#marketinappbilling">Using Android Market In-app Billing</a></li>
 <li><a href="#marketintent">Linking to Your Apps on Android Market</a>
   <ol>
     <li><a href="#OpeningDetails">Opening an app's details page</a></li>
     <li><a href="#PerformingSearch">Performing a search</a></li>
     <li><a href="#BuildaButton">Build an Android Market button</a></li>
     <li><a href="#UriSummary">Summary of URI formats</a></li>
-  </ol>  
+  </ol>
 </li>
 </ol>
 
 <h2>See also</h2>
 
 <ol>
-<li><a href="{@docRoot}guide/publishing/licensing.html">Application Licensing</a></li>
-<li><a href="{@docRoot}guide/publishing/preparing.html">Preparing to Publish</a></li>
+<li><a href="{@docRoot}guide/publishing/publishing_overview.html">Publishing Overview</a></li>
+<li><a href="{@docRoot}guide/publishing/preparing.html">Preparing for Release</a></li>
 </ol>
 
 <div id="qv-extra">
   <img id="rule" src="{@docRoot}assets/images/grad-rule-qv.png">
   <div id="qv-sub-rule">
     <img src="{@docRoot}assets/images/icon_market.jpg" style="float:left;margin:0;padding:0 5px;">
-    <h2 style="color:#669999;">Interested in publishing your app on Android Market?</h2>
-    <p><a href="http://market.android.com/publish">Go to Android Market</a> to
-create a developer account and upload your application. For more information about the
-required assets, listing details, and options, see <a
-href="http://market.android.com/support/bin/answer.py?answer=113469">Uploading
-applications</a>.</p>
+    <h2 style="color:#669999;">Already know about Android Market and want to get started?</h2>
+    <p>Go to <a href="http://market.android.com/publish">Android Market</a>, create a developer
+account, and upload your application. For more information about required assets, listing details,
+and publishing options, see <a
+href="http://market.android.com/support/bin/answer.py?answer=113469">Upload
+Applications</a>.</p>
   </div>
 </div>
 
 </div>
 </div>
 
-<p>If you've followed the steps outlined in <a
-href="{@docRoot}guide/publishing/preparing.html">Preparing to Publish</a>, the result of the process
-is a compiled {@code .apk} file that is signed with your private release key. Your application is
-now ready to be published publicly so users can install it.</p>
+<p>One of the most effective ways to get your application into users' hands is to
+publish it on an application marketplace like Android Market. Publishing on Android Market is a
+straightforward process that you can do in just a few simple steps&mdash;register, configure,
+upload, and publish. Registration takes only a few minutes and needs to be done only once.
+The configuration and publishing steps can all be done through the Android Market Developer Console
+after you register as an Android Market developer.</p>
 
-<p>You can publish your application and allow users to install it any way you choose, including
-from your own web server. This document provides information about publishing your Android
-application with Android Market.</p>
+<p>To start publishing on Android Market, first read this topic and then go to the <a
+href="https://market.android.com/publish/signup">Android Market publisher site</a> and register as
+an Android Market developer.</p>
 
 
 <h2 id="overview">About Android Market</h2>
 
-<p>Android Market is a service that makes it easy for users to find and download Android
-applications to their Android-powered devices, either from the Android Market application on their
-device or from the Android Market web site (<a
-href="http://market.android.com">market.android.com</a>). As a developer, you can use Android Market
-to distribute your applications to users on all types of Android-powered devices, all around the
-world.</p>
+<p>Android Market is a robust publishing platform that helps you publicize, sell, and distribute
+your Android applications to users around the world. When you release your applications through
+Android Market you have access to a suite of developer tools that let you analyze your sales,
+identify market trends, and control who your applications are being distributed to. You also have
+access to several revenue-enhancing features, such as <a
+href="{@docRoot}guide/market/billing/index.html">in-app billing</a> and
+<a href="{@docRoot}guide/publishing/licensing.html">application licensing</a>.</p>
 
-<p>To publish your application on Android Market, you first need to register
-with the service using a Google account and agree to the terms of service.
-Once you are registered, you can upload your application to the service whenever
-you want, update it as many times as you want, and then publish it when you are ready.
-Once published, users can see your application, download it, and rate it. </p>
+<p>Before you can publish applications on Android Market, you need to <a
+href="http://market.android.com/publish">register</a> as an Android Market developer. During the
+registration process you will need to create a developer profile, pay a registration fee, and agree
+to the <a href="http://www.android.com/us/developer-distribution-agreement.html">Android Market
+Developer Distribution Agreement</a>. After you register you can access the Android Market Developer
+Console, where you can upload applications, configure publishing options, and monitor publishing
+data. If you want to sell your applications or use the in-app billing feature, you will also need
+to set up a Google Checkout merchant account. For more information about the registration process,
+see <a href="https://support.google.com/androidmarket/developer/bin/answer.py?hl=en&answer=113468">
+Developer Registration</a>.</p>
 
-<p>To register as an Android Market developer and get started with publishing,
-visit the Android Market publisher site: </p>
+<h2 id="marketpublish">Publishing Apps on Android Market</h2>
 
-<p style="margin-left:3em;"><a
-href="http://market.android.com/publish">http://market.android.com/publish</a>
+<p>Publishing your application on Android Market is a simple process that involves three basic
+tasks (see figure 1):</p>
+
+<ul>
+  <li>Creating various graphical assets that
+accompany your app on Android Market.</li>
+  <li>Using the Android Market <a
+href="http://market.android.com/publish">Developer Console</a> to configure publishing options,
+specify listing details, and upload your app and graphical assets to Android Market.</li>
+  <li>Reviewing your publishing settings and changing the release
+status of your app from Unpublished to Published.</li>
+</ul>
+
+<img src="{@docRoot}images/publishing/publishing_android_market.png"
+     alt="Shows the three steps that are required to publish on Android Market"
+     height="168"
+     id="figure1" />
+<p class="img-caption">
+  <strong>Figure 1.</strong> To publish apps on Android Market you must first <a
+href="{@docRoot}guide/publishing/preparing.html">prepare your app for release</a> and then perform
+three simple tasks.
 </p>
 
-<p>If you plan to publish your application on Android Market, you must make sure
-that it meets the requirements listed below, which are enforced by the Market
-server when you upload the application.</p>
+<p class="caution"><strong>Important:</strong> You must <a
+href="{@docRoot}guide/publishing/preparing.html">prepare your application for release</a> before you
+can publish it on Android Market. When you prepare your application for release you configure it for
+release and build it in release mode. Building in release mode signs your application's {@code .apk}
+file with your private release key. You cannot publish an application on Android Market unless it is
+signed with your own private release key.</p>
 
-<div class="special">
-<p>Requirements enforced by the Android Market server:</p>
-<ol>
-<li>Your application must be signed with a cryptographic private key whose
-validity period ends after <span style="color:red">22 October 2033</span>. </li>
-<li>Your application must define both an <code>android:versionCode</code> and an
-<code>android:versionName</code> attribute in the
+<h3>Preparing promotional materials</h3>
+
+<p>To fully leverage the marketing and publicity capabilities of Android Market, you need to create
+several graphical assets that accompany your app on Android Market, such as screenshots, videos,
+promotional graphics, and promotional text. At a minimum you must provide two screenshots of your
+application and a high resolution application icon. The screenshots are displayed on the details
+page for your application in Android Market, and the high resolution application icon is displayed
+in various locations throughout Android Market. The high resolution icon does not replace the
+launcher icon for your application, rather, it serves as a supplemental icon and should look
+the same as your launcher icon. Promotional video,
+graphics, and text are optional, although we strongly recommended that you prepare these for your
+app. For more information about the graphic assets that accompany your application, see <a
+href="http://support.google.com/androidmarket/developer/bin/answer.py?hl=en&answer=1078870">Graphic
+Assets for your Application</a>.</p>
+
+<h3>Configuring options and uploading assets</h3>
+
+<p>Android Market lets you target your application to a worldwide pool of users and devices. To
+reach these users you can use the Android Market Developer Console to configure various publishing
+options and listing details for your app. For example, you can choose the <a
+href="http://support.google.com/androidmarket/developer/bin/answer.py?hl=en&answer=138294&topic=
+2365624&ctx=topic">countries</a> you want to reach, the listing languages you want to use, and the
 <a
-href="{@docRoot}guide/topics/manifest/manifest-element.html"><code>&lt;manifest&gt;</code></a>
-element of its manifest file. The server uses the <code>android:versionCode</code> as
-the basis for identifying the application internally and handling updates, and
-it displays the <code>android:versionName</code> to users as the application's
-version.</li>
-<li>Your application must define both an <code>android:icon</code> and an
-<code>android:label</code> attribute in the <a
-href="{@docRoot}guide/topics/manifest/application-element.html"><code>&lt;application&gt;</code></a>
-element of its manifest file.</li>
-</ol>
-</div>
+href="http://support.google.com/androidmarket/developer/bin/answer.py?hl=en&answer=138412&topic=
+15867&ctx=topic">price</a> you want to charge in each country. You can also configure listing
+details such as the application type, <a
+href="https://support.google.com/androidmarket/developer/bin/answer.py?hl=en&answer=113475&topic=
+2365760&ctx=topic">category</a>, and <a
+href="http://support.google.com/androidmarket/developer/bin/answer.py?hl=en&answer=188189&topic=
+2364761&ctx=topic">content rating</a>. In addition, if you want to sell items within your app using
+the in-app billing feature, you can use the Developer Console to <a
+href="http://grendel.sea.corp.google.com:48014/guide/market/billing/billing_admin.html#billing-list
+- setup">create a product list</a> and control which items are available for purchase in your
+app.</p>
 
+<p>When you are finished setting publishing options and listing details, you can upload your assets
+and your application to Android Market. You can also upload your application as a draft
+(unpublished) application, which lets you do final testing before you publish it for final
+release.</p>
+
+<p>To learn more about Android Market publishing settings, see the following resources:</p>
+
+<ul>
+  <li><a
+href="http://support.google.com/androidmarket/developer/bin/answer.py?hl=en&answer=113469&topic=
+236562&ctx=topic">Upload Applications</a>&mdash;provides a summary of the publishing settings
+you can configure for an app.</li>
+  <li><a
+href="http://support.google.com/androidmarket/developer/bin/topic.py?hl=en&topic=15867">Selling
+Your Apps</a>&mdash;provides guidance about pricing, supported currencies, tax rates, and many
+other topics related to selling apps.</li>
+  <li><a
+href="https://support.google.com/androidmarket/developer/bin/answer.py?hl=en&answer=1169947&topic=
+15867&ctx=topic">Selling Apps in Multiple Currencies</a>&mdash;provides a description of how
+pricing, payouts, and exchange rates work.</li>
+</ul>
+
+<h3>Publishing your application</h3>
+
+<p>When you are satisfied that your publishing settings are correctly configured and your uploaded
+application is ready to be released to the public, you can simply click <strong>Publish</strong> in
+the Developer Console to make your app available for download
+around the world. Keep in mind, it can take several hours for your app to appear on Android
+Market after you click <strong>Publish</strong> in the Developer Console.</p>
+
+<h3>Controlling Distribution to Devices</h3>
+
+<p>If your application targets different device configurations, you can control which Android-powered
+devices have access to your application on Android Market by
+using Android Market filters. Filtering compares device configurations that you declare in your
+app's manifest file to the configuration defined by a device. For example, if you declare the camera
+filter in your manifest, only those devices that have a camera will see your app on Android
+Market. Filters must be configured in your application's manifest file when you are <a
+href="{@docRoot}guide/publishing/preparing.html">preparing your app for release</a> (that is, before
+you upload your app to Android Market). For more information, see <a
+href="{@docRoot}guide/appendix/market-filters.html">Market Filters</a>.</p>
+
+<p>You can also use the multiple APK feature to distribute different {@code .apk} files under the same
+application listing and the same package name; however, you should use this option only as a last
+resort. Android applications usually run on most compatible devices with a single APK, by supplying
+alternative resources for different configurations (for example, different layouts for different screen
+sizes) and the Android system selects the appropriate resources for the device at runtime. In a
+few cases, however, a single APK is unable to support all device configurations, because alternative
+resources make the APK file too big (greater than 50MB) or other technical challenges prevent a
+single APK from working on all devices. Although we encourage you to develop and publish a single
+APK that supports as many device configurations as possible, doing so is sometimes
+not possible. To help you publish your application for as many devices as possible, Android Market
+allows you to publish multiple APKs under the same application listing. Android Market then supplies
+each APK to the appropriate devices based on configuration support you've declared in the manifest
+file of each APK. To use this feature, you need to build your separate {@code .apk} files when you are <a
+href="{@docRoot}guide/publishing/preparing.html">preparing your app for release</a> (that is, before
+you upload your app to Android Market). For more information, see <a
+href="{@docRoot}guide/market/publishing/multiple-apks.html">Multiple APK Support</a>.</p>
 
 <h2 id="marketupgrade">Publishing Updates on Android Market</h2>
 
@@ -128,6 +232,9 @@
 consider it a new application, publish it as such, and will not offer it to existing users as an
 update.</p>
 
+<p>If you plan to publish your application on Android Market, you must make sure
+  that it meets the requirements listed below, which are enforced by the Market
+  server when you upload the application.</p>
 
 <h2 id="marketLicensing">Using Android Market Licensing Service</h2>
 
@@ -136,7 +243,7 @@
 Android Market Licensing, your applications can query Android Market at runtime
 to obtain the licensing status for the current user, then allow or disallow
 further use of the application as appropriate. Using the service, you can apply a flexible
-licensing policy on an application-by-application basis&mdash;each 
+licensing policy on an application-by-application basis&mdash;each
 application can enforce its licensing status in the way most appropriate
 for it. </p>
 
@@ -149,7 +256,31 @@
 use it in your application, read <a
 href="{@docRoot}guide/publishing/licensing.html">Application Licensing</a>.</p>
 
+<h2 id="marketinappbilling">Using Android Market In-app Billing</h2>
 
+<p><a href="{@docRoot}guide/market/billing/billing_overview.html">Android Market In-app Billing</a>
+is an Android Market service that lets you sell digital content in your applications. You can use
+the service to sell a wide range of content, including downloadable  content such as media files or
+photos, and virtual content such as game levels or potions.</p>
+
+<p>When you use Android Market's in-app billing service to sell an item, Android Market handles all
+billing details so your application never has to directly process any financial transactions.
+Android Market uses the same checkout service that is used for application purchases, so your users
+experience a consistent and familiar purchase flow (see figure 1). Also, the transaction fee for
+in-app purchases is the same as the transaction fee for application purchases (30%).</p>
+
+<p>Any application that you publish through Android Market can implement in-app billing. No special
+account or registration is required other than an Android Market publisher account and a Google
+Checkout Merchant account. Also, because the service uses no dedicated framework APIs, you can add
+in-app billing to any application that uses a minimum API level of 4 or higher.</p>
+
+<p>To help you integrate in-app billing into your application, the Android SDK provides a <a
+href="{@docRoot}guide/market/billing/billing_integrate.html#billing-download">sample application</a>
+that demonstrates a simple implementation of in-app billing. The sample application contains
+examples of billing-related classes you can use to implement in-app billing in your application. It
+also contains examples of the database, user interface, and business logic you might use to
+implement in-app billing. For more information about the in-app billing feature, see the
+<a href="{@docRoot}guide/market/billing/index.html">In-app Billing documentation</a>.</p>
 
 <h2 id="marketintent">Linking to Your Apps on Android Market</h2>
 
@@ -337,7 +468,7 @@
 Guidelines</a>.</p>
 
 <style type="text/css">
-  
+
 form.button-form {
   margin-top:2em;
 }
@@ -539,7 +670,7 @@
 
 <tr>
 <td>Display the details screen for a specific application</td>
-<td><code>http://market.android.com/details?id=&lt;package_name&gt;</code> 
+<td><code>http://market.android.com/details?id=&lt;package_name&gt;</code>
 <td><code>market://details?id=&lt;package_name&gt;</code></td>
 </tr>
 
diff --git a/docs/html/guide/publishing/publishing_overview.jd b/docs/html/guide/publishing/publishing_overview.jd
index e30360b..79199c5 100755
--- a/docs/html/guide/publishing/publishing_overview.jd
+++ b/docs/html/guide/publishing/publishing_overview.jd
@@ -134,7 +134,7 @@
 and features, coupled with numerous end-user community features, makes Android Market the premier
 marketplace for selling and buying Android applications.</p>
 
-<p>Releasing your application on Android Market is a simple process that involves four basic
+<p>Releasing your application on Android Market is a simple process that involves three basic
   steps:</p>
 
 <div class="figure" style="width:275px">
@@ -153,21 +153,16 @@
     create promotional materials for your application, such as screenshots, videos, graphics, and
     promotional text.</p>
   </li>
-  <li>Planning publishing options.
+  <li>Configuring options and uploading assets.
     <p>Android Market lets you target your application to a worldwide pool of users and devices.
-    Using various Android Market tools, you can choose the countries you want to reach, the
-    price you want to charge in each country, and the devices you want to target. You can also
-    use Android Market's filtering settings to target specific device features and capabilities.</p>
-  </li>
-  <li>Configuring publishing options and uploading assets.
-    <p>After you create your promotional materials and determine which publishing options are
-    suitable for your application, you can use the Android Market developer console to configure
-    those options and upload the promotional materials. You can also use the developer console to
-    upload your application as a draft (unpublished) application, which lets you do final
-    testing before you publish it for final release.</p>
+    By configuring various Android Market settings, you can choose the countries you want to
+    reach, the listing languages you want to use, and the price you want to charge in each
+    country. You can also configure listing details such as the application type, category, and
+    content rating. When you are done configuring options you can upload your promotional materials
+    and your application as a draft (unpublished) application.</p>
   </li>
   <li>Publishing the release version of your application.
-    <p>When you are satisfied that your publishing settings are correctly configured and your
+    <p>If you are satisfied that your publishing settings are correctly configured and your
     uploaded application is ready to be released to the public, you can simply click
     <strong>Publish</strong > in the developer console and within minutes your application will be
     live and available for download around the world.</p>
@@ -233,4 +228,4 @@
 <p>Releasing applications through email is convenient if you are sending your application to
 only a few trusted users, but it provides few protections from piracy and unauthorized
 distribution; that is, anyone you send your application to can simply forward it to someone else.
-else.
\ No newline at end of file
+else.
diff --git a/docs/html/guide/topics/providers/content-provider-basics.jd b/docs/html/guide/topics/providers/content-provider-basics.jd
new file mode 100644
index 0000000..40b5c3f
--- /dev/null
+++ b/docs/html/guide/topics/providers/content-provider-basics.jd
@@ -0,0 +1,1215 @@
+page.title=Content Provider Basics
+@jd:body
+<div id="qv-wrapper">
+<div id="qv">
+
+
+                    <!-- In this document -->
+<h2>In this document</h2>
+<ol>
+    <li>
+        <a href="#Basics">Overview</a>
+        <ol>
+            <li>
+                <a href="#ClientProvider">Accessing a provider</a>
+            </li>
+            <li>
+                <a href="#ContentURIs">Content URIs</a>
+            </li>
+        </ol>
+    </li>
+    <li>
+        <a href="#SimpleQuery">Retrieving Data from the Provider</a>
+        <ol>
+            <li>
+                <a href="#RequestPermissions">Requesting read access permission</a>
+            </li>
+            <li>
+                <a href="#Query">Constructing the query</a>
+            </li>
+            <li>
+                <a href="#DisplayResults">Displaying query results</a>
+            </li>
+            <li>
+                <a href="#GettingResults">Getting data from query results</a>
+            </li>
+        </ol>
+    </li>
+    <li>
+        <a href="#Permissions">Content Provider Permissions</a>
+    </li>
+    <li>
+        <a href="#Modifications">Inserting, Updating, and Deleting Data</a>
+        <ol>
+            <li>
+                <a href="#Inserting">Inserting data</a>
+            </li>
+            <li>
+                <a href="#Updating">Updating data</a>
+            </li>
+            <li>
+                <a href="#Deleting">Deleting data</a>
+            </li>
+        </ol>
+    </li>
+    <li>
+        <a href="#DataTypes">Provider Data Types</a>
+    </li>
+    <li>
+        <a href="#AltForms">Alternative Forms of Provider Access</a>
+        <ol>
+            <li>
+                <a href="#Batch">Batch access</a>
+            </li>
+            <li>
+                <a href="#Intents">Data access via intents</a>
+            </li>
+        </ol>
+    </li>
+    <li>
+        <a href="#ContractClasses">Contract Classes</a>
+    </li>
+    <li>
+        <a href="#MIMETypeReference">MIME Type Reference</a>
+    </li>
+</ol>
+
+    <!-- Key Classes -->
+<h2>Key classes</h2>
+    <ol>
+        <li>
+            {@link android.content.ContentProvider}
+        </li>
+        <li>
+            {@link android.content.ContentResolver}
+        </li>
+        <li>
+            {@link android.database.Cursor}
+        </li>
+        <li>
+            {@link android.net.Uri}
+        </li>
+    </ol>
+
+    <!-- Related Samples -->
+<h2>Related Samples</h2>
+    <ol>
+        <li>
+        <a
+        href="{@docRoot}resources/samples/ApiDemos/src/com/example/android/apis/view/List2.html">
+        Cursor (People)</a>
+        </li>
+        <li>
+        <a
+        href="{@docRoot}resources/samples/ApiDemos/src/com/example/android/apis/view/List7.html">
+        Cursor (Phones)</a>
+        </li>
+    </ol>
+
+    <!-- See also -->
+<h2>See also</h2>
+    <ol>
+        <li>
+            <a href="{@docRoot}guide/topics/providers/content-provider-creating.html">
+            Creating a Content Provider</a>
+        </li>
+        <li>
+            <a href="{@docRoot}guide/topics/providers/calendar-provider.html">
+            Calendar Provider</a>
+        </li>
+    </ol>
+</div>
+</div>
+
+    <!-- Intro paragraphs -->
+<p>
+    A content provider manages access to a central repository of data. The provider and
+    is part of an Android application, which often provides its own UI for working with
+    the data. However, content providers are primarily intended to be used by other
+    applications, which access the provider using a provider client object. Together, providers
+    and provider clients offer a consistent, standard interface to data that also handles
+    inter-process communication and secure data access.
+</p>
+<p>
+    This topic describes the basics of the following:
+</p>
+    <ul>
+        <li>How content providers work.</li>
+        <li>The API you use retrieve data from a content provider.</li>
+        <li>The API you use to insert, update, or delete data in a content provider.</li>
+        <li>Other API features that facilitate working with providers.</li>
+    </ul>
+
+    <!-- Basics -->
+<h2 id="Basics">Overview</h2>
+<p>
+    A content provider presents data to external applications as one or more tables that are
+    similar to the tables found in a relational database. A row represents an instance of some type
+    of data the provider collects, and each row in the column represents an individual piece of
+    data collected for an instance.
+</p>
+<p>
+    For example, one of the built-in providers in the Android platform is the user dictionary, which
+    stores the spellings of non-standard words that the user wants to keep. Table 1 illustrates what
+    the data might look like in this provider's table:
+</p>
+<p class="table-caption">
+    <strong>Table 1:</strong> Sample user dictionary table.
+</p>
+<table id="table1" style="width: 50%;">
+    <tr>
+        <th style="width:20%" align="center" scope="col">word</th>
+        <th style="width:20%" align="center" scope="col">app id</th>
+        <th style="width:20%" align="center" scope="col">frequency</th>
+        <th style="width:20%" align="center" scope="col">locale</th>
+        <th style="width:20%" align="center" scope="col">_ID</th>
+    </tr>
+    <tr>
+        <td align="center" scope="row">mapreduce</td>
+        <td align="center">user1</td>
+        <td align="center">100</td>
+        <td align="center">en_US</td>
+        <td align="center">1</td>
+    </tr>
+    <tr>
+        <td align="center" scope="row">precompiler</td>
+        <td align="center">user14</td>
+        <td align="center">200</td>
+        <td align="center">fr_FR</td>
+        <td align="center">2</td>
+    </tr>
+    <tr>
+        <td align="center" scope="row">applet</td>
+        <td align="center">user2</td>
+        <td align="center">225</td>
+        <td align="center">fr_CA</td>
+        <td align="center">3</td>
+    </tr>
+    <tr>
+        <td align="center" scope="row">const</td>
+        <td align="center">user1</td>
+        <td align="center">255</td>
+        <td align="center">pt_BR</td>
+        <td align="center">4</td>
+    </tr>
+    <tr>
+        <td align="center" scope="row">int</td>
+        <td align="center">user5</td>
+        <td align="center">100</td>
+        <td align="center">en_UK</td>
+        <td align="center">5</td>
+    </tr>
+</table>
+<p>
+    In table 1, each row represents an instance of a word that might not be
+    found in a standard dictionary. Each column represents some data for that word, such as the
+    locale in which it was first encountered. The column headers are column names that are stored in
+    the provider. To refer to a row's locale, you refer to its <code>locale</code> column. For
+    this provider, the <code>_ID</code> column serves as a "primary key" column that
+    the provider automatically maintains.
+</p>
+<p class="note">
+    <strong>Note:</strong> A provider isn't required to have a primary key, and it isn't required
+    to use <code>_ID</code> as the column name of a primary key if one is present. However,
+    if you want to bind data from a provider to a {@link android.widget.ListView}, one of the
+    column names has to be <code>_ID</code>. This requirement is explained in more detail in the
+    section <a href="#DisplayResults">Displaying query results</a>.
+</p>
+<h3 id="ClientProvider">Accessing a provider</h3>
+<p>
+    An application accesses the data from a content provider with
+    a {@link android.content.ContentResolver} client object. This object has methods that call
+    identically-named methods in the provider object, an instance of one of the concrete
+    subclasses of {@link android.content.ContentProvider}. The
+    {@link android.content.ContentResolver} methods provide the basic
+    "CRUD" (create, retrieve, update, and delete) functions of persistent storage.
+</p>
+<p>
+    The {@link android.content.ContentResolver} object in the client application's
+    process and the {@link android.content.ContentProvider} object in the application that owns
+    the provider automatically handle inter-process communication.
+    {@link android.content.ContentProvider} also acts as an abstraction layer between its
+    repository of data and the external appearance of data as tables.
+</p>
+<p class="note">
+    <strong>Note:</strong> To access a provider, your application usually has to request specific
+    permissions in its manifest file. This is described in more detail in the section
+    <a href="#Permissions">Content Provider Permissions</a>
+</p>
+<p>
+    For example, to get a list of the words and their locales from the User Dictionary Provider,
+    you call {@link android.content.ContentResolver#query(Uri, String[], String, String[], String)
+    ContentResolver.query()}.
+    The {@link android.content.ContentResolver#query(Uri, String[], String, String[], String)
+    query()} method calls the
+    {@link android.content.ContentProvider#query(Uri, String[], String, String[], String)
+    ContentProvider.query()} method defined by the User Dictionary Provider. The following lines
+    of code show a
+    {@link android.content.ContentResolver#query(Uri, String[], String, String[], String)
+    ContentResolver.query()} call:
+<p>
+<pre>
+// Queries the user dictionary and returns results
+mCursor = getContentResolver().query(
+    UserDictionary.Words.CONTENT_URI,   // The content URI of the words table
+    mProjection,                        // The columns to return for each row
+    mSelectionClause                    // Selection criteria
+    mSelectionArgs,                     // Selection criteria
+    mSortOrder);                        // The sort order for the returned rows
+</pre>
+<p>
+    Table 2 shows how the arguments to
+    {@link android.content.ContentResolver#query(Uri, String[], String, String[], String)
+    query(Uri,projection,selection,selectionArgs,sortOrder)} match an SQL SELECT statement:
+</p>
+<p class="table-caption">
+    <strong>Table 2:</strong> Query() compared to SQL query.
+</p>
+<table id="table2" style="width: 75%;">
+    <tr>
+        <th style="width:25%" align="center" scope="col">query() argument</th>
+        <th style="width:25%" align="center" scope="col">SELECT keyword/parameter</th>
+        <th style="width:50%" align="center" scope="col">Notes</th>
+    </tr>
+    <tr>
+        <td align="center"><code>Uri</code></td>
+        <td align="center"><code>FROM <em>table_name</em></code></td>
+        <td><code>Uri</code> maps to the table in the provider named <em>table_name</em>.</td>
+    </tr>
+    <tr>
+        <td align="center"><code>projection</code></td>
+        <td align="center"><code><em>col,col,col,...</em></code></td>
+        <td>
+            <code>projection</code> is an array of columns that should be included for each row
+            retrieved.
+        </td>
+    </tr>
+    <tr>
+        <td align="center"><code>selection</code></td>
+        <td align="center"><code>WHERE <em>col</em> = <em>value</em></code></td>
+        <td><code>selection</code> specifies the criteria for selecting rows.</td>
+    </tr>
+    <tr>
+        <td align="center"><code>selectionArgs</code></td>
+        <td align="center">
+            (No exact equivalent. Selection arguments replace <code>?</code> placeholders in the
+            selection clause.)
+        </td>
+    </tr>
+    <tr>
+        <td align="center"><code>sortOrder</code></td>
+        <td align="center"><code>ORDER BY <em>col,col,...</em></code></td>
+        <td>
+            <code>sortOrder</code> specifies the order in which rows appear in the returned
+            {@link android.database.Cursor}.
+        </td>
+    </tr>
+</table>
+<h3 id="ContentURIs">Content URIs</h3>
+<p>
+    A <strong>content URI</strong> is a URI that identifies data in a provider. Content URIs
+    include the symbolic name of the entire provider (its <strong>authority</strong>) and a
+    name that points to a table (a <strong>path</strong>). When you call
+    a client method to access a table in a provider, the content URI for the table is one of
+    the arguments.
+</p>
+<p>
+    In the preceding lines of code, the constant
+    {@link android.provider.UserDictionary.Words#CONTENT_URI} contains the content URI of
+    the user dictionary's "words" table. The {@link android.content.ContentResolver}
+    object parses out the URI's authority, and uses it to "resolve" the provider by
+    comparing the authority to a system table of known providers. The
+    {@link android.content.ContentResolver} can then dispatch the query arguments to the correct
+    provider.
+</p>
+<p>
+    The {@link android.content.ContentProvider} uses the path part of the content URI to choose the
+    table to access. A provider usually has a <strong>path</strong> for each table it exposes.
+</p>
+<p>
+    In the previous lines of code, the full URI for the "words" table is:
+</p>
+<pre>
+content://user_dictionary/words
+</pre>
+<p>
+    where the <code>user_dictionary</code> string is the provider's authority, and
+    <code>words</code> string is the table's path. The string
+    <code>content://</code> (the <strong>scheme</strong>) is always present,
+    and identifies this as a content URI.
+</p>
+<p>
+    Many providers allow you to access a single row in a table by appending an ID value
+    to the end of the URI. For example, to retrieve a row whose <code>_ID</code> is
+    <code>4</code> from user dictionary, you can use this content URI:
+</p>
+<pre>
+Uri singleUri = ContentUri.withAppendedId(UserDictionary.Words.CONTENT_URI,4);
+</pre>
+<p>
+    You often use id values when you've retrieved a set of rows and then want to update or delete
+    one of them.
+</p>
+<p class="note">
+    <strong>Note:</strong> The {@link android.net.Uri} and {@link android.net.Uri.Builder} classes
+    contain convenience methods for constructing well-formed Uri objects from strings. The
+    {@link android.content.ContentUris} contains convenience methods for appending id values to
+    a URI. The previous snippet uses {@link android.content.ContentUris#withAppendedId(Uri, long)
+    withAppendedId()} to append an id to the UserDictionary content URI.
+</p>
+
+
+    <!-- Retrieving Data from the Provider -->
+<h2 id="SimpleQuery">Retrieving Data from the Provider</h2>
+<p>
+    This section describes how to retrieve data from a provider, using the User Dictionary Provider
+    as an example.
+</p>
+<p class="note">
+    For the sake of clarity, the code snippets in this section call
+    {@link android.content.ContentResolver#query(Uri, String[], String, String[], String)
+    ContentResolver.query()} on the "UI thread"". In actual code, however, you should
+    do queries asynchronously on a separate thread. One way to do this is to use the
+    {@link android.content.CursorLoader} class, which is described
+    in more detail in the <a href="{@docRoot}guide/topics/fundamentals/loaders.html">
+    Loaders</a> guide. Also, the lines of code are snippets only; they don't show a complete
+    application.
+</p>
+<p>
+    To retrieve data from a provider, follow these basic steps:
+</p>
+<ol>
+   <li>
+        Request the read access permission for the provider.
+   </li>
+   <li>
+        Define the code that sends a query to the provider.
+   </li>
+</ol>
+<h3 id="RequestPermissions">Requesting read access permission</h3>
+<p>
+    To retrieve data from a provider, your application needs "read access permission" for the
+    provider. You can't request this permission at run-time; instead, you have to specify that
+    you need this permission in your manifest, using the
+    <code><a href="{@docRoot}guide/topics/manifest/uses-permission-element.html">
+    &lt;uses-permission&gt;</a></code> element and the exact permission name defined by the
+    provider. When you specify this element in your manifest, you are in effect "requesting" this
+    permission for your application. When users install your application, they implicitly grant
+    this request.
+</p>
+<p>
+    To find the exact name of the read access permission for the provider you're using, as well
+    as the names for other access permissions used by the provider, look in the provider's
+    documentation.
+</p>
+<p>
+    The role of permissions in accessing providers is described in more detail in the section
+    <a href="#Permissions">Content Provider Permissions</a>.
+</p>
+<p>
+    The User Dictionary Provider defines the permission
+    <code>android.permission.READ_USER_DICTIONARY</code> in its manifest file, so an
+    application that wants to read from the provider must request this permission.
+</p>
+<!-- Constructing the query -->
+<h3 id="Query">Constructing the query</h3>
+<p>
+    The next step in retrieving data a provider is to construct a query. This first snippet
+    defines some variables for accessing the User Dictionary Provider:
+</p>
+<pre class="prettyprint">
+
+// A "projection" defines the columns that will be returned for each row
+String[] mProjection =
+{
+    UserDictionary.Words._ID,    // Contract class constant for the _ID column name
+    UserDictionary.Words.WORD,   // Contract class constant for the word column name
+    UserDictionary.Words.LOCALE  // Contract class constant for the locale column name
+};
+
+// Defines a string to contain the selection clause
+String mSelectionClause = null;
+
+// Initializes an array to contain selection arguments
+String[] mSelectionArgs = {""};
+
+</pre>
+<p>
+    The next snippet shows how to use
+    {@link android.content.ContentResolver#query(Uri, String[], String, String[], String)
+    ContentResolver.query()}, using the User Dictionary Provider as an example.
+    A provider client query is similar to an SQL query, and it contains a set of columns to return,
+    a set of selection criteria, and a sort order.
+</p>
+<p>
+    The set of columns that the query should return is called a <strong>projection</strong>
+    (the variable <code>mProjection</code>).
+</p>
+<p>
+    The expression that specifies the rows to retrieve is split into a selection clause and
+    selection arguments. The selection clause is a combination of logical and Boolean expressions,
+    column names, and values (the variable <code>mSelection</code>). If you specify the replaceable
+    parameter <code>?</code> instead of a value, the query method retrieves the value from the
+    selection arguments array (the variable <code>mSelectionArgs</code>).
+</p>
+<p>
+    In the next snippet, if the user doesn't enter a word, the selection clause is set to
+    <code>null</code>, and the query returns all the words in the provider. If the user enters
+    a word, the selection clause is set to <code>UserDictionary.Words.Word + " = ?"</code> and
+    the first element of selection arguments array is set to the word the user enters.
+</p>
+<pre class="prettyprint">
+/*
+ * This defines a one-element String array to contain the selection argument.
+ */
+String[] mSelectionArgs = {""};
+
+// Gets a word from the UI
+mSearchString = mSearchWord.getText().toString();
+
+// Remember to insert code here to check for invalid or malicious input.
+
+// If the word is the empty string, gets everything
+if (TextUtils.isEmpty(mSearchString)) {
+    // Setting the selection clause to null will return all words
+    mSelectionClause = null;
+    mSelectionArgs[0] = "";
+
+} else {
+    // Constructs a selection clause that matches the word that the user entered.
+    mSelectionClause = " = ?";
+
+    // Moves the user's input string to the selection arguments.
+    mSelectionArgs[0] = mSearchString;
+
+}
+
+// Does a query against the table and returns a Cursor object
+mCursor = getContentResolver().query(
+    UserDictionary.Words.CONTENT_URI,  // The content URI of the words table
+    mProjection,                       // The columns to return for each row
+    mSelectionClause                   // Either null, or the word the user entered
+    mSelectionArgs,                    // Either empty, or the string the user entered
+    mSortOrder);                       // The sort order for the returned rows
+
+// Some providers return null if an error occurs, others throw an exception
+if (null == mCursor) {
+    /*
+     * Insert code here to handle the error. Be sure not to use the cursor! You may want to
+     * call android.util.Log.e() to log this error.
+     *
+     */
+// If the Cursor is empty, the provider found no matches
+} else if (mCursor.getCount() &lt; 1) {
+
+    /*
+     * Insert code here to notify the user that the search was unsuccessful. This isn't necessarily
+     * an error. You may want to offer the user the option to insert a new row, or re-type the
+     * search term.
+     */
+
+} else {
+    // Insert code here to do something with the results
+
+}
+</pre>
+<p>
+    This query is analogous to the SQL statement:
+</p>
+<pre>
+SELECT _ID, word, frequency, locale FROM words WHERE word = &lt;userinput&gt; ORDER BY word ASC;
+</pre>
+<p>
+    In this SQL statement, the actual column names are used instead of contract class constants.
+</p>
+<h4 id="Injection">Protecting against malicious input</h4>
+<p>
+    If the data managed by the content provider is in an SQL database, including external untrusted
+    data into raw SQL statements can lead to SQL injection.
+</p>
+<p>
+    Consider this selection clause:
+</p>
+<pre>
+// Constructs a selection clause by concatenating the user's input to the column name
+String mSelectionClause =  "var = " + mUserInput;
+</pre>
+<p>
+    If you do this, you're allowing the user to concatenate malicious SQL onto your SQL statement.
+    For example, the user could enter "nothing; DROP TABLE *;"  for <code>mUserInput</code>, which
+    would result in the selection clause <code>var = nothing; DROP TABLE *;</code>. Since the
+    selection clause is treated as an SQL statement, this might cause the provider to erase all of
+    the tables in the underlying SQLite database (unless the provider is set up to catch
+    <a href="http://en.wikipedia.org/wiki/SQL_injection">SQL injection</a> attempts).
+</p>
+<p>
+    To avoid this problem, use a selection clause that uses <code>?</code> as a replaceable
+    parameter and a separate array of selection arguments. When you do this, the user input
+    is bound directly to the query rather than being interpreted as part of an SQL statement.
+    Because it's not treated as SQL, the user input can't inject malicious SQL. Instead of using
+    concatenation to include the user input, use this selection clause:
+</p>
+<pre>
+// Constructs a selection clause with a replaceable parameter
+String mSelectionClause =  "var = ?";
+</pre>
+<p>
+    Set up the array of selection arguments like this:
+</p>
+<pre>
+// Defines an array to contain the selection arguments
+String[] selectionArgs = {""};
+</pre>
+<p>
+    Put a value in the selection arguments array like this:
+</p>
+<pre>
+// Sets the selection argument to the user's input
+selectionArgs[0] = mUserInput;
+</pre>
+<p>
+    A selection clause that uses <code>?</code> as a replaceable parameter and an array of
+    selection arguments array are preferred way to specify a selection, even the provider isn't
+    based on an SQL database.
+</p>
+<!-- Displaying the results -->
+<h3 id="DisplayResults">Displaying query results</h3>
+<p>
+    The {@link android.content.ContentResolver#query(Uri, String[], String, String[], String)
+    ContentResolver.query()} client method always returns a {@link android.database.Cursor}
+    containing the columns specified by the query's projection for the rows that match the query's
+    selection criteria. A {@link android.database.Cursor} object provides random read access to the
+    rows and columns it contains. Using {@link android.database.Cursor} methods,
+    you can iterate over the rows in the results, determine the data type of each column, get the
+    data out of a column, and examine other properties of the results. Some
+    {@link android.database.Cursor} implementations automatically update the object when the
+    provider's data changes, or trigger methods in an observer object when the
+    {@link android.database.Cursor} changes, or both.
+</p>
+<p class="note">
+    <strong>Note:</strong> A provider may restrict access to columns based on the nature of the
+    object making the query. For example, the Contacts Provider restricts access for some columns to
+    sync adapters, so it won't return them to an activity or service.
+</p>
+<p>
+    If no rows match the selection criteria, the provider
+    returns a {@link android.database.Cursor} object for which
+    {@link android.database.Cursor#getCount() Cursor.getCount()} is 0 (an empty cursor).
+</p>
+<p>
+    If an internal error occurs, the results of the query depend on the particular provider. It may
+    choose to return <code>null</code>, or it may throw an {@link java.lang.Exception}.
+</p>
+<p>
+    Since a {@link android.database.Cursor} is a "list" of rows, a good way to display the
+    contents of a {@link android.database.Cursor} is to link it to a {@link android.widget.ListView}
+    via a {@link android.widget.SimpleCursorAdapter}.
+</p>
+<p>
+    The following snippet continues the code from the previous snippet. It creates a
+    {@link android.widget.SimpleCursorAdapter} object containing the {@link android.database.Cursor}
+    retrieved by the query, and sets this object to be the adapter for a
+    {@link android.widget.ListView}:
+</p>
+<pre class="prettyprint">
+// Defines a list of columns to retrieve from the Cursor and load into an output row
+String[] mWordListColumns =
+{
+    UserDictionary.Words.WORD,   // Contract class constant containing the word column name
+    UserDictionary.Words.LOCALE  // Contract class constant containing the locale column name
+};
+
+// Defines a list of View IDs that will receive the Cursor columns for each row
+int[] mWordListItems = { R.id.dictWord, R.id.locale};
+
+// Creates a new SimpleCursorAdapter
+mCursorAdapter = new SimpleCursorAdapter(
+    getApplicationContext(),               // The application's Context object
+    R.layout.wordlistrow,                  // A layout in XML for one row in the ListView
+    mCursor,                               // The result from the query
+    mWordListColumns,                      // A string array of column names in the cursor
+    mWordListItems,                        // An integer array of view IDs in the row layout
+    0);                                    // Flags (usually none are needed)
+
+// Sets the adapter for the ListView
+mWordList.setAdapter(mCursorAdapter);
+</pre>
+<p class="note">
+    <strong>Note:</strong> To back a {@link android.widget.ListView} with a
+    {@link android.database.Cursor}, the cursor must contain a column named <code>_ID</code>.
+    Because of this, the query shown previously retrieves the <code>_ID</code> column for the
+    "words" table, even though the {@link android.widget.ListView} doesn't display it.
+    This restriction also explains why most providers have a <code>_ID</code> column for each of
+    their tables.
+</p>
+
+        <!-- Getting data from query results -->
+<h3 id="GettingResults">Getting data from query results</h3>
+<p>
+    Rather than simply displaying query results, you can use them for other tasks. For
+    example, you can retrieve spellings from the user dictionary and then look them up in
+    other providers. To do this, you iterate over the rows in the {@link android.database.Cursor}:
+</p>
+<pre class="prettyprint">
+
+// Determine the column index of the column named "word"
+int index = mCursor.getColumnIndex(UserDictionary.Words.WORD);
+
+/*
+ * Only executes if the cursor is valid. The User Dictionary Provider returns null if
+ * an internal error occurs. Other providers may throw an Exception instead of returning null.
+ */
+
+if (mCursor != null) {
+    /*
+     * Moves to the next row in the cursor. Before the first movement in the cursor, the
+     * "row pointer" is -1, and if you try to retrieve data at that position you will get an
+     * exception.
+     */
+    while (mCursor.moveToNext()) {
+
+        // Gets the value from the column.
+        newWord = mCursor.getString(index);
+
+        // Insert code here to process the retrieved word.
+
+        ...
+
+        // end of while loop
+    }
+} else {
+
+    // Insert code here to report an error if the cursor is null or the provider threw an exception.
+}
+</pre>
+<p>
+    {@link android.database.Cursor} implementations contain several "get" methods for
+    retrieving different types of data from the object. For example, the previous snippet
+    uses {@link android.database.Cursor#getString(int) getString()}. They also have a
+    {@link android.database.Cursor#getType(int) getType()} method that returns a value indicating
+    the data type of the column.
+</p>
+
+
+    <!-- Requesting permissions -->
+<h2 id="Permissions">Content Provider Permissions</h2>
+<p>
+    A provider's application can specify permissions that other applications must have in order to
+    access the provider's data. These permissions ensure that the user knows what data
+    an application will try to access. Based on the provider's requirements, other applications
+    request the permissions they need in order to access the provider. End users see the requested
+    permissions when they install the application.
+</p>
+<p>
+    If a provider's application doesn't specify any permissions, then other applications have no
+    access to the provider's data. However, components in the provider's application always have
+    full read and write access, regardless of the specified permissions.
+</p>
+<p>
+    As noted previously, the User Dictionary Provider requires the
+    <code>android.permission.READ_USER_DICTIONARY</code> permission to retrieve data from it.
+    The provider has the separate <code>android.permission.WRITE_USER_DICTIONARY</code>
+    permission for inserting, updating, or deleting data.
+</p>
+<p>
+    To get the permissions needed to access a provider, an application requests them with a
+    <code><a href="{@docRoot}guide/topics/manifest/uses-permission-element.html">
+    &lt;uses-permission&gt;</a></code> element in its manifest file.
+    When the Android Package Manager installs the application, a user must approve all of the
+    permissions the application requests. If the user approves all of them, Package Manager
+    continues the installation; if the user doesn't approve them, Package Manager
+    aborts the installation.
+</p>
+<p>
+    The following
+    <code><a href="{@docRoot}guide/topics/manifest/uses-permission-element.html">
+    &lt;uses-permission&gt;</a></code> element requests read access to the User Dictionary Provider:
+</p>
+<pre>
+    &lt;uses-permission android:name="android.permission.READ_USER_DICTIONARY"&gt;
+</pre>
+<p>
+    The impact of permissions on provider access is explained in more detail in the
+    <a href="{@docRoot}guide/topics/security/security.html">Security and Permissions</a> guide.
+</p>
+
+
+<!-- Inserting, Updating, and Deleting Data -->
+<h2 id="Modifications">Inserting, Updating, and Deleting Data</h2>
+<p>
+    In the same way that you retrieve data from a provider, you also use the interaction between
+    a provider client and the provider's {@link android.content.ContentProvider} to modify data.
+    You call a method of {@link android.content.ContentResolver} with arguments that are passed to
+    the corresponding method of {@link android.content.ContentProvider}. The provider and provider
+    client automatically handle security and inter-process communication.
+</p>
+<h3 id="Inserting">Inserting data</h3>
+<p>
+    To insert data into a provider, you call the
+    {@link android.content.ContentResolver#insert(Uri,ContentValues) ContentResolver.insert()}
+    method. This method inserts a new row into the provider and returns a content URI for that row.
+    This snippet shows how to insert a new word into the User Dictionary Provider:
+</p>
+<pre class="prettyprint">
+// Defines a new Uri object that receives the result of the insertion
+Uri mNewUri;
+
+...
+
+// Defines an object to contain the new values to insert
+ContentValues mNewValues = new ContentValues();
+
+/*
+ * Sets the values of each column and inserts the word. The arguments to the "put"
+ * method are "column name" and "value"
+ */
+mNewValues.put(UserDictionary.Words.APP_ID, "example.user");
+mNewValues.put(UserDictionary.Words.LOCALE, "en_US");
+mNewValues.put(UserDictionary.Words.WORD, "insert");
+mNewValues.put(UserDictionary.Words.FREQUENCY, "100");
+
+mNewUri = getContentResolver().insert(
+    UserDictionary.Word.CONTENT_URI,   // the user dictionary content URI
+    mNewValues                          // the values to insert
+);
+</pre>
+<p>
+    The data for the new row goes into a single {@link android.content.ContentValues} object, which
+    is similar in form to a one-row cursor. The columns in this object don't need to have the
+    same data type, and if you don't want to specify a value at all, you can set a column
+    to <code>null</code> using {@link android.content.ContentValues#putNull(String)
+    ContentValues.putNull()}.
+</p>
+<p>
+    The snippet doesn't add the <code>_ID</code> column, because this column is maintained
+    automatically. The provider assigns a unique value of <code>_ID</code> to every row that is
+    added. Providers usually use this value as the table's primary key.
+</p>
+<p>
+    The content URI returned in <code>newUri</code> identifies the newly-added row, with
+    the following format:
+</p>
+<pre>
+content://user_dictionary/words/&lt;id_value&gt;
+</pre>
+<p>
+    The <code>&lt;id_value&gt;</code> is the contents of <code>_ID</code> for the new row.
+    Most providers can detect this form of content URI automatically and then perform the requested
+    operation on that particular row.
+</p>
+<p>
+    To get the value of <code>_ID</code> from the returned {@link android.net.Uri}, call
+    {@link android.content.ContentUris#parseId(Uri) ContentUris.parseId()}.
+</p>
+<h3 id="Updating">Updating data</h3>
+<p>
+    To update a row, you use a {@link android.content.ContentValues} object with the updated
+    values just as you do with an insertion, and selection criteria just as you do with a query.
+    The client method you use is
+    {@link android.content.ContentResolver#update(Uri, ContentValues, String, String[])
+    ContentResolver.update()}. You only need to add values to the
+    {@link android.content.ContentValues} object for columns you're updating. If you want to clear
+    the contents of a column, set the value to <code>null</code>.
+</p>
+<p>
+    The following snippet changes all the rows whose locale has the language "en" to a
+    have a locale of <code>null</code>. The return value is the number of rows that were updated:
+</p>
+<pre>
+// Defines an object to contain the updated values
+ContentValues mUpdateValues = new ContentValues();
+
+// Defines selection criteria for the rows you want to update
+String mSelectionClause = UserDictionary.Words.LOCALE +  "LIKE ?";
+String[] mSelectionArgs = {"en_%"};
+
+// Defines a variable to contain the number of updated rows
+int mRowsUpdated = 0;
+
+...
+
+/*
+ * Sets the updated value and updates the selected words.
+ */
+mUpdateValues.putNull(UserDictionary.Words.LOCALE);
+
+mRowsUpdated = getContentResolver().update(
+    UserDictionary.Words.CONTENT_URI,   // the user dictionary content URI
+    mUpdateValues                       // the columns to update
+    mSelectionClause                    // the column to select on
+    mSelectionArgs                      // the value to compare to
+);
+</pre>
+<p>
+    You should also sanitize user input when you call
+    {@link android.content.ContentResolver#update(Uri, ContentValues, String, String[])
+    ContentResolver.update()}. To learn more about this, read the section
+    <a href="#Injection">Protecting against malicious input</a>.
+</p>
+<h3 id="Deleting">Deleting data</h3>
+<p>
+    Deleting rows is similar to retrieving row data: you specify selection criteria for the rows
+    you want to delete and the client method returns the number of deleted rows.
+    The following snippet deletes rows whose appid matches "user". The method returns the
+    number of deleted rows.
+</p>
+<pre>
+
+// Defines selection criteria for the rows you want to delete
+String mSelectionClause = UserDictionary.Words.APP_ID + " LIKE ?";
+String[] mSelectionArgs = {"user"};
+
+// Defines a variable to contain the number of rows deleted
+int mRowsDeleted = 0;
+
+...
+
+// Deletes the words that match the selection criteria
+mRowsDeleted = getContentResolver().delete(
+    UserDictionary.Words.CONTENT_URI,   // the user dictionary content URI
+    mSelectionClause                    // the column to select on
+    mSelectionArgs                      // the value to compare to
+);
+</pre>
+<p>
+    You should also sanitize user input when you call
+    {@link android.content.ContentResolver#delete(Uri, String, String[])
+    ContentResolver.delete()}. To learn more about this, read the section
+    <a href="#Injection">Protecting against malicious input</a>.
+</p>
+<!-- Provider Data Types -->
+<h2 id="DataTypes">Provider Data Types</h2>
+<p>
+    Content providers can offer many different data types. The User Dictionary Provider offers only
+    text, but providers can also offer the following formats:
+</p>
+    <ul>
+        <li>
+            integer
+        </li>
+        <li>
+            long integer (long)
+        </li>
+        <li>
+            floating point
+        </li>
+        <li>
+            long floating point (double)
+        </li>
+    </ul>
+<p>
+    Another data type that providers often use is Binary Large OBject (BLOB) implemented as a
+    64KB byte array. You can see the available data types by looking at the
+    {@link android.database.Cursor} class "get" methods.
+</p>
+<p>
+    The data type for each column in a provider is usually listed in its documentation.
+    The data types for the User Dictionary Provider are listed in the reference documentation
+    for its contract class {@link android.provider.UserDictionary.Words} (contract classes are
+    described in the section <a href="#ContractClasses">Contract Classes</a>).
+    You can also determine the data type by calling {@link android.database.Cursor#getType(int)
+    Cursor.getType()}.
+</p>
+<p>
+    Providers also maintain MIME data type information for each content URI they define. You can
+    use the MIME type information to find out if your application can handle data that the
+    provider offers, or to choose a type of handling based on the MIME type. You usually need the
+    MIME type when you are working with a provider that contains complex
+    data structures or files. For example, the {@link android.provider.ContactsContract.Data}
+    table in the Contacts Provider uses MIME types to label the type of contact data stored in each
+    row. To get the MIME type corresponding to a content URI, call
+    {@link android.content.ContentResolver#getType(Uri) ContentResolver.getType()}.
+</p>
+<p>
+    The section <a href="#MIMETypeReference">MIME Type Reference</a> describes the
+    syntax of both standard and custom MIME types.
+</p>
+
+
+<!-- Alternative Forms of Provider Access -->
+<h2 id="AltForms">Alternative Forms of Provider Access</h2>
+<p>
+    Three alternative forms of provider access are important in application development:
+</p>
+<ul>
+    <li>
+        <a href="#Batch">Batch access</a>: You can create a batch of access calls with methods in
+        the {@link android.content.ContentProviderOperation} class, and then apply them with
+        {@link android.content.ContentResolver#applyBatch(String, ArrayList)
+        ContentResolver.applyBatch()}.
+    </li>
+    <li>
+        Asynchronous queries: You should do queries in a separate thread. One way to do this is to
+        use a {@link android.content.CursorLoader} object. The examples in the
+        <a href="{@docRoot}guide/topics/fundamentals/loaders.html">Loaders</a> guide demonstrate
+        how to do this.
+    </li>
+    <li>
+        <a href="#Intents">Data access via intents</a>: Although you can't send an intent
+        directly to a provider, you can send an intent to the provider's application, which is
+        usually the best-equipped to modify the provider's data.
+    </li>
+</ul>
+<p>
+    Batch access and modification via intents are described in the following sections.
+</p>
+<h3 id="Batch">Batch access</h3>
+<p>
+    Batch access to a provider is useful for inserting a large number of rows, or for inserting
+    rows in multiple tables in the same method call, or in general for performing a set of
+    operations across process boundaries as a transaction (an atomic operation).
+</p>
+<p>
+    To access a provider in "batch mode",
+    you create an array of {@link android.content.ContentProviderOperation} objects and then
+    dispatch them to a content provider with
+    {@link android.content.ContentResolver#applyBatch(String, ArrayList)
+    ContentResolver.applyBatch()}. You pass the content provider's <em>authority</em> to this
+    method, rather than a particular content URI, which allows each
+    {@link android.content.ContentProviderOperation} object in the array to work against a
+    different table. A call to {@link android.content.ContentResolver#applyBatch(String, ArrayList)
+    ContentResolver.applyBatch()} returns an array of results.
+</p>
+<p>
+    The description of the {@link android.provider.ContactsContract.RawContacts} contract class
+    includes a code snippet that demonstrates batch insertion. The
+    <a href="{@docRoot}resources/samples/ContactManager/index.html">Contact Manager</a>
+    sample application contains an example of batch access in its <code>ContactAdder.java</code>
+    source file.
+</p>
+<div class="sidebox-wrapper">
+<div class="sidebox">
+<h2>Displaying data using a helper app</h2>
+<p>
+    If your application <em>does</em> have access permissions, you still may want to use an
+    intent to display data in another application. For example, the Calendar application accepts an
+    {@link android.content.Intent#ACTION_VIEW} intent, which displays a particular date or event.
+    This allows you to display calendar information without having to create your own UI.
+    To learn more about this feature, see the
+    <a href="{@docRoot}guide/topics/providers/calendar-provider.html">Calendar Provider</a> guide.
+</p>
+<p>
+    The application to which you send the intent doesn't have to be the application
+    associated with the provider. For example, you can retrieve a contact from the
+    Contact Provider, then send an {@link android.content.Intent#ACTION_VIEW} intent
+    containing the content URI for the contact's image to an image viewer.
+</p>
+</div>
+</div>
+<h3 id="Intents">Data access via intents</h3>
+<p>
+    Intents can provide indirect access to a content provider. You allow the user to access
+    data in a provider even if your application doesn't have access permissions, either by
+    getting a result intent back from an application that has permissions, or by activating an
+    application that has permissions and letting the user do work in it.
+</p>
+<h4>Getting access with temporary permissions</h4>
+<p>
+    You can access data in a content provider, even if you don't have the proper access
+    permissions, by sending an intent to an application that does have the permissions and
+    receiving back a result intent containing "URI" permissions.
+    These are permissions for a specific content URI that last until the activity that receives
+    them is finished. The application that has permanent permissions grants temporary
+    permissions by setting a flag in the result intent:
+</p>
+<ul>
+    <li>
+        <strong>Read permission:</strong>
+        {@link android.content.Intent#FLAG_GRANT_READ_URI_PERMISSION}
+    </li>
+    <li>
+        <strong>Write permission:</strong>
+        {@link android.content.Intent#FLAG_GRANT_WRITE_URI_PERMISSION}
+    </li>
+</ul>
+<p class="note">
+    <strong>Note:</strong> These flags don't give general read or write access to the provider
+    whose authority is contained in the content URI. The access is only for the URI itself.
+</p>
+<p>
+    A provider defines URI permissions for content URIs in its manifest, using the
+    <code><a href="{@docRoot}guide/topics/manifest/provider-element.html#gprmsn">
+    android:grantUriPermission</a></code>
+    attribute of the
+    {@code <a href="guide/topics/manifest/provider-element.html">&lt;provider&gt;</a>}
+    element, as well as the
+    {@code <a href="guide/topics/manifest/grant-uri-permission-element.html">
+    &lt;grant-uri-permission&gt;</a>} child element of the
+    {@code <a href="guide/topics/manifest/provider-element.html">&lt;provider&gt;</a>}
+    element. The URI permissions mechanism is explained in more detail in the
+    <a href="{@docRoot}guide/topics/security/security.html">Security and Permissions</a> guide,
+    in the section "URI Permissions".
+</p>
+<p>
+    For example, you can retrieve data for a contact in the Contacts Provider, even if you don't
+    have the {@link android.Manifest.permission#READ_CONTACTS} permission. You might want to do
+    this in an application that sends e-greetings to a contact on his or her birthday. Instead of
+    requesting {@link android.Manifest.permission#READ_CONTACTS}, which gives you access to all of
+    the user's contacts and all of their information, you prefer to let the user control which
+    contacts are used by your application. To do this, you use the following process:
+</p>
+<ol>
+    <li>
+        Your application sends an intent containing the action
+        {@link android.content.Intent#ACTION_PICK} and the "contacts" MIME type
+        {@link android.provider.ContactsContract.RawContacts#CONTENT_ITEM_TYPE}, using the
+        method {@link android.app.Activity#startActivityForResult(Intent, int)
+        startActivityForResult()}.
+    </li>
+    <li>
+        Because this intent matches the intent filter for the
+        People app's "selection" activity, the activity will come to the foreground.
+    </li>
+    <li>
+        In the selection activity, the user selects a
+        contact to update. When this happens, the selection activity calls
+        {@link android.app.Activity#setResult(int, Intent) setResult(resultcode, intent)}
+        to set up a intent to give back to your application. The intent contains the content URI
+        of the contact the user selected, and the "extras" flags
+        {@link android.content.Intent#FLAG_GRANT_READ_URI_PERMISSION}. These flags grant URI
+        permission to your app to read data for the contact pointed to by the
+        content URI. The selection activity then calls {@link android.app.Activity#finish()} to
+        return control to your application.
+    </li>
+    <li>
+        Your activity returns to the foreground, and the system calls your activity's
+        {@link android.app.Activity#onActivityResult(int, int, Intent) onActivityResult()}
+        method. This method receives the result intent created by the selection activity in
+        the People app.
+    </li>
+    <li>
+        With the content URI from the result intent, you can read the contact's data
+        from the Contacts Provider, even though you didn't request permanent read access permission
+        to the provider in your manifest. You can then get the contact's birthday information
+        or his or her email address and then send the e-greeting.
+    </li>
+</ol>
+<h4>Using another application</h4>
+<p>
+    A simple way to allow the user to modify data to which you don't have access permissions is to
+    activate an application that has permissions and let the user do the work there.
+</p>
+<p>
+    For example, the Calendar application accepts an
+    {@link android.content.Intent#ACTION_INSERT} intent, which allows you to activate the
+    application's insert UI. You can pass "extras" data in this intent, which the application
+    uses to pre-populate the UI. Because recurring events have a complex syntax, the preferred
+    way of inserting events into the Calendar Provider is to activate the Calendar app with an
+    {@link android.content.Intent#ACTION_INSERT} and then let the user insert the event there.
+</p>
+<!-- Contract Classes -->
+<h2 id="ContractClasses">Contract Classes</h2>
+<p>
+    A contract class defines constants that help applications work with the content URIs, column
+    names, intent actions, and other features of a content provider. Contract classes are not
+    included automatically with a provider; the provider's developer has to define them and then
+    make them available to other developers. Many of the providers included with the Android
+    platform have corresponding contract classes in the package {@link android.provider}.
+</p>
+<p>
+    For example, the User Dictionary Provider has a contract class
+    {@link android.provider.UserDictionary} containing content URI and column name constants. The
+    content URI for the "words" table is defined in the constant
+    {@link android.provider.UserDictionary.Words#CONTENT_URI UserDictionary.Words.CONTENT_URI}.
+    The {@link android.provider.UserDictionary.Words} class also contains column name constants,
+    which are used in the example snippets in this guide. For example, a query projection can be
+    defined as:
+</p>
+<pre>
+String[] mProjection =
+{
+    UserDictionary.Words._ID,
+    UserDictionary.Words.WORD,
+    UserDictionary.Words.LOCALE
+};
+</pre>
+<p>
+    Another contract class is {@link android.provider.ContactsContract} for the Contacts Provider.
+    The reference documentation for this class includes example code snippets. One of its
+    subclasses, {@link android.provider.ContactsContract.Intents.Insert}, is a contract
+    class that contains constants for intents and intent data.
+</p>
+
+
+<!-- MIME Type Reference -->
+<h2 id="MIMETypeReference">MIME Type Reference</h2>
+<p>
+    Content providers can return standard MIME media types, or custom MIME type strings, or both.
+</p>
+<p>
+    MIME types have the format
+</p>
+<pre>
+<em>type</em>/<em>subtype</em>
+</pre>
+<p>
+    For example, the well-known MIME type <code>text/html</code> has the <code>text</code> type and
+    the <code>html</code> subtype. If the provider returns this type for a URI, it means that a
+    query using that URI will return text containing HTML tags.
+</p>
+<p>
+    Custom MIME type strings, also called "vendor-specific" MIME types, have more
+    complex <em>type</em> and <em>subtype</em> values. The <em>type</em> value is always
+</p>
+<pre>
+vnd.android.cursor.<strong>dir</strong>
+</pre>
+<p>
+    for multiple rows, or
+</p>
+<pre>
+vnd.android.cursor.<strong>item</strong>
+</pre>
+<p>
+    for a single row.
+</p>
+<p>
+    The <em>subtype</em> is provider-specific. The Android built-in providers usually have a simple
+    subtype. For example, the when the Contacts application creates a row for a telephone number,
+    it sets the following MIME type in the row:
+</p>
+<pre>
+vnd.android.cursor.item/phone_v2
+</pre>
+<p>
+    Notice that the subtype value is simply <code>phone_v2</code>.
+</p>
+<p>
+    Other provider developers may create their own pattern of subtypes based on the provider's
+    authority and table names. For example, consider a provider that contains train timetables.
+    The provider's authority is <code>com.example.trains</code>, and it contains the tables
+    Line1, Line2, and Line3. In response to the content URI
+</p>
+<p>
+<pre>
+content://com.example.trains/Line1
+</pre>
+<p>
+    for table Line1, the provider returns the MIME type
+</p>
+<pre>
+vnd.android.cursor.<strong>dir</strong>/vnd.example.line1
+</pre>
+<p>
+     In response to the content URI
+</p>
+<pre>
+content://com.example.trains/Line2/5
+</pre>
+<p>
+    for row 5 in table Line2, the provider returns the MIME type
+</p>
+<pre>
+vnd.android.cursor.<strong>item</strong>/vnd.example.line2
+</pre>
+<p>
+    Most content providers define contract class constants for the MIME types they use. The
+    Contacts Provider contract class {@link android.provider.ContactsContract.RawContacts},
+    for example, defines the constant
+    {@link android.provider.ContactsContract.RawContacts#CONTENT_ITEM_TYPE} for the MIME type of
+    a single raw contact row.
+</p>
+<p>
+    Content URIs for single rows are described in the section
+    <a href="#ContentURIs">Content URIs</a>.
+</p>
diff --git a/docs/html/guide/topics/providers/content-provider-creating.jd b/docs/html/guide/topics/providers/content-provider-creating.jd
new file mode 100644
index 0000000..4ebdb50
--- /dev/null
+++ b/docs/html/guide/topics/providers/content-provider-creating.jd
@@ -0,0 +1,1215 @@
+page.title=Creating a Content Provider
+@jd:body
+<div id="qv-wrapper">
+<div id="qv">
+
+
+<h2>In this document</h2>
+<ol>
+    <li>
+        <a href="#DataStorage">Designing Data Storage</a>
+    </li>
+    <li>
+        <a href="#ContentURI">Designing Content URIs</a>
+    </li>
+    <li>
+        <a href="#ContentProvider">Implementing the ContentProvider Class</a>
+        <ol>
+            <li>
+                <a href="#RequiredAccess">Required Methods</a>
+            </li>
+            <li>
+                <a href="#Query">Implementing the query() method</a>
+            </li>
+            <li>
+                <a href="#Insert">Implementing the insert() method</a>
+            </li>
+            <li>
+                <a href="#Delete">Implementing the delete() method</a>
+            </li>
+            <li>
+                <a href="#Update">Implementing the update() method</a>
+            </li>
+            <li>
+                <a href="#OnCreate">Implementing the onCreate() method</a>
+            </li>
+        </ol>
+    </li>
+    <li>
+        <a href="#MIMETypes">Implementing Content Provider MIME Types</a>
+        <ol>
+            <li>
+                <a href="#TableMIMETypes">MIME types for tables</a>
+            </li>
+            <li>
+                <a href="#FileMIMETypes">MIME types for files</a>
+            </li>
+        </ol>
+    </li>
+    <li>
+        <a href="#ContractClass">Implementing a Contract Class</a>
+    </li>
+    <li>
+        <a href="#Permissions">Implementing Content Provider Permissions</a>
+    </li>
+    <li>
+        <a href="#ProviderElement">The &lt;provider&gt; Element</a>
+    </li>
+    <li>
+        <a href="#Intents">Intents and Data Access</a>
+    </li>
+</ol>
+<h2>Key classes</h2>
+    <ol>
+        <li>
+            {@link android.content.ContentProvider}
+        </li>
+        <li>
+            {@link android.database.Cursor}
+        </li>
+        <li>
+            {@link android.net.Uri}
+        </li>
+    </ol>
+<h2>Related Samples</h2>
+    <ol>
+        <li>
+            <a
+                href="{@docRoot}resources/samples/NotePad/index.html">
+                Note Pad sample application
+            </a>
+        </li>
+    </ol>
+<h2>See also</h2>
+    <ol>
+        <li>
+            <a href="{@docRoot}guide/topics/providers/content-provider-basics.html">
+            Content Provider Basics</a>
+        </li>
+        <li>
+            <a href="{@docRoot}guide/topics/providers/calendar-provider.html">
+            Calendar Provider</a>
+        </li>
+    </ol>
+</div>
+</div>
+
+
+<p>
+    A content provider manages access to a central repository of data. You implement a
+    provider as one or more classes in an Android application, along with elements in
+    the manifest file. One of your classes implements a subclass
+    {@link android.content.ContentProvider}, which is the interface between your provider and
+    other applications. Although content providers are meant to make data available to other
+    applications, you may of course have activities in your application that allow the user
+    to query and modify the data managed by your provider.
+</p>
+<p>
+    The rest of this topic is a basic list of steps for building a content provider and a list
+    of APIs to use.
+</p>
+
+
+<!-- Before You Start Building -->
+<h2 id="BeforeYouStart">Before You Start Building</h2>
+<p>
+    Before you start building a provider, do the following:
+</p>
+<ol>
+    <li>
+        <strong>Decide if you need a content provider</strong>. You need to build a content
+        provider if you want to provide one or more of the following features:
+        <ul>
+            <li>You want to offer complex data or files to other applications.</li>
+            <li>You want to allow users to copy complex data from your app into other apps.</li>
+            <li>You want to provide custom search suggestions using the search framework.</li>
+        </ul>
+    <p>
+        You <em>don't</em> need a provider to use an SQLite database if the use is entirely within
+        your own application.
+    </p>
+    </li>
+    <li>
+        If you haven't done so already, read the topic
+        <a href="{@docRoot}guide/topics/providers/content-provider-basics.html">
+        Content Provider Basics</a> to learn more about providers.
+    </li>
+</ol>
+<p>
+    Next, follow these steps to build your provider:
+</p>
+<ol>
+    <li>
+        Design the raw storage for your data. A content provider offers data in two ways:
+        <dl>
+            <dt>
+                File data
+            </dt>
+            <dd>
+                Data that normally goes into files, such as
+                photos, audio, or videos. Store the files in your application's private
+                space. In response to a request for a file from another application, your
+                provider can offer a handle to the file.
+            </dd>
+            <dt>
+                &quot;Structured&quot; data
+            </dt>
+            <dd>
+                Data that normally goes into a database, array, or similar structure.
+                Store the data in a form that's compatible with tables of rows and columns. A row
+                represents an entity, such as a person or an item in inventory. A column represents
+                some data for the entity, such a person's name or an item's price. A common way to
+                store this type of data is in an SQLite database, but you can use any type of
+                persistent storage. To learn more about the storage types available in the
+                Android system, see the section <a href="#DataStorage">
+                Designing Data Storage</a>.
+            </dd>
+        </dl>
+    </li>
+    <li>
+        Define a concrete implementation of the {@link android.content.ContentProvider} class and
+        its required methods. This class is the interface between your data and the rest of the
+        Android system. For more information about this class, see the section
+        <a href="#ContentProvider">Implementing the ContentProvider Class</a>.
+    </li>
+    <li>
+        Define the provider's authority string, its content URIs, and column names. If you want
+        the provider's application to handle intents, also define intent actions, extras data,
+        and flags. Also define the permissions that you will require for applications that want
+        to access your data. You should consider defining all of these values as constants in a
+        separate contract class; later, you can expose this class to other developers. For more
+        information about content URIs, see the
+        section <a href="#ContentURI">Designing Content URIs</a>.
+        For more information about intents, see the
+        section <a href="#Intents">Intents and Data Access</a>.
+    </li>
+    <li>
+        Add other optional pieces, such as sample data or an implementation
+        of {@link android.content.AbstractThreadedSyncAdapter} that can synchronize data between
+        the provider and cloud-based data.
+    </li>
+</ol>
+
+
+<!-- Designing Data Storage -->
+<h2 id="DataStorage">Designing Data Storage</h2>
+<p>
+    A content provider is the interface to data saved in a structured format. Before you create
+    the interface, you must decide how to store the data. You can store the data in any form you
+    like, and then design the interface to read and write the data as necessary.
+</p>
+<p>
+    These are some of the data storage technologies that are available in Android:
+</p>
+<ul>
+    <li>
+        The Android system includes an SQLite database API that Android's own providers use
+        to store table-oriented data. The
+        {@link android.database.sqlite.SQLiteOpenHelper} class helps you create databases, and the
+        {@link android.database.sqlite.SQLiteDatabase} class is the base class for accessing
+        databases.
+        <p>
+            Remember that you don't have to use a database to implement your repository. A provider
+            appears externally as a set of tables, similar to a relational database, but this is
+            not a requirement for the provider's internal implementation.
+        </p>
+    </li>
+    <li>
+        For storing file data, Android has a variety of file-oriented APIs.
+        To learn more about file storage, read the topic
+        <a href="{@docRoot}guide/topics/data/data-storage.html">Data Storage</a>. If you're
+        designing a provider that offers media-related data such as music or videos, you can
+        have a provider that combines table data and files.
+    </li>
+    <li>
+        For working with network-based data, use classes in {@link java.net} and
+        {@link android.net}. You can also synchronize network-based data to a local data
+        store such as a database, and then offer the data as tables or files.
+        The <a href="{@docRoot}resources/samples/SampleSyncAdapter/index.html">
+        Sample Sync Adapter</a> sample application demonstrates this type of synchronization.
+    </li>
+</ul>
+<h3 id="DataDesign">
+    Data design considerations
+</h3>
+<p>
+    Here are some tips for designing your provider's data structure:
+</p>
+<ul>
+    <li>
+        Table data should always have a &quot;primary key&quot; column that the provider maintains
+        as a unique numeric value for each row. You can use this value to link the row to related
+        rows in other tables (using it as a &quot;foreign key&quot;). Although you can use any name
+        for this column, using {@link android.provider.BaseColumns#_ID BaseColumns._ID} is the best
+        choice, because linking the results of a provider query to a
+        {@link android.widget.ListView} requires one of the retrieved columns to have the name
+        <code>_ID</code>.
+    </li>
+    <li>
+        If you want to provide bitmap images or other very large pieces of file-oriented data, store
+        the data in a file and then provide it indirectly rather than storing it directly in a
+        table. If you do this, you need to tell users of your provider that they need to use a
+        {@link android.content.ContentResolver} file method to access the data.
+    </li>
+    <li>
+        Use the Binary Large OBject (BLOB) data type to store data that varies in size or has a
+        varying structure. For example, you can use a BLOB column to store a
+        <a href="http://code.google.com/p/protobuf">protocol buffer</a> or
+        <a href="http://www.json.org">JSON structure</a>.
+        <p>
+            You can also use a BLOB to implement a <em>schema-independent</em> table. In
+            this type of table, you define a primary key column, a MIME type column, and one or
+            more generic columns as BLOB. The meaning of the data in the BLOB columns is indicated
+            by the value in the MIME type column. This allows you to store different row types in
+            the same table. The Contacts Provider's &quot;data&quot; table
+            {@link android.provider.ContactsContract.Data} is an example of a schema-independent
+            table.
+        </p>
+    </li>
+</ul>
+<!-- Designing Content URIs -->
+<h2 id="ContentURI">Designing Content URIs</h2>
+<p>
+    A <strong>content URI</strong> is a URI that identifies data in a provider. Content URIs include
+    the symbolic name of the entire provider (its <strong>authority</strong>) and a
+    name that points to a table or file (a <strong>path</strong>). The optional id part points to
+    an individual row in a table. Every data access method of
+    {@link android.content.ContentProvider} has a content URI as an argument; this allows you to
+    determine the table, row, or file to access.
+</p>
+<p>
+    The basics of content URIs are described in the topic
+    <a href="{@docRoot}guide/topics/providers/content-provider-basics.html">
+    Content Provider Basics</a>.
+</p>
+<h3>Designing an authority</h3>
+<p>
+    A provider usually has a single authority, which serves as its Android-internal name. To
+    avoid conflicts with other providers, you should use Internet domain ownership (in reverse)
+    as the basis of your provider authority. Because this recommendation is also true for Android
+    package names, you can define your provider authority as an extension of the name
+    of the package containing the provider. For example, if your Android package name is
+    <code>com.example.&lt;appname&gt;</code>, you should give your provider the
+    authority <code>com.example.&lt;appname&gt;.provider</code>.
+</p>
+<h3>Designing a path structure</h3>
+<p>
+    Developers usually create content URIs from the authority by appending paths that point to
+    individual tables. For example, if you have two tables <em>table1</em> and
+    <em>table2</em>, you combine the authority from the previous example to yield the
+    content URIs
+    <code>com.example.&lt;appname&gt;.provider/table1</code> and
+    <code>com.example.&lt;appname&gt;.provider/table2</code>. Paths aren't
+    limited to a single segment, and there doesn't have to be a table for each level of the path.
+</p>
+<h3>Handling content URI IDs</h3>
+<p>
+    By convention, providers offer access to a single row in a table by accepting a content URI
+    with an ID value for the row at the end of the URI. Also by convention, providers match the
+    ID value to the table's <code>_ID</code> column, and perform the requested access against the
+    row that matches.
+</p>
+<p>
+    This convention facilitates a common design pattern for apps accessing a provider. The app
+    does a query against the provider and displays the resulting {@link android.database.Cursor}
+    in a {@link android.widget.ListView} using a {@link android.widget.CursorAdapter}.
+    The definition of {@link android.widget.CursorAdapter} requires one of the columns in the
+    {@link android.database.Cursor} to be <code>_ID</code>
+</p>
+<p>
+    The user then picks one of the displayed rows from the UI in order to look at or modify the
+    data. The app gets the corresponding row from the {@link android.database.Cursor} backing the
+    {@link android.widget.ListView}, gets the <code>_ID</code> value for this row, appends it to
+    the content URI, and sends the access request to the provider. The provider can then do the
+    query or modification against the exact row the user picked.
+</p>
+<h3>Content URI patterns</h3>
+<p>
+    To help you choose which action to take for an incoming content URI, the provider API includes
+    the convenience class {@link android.content.UriMatcher}, which maps content URI "patterns" to
+    integer values. You can use the integer values in a <code>switch</code> statement that
+    chooses the desired action for the content URI or URIs that match a particular pattern.
+</p>
+<p>
+    A content URI pattern matches content URIs using wildcard characters:
+</p>
+    <ul>
+        <li>
+            <strong><code>*</code>:</strong> Matches a string of any valid characters of any length.
+        </li>
+        <li>
+            <strong><code>#</code>:</strong> Matches a string of numeric characters of any length.
+        </li>
+    </ul>
+<p>
+    As an example of designing and coding content URI handling, consider a provider with the
+    authority <code>com.example.app.provider</code> that recognizes the following content URIs
+    pointing to tables:
+</p>
+<ul>
+    <li>
+        <code>content://com.example.app.provider/table1</code>: A table called <code>table1</code>.
+    </li>
+    <li>
+        <code>content://com.example.app.provider/table2/dataset1</code>: A table called
+        <code>dataset1</code>.
+    </li>
+    <li>
+        <code>content://com.example.app.provider/table2/dataset2</code>: A table called
+        <code>dataset2</code>.
+    </li>
+    <li>
+        <code>content://com.example.app.provider/table3</code>: A table called <code>table3</code>.
+    </li>
+</ul>
+<p>
+    The provider also recognizes these content URIs if they have a row ID appended to them, as
+    for example <code>content://com.example.app.provider/table3/1</code> for the row identified by
+    <code>1</code> in <code>table3</code>.
+</p>
+<p>
+    The following content URI patterns would be possible:
+</p>
+<dl>
+    <dt>
+        <code>content://com.example.app.provider/*</code>
+    </dt>
+    <dd>
+        Matches any content URI in the provider.
+    </dd>
+    <dt>
+        <code>content://com.example.app.provider/table2/*</code>:
+    </dt>
+    <dd>
+        Matches a content URI for the tables <code>dataset1</code>
+        and <code>dataset2</code>, but doesn't match content URIs for <code>table1</code> or
+        <code>table3</code>.
+    </dd>
+    <dt>
+        <code>content://com.example.app.provider/table3/#</code>: Matches a content URI
+        for single rows in <code>table3</code>, such as
+        <code>content://com.example.app.provider/table3/6</code> for the row identified by
+        <code>6</code>.
+    </dt>
+</dl>
+<p>
+    The following code snippet shows how the methods in {@link android.content.UriMatcher} work.
+    This code handles URIs for an entire table differently from URIs for a
+    single row, by using the content URI pattern
+    <code>content://&lt;authority&gt;/&lt;path&gt;</code> for tables, and
+    <code>content://&lt;authority&gt;/&lt;path&gt;/&lt;id&gt;</code> for single rows.
+</p>
+<p>
+    The method {@link android.content.UriMatcher#addURI(String, String, int) addURI()} maps an
+    authority and path to an integer value. The method android.content.UriMatcher#match(Uri)
+    match()} returns the integer value for a URI. A <code>switch</code> statement
+    chooses between querying the entire table, and querying for a single record:
+</p>
+<pre class="prettyprint">
+public class ExampleProvider extends ContentProvider {
+...
+    // Creates a UriMatcher object.
+    private static final UriMatcher sUriMatcher;
+...
+    /*
+     * The calls to addURI() go here, for all of the content URI patterns that the provider
+     * should recognize. For this snippet, only the calls for table 3 are shown.
+     */
+...
+    /*
+     * Sets the integer value for multiple rows in table 3 to 1. Notice that no wildcard is used
+     * in the path
+     */
+    sUriMatcher.addURI("com.example.app.provider", "table3", 1);
+
+    /*
+     * Sets the code for a single row to 2. In this case, the "#" wildcard is
+     * used. "content://com.example.app.provider/table3/3" matches, but
+     * "content://com.example.app.provider/table3 doesn't.
+     */
+    sUriMatcher.addURI("com.example.app.provider", "table3/#", 2);
+...
+    // Implements ContentProvider.query()
+    public Cursor query(
+        Uri uri,
+        String[] projection,
+        String selection,
+        String[] selectionArgs,
+        String sortOrder) {
+...
+        /*
+         * Choose the table to query and a sort order based on the code returned for the incoming
+         * URI. Here, too, only the statements for table 3 are shown.
+         */
+        switch (sUriMatcher.match(uri)) {
+
+
+            // If the incoming URI was for all of table3
+            case 1:
+
+                if (TextUtils.isEmpty(sortOrder)) sortOrder = "_ID ASC";
+                break;
+
+            // If the incoming URI was for a single row
+            case 2:
+
+                /*
+                 * Because this URI was for a single row, the _ID value part is
+                 * present. Get the last path segment from the URI; this is the _ID value.
+                 * Then, append the value to the WHERE clause for the query
+                 */
+                selection = selection + "_ID = " uri.getLastPathSegment();
+                break;
+
+            default:
+            ...
+                // If the URI is not recognized, you should do some error handling here.
+        }
+        // call the code to actually do the query
+    }
+</pre>
+<p>
+    Another class, {@link android.content.ContentUris}, provides convenience methods for working
+    with the <code>id</code> part of content URIs. The classes {@link android.net.Uri} and
+    {@link android.net.Uri.Builder} include convenience methods for parsing existing
+    {@link android.net.Uri} objects and building new ones.
+</p>
+
+<!-- Implementing the ContentProvider class -->
+<h2 id="ContentProvider">Implementing the ContentProvider Class</h2>
+<p>
+    The {@link android.content.ContentProvider} instance manages access
+    to a structured set of data by handling requests from other applications. All forms
+    of access eventually call {@link android.content.ContentResolver}, which then calls a concrete
+    method of {@link android.content.ContentProvider} to get access.
+</p>
+<h3 id="RequiredAccess">Required methods</h3>
+<p>
+    The abstract class {@link android.content.ContentProvider} defines six abstract methods that
+    you must implement as part of your own concrete subclass. All of these methods except
+    {@link android.content.ContentProvider#onCreate() onCreate()} are called by a client application
+    that is attempting to access your content provider:
+</p>
+<dl>
+    <dt>
+        {@link android.content.ContentProvider#query(Uri, String[], String, String[], String)
+        query()}
+    </dt>
+    <dd>
+        Retrieve data from your provider. Use the arguments to select the table to
+        query, the rows and columns to return, and the sort order of the result.
+        Return the data as a {@link android.database.Cursor} object.
+    </dd>
+    <dt>
+        {@link android.content.ContentProvider#insert(Uri, ContentValues) insert()}
+    </dt>
+    <dd>
+        Insert a new row into your provider. Use the arguments to select the
+        destination table and to get the column values to use. Return a content URI for the
+        newly-inserted row.
+    </dd>
+    <dt>
+        {@link android.content.ContentProvider#update(Uri, ContentValues, String, String[])
+        update()}
+    </dt>
+    <dd>
+        Update existing rows in your provider. Use the arguments to select the table and rows
+        to update and to get the updated column values. Return the number of rows updated.
+    </dd>
+    <dt>
+        {@link android.content.ContentProvider#delete(Uri, String, String[]) delete()}
+    </dt>
+    <dd>
+        Delete rows from your provider. Use the arguments to select the table and the rows to
+        delete. Return the number of rows deleted.
+    </dd>
+    <dt>
+        {@link android.content.ContentProvider#getType(Uri) getType()}
+    </dt>
+    <dd>
+        Return the MIME type corresponding to a content URI. This method is described in more
+        detail in the section <a href="#MIMETypes">Implementing Content Provider MIME Types</a>.
+    </dd>
+    <dt>
+        {@link android.content.ContentProvider#onCreate() onCreate()}
+    </dt>
+    <dd>
+        Initialize your provider. The Android system calls this method immediately after it
+        creates your provider. Notice that your provider is not created until a
+        {@link android.content.ContentResolver} object tries to access it.
+    </dd>
+</dl>
+<p>
+    Notice that these methods have the same signature as the identically-named
+    {@link android.content.ContentResolver} methods.
+</p>
+<p>
+    Your implementation of these methods should account for the following:
+</p>
+<ul>
+    <li>
+        All of these methods except {@link android.content.ContentProvider#onCreate() onCreate()}
+        can be called by multiple threads at once, so they must be thread-safe. To learn
+        more about multiple threads, see the topic
+        <a href="{@docRoot}guide/topics/fundamentals/processes-and-threads.html">
+        Processes and Threads</a>.
+    </li>
+    <li>
+        Avoid doing lengthy operations in {@link android.content.ContentProvider#onCreate()
+        onCreate()}. Defer initialization tasks until they are actually needed.
+        The section <a href="#OnCreate">Implementing the onCreate() method</a>
+        discusses this in more detail.
+    </li>
+    <li>
+        Although you must implement these methods, your code does not have to do anything except
+        return the expected data type. For example, you may want to prevent other applications
+        from inserting data into some tables. To do this, you can ignore the call to
+        {@link android.content.ContentProvider#insert(Uri, ContentValues) insert()} and return
+        0.
+    </li>
+</ul>
+<h3 id="Query">Implementing the query() method</h3>
+<p>
+    The
+    {@link android.content.ContentProvider#query(Uri, String[], String, String[], String)
+    ContentProvider.query()} method must return a {@link android.database.Cursor} object, or if it
+    fails, throw an {@link java.lang.Exception}. If you are using an SQLite database as your data
+    storage, you can simply return the {@link android.database.Cursor} returned by one of the
+    <code>query()</code> methods of the {@link android.database.sqlite.SQLiteDatabase} class.
+    If the query does not match any rows, you should return a {@link android.database.Cursor}
+    instance whose {@link android.database.Cursor#getCount()} method returns 0.
+    You should return <code>null</code> only if an internal error occurred during the query process.
+</p>
+<p>
+    If you aren't using an SQLite database as your data storage, use one of the concrete subclasses
+    of {@link android.database.Cursor}. For example, the {@link android.database.MatrixCursor} class
+    implements a cursor in which each row is an array of {@link java.lang.Object}. With this class,
+    use {@link android.database.MatrixCursor#addRow(Object[]) addRow()} to add a new row.
+</p>
+<p>
+    Remember that the Android system must be able to communicate the {@link java.lang.Exception}
+    across process boundaries. Android can do this for the following exceptions that may be useful
+    in handling query errors:
+</p>
+<ul>
+    <li>
+        {@link java.lang.IllegalArgumentException} (You may choose to throw this if your provider
+        receives an invalid content URI)
+    </li>
+    <li>
+        {@link java.lang.NullPointerException}
+    </li>
+</ul>
+<h3 id="Insert">Implementing the insert() method</h3>
+<p>
+    The {@link android.content.ContentProvider#insert(Uri, ContentValues) insert()} method adds a
+    new row to the appropriate table, using the values in the {@link android.content.ContentValues}
+    argument. If a column name is not in the {@link android.content.ContentValues} argument, you
+    may want to provide a default value for it either in your provider code or in your database
+    schema.
+</p>
+<p>
+    This method should return the content URI for the new row. To construct this, append the new
+    row's <code>_ID</code> (or other primary key) value to the table's content URI, using
+    {@link android.content.ContentUris#withAppendedId(Uri, long) withAppendedId()}.
+</p>
+<h3 id="Delete">Implementing the delete() method</h3>
+<p>
+    The {@link android.content.ContentProvider#delete(Uri, String, String[]) delete()} method
+    does not have to physically delete rows from your data storage. If you are using a sync adapter
+    with your provider, you should consider marking a deleted row
+    with a &quot;delete&quot; flag rather than removing the row entirely. The sync adapter can
+    check for deleted rows and remove them from the server before deleting them from the provider.
+</p>
+<h3 id="Update">Implementing the update() method</h3>
+<p>
+    The {@link android.content.ContentProvider#update(Uri, ContentValues, String, String[])
+    update()} method takes the same {@link android.content.ContentValues} argument used by
+    {@link android.content.ContentProvider#insert(Uri, ContentValues) insert()}, and the
+    same <code>selection</code> and <code>selectionArgs</code> arguments used by
+    {@link android.content.ContentProvider#delete(Uri, String, String[]) delete()} and
+    {@link android.content.ContentProvider#query(Uri, String[], String, String[], String)
+    ContentProvider.query()}. This may allow you to re-use code between these methods.
+</p>
+<h3 id="OnCreate">Implementing the onCreate() method</h3>
+<p>
+    The Android system calls {@link android.content.ContentProvider#onCreate()
+    onCreate()} when it starts up the provider. You should perform only fast-running initialization
+    tasks in this method, and defer database creation and data loading until the provider actually
+    receives a request for the data. If you do lengthy tasks in
+    {@link android.content.ContentProvider#onCreate() onCreate()}, you will slow down your
+    provider's startup. In turn, this will slow down the response from the provider to other
+    applications.
+</p>
+<p>
+    For example, if you are using an SQLite database you can create
+    a new {@link android.database.sqlite.SQLiteOpenHelper} object in
+    {@link android.content.ContentProvider#onCreate() ContentProvider.onCreate()},
+    and then create the SQL tables the first time you open the database. To facilitate this, the
+    first time you call {@link android.database.sqlite.SQLiteOpenHelper#getWritableDatabase
+    getWritableDatabase()}, it automatically calls the
+    {@link android.database.sqlite.SQLiteOpenHelper#onCreate(SQLiteDatabase)
+    SQLiteOpenHelper.onCreate()} method.
+</p>
+<p>
+    The following two snippets demonstrate the interaction between
+    {@link android.content.ContentProvider#onCreate() ContentProvider.onCreate()} and
+    {@link android.database.sqlite.SQLiteOpenHelper#onCreate(SQLiteDatabase)
+    SQLiteOpenHelper.onCreate()}. The first snippet is the implementation of
+    {@link android.content.ContentProvider#onCreate() ContentProvider.onCreate()}:
+</p>
+<pre class="prettyprint">
+public class ExampleProvider extends ContentProvider
+
+    /*
+     * Defines a handle to the database helper object. The MainDatabaseHelper class is defined
+     * in a following snippet.
+     */
+    private MainDatabaseHelper mOpenHelper;
+
+    // Defines the database name
+    private static final String DBNAME = "mydb";
+
+    // Holds the database object
+    private SQLiteDatabase db;
+
+    public boolean onCreate() {
+
+        /*
+         * Creates a new helper object. This method always returns quickly.
+         * Notice that the database itself isn't created or opened
+         * until SQLiteOpenHelper.getWritableDatabase is called
+         */
+        mOpenHelper = new SQLiteOpenHelper(
+            getContext(),        // the application context
+            DBNAME,              // the name of the database)
+            null,                // uses the default SQLite cursor
+            1                    // the version number
+        );
+
+        return true;
+    }
+
+    ...
+
+    // Implements the provider's insert method
+    public Cursor insert(Uri uri, ContentValues values) {
+        // Insert code here to determine which table to open, handle error-checking, and so forth
+
+        ...
+
+        /*
+         * Gets a writeable database. This will trigger its creation if it doesn't already exist.
+         *
+         */
+        db = mOpenHelper.getWritableDatabase();
+    }
+}
+</pre>
+<p>
+    The next snippet is the implementation of
+    {@link android.database.sqlite.SQLiteOpenHelper#onCreate(SQLiteDatabase)
+    SQLiteOpenHelper.onCreate()}, including a helper class:
+</p>
+<pre class="prettyprint">
+...
+// A string that defines the SQL statement for creating a table
+private static final String SQL_CREATE_MAIN = "CREATE TABLE " +
+    "main " +                       // Table's name
+    "(" +                           // The columns in the table
+    " _ID INTEGER PRIMARY KEY, " +
+    " WORD TEXT"
+    " FREQUENCY INTEGER " +
+    " LOCALE TEXT )";
+...
+/**
+ * Helper class that actually creates and manages the provider's underlying data repository.
+ */
+protected static final class MainDatabaseHelper extends SQLiteOpenHelper {
+
+    /*
+     * Instantiates an open helper for the provider's SQLite data repository
+     * Do not do database creation and upgrade here.
+     */
+    MainDatabaseHelper(Context context) {
+        super(context, DBNAME, null, 1);
+    }
+
+    /*
+     * Creates the data repository. This is called when the provider attempts to open the
+     * repository and SQLite reports that it doesn't exist.
+     */
+    public void onCreate(SQLiteDatabase db) {
+
+        // Creates the main table
+        db.execSQL(SQL_CREATE_MAIN);
+    }
+}
+</pre>
+
+
+<!-- Implementing ContentProvider MIME Types -->
+<h2 id="MIMETypes">Implementing ContentProvider MIME Types</h2>
+<p>
+    The {@link android.content.ContentProvider} class has two methods for returning MIME types:
+</p>
+<dl>
+    <dt>
+        {@link android.content.ContentProvider#getType(Uri) getType()}
+    </dt>
+    <dd>
+        One of the required methods that you must implement for any provider.
+    </dd>
+    <dt>
+        {@link android.content.ContentProvider#getStreamTypes(Uri, String) getStreamTypes()}
+    </dt>
+    <dd>
+        A method that you're expected to implement if your provider offers files.
+    </dd>
+</dl>
+<h3 id="TableMIMETypes">MIME types for tables</h3>
+<p>
+    The {@link android.content.ContentProvider#getType(Uri) getType()} method returns a
+    {@link java.lang.String} in MIME format that describes the type of data returned by the content
+    URI argument. The {@link android.net.Uri} argument can be a pattern rather than a specific URI;
+    in this case, you should return the type of data associated with content URIs that match the
+    pattern.
+</p>
+<p>
+    For common types of data such as as text, HTML, or JPEG,
+    {@link android.content.ContentProvider#getType(Uri) getType()} should return the standard
+    MIME type for that data. A full list of these standard types is available on the
+    <a href="http://www.iana.org/assignments/media-types/index.htm">IANA MIME Media Types</a>
+    website.
+</p>
+<p>
+    For content URIs that point to a row or rows of table data,
+    {@link android.content.ContentProvider#getType(Uri) getType()} should return
+    a MIME type in Android's vendor-specific MIME format:
+</p>
+<ul>
+    <li>
+        Type part: <code>vnd</code>
+    </li>
+    <li>
+        Subtype part:
+        <ul>
+            <li>
+    If the URI pattern is for a single row: <code>android.cursor.<strong>item</strong>/</code>
+            </li>
+            <li>
+    If the URI pattern is for more than one row: <code>android.cursor.<strong>dir</strong>/</code>
+            </li>
+        </ul>
+    </li>
+    <li>
+        Provider-specific part: <code>vnd.&lt;name&gt;</code>.<code>&lt;type&gt;</code>
+        <p>
+            You supply the <code>&lt;name&gt;</code> and <code>&lt;type&gt;</code>.
+            The <code>&lt;name&gt;</code> value should be globally unique,
+            and the <code>&lt;type&gt;</code> value should be unique to the corresponding URI
+            pattern. A good choice for <code>&lt;name&gt;</code> is your company's name or
+            some part of your application's Android package name. A good choice for the
+            <code>&lt;type&gt;</code> is a string that identifies the table associated with the
+            URI.
+        </p>
+
+    </li>
+</ul>
+<p>
+    For example, if a provider's authority is
+    <code>com.example.app.provider</code>, and it exposes a table named
+    <code>table1</code>, the MIME type for multiple rows in <code>table1</code> is:
+</p>
+<pre>
+vnd.android.cursor.<strong>dir</strong>/vnd.com.example.provider.table1
+</pre>
+<p>
+    For a single row of <code>table1</code>, the MIME type is:
+</p>
+<pre>
+vnd.android.cursor.<strong>item</strong>/vnd.com.example.provider.table1
+</pre>
+<h3 id="FileMIMETypes">MIME types for files</h3>
+<p>
+    If your provider offers files, implement
+    {@link android.content.ContentProvider#getStreamTypes(Uri, String) getStreamTypes()}.
+    The method returns a {@link java.lang.String} array of MIME types for the files your provider
+    can return for a given content URI. You should filter the MIME types you offer by the MIME type
+    filter argument, so that you return only those MIME types that the client wants to handle.
+</p>
+<p>
+    For example, consider a provider that offers photo images as files in <code>.jpg</code>,
+    <code>.png</code>, and <code>.gif</code> format.
+    If an application calls {@link android.content.ContentResolver#getStreamTypes(Uri, String)
+    ContentResolver.getStreamTypes()} with the filter string <code>image/*</code> (something that
+    is an &quot;image&quot;),
+    then the {@link android.content.ContentProvider#getStreamTypes(Uri, String)
+    ContentProvider.getStreamTypes()} method should return the array:
+</p>
+<pre>
+{ &quot;image/jpeg&quot;, &quot;image/png&quot;, &quot;image/gif&quot;}
+</pre>
+<p>
+    If the app is only interested in <code>.jpg</code> files, then it can call
+    {@link android.content.ContentResolver#getStreamTypes(Uri, String)
+    ContentResolver.getStreamTypes()} with the filter string <code>*\/jpeg</code>, and
+    {@link android.content.ContentProvider#getStreamTypes(Uri, String)
+    ContentProvider.getStreamTypes()} should return:
+<pre>
+{&quot;image/jpeg&quot;}
+</pre>
+<p>
+    If your provider doesn't offer any of the MIME types requested in the filter string,
+    {@link android.content.ContentProvider#getStreamTypes(Uri, String) getStreamTypes()}
+    should return <code>null</code>.
+</p>
+
+
+<!--  Implementing a Contract Class -->
+<h2 id="ContractClass">Implementing a Contract Class</h2>
+<p>
+    A contract class is a <code>public final</code> class that contains constant definitions for the
+    URIs, column names, MIME types, and other meta-data that pertain to the provider. The class
+    establishes a contract between the provider and other applications by ensuring that the provider
+    can be correctly accessed even if there are changes to the actual values of URIs, column names,
+    and so forth.
+</p>
+<p>
+    A contract class also helps developers because it usually has mnemonic names for its constants,
+    so developers are less likely to use incorrect values for column names or URIs. Since it's a
+    class, it can contain Javadoc documentation. Integrated development environments such as
+    Eclipse can auto-complete constant names from the contract class and display Javadoc for the
+    constants.
+</p>
+<p>
+    Developers can't access the contract class's class file from your application, but they can
+    statically compile it into their application from a <code>.jar</code> file you provide.
+</p>
+<p>
+    The {@link android.provider.ContactsContract} class and its nested classes are examples of
+    contract classes.
+</p>
+<h2 id="Permissions">Implementing Content Provider Permissions</h2>
+<p>
+    Permissions and access for all aspects of the Android system are described in detail in the
+    topic <a href="{@docRoot}guide/topics/security/security.html">Security and Permissions</a>.
+    The topic <a href="{@docRoot}guide/topics/data/data-storage.html">Data Storage</a> also
+    described the security and permissions in effect for various types of storage.
+    In brief, the important points are:
+</p>
+<ul>
+    <li>
+        By default, data files stored on the device's internal storage are private to your
+        application and provider.
+    </li>
+    <li>
+        {@link android.database.sqlite.SQLiteDatabase} databases you create are private to your
+        application and provider.
+    </li>
+    <li>
+        By default, data files that you save to external storage are <em>public</em> and
+        <em>world-readable</em>. You can't use a content provider to restrict access to files in
+        external storage, because other applications can use other API calls to read and write them.
+    </li>
+    <li>
+        The method calls for opening or creating files or SQLite databases on your device's internal
+        storage can potentially give both read and write access to all other applications. If you
+        use an internal file or database as your provider's repository, and you give it
+        "world-readable" or "world-writeable" access, the permissions you set for your provider in
+        its manifest won't protect your data. The default access for files and databases in
+        internal storage is "private", and for your provider's repository you shouldn't change this.
+    </li>
+</ul>
+<p>
+    If you want to use content provider permissions to control access to your data, then you should
+    store your data in internal files, SQLite databases, or the &quot;cloud&quot; (for example,
+    on a remote server), and you should keep files and databases private to your application.
+</p>
+<h3>Implementing permissions</h3>
+<p>
+    All applications can read from or write to your provider, even if the underlying data is
+    private, because by default your provider does not have permissions set. To change this,
+    set permissions for your provider in your manifest file, using attributes or child
+    elements of the <code><a href="{@docRoot}guide/topics/manifest/provider-element.html">
+    &lt;provider&gt;</a></code> element. You can set permissions that apply to the entire provider,
+    or to certain tables, or even to certain records, or all three.
+</p>
+<p>
+    You define permissions for your provider with one or more
+    <code><a href="{@docRoot}guide/topics/manifest/permission-element.html">
+    &lt;permission&gt;</a></code> elements in your manifest file. To make the
+    permission unique to your provider, use Java-style scoping for the
+    <code><a href="{@docRoot}guide/topics/manifest/permission-element.html#nm">
+    android:name</a></code> attribute. For example, name the read permission
+    <code>com.example.app.provider.permission.READ_PROVIDER</code>.
+
+</p>
+<p>
+    The following list describes the scope of provider permissions, starting with the
+    permissions that apply to the entire provider and then becoming more fine-grained.
+    More fine-grained permissions take precedence over ones with larger scope:
+</p>
+<dl>
+    <dt>
+        Single read-write provider-level permission
+    </dt>
+    <dd>
+        One permission that controls both read and write access to the entire provider, specified
+        with the <code><a href="{@docRoot}guide/topics/manifest/provider-element.html#prmsn">
+        android:permission</a></code> attribute of the
+        <code><a href="{@docRoot}guide/topics/manifest/provider-element.html">
+        &lt;provider&gt;</a></code> element.
+    </dd>
+    <dt>
+        Separate read and write provider-level permission
+    </dt>
+    <dd>
+        A read permission and a write permission for the entire provider. You specify them
+        with the <code><a href="{@docRoot}guide/topics/manifest/provider-element.html#rprmsn">
+        android:readPermission</a></code> and
+        <code><a href="{@docRoot}guide/topics/manifest/provider-element.html#wprmsn">
+        android:writePermission</a></code> attributes of the
+        <code><a href="{@docRoot}guide/topics/manifest/provider-element.html">
+        &lt;provider&gt;</a></code> element. They take precedence over the permission required by
+        <code><a href="{@docRoot}guide/topics/manifest/provider-element.html#prmsn">
+        android:permission</a></code>.
+    </dd>
+    <dt>
+        Path-level permission
+    </dt>
+    <dd>
+        Read, write, or read/write permission for a content URI in your provider. You specify
+        each URI you want to control with a
+        <code><a href="{@docRoot}guide/topics/manifest/path-permission-element.html">
+        &lt;path-permission&gt;</a></code> child element of the
+        <code><a href="{@docRoot}guide/topics/manifest/provider-element.html">
+        &lt;provider&gt;</a></code> element. For each content URI you specify, you can specify a
+        read/write permission, a read permission, or a write permission, or all three. The read and
+        write permissions take precedence over the read/write permission. Also, path-level
+        permission takes precedence over provider-level permissions.
+    </dd>
+    <dt>
+        Temporary permission
+    </dt>
+    <dd>
+        A permission level that grants temporary access to an application, even if the application
+        doesn't have the permissions that are normally required. The temporary
+        access feature reduces the number of permissions an application has to request in
+        its manifest. When you turn on temporary permissions, the only applications that need
+        &quot;permanent&quot; permissions for your provider are ones that continually access all
+        your data.
+        <p>
+            Consider the permissions you need to implement an email provider and app, when you
+            want to allow an outside image viewer application to display photo attachments from your
+            provider. To give the image viewer the necessary access without requiring permissions,
+            set up temporary permissions for content URIs for photos. Design your email app so
+            that when the user wants to display a photo, the app sends an intent containing the
+            photo's content URI and permission flags to the image viewer. The image viewer can
+            then query your email provider to retrieve the photo, even though the viewer doesn't
+            have the normal read permission for your provider.
+        </p>
+        <p>
+            To turn on temporary permissions, either set the
+            <code><a href="{@docRoot}guide/topics/manifest/provider-element.html#gprmsn">
+            android:grantUriPermissions</a></code> attribute of the
+            <code><a href="{@docRoot}guide/topics/manifest/provider-element.html">
+            &lt;provider&gt;</a></code> element, or add one or more
+            <code><a href="{@docRoot}guide/topics/manifest/grant-uri-permission-element.html">
+            &lt;grant-uri-permission&gt;</a></code> child elements to your
+            <code><a href="{@docRoot}guide/topics/manifest/provider-element.html">
+            &lt;provider&gt;</a></code> element. If you use temporary permissions, you have to call
+            {@link android.content.Context#revokeUriPermission(Uri, int)
+            Context.revokeUriPermission()} whenever you remove support for a content URI from your
+            provider, and the content URI is associated with a temporary permission.
+        </p>
+        <p>
+            The attribute's value determines how much of your provider is made accessible.
+            If the attribute is set to <code>true</code>, then the system will grant temporary
+            permission to your entire provider, overriding any other permissions that are required
+            by your provider-level or path-level permissions.
+        </p>
+        <p>
+            If this flag is set to <code>false</code>, then you must add
+            <code><a href="{@docRoot}guide/topics/manifest/grant-uri-permission-element.html">
+            &lt;grant-uri-permission&gt;</a></code> child elements to your
+            <code><a href="{@docRoot}guide/topics/manifest/provider-element.html">
+            &lt;provider&gt;</a></code> element. Each child element specifies the content URI or
+            URIs for which temporary access is granted.
+        </p>
+        <p>
+            To delegate temporary access to an application, an intent must contain
+            the {@link android.content.Intent#FLAG_GRANT_READ_URI_PERMISSION} or the
+            {@link android.content.Intent#FLAG_GRANT_WRITE_URI_PERMISSION} flags, or both. These
+            are set with the {@link android.content.Intent#setFlags(int) setFlags()} method.
+        </p>
+        <p>
+            If the <code><a href="{@docRoot}guide/topics/manifest/provider-element.html#gprmsn">
+            android:grantUriPermissions</a></code> attribute is not present, it's assumed to be
+            <code>false</code>.
+        </p>
+    </dd>
+</dl>
+
+
+
+<!-- The Provider Element -->
+<h2 id="ProviderElement">The &lt;provider&gt; Element</h2>
+<p>
+    Like {@link android.app.Activity} and {@link android.app.Service} components,
+    a subclass of {@link android.content.ContentProvider}
+    must be defined in the manifest file for its application, using the
+    <code><a href="{@docRoot}guide/topics/manifest/provider-element.html">
+    &lt;provider&gt;</a></code> element. The Android system gets the following information from
+    the element:
+<dl>
+    <dt>
+        Authority
+        (<a href="{@docRoot}guide/topics/manifest/provider-element.html#auth">{@code
+        android:authorities}</a>)
+    </dt>
+    <dd>
+        Symbolic names that identify the entire provider within the system. This
+        attribute is described in more detail in the section
+        <a href="#ContentURI">Designing Content URIs</a>.
+    </dd>
+    <dt>
+        Provider class name
+        (<code>
+<a href="{@docRoot}guide/topics/manifest/provider-element.html#nm">android:name</a>
+        </code>)
+    </dt>
+    <dd>
+        The class that implements {@link android.content.ContentProvider}. This class is
+        described in more detail in the section
+        <a href="#ContentProvider">Implementing the ContentProvider Class</a>.
+    </dd>
+    <dt>
+        Permissions
+    </dt>
+    <dd>
+        Attributes that specify the permissions that other applications must have in order to access
+        the provider's data:
+        <ul>
+            <li>
+                <code><a href="{@docRoot}guide/topics/manifest/provider-element.html#gprmsn">
+                android:grantUriPermssions</a></code>: Temporary permission flag.
+            </li>
+            <li>
+                <code><a href="{@docRoot}guide/topics/manifest/provider-element.html#prmsn">
+                android:permission</a></code>: Single provider-wide read/write permission.
+            </li>
+            <li>
+                <code><a href="{@docRoot}guide/topics/manifest/provider-element.html#rprmsn">
+                android:readPermission</a></code>: Provider-wide read permission.
+            </li>
+            <li>
+                <code><a href="{@docRoot}guide/topics/manifest/provider-element.html#wprmsn">
+                android:writePermission</a></code>: Provider-wide write permission.
+            </li>
+        </ul>
+        <p>
+            Permissions and their corresponding attributes are described in more
+            detail in the section
+            <a href="#Permissions">Implementing Content Provider Permissions</a>.
+        </p>
+    </dd>
+    <dt>
+        Startup and control attributes
+    </dt>
+    <dd>
+        These attributes determine how and when the Android system starts the provider, the
+        process characteristics of the provider, and other run-time settings:
+        <ul>
+            <li>
+                <code><a href="{@docRoot}guide/topics/manifest/provider-element.html#enabled">
+                android:enabled</a></code>: Flag allowing the system to start the provider.
+            </li>
+              <li>
+                <code><a href="{@docRoot}guide/topics/manifest/provider-element.html#exported">
+                android:exported</a></code>: Flag allowing other applications to use this provider.
+            </li>
+            <li>
+                <code><a href="{@docRoot}guide/topics/manifest/provider-element.html#init">
+                android:initOrder</a></code>: The order in which this provider should be started,
+                relative to other providers in the same process.
+            </li>
+            <li>
+                <code><a href="{@docRoot}guide/topics/manifest/provider-element.html#multi">
+                android:multiProcess</a></code>: Flag allowing the system to start the provider
+                in the same process as the calling client.
+            </li>
+            <li>
+                <code><a href="{@docRoot}guide/topics/manifest/provider-element.html#proc">
+                android:process</a></code>: The name of the process in which the provider should
+                run.
+            </li>
+            <li>
+                <code><a href="{@docRoot}guide/topics/manifest/provider-element.html#sync">
+                android:syncable</a></code>: Flag indicating that the provider's data is to be
+                sync'ed with data on a server.
+            </li>
+        </ul>
+        <p>
+            The attributes are fully documented in the dev guide topic for the
+            <code><a href="{@docRoot}guide/topics/manifest/provider-element.html">
+            &lt;provider&gt;</a></code>
+            element.
+        </p>
+    </dd>
+    <dt>
+        Informational attributes
+    </dt>
+    <dd>
+        An optional icon and label for the provider:
+        <ul>
+            <li>
+                <code><a href="{@docRoot}guide/topics/manifest/provider-element.html#icon">
+                android:icon</a></code>: A drawable resource containing an icon for the provider.
+                The icon appears next to the provider's label in the list of apps in
+                <em>Settings</em> &gt; <em>Apps</em> &gt; <em>All</em>.
+            </li>
+            <li>
+                <code><a href="{@docRoot}guide/topics/manifest/provider-element.html#label">
+                android:label</a></code>: An informational label describing the provider or its
+                data, or both. The label appears in the list of apps in
+                <em>Settings</em> &gt; <em>Apps</em> &gt; <em>All</em>.
+            </li>
+        </ul>
+        <p>
+            The attributes are fully documented in the dev guide topic for the
+            <code><a href="{@docRoot}guide/topics/manifest/provider-element.html">
+            &lt;provider&gt;</a></code> element.
+        </p>
+    </dd>
+</dl>
+
+<!-- Intent Access -->
+<h2 id="Intents">Intents and Data Access</h2>
+<p>
+    Applications can access a content provider indirectly with an {@link android.content.Intent}.
+    The application does not call any of the methods of {@link android.content.ContentResolver} or
+    {@link android.content.ContentProvider}. Instead, it sends an intent that starts an activity,
+    which is often part of the provider's own application. The destination activity is in charge of
+    retrieving and displaying the data in its UI. Depending on the action in the intent, the
+    destination activity may also prompt the user to make modifications to the provider's data.
+    An intent may also contain &quot;extras&quot; data that the destination activity displays
+    in the UI; the user then has the option of changing this data before using it to modify the
+    data in the provider.
+</p>
+<p>
+
+</p>
+<p>
+    You may want to use intent access to help ensure data integrity. Your provider may depend
+    on having data inserted, updated, and deleted according to strictly defined business logic. If
+    this is the case, allowing other applications to directly modify your data may lead to
+    invalid data. If you want developers to use intent access, be sure to document it thoroughly.
+    Explain to them why intent access using your own application's UI is better than trying to
+    modify the data with their code.
+</p>
+<p>
+    Handling an incoming intent that wishes to modify your provider's data is no different from
+    handling other intents. You can learn more about using intents by reading the topic
+    <a href="{@docRoot}guide/topics/intents/intents-filters.html">Intents and Intent Filters</a>.
+</p>
diff --git a/docs/html/guide/topics/providers/content-providers.jd b/docs/html/guide/topics/providers/content-providers.jd
index 95331ce..1707f03 100644
--- a/docs/html/guide/topics/providers/content-providers.jd
+++ b/docs/html/guide/topics/providers/content-providers.jd
@@ -1,922 +1,96 @@
 page.title=Content Providers
 @jd:body
-
 <div id="qv-wrapper">
 <div id="qv">
 
-<h2>In this document</h2>
+
+<!-- In this document -->
+<h2>Topics</h2>
 <ol>
-<li><a href="#basics">Content provider basics</a></li>
-<li><a href="#querying">Querying a content provider</a></li>
-<li><a href="#modifying">Modifying data in a provider</a></li>
-<li><a href="#creating">Creating a content provider</a></li>
-<li><a href="#urisum">Content URI summary</a></li>
+    <li>
+        <a href="{@docRoot}guide/topics/providers/content-provider-basics.html">
+        Content Provider Basics</a>
+    </li>
+    <li>
+        <a href="{@docRoot}guide/topics/providers/content-provider-creating.html">
+        Creating a Content Provider</a>
+    </li>
+    <li>
+        <a href="{@docRoot}guide/topics/providers/calendar-provider.html">Calendar Provider</a>
+    </li>
 </ol>
 
-<h2>Key classes</h2>
-<ol>
-<li>{@link android.content.ContentProvider}</li>
-<li>{@link android.content.ContentResolver}</li>
-<li>{@link android.database.Cursor}</li>
-</ol>
-
-<h2>See also</h2>
-<ol>
-  <li><a href="{@docRoot}guide/topics/providers/calendar-provider.html">Calendar Provider</a></li>
-</ol>
+    <!-- Related Samples -->
+<h2>Related Samples</h2>
+    <ol>
+        <li>
+            <a href="{@docRoot}resources/samples/ContactManager/index.html">
+            Contact Manager</a> application
+        </li>
+        <li>
+        <a
+        href="{@docRoot}resources/samples/ApiDemos/src/com/example/android/apis/view/List2.html">
+        &quot;Cursor (People)&quot;
+        </a>
+        </li>
+        <li>
+        <a
+        href="{@docRoot}resources/samples/ApiDemos/src/com/example/android/apis/view/List7.html">
+        &quot;Cursor (Phones)&quot;</a>
+        </li>
+    </ol>
 </div>
 </div>
-
 <p>
-Content providers store and retrieve data and make it accessible to all 
-applications.  They're the only way to share data across applications; there's 
-no common storage area that all Android packages can access.
-</p>   
-
-<p>
-Android ships with a number of content providers for common data types 
-(audio, video, images, personal contact information, and so on).  You can 
-see some of them listed in the {@link android.provider android.provider} 
-package.  You can query these providers for the data they contain (although,
-for some, you must acquire the proper permission to read the data).
-</p>   
-
-<p class="note"><strong>Note:</strong> Android 4.0 introduces the Calendar
-Provider. For more information, see <a
-href="{@docRoot}guide/topics/providers/calendar-provider.html">Calendar
-Provider</a>.</p>
-<p>
-If you want to make your own data public, you have two options:  You can 
-create your own content provider (a {@link android.content.ContentProvider} 
-subclass) or you can add the data to an existing provider &mdash; if there's 
-one that controls the same type of data and you have permission to write to it. 
-</p>   
-
-<p>
-This document is an introduction to using content providers.  After a 
-brief discussion of the fundamentals, it explores how to query a content 
-provider, how to modify data controlled by a provider, and how to create
-a content provider of your own.
-</p>   
-
-
-<h2><a name="basics"></a>Content Provider Basics</h2>
-
-<p>
-How a content provider actually stores its data under the covers is 
-up to its designer.  But all content providers implement a common interface 
-for querying the provider and returning results &mdash; as well as for 
-adding, altering, and deleting data.
-</p>   
-
-<p>
-It's an interface that clients use indirectly, most generally through 
-{@link android.content.ContentResolver} objects.  You get a ContentResolver 
-by calling <code>{@link android.content.Context#getContentResolver 
-getContentResolver()}</code> from within the implementation of an Activity 
-or other application component:
-</p>   
-
-<pre>ContentResolver cr = getContentResolver();</pre>
-
-<p>
-You can then use the ContentResolver's methods to interact with whatever 
-content providers you're interested in.
-</p>   
-
-<p>
-When a query is initiated, the Android system identifies the content provider 
-that's the target of the query and makes sure that it is up and running.  
-The system instantiates all ContentProvider objects; you never need to do it 
-on your own.  In fact, you never deal directly with ContentProvider objects 
-at all.  Typically, there's just a single instance of each type of 
-ContentProvider.  But it can communicate with multiple ContentResolver objects 
-in different applications and processes.  The interaction between processes is 
-handled by the ContentResolver and ContentProvider classes.
-</p>   
-
-
-<h3>The data model</h3>
-
-<p>
-Content providers expose their data as a simple table on a database model, 
-where each row is a record and each column is data of a particular type 
-and meaning.  For example, information about people and their phone numbers 
-might be exposed as follows: 
-</p>   
-
-<table>
-   <tr>
-      <th scope="col">_ID</th>
-      <th scope="col">NUMBER</th>
-      <th scope="col">NUMBER_KEY</th>
-      <th scope="col">LABEL</th>
-      <th scope="col">NAME</th>
-      <th scope="col">TYPE</th>
-   </tr>
-   <tr>
-      <td>13</td>
-      <td>(425) 555 6677</td>
-      <td>425 555 6677</td>
-      <td>Kirkland office</td>
-      <td>Bully Pulpit</td>
-      <td>{@code TYPE_WORK}</td>
-   </tr>
-   <tr>
-      <td>44</td>
-      <td>(212) 555-1234</td>
-      <td>212 555 1234</td>
-      <td>NY apartment</td>
-      <td>Alan Vain</td>
-      <td>{@code TYPE_HOME}</td>
-   </tr>
-   <tr>
-      <td>45</td>
-      <td>(212) 555-6657</td>
-      <td>212 555 6657</td>
-      <td>Downtown office</td>
-      <td>Alan Vain</td>
-      <td>{@code TYPE_MOBILE}</td>
-   </tr>
-   <tr>
-      <td>53</td>
-      <td>201.555.4433</td>
-      <td>201 555 4433</td>
-      <td>Love Nest</td>
-      <td>Rex Cars</td>
-      <td>{@code TYPE_HOME}</td>
-   </tr>
-</table>
-
-<p>
-Every record includes a numeric {@code _ID} field that uniquely identifies 
-the record within the table.  IDs can be used to match records in related 
-tables &mdash; for example, to find a person's phone number in one table 
-and pictures of that person in another.
-</p>   
-
-<p>
-A query returns a {@link android.database.Cursor} object that can move from 
-record to record and column to column to read the contents of each field.  
-It has specialized methods for reading each type of data.  So, to read a field, 
-you must know what type of data the field contains.  (There's more on query 
-results and Cursor objects later.)
-</p>   
-
-
-<h3><a name="uri"></a>URIs</h3>
-
-<p>
-Each content provider exposes a public URI (wrapped as a {@link android.net.Uri} 
-object) that uniquely identifies its data set.  A content provider that controls 
-multiple data sets (multiple tables) exposes a separate URI for each one.  All 
-URIs for providers begin with the string "{@code content://}".  The {@code content:} 
-scheme identifies the data as being controlled by a content provider.
-</p>   
-
-<p>
-If you're defining a content provider, it's a good idea to also define a 
-constant for its URI, to simplify client code and make future updates cleaner.  
-Android defines {@code CONTENT_URI} constants for all the providers that come 
-with the platform.  For example, the URI for the table that matches 
-phone numbers to people and the URI for the table that holds pictures of 
-people (both controlled by the Contacts content provider) are:
-</p>   
-
-<p>
-<p style="margin-left: 2em">{@code android.provider.Contacts.Phones.CONTENT_URI}
-<br/>{@code android.provider.Contacts.Photos.CONTENT_URI}
+    Content providers manage access to a structured set of data. They encapsulate the
+    data, and provide mechanisms for defining data security. Content providers are the standard
+    interface that connects data in one process with code running in another process.
 </p>
-
 <p>
-The URI constant is used in all interactions with the content provider. 
-Every {@link android.content.ContentResolver} method takes the URI 
-as its first argument.  It's what identifies which provider the ContentResolver 
-should talk to and which table of the provider is being targeted.
-</p>   
-
-
-<h2><a name="querying"></a>Querying a Content Provider</h2>
-
-<p>
-You need three pieces of information to query a content provider:
-</p>   
-
-<ul>
-<li>The URI that identifies the provider</li>
-<li>The names of the data fields you want to receive</li>
-<li>The data types for those fields</li>
-</ul>
-
-<p>
-If you're querying a particular record, you also need the ID for that record.
-</p>   
-
-
-<h3>Making the query</h3>
-
-<p>
-To query a content provider, you can use either the 
-<code>{@link android.content.ContentResolver#query ContentResolver.query()}</code> 
-method or the <code>{@link  android.app.Activity#managedQuery 
-Activity.managedQuery()}</code> method. 
-Both methods take the same set of arguments, and both return a 
-Cursor object.  However, {@code managedQuery()} 
-causes the activity to manage the life cycle of the Cursor.  A managed Cursor 
-handles all of the niceties, such as unloading itself when the activity pauses, 
-and requerying itself when the activity restarts.  You can ask an Activity to 
-begin managing an unmanaged Cursor object for you by calling 
-<code>{@link android.app.Activity#startManagingCursor 
-Activity.startManagingCursor()}</code>. 
-</p>   
-
-<p>
-The first argument to either <code>{@link android.content.ContentResolver#query query()}</code> 
-or <code>{@link android.app.Activity#managedQuery managedQuery()}</code> is the provider URI 
-&mdash; the {@code CONTENT_URI} constant that identifies a particular 
-ContentProvider and data set (see <a href="#uri">URIs</a> earlier).
-</p>   
-
-<p>
-To restrict a query to just one record, you can append the {@code _ID} value for 
-that record to the URI &mdash; that is, place a string matching the ID as the 
-last segment of the path part of the URI.  For example, if the ID is 23, 
-the URI would be:
-</p>   
-
-<p style="margin-left: 2em">{@code content://. . . ./23}</p>   
-
-<p>
-There are some helper methods, particularly 
-<code>{@link android.content.ContentUris#withAppendedId 
-ContentUris.withAppendedId()}</code> and <code>{@link 
-android.net.Uri#withAppendedPath Uri.withAppendedPath()}</code>, 
-that make it easy to append an ID to a URI.  Both are static methods that return 
-a Uri object with the ID added.  So, for example, if you were looking for record 
-23 in the database of people contacts, you might construct a query as follows:
-</p>   
-
-<pre>
-import android.provider.Contacts.People;
-import android.content.ContentUris;
-import android.net.Uri;
-import android.database.Cursor;
-
-// Use the ContentUris method to produce the base URI for the contact with _ID == 23.
-Uri myPerson = ContentUris.withAppendedId(People.CONTENT_URI, 23);
-
-// Alternatively, use the Uri method to produce the base URI.
-// It takes a string rather than an integer.
-Uri myPerson = Uri.withAppendedPath(People.CONTENT_URI, "23");
-
-// Then query for this specific record:
-Cursor cur = managedQuery(myPerson, null, null, null, null);
-</pre>
-
-<p>
-The other arguments to the <code>{@link android.content.ContentResolver#query query()}</code> 
-and <code>{@link android.app.Activity#managedQuery managedQuery()}</code> methods delimit 
-the query in more detail.  They are:
-</p>   
-
-<ul>
-<li>The names of the data columns that should be returned.  A {@code null} 
-value returns all columns.  Otherwise, only columns that are listed by name
-are returned.  All the content providers that come with the platform define 
-constants for their columns.  For example, the 
-{@link android.provider.Contacts.Phones android.provider.Contacts.Phones} class 
-defines constants for the names of the columns in the phone table illustrated 
-earlier &mdash; {@code _ID}, {@code NUMBER}, {@code NUMBER_KEY}, {@code NAME},
-and so on.</li>
-
-<li><p>A filter detailing which rows to return, formatted as an SQL {@code WHERE} 
-clause (excluding the {@code WHERE} itself).  A {@code null} value returns 
-all rows (unless the URI limits the query to a single record).</p></li>
-
-<li><p>Selection arguments.</p></li>
-
-<li><p>A sorting order for the rows that are returned, formatted as an SQL 
-{@code ORDER BY} clause (excluding the {@code ORDER BY} itself).  A {@code null} 
-value returns the records in the default order for the table, which may be
-unordered.</p></li>  
-</ul>
-
-<p>
-Let's look at an example query to retrieve a list of contact names and their 
-primary phone numbers:
+    When you want to access data in a content provider, you use the
+    {@link android.content.ContentResolver} object in your
+    application's {@link android.content.Context} to communicate with the provider as a client.
+    The {@link android.content.ContentResolver} object communicates with the provider object, an
+    instance of a class that implements {@link android.content.ContentProvider}. The provider
+    object receives data requests from clients, performs the requested action, and
+    returns the results.
 </p>
-
-<pre>
-import android.provider.Contacts.People;
-import android.database.Cursor;
-
-// Form an array specifying which columns to return. 
-String[] projection = new String[] {
-                             People._ID,
-                             People._COUNT,
-                             People.NAME,
-                             People.NUMBER
-                          };
-
-// Get the base URI for the People table in the Contacts content provider.
-Uri contacts =  People.CONTENT_URI;
-
-// Make the query. 
-Cursor managedCursor = managedQuery(contacts,
-                         projection, // Which columns to return 
-                         null,       // Which rows to return (all rows)
-                         null,       // Selection arguments (none)
-                         // Put the results in ascending order by name
-                         People.NAME + " ASC");
-</pre>
-
 <p>
-This query retrieves data from the People table of the Contacts content 
-provider.  It gets the name, primary phone number, and unique record ID for
-each contact.  It also reports the number of records that are returned as 
-the {@code _COUNT} field of each record.
+    You don't need to develop your own provider if you don't intend to share your data with
+    other applications. However, you do need your own provider to provide custom search
+    suggestions in your own application. You also need your own provider if you want to copy and
+    paste complex data or files from your application to other applications.
 </p>
-
 <p>
-The constants for the names of the columns are defined in various interfaces 
-&mdash; {@code _ID} and {@code _COUNT} in 
-{@link android.provider.BaseColumns BaseColumns}, {@code NAME} in {@link android.provider.Contacts.PeopleColumns PeopleColumns}, and {@code NUMBER} 
-in {@link android.provider.Contacts.PhonesColumns PhoneColumns}.  The 
-{@link android.provider.Contacts.People Contacts.People} class implements 
-each of these interfaces, which is why the code example above could refer 
-to them using just the class name. 
+    Android itself includes content providers that manage data such as audio, video, images, and
+    personal contact information. You can see some of them listed in the reference
+    documentation for the
+    <code><a href="{@docRoot}reference/android/provider/package-summary.html">android.provider</a>
+    </code> package. With some restrictions, these providers are accessible to any Android
+    application.
+</p><p>
+    The following topics describe content providers in more detail:
 </p>
-
-
-<h3>What a query returns</h3>
-
-<p>
-A query returns a set of zero or more database records.  The names of the 
-columns, their default order, and their data types are specific to each 
-content provider. 
-But every provider has an {@code _ID} column, which holds a unique numeric 
-ID for each record.  Every provider can also report the number
-of records returned as the {@code _COUNT} column; its value 
-is the same for all rows. 
-</p>
-
-<p> 
-Here is an example result set for the query in the previous section:
-</p>
-
-<table border="1">
-   <tbody>
-      <tr>
-         <th scope="col">_ID</th>
-         <th scope="col">_COUNT</th>
-         <th scope="col">NAME</th>
-         <th scope="col">NUMBER</th>     
-      </tr>
-      <tr>
-         <td>44</td>
-         <td>3</td>
-         <td>Alan Vain</td>
-         <td>212 555 1234</td>   
-      </tr>
-      <tr>
-         <td>13</td>
-         <td>3</td>
-         <td>Bully Pulpit</td>
-         <td>425 555 6677</td>   
-      </tr>
-      <tr>
-         <td>53</td>
-         <td>3</td>
-         <td>Rex Cars</td>
-         <td>201 555 4433</td>
-      </tr>
-   </tbody>
-</table>
-
-<p>
-The retrieved data is exposed by a {@link android.database.Cursor Cursor} 
-object that can be used to iterate backward or forward through the result 
-set.  You can use this object only to read the data.  To add, modify, or 
-delete data, you must use a ContentResolver object.
-</p>
-
-
-<h3>Reading retrieved data</h3>
-
-<p>
-The Cursor object returned by a query provides access to a recordset of
-results.  If you have queried for a specific record by ID, this set will
-contain only one value.  Otherwise, it can contain multiple values.  
-(If there are no matches, it can also be empty.)  You 
-can read data from specific fields in the record, but you must know the 
-data type of the field, because the Cursor object has a separate method
-for reading each type of data &mdash; such as <code>{@link 
-android.database.Cursor#getString getString()}</code>, <code>{@link 
-android.database.Cursor#getInt getInt()}</code>, and <code>{@link 
-android.database.Cursor#getFloat getFloat()}</code>.  
-(However, for most types, if you call the method for reading strings, 
-the Cursor object will give you the String representation of the data.)  
-The Cursor lets you request the column name from the index of the column, 
-or the index number from the column name.
-</p>
-
-<p>
-The following snippet demonstrates reading names and phone numbers from
-the query illustrated earlier:
-</p>
-
-<pre>
-import android.provider.Contacts.People;
-
-private void getColumnData(Cursor cur){ 
-    if (cur.moveToFirst()) {
-
-        String name; 
-        String phoneNumber; 
-        int nameColumn = cur.getColumnIndex(People.NAME); 
-        int phoneColumn = cur.getColumnIndex(People.NUMBER);
-        String imagePath; 
-    
-        do {
-            // Get the field values
-            name = cur.getString(nameColumn);
-            phoneNumber = cur.getString(phoneColumn);
-           
-	    // Do something with the values. 
-            ... 
-
-        } while (cur.moveToNext());
-
-    }
-}
-</pre>
-
-<p>
-If a query can return binary data, such as an image or sound, the data 
-may be directly entered in the table or the table entry for that data may be
-a string specifying a {@code content:} URI that you can use to get the data.  
-In general, smaller amounts of data (say, from 20 to 50K or less) are most often 
-directly entered in the table and can be read by calling 
-<code>{@link android.database.Cursor#getBlob Cursor.getBlob()}</code>.  
-It returns a byte array.
-</p>
-  
-<p>
-If the table entry is a {@code content:} URI, you should never try to open 
-and read the file directly (for one thing, permissions problems can make this 
-fail).  Instead, you should call 
-<code>{@link android.content.ContentResolver#openInputStream 
-ContentResolver.openInputStream()}</code> to get an 
-{@link java.io.InputStream} object that you can use to read the data.  
-</p>
-
-
-<h2><a name="modifying"></a>Modifying Data</h2>
-
-<p>
-Data kept by a content provider can be modified by:
-</p>
-
-<ul>
-<p><li>Adding new records</li>
-<li>Adding new values to existing records</li>
-<li>Batch updating existing records</li>
-<li>Deleting records</li>
-</ul>
-
-<p>
-All data modification is accomplished using {@link android.content.ContentResolver}
-methods.  Some content providers require a more restrictive permission for writing
-data than they do for reading it.  If you don't have permission to write to a 
-content provider, the ContentResolver methods will fail.
-</p>
-
-
-<h3>Adding records</h3>
-
-<p>
-To add a new record to a content provider, first set up a map of key-value pairs 
-in a {@link android.content.ContentValues} object, where each key matches 
-the name of a column in the content provider and the value is the desired 
-value for the new record in that column.  Then call <code>{@link 
-android.content.ContentResolver#insert ContentResolver.insert()}</code> and pass 
-it the URI of the provider and the ContentValues map.  This method returns 
-the full URI of the new record &mdash; that is, the provider's URI with 
-the appended ID for the new record.  You can then use this URI to query and 
-get a Cursor over the new record, and to further modify the record.  
-Here's an example:
-</p>
-
-<pre>
-import android.provider.Contacts.People;
-import android.content.ContentResolver;
-import android.content.ContentValues; 
-
-ContentValues values = new ContentValues();
-
-// Add Abraham Lincoln to contacts and make him a favorite.
-values.put(People.NAME, "Abraham Lincoln");
-// 1 = the new contact is added to favorites
-// 0 = the new contact is not added to favorites
-values.put(People.STARRED, 1);
-
-Uri uri = getContentResolver().insert(People.CONTENT_URI, values);
-</pre>
-
-
-<h3>Adding new values</h3>
-
-<p>
-Once a record exists, you can add new information to it or modify 
-existing information.  For example, the next step in the example above would 
-be to add contact information &mdash; like a phone number or an IM or e-mail 
-address &mdash; to the new entry.  
-</p>
-
-<p>
-The best way to add to a record in the Contacts database is to append 
-the name of the table where the new data goes to the URI for the 
-record, then use the amended URI to add the new data values.  Each
-Contacts table exposes a name for this purpose as a {@code 
-CONTENT_DIRECTORY} constant.  The following code continues the previous 
-example by adding a phone number and e-mail address for the record
-just created:
-</p>
-
-<pre>
-Uri phoneUri = null;
-Uri emailUri = null;
-
-// Add a phone number for Abraham Lincoln.  Begin with the URI for
-// the new record just returned by insert(); it ends with the _ID
-// of the new record, so we don't have to add the ID ourselves.
-// Then append the designation for the phone table to this URI,
-// and use the resulting URI to insert the phone number.
-phoneUri = Uri.withAppendedPath(uri, People.Phones.CONTENT_DIRECTORY);
-
-values.clear();
-values.put(People.Phones.TYPE, People.Phones.TYPE_MOBILE);
-values.put(People.Phones.NUMBER, "1233214567");
-getContentResolver().insert(phoneUri, values);
-
-// Now add an email address in the same way.
-emailUri = Uri.withAppendedPath(uri, People.ContactMethods.CONTENT_DIRECTORY);
-
-values.clear();
-// ContactMethods.KIND is used to distinguish different kinds of
-// contact methods, such as email, IM, etc. 
-values.put(People.ContactMethods.KIND, Contacts.KIND_EMAIL);
-values.put(People.ContactMethods.DATA, "test@example.com");
-values.put(People.ContactMethods.TYPE, People.ContactMethods.TYPE_HOME);
-getContentResolver().insert(emailUri, values);   
-</pre>
-
-<p>
-You can place small amounts of binary data into a table by calling 
-the version of <code>{@link android.content.ContentValues#put 
-ContentValues.put()}</code> that takes a byte array.  
-That would work for a small icon-like image or a short audio clip, for example.  
-However, if you have a large amount of binary data to add, such as a photograph
-or a complete song, put a {@code content:} URI for the data in the table and call
-<code>{@link android.content.ContentResolver#openOutputStream 
-ContentResolver.openOutputStream()}</code> 
-with the file's URI.  (That causes the content provider to store the data 
-in a file and record the file path in a hidden field of the record.)
-</p>
-
-<p>
-In this regard, the {@link android.provider.MediaStore} content 
-provider, the main provider that dispenses image, audio, and video 
-data, employs a special convention:  The same URI that is used with 
-{@code query()} or {@code managedQuery()} to get meta-information 
-about the binary data (such as, the caption of a photograph or the
-date it was taken) is used with {@code openInputStream()} 
-to get the data itself.  Similarly, the same URI that is used with
-{@code insert()} to put meta-information into a MediaStore record 
-is used with {@code openOutputStream()} to place the binary data there.
-The following code snippet illustrates this convention:
-</p>
-
-<pre>
-import android.provider.MediaStore.Images.Media;
-import android.content.ContentValues;
-import java.io.OutputStream;
-
-// Save the name and description of an image in a ContentValues map.  
-ContentValues values = new ContentValues(3);
-values.put(Media.DISPLAY_NAME, "road_trip_1");
-values.put(Media.DESCRIPTION, "Day 1, trip to Los Angeles");
-values.put(Media.MIME_TYPE, "image/jpeg");
-
-// Add a new record without the bitmap, but with the values just set.
-// insert() returns the URI of the new record.
-Uri uri = getContentResolver().insert(Media.EXTERNAL_CONTENT_URI, values);
-
-// Now get a handle to the file for that record, and save the data into it.
-// Here, sourceBitmap is a Bitmap object representing the file to save to the database.
-try {
-    OutputStream outStream = getContentResolver().openOutputStream(uri);
-    sourceBitmap.compress(Bitmap.CompressFormat.JPEG, 50, outStream);
-    outStream.close();
-} catch (Exception e) {
-    Log.e(TAG, "exception while writing image", e);
-}
-</pre>
-
-
-<h3>Batch updating records</h3>
-
-<p>
-To batch update a group of records (for example, to change "NY" to "New York" 
-in all fields), call the <code>{@link 
-android.content.ContentResolver#update ContentResolver.update()}</code> 
-method with the columns and values to change.
-</p>
-
-
-<h3><a name="deletingrecord"></a>Deleting a record</h3>
-
-<p>
-To delete a single record, call {<code>{@link 
-android.content.ContentResolver#delete ContentResolver.delete()}</code> 
-with the URI of a specific row.
-</p>
-
-<p>
-To delete multiple rows, call <code>{@link 
-android.content.ContentResolver#delete ContentResolver.delete()}</code> 
-with the URI of the type of record to delete (for example, {@code android.provider.Contacts.People.CONTENT_URI}) and an SQL {@code WHERE} 
-clause defining which rows to delete.  (<i><b>Caution</b>: 
-Be sure to include a valid {@code WHERE} clause if you're deleting a general 
-type, or you risk deleting more records than you intended!</i>).
-</p>
-
-
-<h2><a name="creating"></a>Creating a Content Provider</h2>
-
-<p>
-To create a content provider, you must:
-</p>
-
-<ul>
-<li>Set up a system for storing the data.  Most content providers 
-store their data using Android's file storage methods or SQLite databases, 
-but you can store your data any way you want.  Android provides the
-{@link android.database.sqlite.SQLiteOpenHelper SQLiteOpenHelper}
-class to help you create a database and {@link 
-android.database.sqlite.SQLiteDatabase SQLiteDatabase} to manage it.</li>
-
-<li><p>Extend the {@link android.content.ContentProvider} class to provide 
-access to the data.</p></li>
-
-<li><p>Declare the content provider in the manifest file for your 
-application (AndroidManifest.xml).</p></li>
-</ul>
-
-<p>
-The following sections have notes on the last two of these tasks.
-</p>
-
-
-<h3>Extending the ContentProvider class</h3>
-
-<p>
-You define a {@link android.content.ContentProvider} subclass to 
-expose your data to others using the conventions expected by 
-ContentResolver and Cursor objects.  Principally, this means 
-implementing six abstract methods declared in the ContentProvider class:
-</p>
-
-<p style="margin-left: 2em">{@code query()}
-<br/>{@code insert()}
-<br/>{@code update()}
-<br/>{@code delete()}
-<br/>{@code getType()}
-<br/>{@code onCreate()}</p>
-
-<p>
-The {@code query()} method must return a {@link android.database.Cursor} object 
-that can iterate over the requested data.  Cursor itself is an interface, but
-Android provides some ready-made Cursor objects that you can use.  For example,
-{@link android.database.sqlite.SQLiteCursor} can iterate over data stored in
-an SQLite database.  You get the Cursor object by calling any of the {@link 
-android.database.sqlite.SQLiteDatabase SQLiteDatabase} class's {@code query()}
-methods.  There are other Cursor implementations &mdash; such as {@link 
-android.database.MatrixCursor} &mdash; for data not stored in a database.
-</p>
-
-<p>
-Because these ContentProvider methods can be called from 
-various ContentResolver objects in different processes and threads, 
-they must be implemented in a thread-safe manner. 
-</p>
-
-<p>
-As a courtesy, you might also want to call <code>{@link android.content.ContentResolver#notifyChange(android.net.Uri,android.database.ContentObserver)
-ContentResolver.notifyChange()}</code> to notify listeners when there are 
-modifications to the data. 
-</p>
-
-<p>
-Beyond defining the subclass itself, there are other steps you should take
-to simplify the work of clients and make the class more accessible: 
-</p>
-
-<ul>
-<li>Define a {@code public static final} {@link android.net.Uri} 
-named {@code CONTENT_URI}.  This is the string that represents the full 
-{@code content:} URI that your content provider handles.  You must define a 
-unique string for this value.  The best solution is to use the fully-qualified 
-class name of the content provider (made lowercase).  So, for example, the 
-URI for a TransportationProvider class could be defined as follows:
-
-<pre>public static final Uri CONTENT_URI = 
-               Uri.parse("content://com.example.codelab.transportationprovider");</pre>
-
-<p>
-If the provider has subtables, also define {@code CONTENT_URI} constants for
-each of the subtables.  These URIs should all have the same authority (since
-that identifies the content provider), and be distinguished only by their paths. 
-For example:
-</p>
-
-<p style="margin-left: 2em">{@code content://com.example.codelab.transportationprovider/train} 
-<br/>{@code content://com.example.codelab.transportationprovider/air/domestic}
-<br/>{@code content://com.example.codelab.transportationprovider/air/international}</p>
-
-<p>
-For an overview of {@code content:} URIs, see the <a href="#urisum">Content URI 
-Summary</a> at the end of this document.
-</p></li>
-
-<li><p>Define the column names that the content provider will return to clients. 
-If you are using an underlying database, these column names are typically 
-identical to the SQL database column names they represent.  Also define
-{@code public static} String constants that clients can use to specify 
-the columns in queries and other instructions.
-</p>
-
-<p>
-Be sure to include an integer column named "{@code _id}" 
-(with the constant {@code _ID}) for 
-the IDs of the records.  You should have this field whether or not you have 
-another field (such as a URL) that is also unique among all records.  If 
-you're using the SQLite database, the {@code _ID} field should be the 
-following type:
-</p>
-
-<p style="margin-left: 2em">{@code INTEGER PRIMARY KEY AUTOINCREMENT}</p>
-
-<p>
-The {@code AUTOINCREMENT} descriptor is optional.  But without it, SQLite
-increments an ID counter field to the next number above the largest
-existing number in the column.  If you delete the last row, the next row added
-will have the same ID as the deleted row.  {@code AUTOINCREMENT} avoids this 
-by having SQLite increment to the next largest value whether deleted or not.
-</p>
-</li>
-
-<li><p>Carefully document the data type of each column.  Clients need this
-information to read the data.</p></li>
-
-<li><p>If you are handling a new data type, you must define a new MIME type 
-to return in your implementation of <code>{@link 
-android.content.ContentProvider#getType ContentProvider.getType()}</code>.  
-The type depends in part on whether or not the {@code content:} URI submitted 
-to {@code getType()} limits the request to a specific record.  There's one 
-form of the MIME type for a single record and another for multiple records.  
-Use the {@link android.net.Uri Uri} methods to help determine what is being 
-requested.  Here is the general format for each type:</p></li>
-
-<ul>
-<li><p>For a single record:&nbsp;&nbsp;&nbsp; {@code vnd.android.cursor.item/vnd.<em>yourcompanyname.contenttype</em>}</p>
-
-<p>For example, a request for train record 122, like this URI,</p>
-<p style="margin-left: 2em">{@code content://com.example.transportationprovider/trains/122}</p>
-
-<p>might return this MIME type:</p>
-<p style="margin-left: 2em">{@code vnd.android.cursor.item/vnd.example.rail}</p>
-</li>
-
-<li><p>For multiple records:&nbsp;&nbsp;&nbsp; {@code vnd.android.cursor.dir/vnd.<em>yourcompanyname.contenttype</em>}</p>
-
-<p>For example, a request for all train records, like the following URI,</p>
-<p style="margin-left: 2em">{@code content://com.example.transportationprovider/trains}</p>
-
-<p>might return this MIME type:</p>
-<p style="margin-left: 2em">{@code vnd.android.cursor.dir/vnd.example.rail}</p>
-</li>
-</ul>
-
-<li><p>If you are exposing byte data that's too big to put in the table itself
-&mdash; such as a large bitmap file &mdash; the field that exposes the
-data to clients should actually contain a {@code content:} URI string.
-This is the field that gives clients access to the data file.  The record 
-should also have another field, named "{@code _data}" that lists the exact file 
-path on the device for that file.  This field is not intended to be read by 
-the client, but by the ContentResolver.  The client will call <code>{@link 
-android.content.ContentResolver#openInputStream ContentResolver.openInputStream()}</code> 
-on the user-facing field holding the URI for the item.  The ContentResolver 
-will request the "{@code _data}" field for that record, and because
-it has higher permissions than a client, it should be able to access
-that file directly and return a read wrapper for the file to the client.</p></li>
-
-</ul>
-
-<p>
-For an example of a private content provider implementation, see the 
-NodePadProvider class in the Notepad sample application that ships with the SDK.
-</p>
-
-
-<h3>Declaring the content provider</h3>
-
-<p>
-To let the Android system know about the content provider you've developed, 
-declare it with a {@code &lt;provider&gt;} element in the application's 
-AndroidManifest.xml file.  Content providers that are not declared in the
-manifest are not visible to the Android system
-</p>
-
-<p>
-The {@code name} attribute is the fully qualified name of the ContentProvider
-subclass.  The {@code authorities} attribute is the authority part of the 
-{@code content:} URI that identifies the provider.
-For example if the ContentProvider subclass is AutoInfoProvider, the 
-{@code &lt;provider&gt;} element might look like this:
-</p>
-
-<pre>
-&lt;provider android:name="com.example.autos.AutoInfoProvider"
-          android:authorities="com.example.autos.autoinfoprovider" 
-          . . . /&gt
-&lt;/provider&gt;
-</pre>
-
-<p>
-Note that the {@code authorities} attribute omits the path part of a 
-{@code content:} URI.  For example, if AutoInfoProvider controlled subtables
-for different types of autos or different manufacturers,
-</p>
-
-<p style="margin-left: 2em">{@code content://com.example.autos.autoinfoprovider/honda}
-<br/>{@code content://com.example.autos.autoinfoprovider/gm/compact}
-<br/>{@code content://com.example.autos.autoinfoprovider/gm/suv}</p>
-
-<p>
-those paths would not be declared in the manifest.  The authority is what 
-identifies the provider, not the path; your provider can interpret the path 
-part of the URI in any way you choose.
-</p>
-
-<p>
-Other {@code &lt;provider&gt;} attributes can set permissions to read and 
-write data, provide for an icon and text that can be displayed to users, 
-enable and disable the provider, and so on.  Set the {@code multiprocess} 
-attribute to "{@code true}" if data does not need to be synchronized between 
-multiple running versions of the content provider.  This permits an instance 
-of the provider to be created in each client process, eliminating the need 
-to perform IPC. 
-</p>
-
-
-<h2><a name="urisum"></a>Content URI Summary</h2>
-
-<p>
-Here is a recap of the important parts of a content URI:
-</p>
-
-<p>
-<img src="{@docRoot}images/content_uri.png" alt="Elements of a content URI" 
-height="80" width="528">
-</p>
-
-<ol type="A">
-<li>Standard prefix indicating that the data is controlled by a
-content provider. It's never modified.</li>
-
-<li><p>The authority part of the URI; it identifies the content provider. 
-For third-party applications, this should be a fully-qualified class name 
-(reduced to lowercase) to ensure uniqueness.  The authority is declared in 
-the {@code &lt;provider&gt;} element's {@code authorities} attribute:</p>
-
-<pre>&lt;provider android:name=".TransportationProvider"
-          android:authorities="com.example.transportationprovider"
-          . . .  &gt;</pre></li>
-
-<li><p>The path that the content provider uses to determine what kind of data is
-being requested.  This can be zero or more segments long.  If the content provider
-exposes only one type of data (only trains, for example), it can be absent.
-If the provider exposes several types, including subtypes, it can be several 
-segments long &mdash; for example, "{@code land/bus}", "{@code land/train}", 
-"{@code sea/ship}", and "{@code sea/submarine}" to give four possibilities.</p></li>
-
-<li><p>The ID of the specific record being requested, if any.  This is the 
-{@code _ID} value of the requested record.  If the request is not limited to
-a single record, this segment and the trailing slash are omitted:</p>
-
-<p style="margin-left: 2em">{@code content://com.example.transportationprovider/trains}</p>
-</li>
-</ol>
-
-
+<dl>
+    <dt>
+        <strong><a href="{@docRoot}guide/topics/providers/content-provider-basics.html">
+        Content Provider Basics</a></strong>
+    </dt>
+    <dd>
+        How to access data in a content provider when the data is organized in tables.
+    </dd>
+    <dt>
+        <strong><a href="{@docRoot}guide/topics/providers/content-provider-creating.html">
+        Creating a Content Provider</a></strong>
+    </dt>
+    <dd>
+        How to create your own content provider.
+    </dd>
+    <dt>
+        <strong><a href="{@docRoot}guide/topics/providers/calendar-provider.html">
+        Calendar Provider</a></strong>
+    </dt>
+    <dd>
+        How to access the Calendar Provider that is part of the Android platform.
+    </dd>
+</dl>
diff --git a/docs/html/guide/topics/ui/notifiers/notifications.jd b/docs/html/guide/topics/ui/notifiers/notifications.jd
index 33b0fec..bef9671 100644
--- a/docs/html/guide/topics/ui/notifiers/notifications.jd
+++ b/docs/html/guide/topics/ui/notifiers/notifications.jd
@@ -245,31 +245,27 @@
 activity like this can cause it to be mixed with your normal application back stack
 in undesired ways.  To make it behave correctly, in the manifest declaration
 for the activity the attributes 
-<code>android:launchMode="singleInstance"</code> and
+<code>android:launchMode="singleTask"</code>,
+<code>android:taskAffinity=""</code> and
 <code>android:excludeFromRecents="true"</code>
 must be set.  The full activity declaration for this sample is:</p>
 
 {@sample development/samples/ApiDemos/AndroidManifest.xml interstitial_affinity}
 
-<p>Because of the use of <code>singleInstance</code>, you must be careful about launching
-any other activities from this one.  These activities will be launched
-in their own task, and care must be taken to make sure this interacts
-well with the current state of your application's task.  This is essentially
+<p>You must be careful when launching other activities from this initial activity,
+because this is not a top-level part of the application, does not appear in
+recents, and needs to be relaunched at any point from the notification with new data
+to show.  This best approach is to make sure any activity launched from it is
+launched in its own task.  When doing this care must be taken to make sure this
+new task interacts well with the current state of your exiting application's
+task.  This is essentially
 the same as switching to the main application as described for the Email style
 notification shown before.  Given the <code>makeMessageIntentStack()</code>
-method previously shown, handling a click here would look something like this:</p>
+method previously shown, handling a click then would look something like this:</p>
 
 {@sample development/samples/ApiDemos/src/com/example/android/apis/app/IncomingMessageInterstitial.java
   app_launch}
 
-<p>If you don't want to use the <code>singleInstance</code> launch mode for
-this activity, an alternative approach is to use <code>android:taskAffinity=""</code>.
-This tells Android that the activity should not be treated as part of the
-main application flow, so it will not get mixed together with that.  All of the
-other issues discussed here do still apply, though this would allow you to start
-additional activities that are part of this notification task instead of switching
-to and replacing the main application task.</p>
-
 <h2 id="ManageYourNotifications">Managing your Notifications</h2>
 
 <p>The {@link android.app.NotificationManager} is a system service that manages all
diff --git a/docs/html/images/publishing/publishing_android_market.png b/docs/html/images/publishing/publishing_android_market.png
new file mode 100755
index 0000000..aa591ef
--- /dev/null
+++ b/docs/html/images/publishing/publishing_android_market.png
Binary files differ
diff --git a/docs/html/index.jd b/docs/html/index.jd
index 9197b5d..fdf860a 100644
--- a/docs/html/index.jd
+++ b/docs/html/index.jd
@@ -1,4 +1,5 @@
 home=true
+metaDescription=The official site for Android developers. Provides the Android SDK and documentation for app developers and designers.
 @jd:body
 
 
@@ -142,6 +143,20 @@
 + "href='{@docRoot}sdk/api_diff/15/changes.html'>diff report</a>. If you're new to Android, "
 + "get started with the <a href='/sdk/index.html'>SDK starter package</a>.</p>"
     },
+    
+    'plus': {
+      'layout':"imgLeft",
+      'icon':"google-plus-small.png",
+      'name':"Google+ Page",
+      'img':"google-plus.png",
+      'title':"Android Developers on Google+",
+      'desc': "<p>We now have a Google+ page for <a "
++ "href='https://plus.google.com/108967384991768947849'>+Android Developers</a>. "
++ "We'll use it to host Hangouts for developers, talk about the latest releases, "
++ "development and design tips, and much more.</p>"
++ "<div style='margin:.7em 0 0 -1.2em'><g:plus href='https://plus.google.com/108967384991768947849' "
++ "size=\"smallbadge\" width=\"275\"></g:plus></div>"
+    },
 
     'tv': {
       'layout':"imgLeft",
@@ -186,5 +201,16 @@
 </script>
 <script type="text/javascript" src="{@docRoot}assets/carousel.js"></script>
 <script type="text/javascript">
-  initCarousel("sdk");
+  initCarousel("plus");
 </script>
+
+<script type="text/javascript" src="https://plus.google.com/108967384991768947849"
+rel="publisher"></script>
+<script type="text/javascript">
+window.___gcfg = {lang: 'en'};
+(function() 
+{var po = document.createElement("script");
+po.type = "text/javascript"; po.async = true;po.src = "https://apis.google.com/js/plusone.js";
+var s = document.getElementsByTagName("script")[0];
+s.parentNode.insertBefore(po, s);
+})();</script>
diff --git a/docs/html/resources/community-more.jd b/docs/html/resources/community-more.jd
index df72926..3089d45 100644
--- a/docs/html/resources/community-more.jd
+++ b/docs/html/resources/community-more.jd
@@ -1,5 +1,5 @@
 community=true
-page.title=IRC and Twitter
+page.title=IRC, G+, Twitter
 @jd:body
 
 <p>In addition to the <a href="community-groups.html">Android developer forums</a>, you can participate in the Android developer community through IRC and you can follow us on Twitter. </p>
@@ -45,8 +45,27 @@
 </li>
 </ul>
 
+
+<h3 id="gplus">Google+</h3>
+<p>We use a Google+ page to host Hangouts for developers, talk about the latest
+releases, development and design tips, and much more.</p>
+
+<div style='margin-top:1em'><g:plus href='https://plus.google.com/108967384991768947849'
+size='badge'></g:plus></div>
+
+
 <h3 id="twitter">Twitter</h3>
 <p>You can follow us on Twitter at this account:</p>
 
 <p style="margin-left:2em;"><a href="http://twitter.com/androiddev">http://twitter.com/androiddev</a></p>
 
+<script type="text/javascript" src="https://plus.google.com/108967384991768947849"
+rel="publisher"></script>
+<script type="text/javascript">
+window.___gcfg = {lang: 'en'};
+(function() 
+{var po = document.createElement("script");
+po.type = "text/javascript"; po.async = true;po.src = "https://apis.google.com/js/plusone.js";
+var s = document.getElementsByTagName("script")[0];
+s.parentNode.insertBefore(po, s);
+})();</script>
\ No newline at end of file
diff --git a/docs/html/resources/resources_toc.cs b/docs/html/resources/resources_toc.cs
index 8df419f..8483037 100644
--- a/docs/html/resources/resources_toc.cs
+++ b/docs/html/resources/resources_toc.cs
@@ -1,7 +1,8 @@
 <ul>
   <li>
-    <h2><span class="en">Android Training</span>
-    </h2>
+    <span class="heading">
+      <span class="en">Android Training</span>
+    </span>
     <ul>
       
       <li><a href="<?cs var:toroot ?>training/index.html">
@@ -237,8 +238,9 @@
       
       
   <li>
-    <h2><span class="en">Technical Resources</span>
-    </h2>
+    <span class="heading">
+      <span class="en">Technical Resources</span>
+    </span>
     <ul>
       <li class="toggle-list">
         <div><a href="<?cs var:toroot ?>resources/browser.html?tag=sample">
@@ -288,29 +290,31 @@
     </ul>
   </li>
   <li>
-    <h2><span class="en">Community</span>
-               <span style="display:none" class="de"></span>
-               <span style="display:none" class="es">Comunidad</span>
-               <span style="display:none" class="fr">Communauté</span>
-               <span style="display:none" class="it"></span>
-               <span style="display:none" class="ja">コミュニティ</span>
-               <span style="display:none" class="zh-CN">社区</span>
-               <span style="display:none" class="zh-TW">社群</span>
-    </h2>
+    <span class="heading">
+      <span class="en">Community</span>
+      <span style="display:none" class="de"></span>
+      <span style="display:none" class="es">Comunidad</span>
+      <span style="display:none" class="fr">Communauté</span>
+      <span style="display:none" class="it"></span>
+      <span style="display:none" class="ja">コミュニティ</span>
+      <span style="display:none" class="zh-CN">社区</span>
+      <span style="display:none" class="zh-TW">社群</span>
+    </span>
     <ul>
       <li><a href="<?cs var:toroot ?>resources/community-groups.html">
             <span class="en">Developer Forums</span>
           </a></li>
       <li><a href="<?cs var:toroot ?>resources/community-more.html">
-            <span class="en">IRC, Twitter</span>
+            <span class="en">IRC, G+, Twitter</span>
           </a></li>
     </ul>
   </li>
 <?cs
   if:android.whichdoc == "online" ?>
   <li>
-    <h2><span class="en">Device Dashboard</span>
-    </h2>
+    <span class="heading">
+      <span class="en">Device Dashboard</span>
+    </span>
     <ul>
       <li><a href="<?cs var:toroot ?>resources/dashboard/platform-versions.html">
             <span class="en">Platform Versions</span>
@@ -327,7 +331,9 @@
 ?>
 
   <li>
-   <h2><span class="en">More</span></h2>
+    <span class="heading">
+      <span class="en">More</span>
+    </span>
     <ul>
       <li><a href="<?cs var:toroot ?>resources/faq/commontasks.html">
             <span class="en">Common Tasks </span>
diff --git a/docs/html/sdk/android-2.3.3.jd b/docs/html/sdk/android-2.3.3.jd
index 7a5b044..023e2e4 100644
--- a/docs/html/sdk/android-2.3.3.jd
+++ b/docs/html/sdk/android-2.3.3.jd
@@ -336,7 +336,7 @@
 <li>English, New Zealand (en_NZ)</li>
 <li>English, Singapore(en_SG)</li>
 <li>English, US (en_US)</li>
-<li>English, Zimbabwe (en_ZA)</li>
+<li>English, South Africa (en_ZA)</li>
 <li>Spanish (es_ES)</li>
 <li>Spanish, US (es_US)</li>
 <li>Finnish, Finland (fi_FI)</li>
diff --git a/docs/html/sdk/android-2.3.4.jd b/docs/html/sdk/android-2.3.4.jd
index 4cb44b9..eeaa69a 100644
--- a/docs/html/sdk/android-2.3.4.jd
+++ b/docs/html/sdk/android-2.3.4.jd
@@ -296,7 +296,7 @@
 <li>English, New Zealand (en_NZ)</li>
 <li>English, Singapore(en_SG)</li>
 <li>English, US (en_US)</li>
-<li>English, Zimbabwe (en_ZA)</li>
+<li>English, South Africa (en_ZA)</li>
 <li>Spanish (es_ES)</li>
 <li>Spanish, US (es_US)</li>
 <li>Finnish, Finland (fi_FI)</li>
diff --git a/docs/html/sdk/android-2.3.jd b/docs/html/sdk/android-2.3.jd
index e7aa0fa..fc4f5aa 100644
--- a/docs/html/sdk/android-2.3.jd
+++ b/docs/html/sdk/android-2.3.jd
@@ -859,7 +859,7 @@
 <li>English, New Zealand (en_NZ)</li>
 <li>English, Singapore(en_SG)</li>
 <li>English, US (en_US)</li>
-<li>English, Zimbabwe (en_ZA)</li>
+<li>English, South Africa (en_ZA)</li>
 <li>Spanish (es_ES)</li>
 <li>Spanish, US (es_US)</li>
 <li>Finnish, Finland (fi_FI)</li>
diff --git a/docs/html/sdk/android-3.0.jd b/docs/html/sdk/android-3.0.jd
index 96b92d9..49fefee 100644
--- a/docs/html/sdk/android-3.0.jd
+++ b/docs/html/sdk/android-3.0.jd
@@ -1119,7 +1119,7 @@
 <li>English, New Zealand (en_NZ)</li>
 <li>English, Singapore(en_SG)</li>
 <li>English, US (en_US)</li>
-<li>English, Zimbabwe (en_ZA)</li>
+<li>English, South Africa (en_ZA)</li>
 <li>Spanish (es_ES)</li>
 <li>Spanish, US (es_US)</li>
 <li>Finnish, Finland (fi_FI)</li>
diff --git a/docs/html/sdk/android-3.1.jd b/docs/html/sdk/android-3.1.jd
index 78f265d..b9cf969 100644
--- a/docs/html/sdk/android-3.1.jd
+++ b/docs/html/sdk/android-3.1.jd
@@ -1040,7 +1040,7 @@
 <li>English, New Zealand (en_NZ)</li>
 <li>English, Singapore(en_SG)</li>
 <li>English, US (en_US)</li>
-<li>English, Zimbabwe (en_ZA)</li>
+<li>English, South Africa (en_ZA)</li>
 <li>Spanish (es_ES)</li>
 <li>Spanish, US (es_US)</li>
 <li>Finnish, Finland (fi_FI)</li>
diff --git a/docs/html/sdk/android-4.0.3.jd b/docs/html/sdk/android-4.0.3.jd
index 1fca8df..809c83c 100644
--- a/docs/html/sdk/android-4.0.3.jd
+++ b/docs/html/sdk/android-4.0.3.jd
@@ -435,7 +435,7 @@
 <li>English, New Zealand (en_NZ)</li>
 <li>English, Singapore(en_SG)</li>
 <li>English, US (en_US)</li>
-<li>English, Zimbabwe (en_ZA)</li>
+<li>English, South Africa (en_ZA)</li>
 <li>Spanish (es_ES)</li>
 <li>Spanish, US (es_US)</li>
 <li>Finnish, Finland (fi_FI)</li>
diff --git a/docs/html/sdk/android-4.0.jd b/docs/html/sdk/android-4.0.jd
index 5f55947..2cad86b 100644
--- a/docs/html/sdk/android-4.0.jd
+++ b/docs/html/sdk/android-4.0.jd
@@ -1963,7 +1963,7 @@
 <li>English, New Zealand (en_NZ)</li>
 <li>English, Singapore(en_SG)</li>
 <li>English, US (en_US)</li>
-<li>English, Zimbabwe (en_ZA)</li>
+<li>English, South Africa (en_ZA)</li>
 <li>Spanish (es_ES)</li>
 <li>Spanish, US (es_US)</li>
 <li>Finnish, Finland (fi_FI)</li>
diff --git a/docs/html/sdk/eclipse-adt.jd b/docs/html/sdk/eclipse-adt.jd
index f15da78..30825ee 100644
--- a/docs/html/sdk/eclipse-adt.jd
+++ b/docs/html/sdk/eclipse-adt.jd
@@ -42,7 +42,7 @@
 
 <p>Developing in Eclipse with ADT is highly recommended and is the fastest way
 to get started. With the guided project setup it provides, as well as tools
-integration, custom XML editors, and debug ouput pane, ADT gives you an
+integration, custom XML editors, and debug output pane, ADT gives you an
 incredible boost in developing Android applications. </p>
 
 <p>This document provides step-by-step instructions on how to download the ADT
@@ -1104,7 +1104,7 @@
 <h3 id="downloading">Downloading the ADT Plugin</h3>
 
 <p>Use the Update Manager feature of your Eclipse installation to install the latest
-revision of ADT on your development computer.<>
+revision of ADT on your development computer.</p>
 
 <p>Assuming that you have a compatible version of the Eclipse IDE installed, as
 described in <a href="#preparing">Preparing for Installation</a>, above, follow
diff --git a/docs/html/sdk/index.jd b/docs/html/sdk/index.jd
index 65a1f46..5cf05e0 100644
--- a/docs/html/sdk/index.jd
+++ b/docs/html/sdk/index.jd
@@ -1,4 +1,5 @@
 page.title=Android SDK
+page.metaDescription=Download the official Android SDK to develop apps for Android-powered devices.
 sdk.redirect=0
 
 sdk.win_installer=installer_r16-windows.exe
diff --git a/docs/html/sdk/sdk_toc.cs b/docs/html/sdk/sdk_toc.cs
index 5f6a57f..0de477a 100644
--- a/docs/html/sdk/sdk_toc.cs
+++ b/docs/html/sdk/sdk_toc.cs
@@ -1,7 +1,7 @@
 <?cs if:!sdk.redirect ?>
 <ul>
   <li>
-    <h2>
+    <span class="heading">
       <span class="en">Android SDK Starter Package</span>
       <span style="display:none" class="de">Aktuelle SDK-Version</span>
       <span style="display:none" class="es">Versión actual del SDK</span>
@@ -10,7 +10,7 @@
       <span style="display:none" class="ja">現在リリースされている SDK</span>
       <span style="display:none" class="zh-CN">当前的 SDK 版本</span>
       <span style="display:none" class="zh-TW">目前 SDK 發行版本</span>
-    </h2>
+    </span>
     <ul><?cs
   if:android.whichdoc == "online" ?>
       <li><a href="<?cs var:toroot ?>sdk/index.html">
@@ -37,7 +37,8 @@
     </ul>
   </li><?cs
   if:sdk.preview ?>
-  <li><h2>Android 3.0 Preview SDK</h2>
+  <li>
+    <span class="heading">Android 3.0 Preview SDK</span>
     <ul>
       <li><a href="<?cs var:toroot ?>sdk/preview/start.html">Getting Started</a> <span
 class="new">new!</span></li>
@@ -46,13 +47,14 @@
   /if ?>
   <?cs
   if:sdk.preview ?>
-  <li><h2>Android x.x Preview</h2>
+  <li>
+    <span class="heading">Android x.x Preview</span>
     <ul>
     </ul>
   </li><?cs
   /if ?>
   <li>
-    <h2>
+    <span class="heading">
       <span class="en">Downloadable SDK Components</span>
       <span style="display:none" class="de"></span>
       <span style="display:none" class="es"></span>
@@ -61,7 +63,7 @@
       <span style="display:none" class="ja"></span>
       <span style="display:none" class="zh-CN"></span>
       <span style="display:none" class="zh-TW"></span>
-    </h2>
+    </span>
     <ul>
       <li><a href="<?cs var:toroot ?>sdk/adding-components.html">
       <span class="en">Adding SDK Components</span>
@@ -158,7 +160,7 @@
     </ul>
   </li>
   <li>
-      <h2>
+    <span class="heading">
       <span class="en">ADT Plugin for Eclipse</span>
       <span style="display:none" class="de"></span>
       <span style="display:none" class="es"></span>
@@ -167,7 +169,7 @@
       <span style="display:none" class="ja"></span>
       <span style="display:none" class="zh-CN"></span>
       <span style="display:none" class="zh-TW"></span>
-      </h2>
+    </span>
     <ul>
       <li><a href="<?cs var:toroot ?>sdk/eclipse-adt.html">ADT 16.0.1
       <span style="display:none" class="de"></span>
@@ -182,7 +184,8 @@
     </ul>
   </li>
   <li>
-    <h2><span class="en">Native Development Tools</span>
+    <span class="heading">
+      <span class="en">Native Development Tools</span>
       <span style="display:none" class="de"></span>
       <span style="display:none" class="es"></span>
       <span style="display:none" class="fr"></span>
@@ -190,7 +193,7 @@
       <span style="display:none" class="ja"></span>
       <span style="display:none" class="zh-CN"></span>
       <span style="display:none" class="zh-TW"></span>
-    </h2>
+    </span>
     <ul>
       <li><a href="<?cs var:toroot ?>sdk/ndk/index.html">Android NDK, r7</a>
         <span class="new">new!</span>
@@ -200,7 +203,7 @@
   </li>
 
   <li>
-    <h2>
+    <span class="heading">
       <span class="en">More Information</span>
       <span style="display:none" class="de"></span>
       <span style="display:none" class="es"></span>
@@ -209,7 +212,7 @@
       <span style="display:none" class="ja"></span>
       <span style="display:none" class="zh-CN"></span>
       <span style="display:none" class="zh-TW"></span>
-    </h2>
+    </span>
     <ul>
       <li><a href="<?cs var:toroot ?>sdk/oem-usb.html">
         <span class="en">OEM USB Drivers</span>
diff --git a/docs/html/shareables/adl/2010Q2_Business_Overview.pdf b/docs/html/shareables/adl/2010Q2_Business_Overview.pdf
deleted file mode 100644
index c34ea15..0000000
--- a/docs/html/shareables/adl/2010Q2_Business_Overview.pdf
+++ /dev/null
Binary files differ
diff --git a/docs/html/shareables/adl/2010Q2_Market_Overview.pdf b/docs/html/shareables/adl/2010Q2_Market_Overview.pdf
deleted file mode 100644
index 3752258..0000000
--- a/docs/html/shareables/adl/2010Q2_Market_Overview.pdf
+++ /dev/null
Binary files differ
diff --git a/docs/html/shareables/adl/2010Q2_SDK_Overview.pdf b/docs/html/shareables/adl/2010Q2_SDK_Overview.pdf
deleted file mode 100644
index 8796584..0000000
--- a/docs/html/shareables/adl/2010Q2_SDK_Overview.pdf
+++ /dev/null
Binary files differ
diff --git a/docs/html/shareables/adl/2011Q3_Android_Market_for_Developers.pdf b/docs/html/shareables/adl/2011Q3_Android_Market_for_Developers.pdf
deleted file mode 100644
index 598a27e..0000000
--- a/docs/html/shareables/adl/2011Q3_Android_Market_for_Developers.pdf
+++ /dev/null
Binary files differ
diff --git a/docs/html/shareables/adl/2011Q3_Designing_UIs_for_Phones_and_Tablets.pdf b/docs/html/shareables/adl/2011Q3_Designing_UIs_for_Phones_and_Tablets.pdf
deleted file mode 100644
index 6ef41dd..0000000
--- a/docs/html/shareables/adl/2011Q3_Designing_UIs_for_Phones_and_Tablets.pdf
+++ /dev/null
Binary files differ
diff --git a/docs/html/shareables/adl/2011Q3_Introduction_to_Honeycomb_APIs.pdf b/docs/html/shareables/adl/2011Q3_Introduction_to_Honeycomb_APIs.pdf
deleted file mode 100755
index e56d2377..0000000
--- a/docs/html/shareables/adl/2011Q3_Introduction_to_Honeycomb_APIs.pdf
+++ /dev/null
Binary files differ
diff --git a/docs/html/shareables/icon_templates-v1.0.zip b/docs/html/shareables/icon_templates-v1.0.zip
deleted file mode 100644
index 94fbcdc..0000000
--- a/docs/html/shareables/icon_templates-v1.0.zip
+++ /dev/null
Binary files differ
diff --git a/docs/html/training/design-navigation/ancestral-temporal.jd b/docs/html/training/design-navigation/ancestral-temporal.jd
index 02e43e1..c0b1aef 100644
--- a/docs/html/training/design-navigation/ancestral-temporal.jd
+++ b/docs/html/training/design-navigation/ancestral-temporal.jd
@@ -21,6 +21,7 @@
 
 <h2>You should also read</h2>
 <ul>
+  <li><a href="{@docRoot}design/patterns/navigation.html">Android Design: Navigation</a></li>
   <li><a href="{@docRoot}guide/topics/fundamentals/tasks-and-back-stack.html">Tasks and Back Stack</a></li>
 </ul>
 
@@ -30,6 +31,11 @@
 
 <p>Now that users can navigate <a href="descendant-lateral.html">deep into</a> the application's screen hierarchy, we need to provide a method for navigating up the hierarchy, to parent and ancestor screens. Additionally, we should ensure that temporal navigation via the BACK button is respected to respect Android conventions.</p>
 
+<div class="design-announce">
+<p><strong>Back/Up Navigation Design</strong></p>
+  <p>For design guidelines, read Android Design's <a
+  href="{@docRoot}design/patterns/navigation.html">Navigation</a> pattern guide.</p>
+</div>
 
 <h2 id="temporal-navigation">Support Temporal Navigation: <em>Back</em></h2>
 
@@ -49,7 +55,7 @@
 
 <h2 id="ancestral-navigation">Provide Ancestral Navigation: <em>Up</em> and <em>Home</em></h2>
 
-<p>Before Android 3.0, the most common form of ancestral navigation was the <em>Home</em> metaphor. This was generally implemented as a <em>Home</em> item accessible via the device's MENU button, or a <em>Home</em> button at the top-left of the screen, usually as a component of the <a href="{@docRoot}guide/topics/ui/actionbar.html">Action Bar</a>. Upon selecting <em>Home</em>, the user would be taken to the screen at the top of the screen hierarchy, generally known as the application's home screen.</p>
+<p>Before Android 3.0, the most common form of ancestral navigation was the <em>Home</em> metaphor. This was generally implemented as a <em>Home</em> item accessible via the device's MENU button, or a <em>Home</em> button at the top-left of the screen, usually as a component of the Action Bar (<a href="{@docRoot}design/patterns/actionbar.html">pattern docs</a> at Android Design). Upon selecting <em>Home</em>, the user would be taken to the screen at the top of the screen hierarchy, generally known as the application's home screen.</p>
 
 <p>Providing direct access to the application's home screen can give the user a sense of comfort and security. Regardless of where they are in the application, if they get lost in the app, they can select <em>Home</em> to arrive back at the familiar home screen.</p>
 
diff --git a/docs/html/training/design-navigation/descendant-lateral.jd b/docs/html/training/design-navigation/descendant-lateral.jd
index ebfd913..0064bd4 100644
--- a/docs/html/training/design-navigation/descendant-lateral.jd
+++ b/docs/html/training/design-navigation/descendant-lateral.jd
@@ -18,9 +18,18 @@
   <li><a href="#buttons">Buttons and Simple Targets</a></li>
   <li><a href="#lists">Lists, Grids, Carousels, and Stacks</a></li>
   <li><a href="#tabs">Tabs</a></li>
-  <li><a href="#paging">Horizontal Paging</a></li>
+  <li><a href="#paging">Horizontal Paging (Swipe Views)</a></li>
 </ol>
 
+<h2>You should also read</h2>
+<ul>
+  <li><a href="{@docRoot}design/building-blocks/buttons.html">Android Design: Buttons</a></li>
+  <li><a href="{@docRoot}design/building-blocks/lists.html">Android Design: Lists</a></li>
+  <li><a href="{@docRoot}design/building-blocks/grid-lists.html">Android Design: Grid Lists</a></li>
+  <li><a href="{@docRoot}design/building-blocks/tabs.html">Android Design: Tabs</a></li>
+  <li><a href="{@docRoot}design/patterns/swipe-views.html">Android Design: Swipe Views</a></li>
+</ul>
+
 </div>
 </div>
 
@@ -48,6 +57,12 @@
 
 <h2 id="buttons">Buttons and Simple Targets</h2>
 
+<div class="design-announce">
+<p><strong>Button Design</strong></p>
+  <p>For design guidelines, read Android Design's <a
+  href="{@docRoot}design/building-blocks/buttons.html">Buttons</a> guide.</p>
+</div>
+
 <p>For section-related screens, offering touchable and keyboard-focusable targets in the parent is generally the most straightforward and familiar kind of touch-based navigation interface. Examples of such targets include buttons, fixed-size list views, or text links, although the latter is not an ideal UI (user interface) element for touch-based navigation. Upon selecting one of these targets, the child screen is opened, replacing the current context (screen) entirely. Buttons and other simple targets are rarely used for representing items in a collection.</p>
 
 
@@ -64,6 +79,13 @@
 
 <h2 id="lists">Lists, Grids, Carousels, and Stacks</h2>
 
+<div class="design-announce">
+<p><strong>List and Grid List Design</strong></p>
+  <p>For design guidelines, read Android Design's <a
+  href="{@docRoot}design/building-blocks/lists.html">Lists</a> and <a
+  href="{@docRoot}design/building-blocks/grid-lists.html">Grid Lists</a> guides.</p>
+</div>
+
 <p>For collection-related screens, and especially for textual information, vertically scrolling lists are often the most straightforward and familiar kind of interface. For more visual or media-rich content items such as photos or videos, vertically scrolling grids of items, horizontally scrolling lists (sometimes referred to as <em>carousels</em>), or stacks (sometimes referred to as <em>cards</em>) can be used instead. These UI elements are generally best used for presenting item collections or large sets of child screens (for example, a list of stories or a list of 10 or more news topics), rather than a small set of unrelated, sibling child screens.</p>
 
 
@@ -80,6 +102,12 @@
 
 <h2 id="tabs">Tabs</h2>
 
+<div class="design-announce">
+<p><strong>Tab Design</strong></p>
+  <p>For design guidelines, read Android Design's <a
+  href="{@docRoot}design/building-blocks/tabs.html">Tabs</a> guide.</p>
+</div>
+
 <p>Using tabs is a very popular solution for lateral navigation. This pattern allows grouping of sibling screens, in that the tab content container in the parent screen can embed child screens that otherwise would be entirely separate contexts. Tabs are most appropriate for small sets (4 or fewer) of section-related screens.</p>
 
 
@@ -89,7 +117,7 @@
 <p class="img-caption"><strong>Figure 5.</strong> Example phone and tablet tab-based navigation interfaces with relevant screen map excerpt.</p>
 
 
-<p>Several best practices apply when using tabs. Tabs should be persistent across immediate related screens. Only the designated content region should change when selecting a tab, and tab indicators should remain available at all times. Additionally, tab switches should not be treated as history. For example, if a user switches from a tab <em>A</em> to another tab <em>B</em>, pressing the BACK button (more on that in the <a href="ancestral-temporal.html">next lesson</a>) should not re-select tab <em>A</em>. Tabs are usually laid out horizontally, although other presentations of tab navigation such as using a drop-down list in the <a href="{@docRoot}guide/topics/ui/actionbar.html">Action Bar</a> are sometimes appropriate. Lastly, and most importantly, <em>tabs should always run along the top of the screen</em>, and should not be aligned to the bottom of the screen.</p>
+<p>Several best practices apply when using tabs. Tabs should be persistent across immediate related screens. Only the designated content region should change when selecting a tab, and tab indicators should remain available at all times. Additionally, tab switches should not be treated as history. For example, if a user switches from a tab <em>A</em> to another tab <em>B</em>, pressing the BACK button (more on that in the <a href="ancestral-temporal.html">next lesson</a>) should not re-select tab <em>A</em>. Tabs are usually laid out horizontally, although other presentations of tab navigation such as using a drop-down list in the Action Bar (<a href="{@docRoot}design/patterns/actionbar.html">pattern docs</a> at Android Design) are sometimes appropriate. Lastly, and most importantly, <em>tabs should always run along the top of the screen</em>, and should not be aligned to the bottom of the screen.</p>
 
 <p>There are some obvious immediate benefits of tabs over simpler list- and button-based navigation:</p>
 
@@ -101,9 +129,15 @@
 <p>A common criticism is that space must be reserved for the tab indicators, detracting from the space available to tab contents. This consequence is usually acceptable, and the tradeoff commonly weighs in favor of using this pattern. You should also feel free to customize tab indicators, showing text and/or icons to make optimal use of vertical space. When adjusting indicator heights however, ensure that tab indicators are large enough for a human finger to touch without error.</p>
 
 
-<h2 id="paging">Horizontal Paging</h2>
+<h2 id="paging">Horizontal Paging (Swipe Views)</h2>
 
-<p>Another popular lateral navigation pattern is horizontal paging. This pattern applies best to collection-related sibling screens, such as a list of categories (world, business, technology, and health stories). Like tabs, this pattern also allows grouping screens in that the parent presents the contents of child screens embedded within its own layout.</p>
+<div class="design-announce">
+<p><strong>Swipe Views Design</strong></p>
+  <p>For design guidelines, read Android Design's <a
+  href="{@docRoot}design/patterns/swipe-views.html">Swipe Views</a> pattern guides.</p>
+</div>
+
+<p>Another popular lateral navigation pattern is horizontal paging, also referred to as swipe views. This pattern applies best to collection-related sibling screens, such as a list of categories (world, business, technology, and health stories). Like tabs, this pattern also allows grouping screens in that the parent presents the contents of child screens embedded within its own layout.</p>
 
 
 <img src="{@docRoot}images/training/app-navigation-descendant-lateral-paging.png"
diff --git a/docs/html/training/design-navigation/index.jd b/docs/html/training/design-navigation/index.jd
index e02d52e..cb20a60 100644
--- a/docs/html/training/design-navigation/index.jd
+++ b/docs/html/training/design-navigation/index.jd
@@ -14,7 +14,7 @@
 
 <p>This class is not specific to any particular version of the Android platform. It is also primarily design-focused and does not require knowledge of the Android SDK. That said, you should have experience using an Android device for a better understanding of the context in which Android applications run.</p>
 
-<p>You should also have basic familiarity with the <a href="{@docRoot}guide/topics/ui/actionbar.html">Action Bar</a>, used across most applications in devices running Android 3.0 and later.</p>
+<p>You should also have basic familiarity with the Action Bar (<a href="{@docRoot}design/patterns/actionbar.html">pattern docs</a> at Android Design), used across most applications in devices running Android 3.0 and later.</p>
 
 
 </div>
diff --git a/docs/html/training/design-navigation/multiple-sizes.jd b/docs/html/training/design-navigation/multiple-sizes.jd
index 7a8139f..ebaec0f 100644
--- a/docs/html/training/design-navigation/multiple-sizes.jd
+++ b/docs/html/training/design-navigation/multiple-sizes.jd
@@ -22,6 +22,7 @@
 
 <h2>You should also read</h2>
 <ul>
+  <li><a href="{@docRoot}design/patterns/multi-pane-layouts.html">Android Design: Multi-pane Layouts</a></li>
   <li><a href="{@docRoot}training/multiscreen/index.html">Designing for Multiple Screens</a></li>
 </ul>
 
@@ -35,6 +36,12 @@
 
 <h2 id="multi-pane-layouts">Group Screens with Multi-pane Layouts</h2>
 
+<div class="design-announce">
+<p><strong>Multi-pane Layout Design</strong></p>
+  <p>For design guidelines, read Android Design's <a
+  href="{@docRoot}design/patterns/multi-pane-layouts.html">Multi-pane Layouts</a> pattern guide.</p>
+</div>
+
 <p>3 to 4-inch screens are generally only suitable for showing a single vertical pane of content at a time, be it a list of items, or detail information about an item, etc. Thus on such devices, screens generally map one-to-one with levels in the information hierarchy (<em>categories</em> &rarr; <em>object list</em> &rarr; <em>object detail</em>).</p>
 
 <p>Larger screens such as those found on tablets and TVs, on the other hand, generally have much more available screen space and are able to present multiple panes of content. In landscape, panes are usually ordered from left to right in increasing detail order. Users are especially accustomed to multiple panes on larger screens from years and years of desktop application and desktop web site use. Many desktop applications and websites offer a left-hand navigation pane or use a master/detail two-pane layout.</p>
@@ -76,12 +83,12 @@
   <li><strong>Expand/collapse</strong>
     <img src="{@docRoot}images/training/app-navigation-multiple-sizes-strategy-collapse.png"
       alt="Expand/collapse strategy">
-    <p>A variation on the stretch strategy is to collapse the contents of the left pane when in portrait. This works quite well with master/detail panes where the left (master) pane contains easily collapsible list items. An example would be for a realtime chat application. In landscape, the left list could contain chat contact photos, names, and online statuses. In portrait, horizontal space could be collapsed by hiding contact names and only showing photos and online status indicator icons.</p></li>
+    <p>A variation on the stretch strategy is to collapse the contents of the left pane when in portrait. This works quite well with master/detail panes where the left (master) pane contains easily collapsible list items. An example would be for a realtime chat application. In landscape, the left list could contain chat contact photos, names, and online statuses. In portrait, horizontal space could be collapsed by hiding contact names and only showing photos and online status indicator icons. Optionally also provide an expand control that allows the user to expand the left pane content to its larger width and vice versa.</p></li>
 
   <li><strong>Show/Hide</strong>
     <img src="{@docRoot}images/training/app-navigation-multiple-sizes-strategy-show-hide.png"
       alt="Show/Hide strategy">
-    <p>In this scenario, the left pane is completely hidden in portrait mode. However, <em>to ensure the functional parity</em> of your screen in portrait and landscape, the left pane should be made available via an onscreen affordance (such as a button). It's usually appropriate to use the <em>Up</em> button in the <a href="{@docRoot}guide/topics/ui/actionbar.html">Action Bar</a> to show the left pane, as is discussed in a <a href="ancestral-temporal.html">later lesson</a>.</p></li>
+    <p>In this scenario, the left pane is completely hidden in portrait mode. However, <em>to ensure the functional parity</em> of your screen in portrait and landscape, the left pane should be made available via an onscreen affordance (such as a button). It's usually appropriate to use the <em>Up</em> button in the Action Bar (<a href="{@docRoot}design/patterns/actionbar.html">pattern docs</a> at Android Design) to show the left pane, as is discussed in a <a href="ancestral-temporal.html">later lesson</a>.</p></li>
 
   <li><strong>Stack</strong>
     <img src="{@docRoot}images/training/app-navigation-multiple-sizes-strategy-stack.png"
diff --git a/docs/html/training/design-navigation/wireframing.jd b/docs/html/training/design-navigation/wireframing.jd
index c7687dd..6deceb1 100644
--- a/docs/html/training/design-navigation/wireframing.jd
+++ b/docs/html/training/design-navigation/wireframing.jd
@@ -121,5 +121,5 @@
   <li><a href="{@docRoot}guide/topics/ui/index.html">Developer's Guide: User Interface</a>: learn how to implement your user interface designs using the Android SDK.</li>
   <li><a href="{@docRoot}guide/topics/ui/actionbar.html">Action Bar</a>: implement tabs, up navigation, on-screen actions, etc.
   <li><a href="{@docRoot}guide/topics/fundamentals/fragments.html">Fragments</a>: implement re-usable, multi-pane layouts
-  <li><a href="{@docRoot}sdk/compatibility-library.html">Support Library</a>: implement horizontal paging using <code>ViewPager</code></li>
+  <li><a href="{@docRoot}sdk/compatibility-library.html">Support Library</a>: implement horizontal paging (swipe views) using <code>ViewPager</code></li>
 </ul>
diff --git a/packages/SystemUI/res/drawable-hdpi/stat_sys_data_wimax_signal_0.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_data_wimax_signal_0.png
index f24d801..55272f5 100644
--- a/packages/SystemUI/res/drawable-hdpi/stat_sys_data_wimax_signal_0.png
+++ b/packages/SystemUI/res/drawable-hdpi/stat_sys_data_wimax_signal_0.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/stat_sys_data_wimax_signal_0_fully.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_data_wimax_signal_0_fully.png
index 66eb5db..e5e6305 100644
--- a/packages/SystemUI/res/drawable-hdpi/stat_sys_data_wimax_signal_0_fully.png
+++ b/packages/SystemUI/res/drawable-hdpi/stat_sys_data_wimax_signal_0_fully.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/stat_sys_data_wimax_signal_1.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_data_wimax_signal_1.png
index edff74a..f595ae1 100644
--- a/packages/SystemUI/res/drawable-hdpi/stat_sys_data_wimax_signal_1.png
+++ b/packages/SystemUI/res/drawable-hdpi/stat_sys_data_wimax_signal_1.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/stat_sys_data_wimax_signal_1_fully.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_data_wimax_signal_1_fully.png
index 1cdd4eb..f555fc9 100644
--- a/packages/SystemUI/res/drawable-hdpi/stat_sys_data_wimax_signal_1_fully.png
+++ b/packages/SystemUI/res/drawable-hdpi/stat_sys_data_wimax_signal_1_fully.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/stat_sys_data_wimax_signal_2.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_data_wimax_signal_2.png
index 95fdaf9..ecf1349 100644
--- a/packages/SystemUI/res/drawable-hdpi/stat_sys_data_wimax_signal_2.png
+++ b/packages/SystemUI/res/drawable-hdpi/stat_sys_data_wimax_signal_2.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/stat_sys_data_wimax_signal_2_fully.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_data_wimax_signal_2_fully.png
index 8678e39..918a9f9 100644
--- a/packages/SystemUI/res/drawable-hdpi/stat_sys_data_wimax_signal_2_fully.png
+++ b/packages/SystemUI/res/drawable-hdpi/stat_sys_data_wimax_signal_2_fully.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/stat_sys_data_wimax_signal_3.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_data_wimax_signal_3.png
index 1d2d290..f5d1479 100644
--- a/packages/SystemUI/res/drawable-hdpi/stat_sys_data_wimax_signal_3.png
+++ b/packages/SystemUI/res/drawable-hdpi/stat_sys_data_wimax_signal_3.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/stat_sys_data_wimax_signal_3_fully.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_data_wimax_signal_3_fully.png
index c2e4b78..f58a19c 100644
--- a/packages/SystemUI/res/drawable-hdpi/stat_sys_data_wimax_signal_3_fully.png
+++ b/packages/SystemUI/res/drawable-hdpi/stat_sys_data_wimax_signal_3_fully.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/stat_sys_data_wimax_signal_disconnected.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_data_wimax_signal_disconnected.png
index 51b839f..744b1fa 100644
--- a/packages/SystemUI/res/drawable-hdpi/stat_sys_data_wimax_signal_disconnected.png
+++ b/packages/SystemUI/res/drawable-hdpi/stat_sys_data_wimax_signal_disconnected.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/stat_sys_data_wimax_signal_idle.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_data_wimax_signal_idle.png
index b20c5c7..bef4358 100644
--- a/packages/SystemUI/res/drawable-hdpi/stat_sys_data_wimax_signal_idle.png
+++ b/packages/SystemUI/res/drawable-hdpi/stat_sys_data_wimax_signal_idle.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_0.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_0.png
index b0e1424..a2ba6c4 100644
--- a/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_0.png
+++ b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_0.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_0_fully.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_0_fully.png
index 797b1eb..00b560c 100644
--- a/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_0_fully.png
+++ b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_0_fully.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_1.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_1.png
index 7c479e8..fd8d2f2 100644
--- a/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_1.png
+++ b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_1.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_1_fully.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_1_fully.png
index c60def1..92364d2 100644
--- a/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_1_fully.png
+++ b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_1_fully.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_2.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_2.png
index 1cef87b..3b4aaa1 100644
--- a/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_2.png
+++ b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_2.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_2_fully.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_2_fully.png
index 61e0e95..8cea4e93f 100644
--- a/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_2_fully.png
+++ b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_2_fully.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_3.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_3.png
index 48c3490..873a317 100644
--- a/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_3.png
+++ b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_3.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_3_fully.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_3_fully.png
index 71205bf..94a4a35 100644
--- a/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_3_fully.png
+++ b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_3_fully.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_4.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_4.png
index e5b0e2d..d2381fcc 100644
--- a/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_4.png
+++ b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_4.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_4_fully.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_4_fully.png
index 5e74e44..93552cb 100644
--- a/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_4_fully.png
+++ b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_4_fully.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_null.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_null.png
new file mode 100644
index 0000000..daf18c7
--- /dev/null
+++ b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_null.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/stat_sys_data_wimax_signal_0.png b/packages/SystemUI/res/drawable-mdpi/stat_sys_data_wimax_signal_0.png
new file mode 100644
index 0000000..a0c7a99
--- /dev/null
+++ b/packages/SystemUI/res/drawable-mdpi/stat_sys_data_wimax_signal_0.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/stat_sys_data_wimax_signal_0_fully.png b/packages/SystemUI/res/drawable-mdpi/stat_sys_data_wimax_signal_0_fully.png
new file mode 100644
index 0000000..b1f1e5b
--- /dev/null
+++ b/packages/SystemUI/res/drawable-mdpi/stat_sys_data_wimax_signal_0_fully.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/stat_sys_data_wimax_signal_1.png b/packages/SystemUI/res/drawable-mdpi/stat_sys_data_wimax_signal_1.png
new file mode 100644
index 0000000..8b31618
--- /dev/null
+++ b/packages/SystemUI/res/drawable-mdpi/stat_sys_data_wimax_signal_1.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/stat_sys_data_wimax_signal_1_fully.png b/packages/SystemUI/res/drawable-mdpi/stat_sys_data_wimax_signal_1_fully.png
new file mode 100644
index 0000000..1a62682
--- /dev/null
+++ b/packages/SystemUI/res/drawable-mdpi/stat_sys_data_wimax_signal_1_fully.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/stat_sys_data_wimax_signal_2.png b/packages/SystemUI/res/drawable-mdpi/stat_sys_data_wimax_signal_2.png
new file mode 100644
index 0000000..ff51551
--- /dev/null
+++ b/packages/SystemUI/res/drawable-mdpi/stat_sys_data_wimax_signal_2.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/stat_sys_data_wimax_signal_2_fully.png b/packages/SystemUI/res/drawable-mdpi/stat_sys_data_wimax_signal_2_fully.png
new file mode 100644
index 0000000..0374142
--- /dev/null
+++ b/packages/SystemUI/res/drawable-mdpi/stat_sys_data_wimax_signal_2_fully.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/stat_sys_data_wimax_signal_3.png b/packages/SystemUI/res/drawable-mdpi/stat_sys_data_wimax_signal_3.png
new file mode 100644
index 0000000..8f881f2
--- /dev/null
+++ b/packages/SystemUI/res/drawable-mdpi/stat_sys_data_wimax_signal_3.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/stat_sys_data_wimax_signal_3_fully.png b/packages/SystemUI/res/drawable-mdpi/stat_sys_data_wimax_signal_3_fully.png
new file mode 100644
index 0000000..7870cee1
--- /dev/null
+++ b/packages/SystemUI/res/drawable-mdpi/stat_sys_data_wimax_signal_3_fully.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/stat_sys_data_wimax_signal_disconnected.png b/packages/SystemUI/res/drawable-mdpi/stat_sys_data_wimax_signal_disconnected.png
new file mode 100644
index 0000000..65404c2
--- /dev/null
+++ b/packages/SystemUI/res/drawable-mdpi/stat_sys_data_wimax_signal_disconnected.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/stat_sys_data_wimax_signal_idle.png b/packages/SystemUI/res/drawable-mdpi/stat_sys_data_wimax_signal_idle.png
new file mode 100644
index 0000000..327f89d
--- /dev/null
+++ b/packages/SystemUI/res/drawable-mdpi/stat_sys_data_wimax_signal_idle.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_0.png b/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_0.png
index 76b272e..d93a661 100644
--- a/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_0.png
+++ b/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_0.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_0_fully.png b/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_0_fully.png
index 18c603d..b39cc04 100644
--- a/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_0_fully.png
+++ b/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_0_fully.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_1.png b/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_1.png
index 89274b1..4305351 100644
--- a/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_1.png
+++ b/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_1.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_1_fully.png b/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_1_fully.png
index ae8e70a..4305be2 100644
--- a/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_1_fully.png
+++ b/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_1_fully.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_2.png b/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_2.png
index 35ec9bd..beb641b 100644
--- a/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_2.png
+++ b/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_2.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_2_fully.png b/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_2_fully.png
index b082e9f..7b8ddc2 100644
--- a/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_2_fully.png
+++ b/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_2_fully.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_3.png b/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_3.png
index a2c7ed8..a4028cd 100644
--- a/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_3.png
+++ b/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_3.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_3_fully.png b/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_3_fully.png
index e12ecbf..fad1873 100644
--- a/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_3_fully.png
+++ b/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_3_fully.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_4.png b/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_4.png
index f08b75e..b5ed22b 100644
--- a/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_4.png
+++ b/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_4.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_4_fully.png b/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_4_fully.png
index 12581d5..cca7bf3 100644
--- a/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_4_fully.png
+++ b/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_4_fully.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_null.png b/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_null.png
new file mode 100644
index 0000000..5292998
--- /dev/null
+++ b/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_null.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-sw600dp-hdpi/stat_sys_signal_0.png b/packages/SystemUI/res/drawable-sw600dp-hdpi/stat_sys_signal_0.png
index a290cf0..ac322ba 100644
--- a/packages/SystemUI/res/drawable-sw600dp-hdpi/stat_sys_signal_0.png
+++ b/packages/SystemUI/res/drawable-sw600dp-hdpi/stat_sys_signal_0.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-sw600dp-hdpi/stat_sys_signal_0_fully.png b/packages/SystemUI/res/drawable-sw600dp-hdpi/stat_sys_signal_0_fully.png
index 09314e9..ac322ba 100644
--- a/packages/SystemUI/res/drawable-sw600dp-hdpi/stat_sys_signal_0_fully.png
+++ b/packages/SystemUI/res/drawable-sw600dp-hdpi/stat_sys_signal_0_fully.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-sw600dp-hdpi/stat_sys_signal_1.png b/packages/SystemUI/res/drawable-sw600dp-hdpi/stat_sys_signal_1.png
index 90de934..f139bbe 100644
--- a/packages/SystemUI/res/drawable-sw600dp-hdpi/stat_sys_signal_1.png
+++ b/packages/SystemUI/res/drawable-sw600dp-hdpi/stat_sys_signal_1.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-sw600dp-hdpi/stat_sys_signal_1_fully.png b/packages/SystemUI/res/drawable-sw600dp-hdpi/stat_sys_signal_1_fully.png
index cdcac61..af67018 100644
--- a/packages/SystemUI/res/drawable-sw600dp-hdpi/stat_sys_signal_1_fully.png
+++ b/packages/SystemUI/res/drawable-sw600dp-hdpi/stat_sys_signal_1_fully.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-sw600dp-hdpi/stat_sys_signal_2.png b/packages/SystemUI/res/drawable-sw600dp-hdpi/stat_sys_signal_2.png
index 570a9b5..fe404e2 100644
--- a/packages/SystemUI/res/drawable-sw600dp-hdpi/stat_sys_signal_2.png
+++ b/packages/SystemUI/res/drawable-sw600dp-hdpi/stat_sys_signal_2.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-sw600dp-hdpi/stat_sys_signal_2_fully.png b/packages/SystemUI/res/drawable-sw600dp-hdpi/stat_sys_signal_2_fully.png
index 68f3075..1ffa9b6 100644
--- a/packages/SystemUI/res/drawable-sw600dp-hdpi/stat_sys_signal_2_fully.png
+++ b/packages/SystemUI/res/drawable-sw600dp-hdpi/stat_sys_signal_2_fully.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-sw600dp-hdpi/stat_sys_signal_3.png b/packages/SystemUI/res/drawable-sw600dp-hdpi/stat_sys_signal_3.png
index 07b03fa..75cd8ee 100644
--- a/packages/SystemUI/res/drawable-sw600dp-hdpi/stat_sys_signal_3.png
+++ b/packages/SystemUI/res/drawable-sw600dp-hdpi/stat_sys_signal_3.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-sw600dp-hdpi/stat_sys_signal_3_fully.png b/packages/SystemUI/res/drawable-sw600dp-hdpi/stat_sys_signal_3_fully.png
index 9dff62d..666d1f6 100644
--- a/packages/SystemUI/res/drawable-sw600dp-hdpi/stat_sys_signal_3_fully.png
+++ b/packages/SystemUI/res/drawable-sw600dp-hdpi/stat_sys_signal_3_fully.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-sw600dp-hdpi/stat_sys_signal_4.png b/packages/SystemUI/res/drawable-sw600dp-hdpi/stat_sys_signal_4.png
index f855c1c..da9607b 100644
--- a/packages/SystemUI/res/drawable-sw600dp-hdpi/stat_sys_signal_4.png
+++ b/packages/SystemUI/res/drawable-sw600dp-hdpi/stat_sys_signal_4.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-sw600dp-hdpi/stat_sys_signal_4_fully.png b/packages/SystemUI/res/drawable-sw600dp-hdpi/stat_sys_signal_4_fully.png
index 119ce32..d05297f 100644
--- a/packages/SystemUI/res/drawable-sw600dp-hdpi/stat_sys_signal_4_fully.png
+++ b/packages/SystemUI/res/drawable-sw600dp-hdpi/stat_sys_signal_4_fully.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-sw600dp-hdpi/stat_sys_signal_null.png b/packages/SystemUI/res/drawable-sw600dp-hdpi/stat_sys_signal_null.png
new file mode 100644
index 0000000..3733a38
--- /dev/null
+++ b/packages/SystemUI/res/drawable-sw600dp-hdpi/stat_sys_signal_null.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-sw600dp-mdpi/stat_sys_signal_0.png b/packages/SystemUI/res/drawable-sw600dp-mdpi/stat_sys_signal_0.png
index 926b081..f931c60 100644
--- a/packages/SystemUI/res/drawable-sw600dp-mdpi/stat_sys_signal_0.png
+++ b/packages/SystemUI/res/drawable-sw600dp-mdpi/stat_sys_signal_0.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-sw600dp-mdpi/stat_sys_signal_0_fully.png b/packages/SystemUI/res/drawable-sw600dp-mdpi/stat_sys_signal_0_fully.png
index 4498bed..f931c60 100644
--- a/packages/SystemUI/res/drawable-sw600dp-mdpi/stat_sys_signal_0_fully.png
+++ b/packages/SystemUI/res/drawable-sw600dp-mdpi/stat_sys_signal_0_fully.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-sw600dp-mdpi/stat_sys_signal_1.png b/packages/SystemUI/res/drawable-sw600dp-mdpi/stat_sys_signal_1.png
index 60b00a8..398f4d5 100644
--- a/packages/SystemUI/res/drawable-sw600dp-mdpi/stat_sys_signal_1.png
+++ b/packages/SystemUI/res/drawable-sw600dp-mdpi/stat_sys_signal_1.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-sw600dp-mdpi/stat_sys_signal_1_fully.png b/packages/SystemUI/res/drawable-sw600dp-mdpi/stat_sys_signal_1_fully.png
index 8e9be27..a0fc3f2 100644
--- a/packages/SystemUI/res/drawable-sw600dp-mdpi/stat_sys_signal_1_fully.png
+++ b/packages/SystemUI/res/drawable-sw600dp-mdpi/stat_sys_signal_1_fully.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-sw600dp-mdpi/stat_sys_signal_2.png b/packages/SystemUI/res/drawable-sw600dp-mdpi/stat_sys_signal_2.png
index 014d838..5fe96a3 100644
--- a/packages/SystemUI/res/drawable-sw600dp-mdpi/stat_sys_signal_2.png
+++ b/packages/SystemUI/res/drawable-sw600dp-mdpi/stat_sys_signal_2.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-sw600dp-mdpi/stat_sys_signal_2_fully.png b/packages/SystemUI/res/drawable-sw600dp-mdpi/stat_sys_signal_2_fully.png
index 1755088..8a66255 100644
--- a/packages/SystemUI/res/drawable-sw600dp-mdpi/stat_sys_signal_2_fully.png
+++ b/packages/SystemUI/res/drawable-sw600dp-mdpi/stat_sys_signal_2_fully.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-sw600dp-mdpi/stat_sys_signal_3.png b/packages/SystemUI/res/drawable-sw600dp-mdpi/stat_sys_signal_3.png
index 44e7905..e785a7a 100644
--- a/packages/SystemUI/res/drawable-sw600dp-mdpi/stat_sys_signal_3.png
+++ b/packages/SystemUI/res/drawable-sw600dp-mdpi/stat_sys_signal_3.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-sw600dp-mdpi/stat_sys_signal_3_fully.png b/packages/SystemUI/res/drawable-sw600dp-mdpi/stat_sys_signal_3_fully.png
index bfc17dd..63be95d 100644
--- a/packages/SystemUI/res/drawable-sw600dp-mdpi/stat_sys_signal_3_fully.png
+++ b/packages/SystemUI/res/drawable-sw600dp-mdpi/stat_sys_signal_3_fully.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-sw600dp-mdpi/stat_sys_signal_4.png b/packages/SystemUI/res/drawable-sw600dp-mdpi/stat_sys_signal_4.png
index e39d7d7..533bcdc 100644
--- a/packages/SystemUI/res/drawable-sw600dp-mdpi/stat_sys_signal_4.png
+++ b/packages/SystemUI/res/drawable-sw600dp-mdpi/stat_sys_signal_4.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-sw600dp-mdpi/stat_sys_signal_4_fully.png b/packages/SystemUI/res/drawable-sw600dp-mdpi/stat_sys_signal_4_fully.png
index 466d3b5..566172e 100644
--- a/packages/SystemUI/res/drawable-sw600dp-mdpi/stat_sys_signal_4_fully.png
+++ b/packages/SystemUI/res/drawable-sw600dp-mdpi/stat_sys_signal_4_fully.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-sw600dp-mdpi/stat_sys_signal_null.png b/packages/SystemUI/res/drawable-sw600dp-mdpi/stat_sys_signal_null.png
new file mode 100644
index 0000000..ab718ad
--- /dev/null
+++ b/packages/SystemUI/res/drawable-sw600dp-mdpi/stat_sys_signal_null.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-sw600dp-xhdpi/stat_sys_signal_0.png b/packages/SystemUI/res/drawable-sw600dp-xhdpi/stat_sys_signal_0.png
index 1744f65..ccf1ba1 100644
--- a/packages/SystemUI/res/drawable-sw600dp-xhdpi/stat_sys_signal_0.png
+++ b/packages/SystemUI/res/drawable-sw600dp-xhdpi/stat_sys_signal_0.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-sw600dp-xhdpi/stat_sys_signal_0_fully.png b/packages/SystemUI/res/drawable-sw600dp-xhdpi/stat_sys_signal_0_fully.png
index 6270e51..ccf1ba1 100644
--- a/packages/SystemUI/res/drawable-sw600dp-xhdpi/stat_sys_signal_0_fully.png
+++ b/packages/SystemUI/res/drawable-sw600dp-xhdpi/stat_sys_signal_0_fully.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-sw600dp-xhdpi/stat_sys_signal_1.png b/packages/SystemUI/res/drawable-sw600dp-xhdpi/stat_sys_signal_1.png
index b47624f..07937fe 100644
--- a/packages/SystemUI/res/drawable-sw600dp-xhdpi/stat_sys_signal_1.png
+++ b/packages/SystemUI/res/drawable-sw600dp-xhdpi/stat_sys_signal_1.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-sw600dp-xhdpi/stat_sys_signal_1_fully.png b/packages/SystemUI/res/drawable-sw600dp-xhdpi/stat_sys_signal_1_fully.png
index 9fd562d..ba1b077 100644
--- a/packages/SystemUI/res/drawable-sw600dp-xhdpi/stat_sys_signal_1_fully.png
+++ b/packages/SystemUI/res/drawable-sw600dp-xhdpi/stat_sys_signal_1_fully.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-sw600dp-xhdpi/stat_sys_signal_2.png b/packages/SystemUI/res/drawable-sw600dp-xhdpi/stat_sys_signal_2.png
index 42630a2..a705a89 100644
--- a/packages/SystemUI/res/drawable-sw600dp-xhdpi/stat_sys_signal_2.png
+++ b/packages/SystemUI/res/drawable-sw600dp-xhdpi/stat_sys_signal_2.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-sw600dp-xhdpi/stat_sys_signal_2_fully.png b/packages/SystemUI/res/drawable-sw600dp-xhdpi/stat_sys_signal_2_fully.png
index 1777ce7..0187d12 100644
--- a/packages/SystemUI/res/drawable-sw600dp-xhdpi/stat_sys_signal_2_fully.png
+++ b/packages/SystemUI/res/drawable-sw600dp-xhdpi/stat_sys_signal_2_fully.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-sw600dp-xhdpi/stat_sys_signal_3.png b/packages/SystemUI/res/drawable-sw600dp-xhdpi/stat_sys_signal_3.png
index d35d546..0ed7d6f4 100644
--- a/packages/SystemUI/res/drawable-sw600dp-xhdpi/stat_sys_signal_3.png
+++ b/packages/SystemUI/res/drawable-sw600dp-xhdpi/stat_sys_signal_3.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-sw600dp-xhdpi/stat_sys_signal_3_fully.png b/packages/SystemUI/res/drawable-sw600dp-xhdpi/stat_sys_signal_3_fully.png
index 324ec32..24a6e5a 100644
--- a/packages/SystemUI/res/drawable-sw600dp-xhdpi/stat_sys_signal_3_fully.png
+++ b/packages/SystemUI/res/drawable-sw600dp-xhdpi/stat_sys_signal_3_fully.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-sw600dp-xhdpi/stat_sys_signal_4.png b/packages/SystemUI/res/drawable-sw600dp-xhdpi/stat_sys_signal_4.png
index 54f3ae7..1a47801 100644
--- a/packages/SystemUI/res/drawable-sw600dp-xhdpi/stat_sys_signal_4.png
+++ b/packages/SystemUI/res/drawable-sw600dp-xhdpi/stat_sys_signal_4.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-sw600dp-xhdpi/stat_sys_signal_4_fully.png b/packages/SystemUI/res/drawable-sw600dp-xhdpi/stat_sys_signal_4_fully.png
index 290dafa..d9648b6f 100644
--- a/packages/SystemUI/res/drawable-sw600dp-xhdpi/stat_sys_signal_4_fully.png
+++ b/packages/SystemUI/res/drawable-sw600dp-xhdpi/stat_sys_signal_4_fully.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-sw600dp-xhdpi/stat_sys_signal_null.png b/packages/SystemUI/res/drawable-sw600dp-xhdpi/stat_sys_signal_null.png
new file mode 100644
index 0000000..023bbe6
--- /dev/null
+++ b/packages/SystemUI/res/drawable-sw600dp-xhdpi/stat_sys_signal_null.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-xhdpi/stat_sys_data_wimax_signal_0.png b/packages/SystemUI/res/drawable-xhdpi/stat_sys_data_wimax_signal_0.png
new file mode 100644
index 0000000..7a8d1f3
--- /dev/null
+++ b/packages/SystemUI/res/drawable-xhdpi/stat_sys_data_wimax_signal_0.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-xhdpi/stat_sys_data_wimax_signal_0_fully.png b/packages/SystemUI/res/drawable-xhdpi/stat_sys_data_wimax_signal_0_fully.png
new file mode 100644
index 0000000..5f86bbb
--- /dev/null
+++ b/packages/SystemUI/res/drawable-xhdpi/stat_sys_data_wimax_signal_0_fully.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-xhdpi/stat_sys_data_wimax_signal_1.png b/packages/SystemUI/res/drawable-xhdpi/stat_sys_data_wimax_signal_1.png
new file mode 100644
index 0000000..70e2011
--- /dev/null
+++ b/packages/SystemUI/res/drawable-xhdpi/stat_sys_data_wimax_signal_1.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-xhdpi/stat_sys_data_wimax_signal_1_fully.png b/packages/SystemUI/res/drawable-xhdpi/stat_sys_data_wimax_signal_1_fully.png
new file mode 100644
index 0000000..c1d1cc3
--- /dev/null
+++ b/packages/SystemUI/res/drawable-xhdpi/stat_sys_data_wimax_signal_1_fully.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-xhdpi/stat_sys_data_wimax_signal_2.png b/packages/SystemUI/res/drawable-xhdpi/stat_sys_data_wimax_signal_2.png
new file mode 100644
index 0000000..c62d977
--- /dev/null
+++ b/packages/SystemUI/res/drawable-xhdpi/stat_sys_data_wimax_signal_2.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-xhdpi/stat_sys_data_wimax_signal_2_fully.png b/packages/SystemUI/res/drawable-xhdpi/stat_sys_data_wimax_signal_2_fully.png
new file mode 100644
index 0000000..86d30df
--- /dev/null
+++ b/packages/SystemUI/res/drawable-xhdpi/stat_sys_data_wimax_signal_2_fully.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-xhdpi/stat_sys_data_wimax_signal_3.png b/packages/SystemUI/res/drawable-xhdpi/stat_sys_data_wimax_signal_3.png
new file mode 100644
index 0000000..b112748
--- /dev/null
+++ b/packages/SystemUI/res/drawable-xhdpi/stat_sys_data_wimax_signal_3.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-xhdpi/stat_sys_data_wimax_signal_3_fully.png b/packages/SystemUI/res/drawable-xhdpi/stat_sys_data_wimax_signal_3_fully.png
new file mode 100644
index 0000000..bfc7d81
--- /dev/null
+++ b/packages/SystemUI/res/drawable-xhdpi/stat_sys_data_wimax_signal_3_fully.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-xhdpi/stat_sys_data_wimax_signal_disconnected.png b/packages/SystemUI/res/drawable-xhdpi/stat_sys_data_wimax_signal_disconnected.png
new file mode 100644
index 0000000..bea643f3a
--- /dev/null
+++ b/packages/SystemUI/res/drawable-xhdpi/stat_sys_data_wimax_signal_disconnected.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-xhdpi/stat_sys_data_wimax_signal_idle.png b/packages/SystemUI/res/drawable-xhdpi/stat_sys_data_wimax_signal_idle.png
new file mode 100644
index 0000000..a8a89d6
--- /dev/null
+++ b/packages/SystemUI/res/drawable-xhdpi/stat_sys_data_wimax_signal_idle.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-xhdpi/stat_sys_signal_0.png b/packages/SystemUI/res/drawable-xhdpi/stat_sys_signal_0.png
index 9c80517..0a28885 100644
--- a/packages/SystemUI/res/drawable-xhdpi/stat_sys_signal_0.png
+++ b/packages/SystemUI/res/drawable-xhdpi/stat_sys_signal_0.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-xhdpi/stat_sys_signal_0_fully.png b/packages/SystemUI/res/drawable-xhdpi/stat_sys_signal_0_fully.png
index b144e18..bbe70cc 100644
--- a/packages/SystemUI/res/drawable-xhdpi/stat_sys_signal_0_fully.png
+++ b/packages/SystemUI/res/drawable-xhdpi/stat_sys_signal_0_fully.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-xhdpi/stat_sys_signal_1.png b/packages/SystemUI/res/drawable-xhdpi/stat_sys_signal_1.png
index 32762da..9943613 100644
--- a/packages/SystemUI/res/drawable-xhdpi/stat_sys_signal_1.png
+++ b/packages/SystemUI/res/drawable-xhdpi/stat_sys_signal_1.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-xhdpi/stat_sys_signal_1_fully.png b/packages/SystemUI/res/drawable-xhdpi/stat_sys_signal_1_fully.png
index ae02c8f..e25a55c 100644
--- a/packages/SystemUI/res/drawable-xhdpi/stat_sys_signal_1_fully.png
+++ b/packages/SystemUI/res/drawable-xhdpi/stat_sys_signal_1_fully.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-xhdpi/stat_sys_signal_2.png b/packages/SystemUI/res/drawable-xhdpi/stat_sys_signal_2.png
index f95f677..1fc1775 100644
--- a/packages/SystemUI/res/drawable-xhdpi/stat_sys_signal_2.png
+++ b/packages/SystemUI/res/drawable-xhdpi/stat_sys_signal_2.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-xhdpi/stat_sys_signal_2_fully.png b/packages/SystemUI/res/drawable-xhdpi/stat_sys_signal_2_fully.png
index 23343e9..d1aefca 100644
--- a/packages/SystemUI/res/drawable-xhdpi/stat_sys_signal_2_fully.png
+++ b/packages/SystemUI/res/drawable-xhdpi/stat_sys_signal_2_fully.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-xhdpi/stat_sys_signal_3.png b/packages/SystemUI/res/drawable-xhdpi/stat_sys_signal_3.png
index d72d42b..82b9741 100644
--- a/packages/SystemUI/res/drawable-xhdpi/stat_sys_signal_3.png
+++ b/packages/SystemUI/res/drawable-xhdpi/stat_sys_signal_3.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-xhdpi/stat_sys_signal_3_fully.png b/packages/SystemUI/res/drawable-xhdpi/stat_sys_signal_3_fully.png
index 3e5eaf4..c8c2c63 100644
--- a/packages/SystemUI/res/drawable-xhdpi/stat_sys_signal_3_fully.png
+++ b/packages/SystemUI/res/drawable-xhdpi/stat_sys_signal_3_fully.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-xhdpi/stat_sys_signal_4.png b/packages/SystemUI/res/drawable-xhdpi/stat_sys_signal_4.png
index bf8ca9f..9f4979c 100644
--- a/packages/SystemUI/res/drawable-xhdpi/stat_sys_signal_4.png
+++ b/packages/SystemUI/res/drawable-xhdpi/stat_sys_signal_4.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-xhdpi/stat_sys_signal_4_fully.png b/packages/SystemUI/res/drawable-xhdpi/stat_sys_signal_4_fully.png
index e9de257..b2e64b9 100644
--- a/packages/SystemUI/res/drawable-xhdpi/stat_sys_signal_4_fully.png
+++ b/packages/SystemUI/res/drawable-xhdpi/stat_sys_signal_4_fully.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-xhdpi/stat_sys_signal_null.png b/packages/SystemUI/res/drawable-xhdpi/stat_sys_signal_null.png
new file mode 100644
index 0000000..3e7fefd
--- /dev/null
+++ b/packages/SystemUI/res/drawable-xhdpi/stat_sys_signal_null.png
Binary files differ
diff --git a/packages/SystemUI/res/layout-sw600dp/status_bar_notification_panel_title.xml b/packages/SystemUI/res/layout-sw600dp/status_bar_notification_panel_title.xml
index c9b1673..b985aaf 100644
--- a/packages/SystemUI/res/layout-sw600dp/status_bar_notification_panel_title.xml
+++ b/packages/SystemUI/res/layout-sw600dp/status_bar_notification_panel_title.xml
@@ -44,12 +44,13 @@
             <FrameLayout
                 android:layout_height="wrap_content"
                 android:layout_width="wrap_content"
+                android:layout_gravity="center_vertical"
                 >
                 <ImageView
                     android:id="@+id/bluetooth"
                     android:layout_height="wrap_content"
                     android:layout_width="wrap_content"
-                    android:scaleType="centerInside"
+                    android:paddingRight="16dp"
                     android:visibility="gone"
                     android:contentDescription="@null"
                     android:layout_gravity="center_vertical"
@@ -61,8 +62,8 @@
                 android:id="@+id/mobile_icon"
                 android:layout_height="wrap_content"
                 android:layout_width="wrap_content"
-                android:paddingRight="4dp"
                 android:layout_gravity="center_vertical"
+                android:paddingRight="6dp"
                 >
 
                 <ImageView
@@ -86,8 +87,7 @@
                 android:layout_gravity="left|center_vertical"
                 android:layout_width="wrap_content"
                 android:layout_height="wrap_content"
-                android:paddingRight="8dp"
-                android:layout_weight="1"
+                android:paddingRight="12dp"
                 android:singleLine="true"
                 android:ellipsize="end"
                 android:text="@string/status_bar_settings_settings_button"
@@ -98,8 +98,8 @@
                 android:id="@+id/wifi_icon"
                 android:layout_height="wrap_content"
                 android:layout_width="wrap_content"
-                android:paddingRight="4dp"
                 android:layout_gravity="center_vertical"
+                android:paddingRight="6dp"
                 >
 
                 <ImageView
@@ -123,7 +123,7 @@
                 android:layout_gravity="left|center_vertical"
                 android:layout_width="wrap_content"
                 android:layout_height="wrap_content"
-                android:paddingRight="8dp"
+                android:paddingRight="12dp"
                 android:singleLine="true"
                 android:ellipsize="end"
                 android:text="@string/status_bar_settings_settings_button"
@@ -136,18 +136,17 @@
                 android:scaleType="centerInside"
                 android:layout_gravity="center_vertical"
                 android:layout_alignBaseline="@id/wifi_signal"
-                android:paddingLeft="8dp"
-                android:paddingRight="8dp"
+                android:paddingRight="6dp"
                 android:contentDescription="@null"
                 />
 
             <TextView
                 android:id="@+id/battery_text"
                 style="@style/StatusBarNotificationText"
-                android:layout_width="56dp"
+                android:layout_width="wrap_content"
                 android:layout_height="wrap_content"
                 android:layout_gravity="left|center_vertical"
-                android:paddingRight="8dp"
+                android:paddingRight="2dp"
                 android:singleLine="true"
                 android:text="@string/status_bar_settings_settings_button"
                 />
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/NavigationBarView.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/NavigationBarView.java
index 97a1855..005d12f 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/NavigationBarView.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/NavigationBarView.java
@@ -21,6 +21,8 @@
 import android.content.Context;
 import android.content.res.Resources;
 import android.graphics.Rect;
+import android.os.Handler;
+import android.os.Message;
 import android.os.ServiceManager;
 import android.util.AttributeSet;
 import android.util.Slog;
@@ -62,6 +64,35 @@
     boolean mHidden, mLowProfile, mShowMenu;
     int mDisabledFlags = 0;
 
+    // workaround for LayoutTransitions leaving the nav buttons in a weird state (bug 5549288)
+    final static boolean WORKAROUND_INVALID_LAYOUT = true;
+    final static int MSG_CHECK_INVALID_LAYOUT = 8686;
+
+    private class H extends Handler {
+        public void handleMessage(Message m) {
+            switch (m.what) {
+                case MSG_CHECK_INVALID_LAYOUT:
+                    final String how = "" + m.obj;
+                    final int w = getWidth();
+                    final int h = getHeight();
+                    final int vw = mCurrentView.getWidth();
+                    final int vh = mCurrentView.getHeight();
+
+                    if (h != vh || w != vw) {
+                        Slog.w(TAG, String.format(
+                            "*** Invalid layout in navigation bar (%s this=%dx%d cur=%dx%d)",
+                            how, w, h, vw, vh));
+                        if (WORKAROUND_INVALID_LAYOUT) {
+                            requestLayout();
+                        }
+                    }
+                    break;
+            }
+        }
+    }
+
+    private H mHandler = new H();
+
     public View getRecentsButton() {
         return mCurrentView.findViewById(R.id.recent_apps);
     }
@@ -243,6 +274,36 @@
         }
     }
 
+    @Override
+    protected void onSizeChanged(int w, int h, int oldw, int oldh) {
+        if (DEBUG) Slog.d(TAG, String.format(
+                    "onSizeChanged: (%dx%d) old: (%dx%d)", w, h, oldw, oldh));
+        postCheckForInvalidLayout("sizeChanged");
+        super.onSizeChanged(w, h, oldw, oldh);
+    }
+
+    /*
+    @Override
+    protected void onLayout (boolean changed, int left, int top, int right, int bottom) {
+        if (DEBUG) Slog.d(TAG, String.format(
+                    "onLayout: %s (%d,%d,%d,%d)", 
+                    changed?"changed":"notchanged", left, top, right, bottom));
+        super.onLayout(changed, left, top, right, bottom);
+    }
+
+    // uncomment this for extra defensiveness in WORKAROUND_INVALID_LAYOUT situations: if all else
+    // fails, any touch on the display will fix the layout.
+    @Override
+    public boolean onInterceptTouchEvent(MotionEvent ev) {
+        if (DEBUG) Slog.d(TAG, "onInterceptTouchEvent: " + ev.toString());
+        if (ev.getAction() == MotionEvent.ACTION_DOWN) {
+            postCheckForInvalidLayout("touch");
+        }
+        return super.onInterceptTouchEvent(ev);
+    }
+    */
+        
+
     private String getResourceName(int resId) {
         if (resId != 0) {
             final android.content.res.Resources res = mContext.getResources();
@@ -256,6 +317,10 @@
         }
     }
 
+    private void postCheckForInvalidLayout(final String how) {
+        mHandler.obtainMessage(MSG_CHECK_INVALID_LAYOUT, 0, 0, how).sendToTarget();
+    }
+
     private static String visibilityToString(int vis) {
         switch (vis) {
             case View.INVISIBLE:
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/policy/NetworkController.java b/packages/SystemUI/src/com/android/systemui/statusbar/policy/NetworkController.java
index 666d696..d46ab6c 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/policy/NetworkController.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/policy/NetworkController.java
@@ -457,13 +457,13 @@
     private final void updateTelephonySignalStrength() {
         if (!hasService()) {
             if (CHATTY) Slog.d(TAG, "updateTelephonySignalStrength: !hasService()");
-            mPhoneSignalIconId = R.drawable.stat_sys_signal_0;
-            mDataSignalIconId = R.drawable.stat_sys_signal_0;
+            mPhoneSignalIconId = R.drawable.stat_sys_signal_null;
+            mDataSignalIconId = R.drawable.stat_sys_signal_null;
         } else {
             if (mSignalStrength == null) {
                 if (CHATTY) Slog.d(TAG, "updateTelephonySignalStrength: mSignalStrength == null");
-                mPhoneSignalIconId = R.drawable.stat_sys_signal_0;
-                mDataSignalIconId = R.drawable.stat_sys_signal_0;
+                mPhoneSignalIconId = R.drawable.stat_sys_signal_null;
+                mDataSignalIconId = R.drawable.stat_sys_signal_null;
                 mContentDescriptionPhoneSignal = mContext.getString(
                         AccessibilityContentDescriptions.PHONE_SIGNAL_STRENGTH[0]);
             } else {
@@ -888,34 +888,53 @@
         String mobileLabel = "";
         int N;
 
-        if (mDataConnected) {
-            mobileLabel = mNetworkName;
-            if (DEBUG) {
-                mobileLabel += "yyyyYYYYyyyyYYYY";
-            }
-            combinedSignalIconId = mDataSignalIconId;
-            switch (mDataActivity) {
-                case TelephonyManager.DATA_ACTIVITY_IN:
-                    mMobileActivityIconId = R.drawable.stat_sys_signal_in;
-                    break;
-                case TelephonyManager.DATA_ACTIVITY_OUT:
-                    mMobileActivityIconId = R.drawable.stat_sys_signal_out;
-                    break;
-                case TelephonyManager.DATA_ACTIVITY_INOUT:
-                    mMobileActivityIconId = R.drawable.stat_sys_signal_inout;
-                    break;
-                default:
-                    mMobileActivityIconId = 0;
-                    break;
+        if (!mHasMobileDataFeature) {
+            mDataSignalIconId = mPhoneSignalIconId = 0;
+            mobileLabel = "";
+        } else {
+            // We want to show the carrier name if in service and either:
+            //   - We are connected to mobile data, or
+            //   - We are not connected to mobile data, as long as the *reason* packets are not
+            //     being routed over that link is that we have better connectivity via wifi.
+            // If data is disconnected for some other reason but wifi is connected, we show nothing.
+            // Otherwise (nothing connected) we show "No internet connection".
+
+            if (mDataConnected) {
+                mobileLabel = mNetworkName;
+            } else if (mWifiConnected) {
+                if (hasService()) {
+                    mobileLabel = mNetworkName;
+                } else {
+                    mobileLabel = "";
+                }
+            } else {
+                mobileLabel 
+                    = context.getString(R.string.status_bar_settings_signal_meter_disconnected);
             }
 
-            combinedLabel = mobileLabel;
-            combinedActivityIconId = mMobileActivityIconId;
-            combinedSignalIconId = mDataSignalIconId; // set by updateDataIcon()
-            mContentDescriptionCombinedSignal = mContentDescriptionDataType;
-        } else {
-            mobileLabel = mHasMobileDataFeature ?
-                context.getString(R.string.status_bar_settings_signal_meter_disconnected) : "";
+            // Now for things that should only be shown when actually using mobile data.
+            if (mDataConnected) {
+                combinedSignalIconId = mDataSignalIconId;
+                switch (mDataActivity) {
+                    case TelephonyManager.DATA_ACTIVITY_IN:
+                        mMobileActivityIconId = R.drawable.stat_sys_signal_in;
+                        break;
+                    case TelephonyManager.DATA_ACTIVITY_OUT:
+                        mMobileActivityIconId = R.drawable.stat_sys_signal_out;
+                        break;
+                    case TelephonyManager.DATA_ACTIVITY_INOUT:
+                        mMobileActivityIconId = R.drawable.stat_sys_signal_inout;
+                        break;
+                    default:
+                        mMobileActivityIconId = 0;
+                        break;
+                }
+
+                combinedLabel = mobileLabel;
+                combinedActivityIconId = mMobileActivityIconId;
+                combinedSignalIconId = mDataSignalIconId; // set by updateDataIcon()
+                mContentDescriptionCombinedSignal = mContentDescriptionDataType;
+            }
         }
 
         if (mWifiConnected) {
@@ -947,6 +966,12 @@
             combinedLabel = wifiLabel;
             combinedSignalIconId = mWifiIconId; // set by updateWifiIcons()
             mContentDescriptionCombinedSignal = mContentDescriptionWifi;
+        } else {
+            if (mHasMobileDataFeature) {
+                wifiLabel = "";
+            } else {
+                wifiLabel = context.getString(R.string.status_bar_settings_signal_meter_disconnected);
+            }
         }
 
         if (mBluetoothTethered) {
@@ -967,9 +992,17 @@
             mDataTypeIconId = 0;
 
             // combined values from connected wifi take precedence over airplane mode
-            if (!mWifiConnected) {
-                wifiLabel = context.getString(R.string.status_bar_settings_signal_meter_disconnected);
-                combinedLabel = wifiLabel;
+            if (mWifiConnected) {
+                // Suppress "No internet connection." from mobile if wifi connected.
+                mobileLabel = "";
+            } else {
+                if (mHasMobileDataFeature) {
+                    // let the mobile icon show "No internet connection."
+                    wifiLabel = "";
+                } else {
+                    wifiLabel = context.getString(R.string.status_bar_settings_signal_meter_disconnected);
+                    combinedLabel = wifiLabel;
+                }
                 mContentDescriptionCombinedSignal = mContentDescriptionPhoneSignal;
                 combinedSignalIconId = mDataSignalIconId;
             }
@@ -1029,8 +1062,13 @@
             N = mPhoneSignalIconViews.size();
             for (int i=0; i<N; i++) {
                 final ImageView v = mPhoneSignalIconViews.get(i);
-                v.setImageResource(mPhoneSignalIconId);
-                v.setContentDescription(mContentDescriptionPhoneSignal);
+                if (mPhoneSignalIconId == 0) {
+                    v.setVisibility(View.GONE);
+                } else {
+                    v.setVisibility(View.VISIBLE);
+                    v.setImageResource(mPhoneSignalIconId);
+                    v.setContentDescription(mContentDescriptionPhoneSignal);
+                }
             }
         }
 
@@ -1136,14 +1174,24 @@
         N = mWifiLabelViews.size();
         for (int i=0; i<N; i++) {
             TextView v = mWifiLabelViews.get(i);
-            v.setText(wifiLabel);
+            if ("".equals(wifiLabel)) {
+                v.setVisibility(View.GONE);
+            } else {
+                v.setVisibility(View.VISIBLE);
+                v.setText(wifiLabel);
+            }
         }
         
         // mobile label
         N = mMobileLabelViews.size();
         for (int i=0; i<N; i++) {
             TextView v = mMobileLabelViews.get(i);
-            v.setText(mobileLabel);
+            if ("".equals(mobileLabel)) {
+                v.setVisibility(View.GONE);
+            } else {
+                v.setVisibility(View.VISIBLE);
+                v.setText(mobileLabel);
+            }
         }
     }
 
diff --git a/policy/src/com/android/internal/policy/impl/PhoneWindowManager.java b/policy/src/com/android/internal/policy/impl/PhoneWindowManager.java
index 7c9f0b5..59b6626 100755
--- a/policy/src/com/android/internal/policy/impl/PhoneWindowManager.java
+++ b/policy/src/com/android/internal/policy/impl/PhoneWindowManager.java
@@ -1977,6 +1977,12 @@
                         mTmpNavigationFrame.offset(mNavigationBarWidth, 0);
                     }
                 }
+                // Make sure the content and current rectangles are updated to
+                // account for the restrictions from the navigation bar.
+                mContentTop = mCurTop = mDockTop;
+                mContentBottom = mCurBottom = mDockBottom;
+                mContentLeft = mCurLeft = mDockLeft;
+                mContentRight = mCurRight = mDockRight;
                 // And compute the final frame.
                 mNavigationBar.computeFrameLw(mTmpNavigationFrame, mTmpNavigationFrame,
                         mTmpNavigationFrame, mTmpNavigationFrame);
diff --git a/services/audioflinger/AudioFlinger.cpp b/services/audioflinger/AudioFlinger.cpp
index 133dabd..ce701ca 100644
--- a/services/audioflinger/AudioFlinger.cpp
+++ b/services/audioflinger/AudioFlinger.cpp
@@ -1973,11 +1973,14 @@
         if (LIKELY(mixerStatus == MIXER_TRACKS_READY)) {
             // mix buffers...
             mAudioMixer->process();
-            sleepTime = 0;
-            // increase sleep time progressively when application underrun condition clears
-            if (sleepTimeShift > 0) {
+            // increase sleep time progressively when application underrun condition clears.
+            // Only increase sleep time if the mixer is ready for two consecutive times to avoid
+            // that a steady state of alternating ready/not ready conditions keeps the sleep time
+            // such that we would underrun the audio HAL.
+            if ((sleepTime == 0) && (sleepTimeShift > 0)) {
                 sleepTimeShift--;
             }
+            sleepTime = 0;
             standbyTime = systemTime() + kStandbyTimeInNsecs;
             //TODO: delay standby when effects have a tail
         } else {
diff --git a/services/java/com/android/server/connectivity/Tethering.java b/services/java/com/android/server/connectivity/Tethering.java
index c344bc6..cc1df4f 100644
--- a/services/java/com/android/server/connectivity/Tethering.java
+++ b/services/java/com/android/server/connectivity/Tethering.java
@@ -55,6 +55,7 @@
 import java.io.FileDescriptor;
 import java.io.PrintWriter;
 import java.net.InetAddress;
+import java.net.Inet4Address;
 import java.util.ArrayList;
 import java.util.Collection;
 import java.util.HashMap;
@@ -118,7 +119,7 @@
         "192.168.48.2", "192.168.48.254",
     };
 
-    private String[] mDnsServers;
+    private String[] mDefaultDnsServers;
     private static final String DNS_DEFAULT_SERVER1 = "8.8.8.8";
     private static final String DNS_DEFAULT_SERVER2 = "8.8.4.4";
 
@@ -171,9 +172,9 @@
         updateConfiguration();
 
         // TODO - remove and rely on real notifications of the current iface
-        mDnsServers = new String[2];
-        mDnsServers[0] = DNS_DEFAULT_SERVER1;
-        mDnsServers[1] = DNS_DEFAULT_SERVER2;
+        mDefaultDnsServers = new String[2];
+        mDefaultDnsServers[0] = DNS_DEFAULT_SERVER1;
+        mDefaultDnsServers[1] = DNS_DEFAULT_SERVER2;
     }
 
     void updateConfiguration() {
@@ -1245,7 +1246,7 @@
                     }
                 }
                 try {
-                    mNMService.setDnsForwarders(mDnsServers);
+                    mNMService.setDnsForwarders(mDefaultDnsServers);
                 } catch (Exception e) {
                     transitionTo(mSetDnsForwardersErrorState);
                     return false;
@@ -1321,7 +1322,29 @@
                     try {
                         linkProperties = mConnService.getLinkProperties(upType);
                     } catch (RemoteException e) { }
-                    if (linkProperties != null) iface = linkProperties.getInterfaceName();
+                    if (linkProperties != null) {
+                        iface = linkProperties.getInterfaceName();
+                        String[] dnsServers = mDefaultDnsServers;
+                        Collection<InetAddress> dnses = linkProperties.getDnses();
+                        if (dnses != null) {
+                            // we currently only handle IPv4
+                            ArrayList<InetAddress> v4Dnses =
+                                    new ArrayList<InetAddress>(dnses.size());
+                            for (InetAddress dnsAddress : dnses) {
+                                if (dnsAddress instanceof Inet4Address) {
+                                    v4Dnses.add(dnsAddress);
+                                }
+                            }
+                            if (v4Dnses.size() > 0) {
+                                dnsServers = NetworkUtils.makeStrings(v4Dnses);
+                            }
+                        }
+                        try {
+                            mNMService.setDnsForwarders(dnsServers);
+                        } catch (Exception e) {
+                            transitionTo(mSetDnsForwardersErrorState);
+                        }
+                    }
                 }
                 notifyTetheredOfNewUpstreamIface(iface);
             }
@@ -1372,11 +1395,12 @@
             boolean mTryCell = !WAIT_FOR_NETWORK_TO_SETTLE;
             @Override
             public void enter() {
+                turnOnMasterTetherSettings(); // may transition us out
+
                 mTryCell = !WAIT_FOR_NETWORK_TO_SETTLE; // better try something first pass
                                                         // or crazy tests cases will fail
                 chooseUpstreamType(mTryCell);
                 mTryCell = !mTryCell;
-                turnOnMasterTetherSettings(); // may transition us out
             }
             @Override
             public void exit() {
diff --git a/services/java/com/android/server/wm/WindowManagerService.java b/services/java/com/android/server/wm/WindowManagerService.java
index 4dcf59b..bd33e0c 100644
--- a/services/java/com/android/server/wm/WindowManagerService.java
+++ b/services/java/com/android/server/wm/WindowManagerService.java
@@ -2538,8 +2538,12 @@
             if (win == null) {
                 return 0;
             }
-            win.mRequestedWidth = requestedWidth;
-            win.mRequestedHeight = requestedHeight;
+            if (win.mRequestedWidth != requestedWidth
+                    || win.mRequestedHeight != requestedHeight) {
+                win.mLayoutNeeded = true;
+                win.mRequestedWidth = requestedWidth;
+                win.mRequestedHeight = requestedHeight;
+            }
             if (attrs != null && seq == win.mSeq) {
                 win.mSystemUiVisibility = systemUiVisibility;
             }
@@ -2560,6 +2564,9 @@
                 }
                 flagChanges = win.mAttrs.flags ^= attrs.flags;
                 attrChanges = win.mAttrs.copyFrom(attrs);
+                if ((attrChanges&WindowManager.LayoutParams.LAYOUT_CHANGED) != 0) {
+                    win.mLayoutNeeded = true;
+                }
             }
 
             if (DEBUG_LAYOUT) Slog.v(TAG, "Relayout " + win + ": " + win.mAttrs);
@@ -7438,12 +7445,13 @@
             // if they want.  (We do the normal layout for INVISIBLE
             // windows, since that means "perform layout as normal,
             // just don't display").
-            if (!gone || !win.mHaveFrame) {
+            if (!gone || !win.mHaveFrame || win.mLayoutNeeded) {
                 if (!win.mLayoutAttached) {
                     if (initial) {
                         //Slog.i(TAG, "Window " + this + " clearing mContentChanged - initial");
                         win.mContentChanged = false;
                     }
+                    win.mLayoutNeeded = false;
                     win.prelayout();
                     mPolicy.layoutWindowLw(win, win.mAttrs, null);
                     win.mLayoutSeq = seq;
@@ -7475,11 +7483,12 @@
                 // windows, since that means "perform layout as normal,
                 // just don't display").
                 if ((win.mViewVisibility != View.GONE && win.mRelayoutCalled)
-                        || !win.mHaveFrame) {
+                        || !win.mHaveFrame || win.mLayoutNeeded) {
                     if (initial) {
                         //Slog.i(TAG, "Window " + this + " clearing mContentChanged - initial");
                         win.mContentChanged = false;
                     }
+                    win.mLayoutNeeded = false;
                     win.prelayout();
                     mPolicy.layoutWindowLw(win, win.mAttrs, win.mAttachedWindow);
                     win.mLayoutSeq = seq;
diff --git a/services/java/com/android/server/wm/WindowState.java b/services/java/com/android/server/wm/WindowState.java
index 9118381..1067cad 100644
--- a/services/java/com/android/server/wm/WindowState.java
+++ b/services/java/com/android/server/wm/WindowState.java
@@ -238,6 +238,12 @@
     // we can give the window focus before waiting for the relayout.
     boolean mRelayoutCalled;
 
+    // If the application has called relayout() with changes that can
+    // impact its window's size, we need to perform a layout pass on it
+    // even if it is not currently visible for layout.  This is set
+    // when in that case until the layout is done.
+    boolean mLayoutNeeded;
+
     // This is set after the Surface has been created but before the
     // window has been drawn.  During this time the surface is hidden.
     boolean mDrawPending;
@@ -1449,7 +1455,7 @@
         return mViewVisibility == View.GONE
                 || !mRelayoutCalled
                 || (atoken == null && mRootToken.hidden)
-                || (atoken != null && atoken.hiddenRequested)
+                || (atoken != null && (atoken.hiddenRequested || atoken.hidden))
                 || mAttachedHidden
                 || mExiting || mDestroying;
     }
@@ -1728,8 +1734,9 @@
                     pw.print(mPolicyVisibilityAfterAnim);
                     pw.print(" mAttachedHidden="); pw.println(mAttachedHidden);
         }
-        if (!mRelayoutCalled) {
-            pw.print(prefix); pw.print("mRelayoutCalled="); pw.println(mRelayoutCalled);
+        if (!mRelayoutCalled || mLayoutNeeded) {
+            pw.print(prefix); pw.print("mRelayoutCalled="); pw.print(mRelayoutCalled);
+                    pw.print(" mLayoutNeeded="); pw.println(mLayoutNeeded);
         }
         if (mSurfaceResized || mSurfaceDestroyDeferred) {
             pw.print(prefix); pw.print("mSurfaceResized="); pw.print(mSurfaceResized);
diff --git a/telephony/java/android/telephony/SignalStrength.java b/telephony/java/android/telephony/SignalStrength.java
index 3128592..1a4b574 100644
--- a/telephony/java/android/telephony/SignalStrength.java
+++ b/telephony/java/android/telephony/SignalStrength.java
@@ -47,6 +47,9 @@
         "none", "poor", "moderate", "good", "great"
     };
 
+    /** @hide */
+    public static final int INVALID_SNR = 0x7FFFFFFF;
+
     private int mGsmSignalStrength; // Valid values are (0-31, 99) as defined in TS 27.007 8.5
     private int mGsmBitErrorRate;   // bit error rate (0-7, 99) as defined in TS 27.007 8.5
     private int mCdmaDbm;   // This value is the RSSI value
@@ -96,7 +99,7 @@
         mLteSignalStrength = -1;
         mLteRsrp = -1;
         mLteRsrq = -1;
-        mLteRssnr = -1;
+        mLteRssnr = INVALID_SNR;
         mLteCqi = -1;
         isGsm = true;
     }
@@ -136,7 +139,8 @@
             int evdoDbm, int evdoEcio, int evdoSnr,
             boolean gsm) {
         this(gsmSignalStrength, gsmBitErrorRate, cdmaDbm, cdmaEcio,
-                evdoDbm, evdoEcio, evdoSnr, -1, -1, -1, -1, -1, gsm);
+                evdoDbm, evdoEcio, evdoSnr, -1, -1,
+                -1, INVALID_SNR, -1, gsm);
     }
 
     /**
@@ -292,7 +296,7 @@
             if ((mLteSignalStrength == -1)
                     && (mLteRsrp == -1)
                     && (mLteRsrq == -1)
-                    && (mLteRssnr == -1)
+                    && (mLteRssnr == INVALID_SNR)
                     && (mLteCqi == -1)) {
                 level = getGsmLevel();
             } else {
@@ -327,7 +331,7 @@
             if ((mLteSignalStrength == -1)
                     && (mLteRsrp == -1)
                     && (mLteRsrq == -1)
-                    && (mLteRssnr == -1)
+                    && (mLteRssnr == INVALID_SNR)
                     && (mLteCqi == -1)) {
                 asuLevel = getGsmAsuLevel();
             } else {
@@ -363,7 +367,7 @@
             if ((mLteSignalStrength == -1)
                     && (mLteRsrp == -1)
                     && (mLteRsrq == -1)
-                    && (mLteRssnr == -1)
+                    && (mLteRssnr == INVALID_SNR)
                     && (mLteCqi == -1)) {
                 dBm = getGsmDbm();
             } else {
@@ -566,16 +570,31 @@
      */
     public int getLteLevel() {
         int levelLteRsrp = 0;
+        int levelLteRssnr = 0;
 
         if (mLteRsrp == -1) levelLteRsrp = 0;
-        else if (mLteRsrp >= -90) levelLteRsrp = SIGNAL_STRENGTH_GREAT;
-        else if (mLteRsrp >= -100) levelLteRsrp = SIGNAL_STRENGTH_GOOD;
-        else if (mLteRsrp >= -110) levelLteRsrp = SIGNAL_STRENGTH_MODERATE;
-        else if (mLteRsrp >= -118) levelLteRsrp = SIGNAL_STRENGTH_POOR;
-        else levelLteRsrp = 0;
+        else if (mLteRsrp >= -95) levelLteRsrp = SIGNAL_STRENGTH_GREAT;
+        else if (mLteRsrp >= -105) levelLteRsrp = SIGNAL_STRENGTH_GOOD;
+        else if (mLteRsrp >= -115) levelLteRsrp = SIGNAL_STRENGTH_MODERATE;
+        else levelLteRsrp = SIGNAL_STRENGTH_POOR;
 
-        if (DBG) log("Lte level: "+levelLteRsrp);
-        return levelLteRsrp;
+        if (mLteRssnr == INVALID_SNR) levelLteRssnr = 0;
+        else if (mLteRssnr >= 45) levelLteRssnr = SIGNAL_STRENGTH_GREAT;
+        else if (mLteRssnr >= 10) levelLteRssnr = SIGNAL_STRENGTH_GOOD;
+        else if (mLteRssnr >= -30) levelLteRssnr = SIGNAL_STRENGTH_MODERATE;
+        else levelLteRssnr = SIGNAL_STRENGTH_POOR;
+
+        int level;
+        if (mLteRsrp == -1)
+            level = levelLteRssnr;
+        else if (mLteRssnr == INVALID_SNR)
+            level = levelLteRsrp;
+        else
+            level = (levelLteRssnr < levelLteRsrp) ? levelLteRssnr : levelLteRsrp;
+
+        if (DBG) log("Lte rsrp level: "+levelLteRsrp
+                + " snr level: " + levelLteRssnr + " level: " + level);
+        return level;
     }
 
     /**
diff --git a/telephony/java/com/android/internal/telephony/cdma/CdmaLteServiceStateTracker.java b/telephony/java/com/android/internal/telephony/cdma/CdmaLteServiceStateTracker.java
index 3486190..610cd5d 100644
--- a/telephony/java/com/android/internal/telephony/cdma/CdmaLteServiceStateTracker.java
+++ b/telephony/java/com/android/internal/telephony/cdma/CdmaLteServiceStateTracker.java
@@ -147,7 +147,9 @@
 
     @Override
     protected void setSignalStrengthDefaultValues() {
-        mSignalStrength = new SignalStrength(99, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, false);
+        // TODO Make a constructor only has boolean gsm as parameter
+        mSignalStrength = new SignalStrength(99, -1, -1, -1, -1, -1, -1,
+                -1, -1, -1, SignalStrength.INVALID_SNR, -1, false);
     }
 
     @Override
@@ -452,8 +454,13 @@
             setSignalStrengthDefaultValues();
         } else {
             int[] ints = (int[])ar.result;
-            int lteCqi = 99, lteRsrp = -1;
-            int lteRssi = 99;
+
+            int lteRssi = -1;
+            int lteRsrp = -1;
+            int lteRsrq = -1;
+            int lteRssnr = SignalStrength.INVALID_SNR;
+            int lteCqi = -1;
+
             int offset = 2;
             int cdmaDbm = (ints[offset] > 0) ? -ints[offset] : -120;
             int cdmaEcio = (ints[offset + 1] > 0) ? -ints[offset + 1] : -160;
@@ -461,10 +468,13 @@
             int evdoEcio = (ints[offset + 3] > 0) ? -ints[offset + 3] : -1;
             int evdoSnr = ((ints[offset + 4] > 0) && (ints[offset + 4] <= 8)) ? ints[offset + 4]
                     : -1;
+
             if (networkType == ServiceState.RADIO_TECHNOLOGY_LTE) {
-                lteRssi = (ints[offset + 5] >= 0) ? ints[offset + 5] : 99;
-                lteRsrp = (ints[offset + 6] < 0) ? ints[offset + 6] : -1;
-                lteCqi = (ints[offset + 7] >= 0) ? ints[offset + 7] : 99;
+                lteRssi = ints[offset+5];
+                lteRsrp = ints[offset+6];
+                lteRsrq = ints[offset+7];
+                lteRssnr = ints[offset+8];
+                lteCqi = ints[offset+9];
             }
 
             if (networkType != ServiceState.RADIO_TECHNOLOGY_LTE) {
@@ -472,7 +482,7 @@
                         evdoSnr, false);
             } else {
                 mSignalStrength = new SignalStrength(99, -1, cdmaDbm, cdmaEcio, evdoRssi, evdoEcio,
-                        evdoSnr, lteRssi, lteRsrp, -1, -1, lteCqi, true);
+                        evdoSnr, lteRssi, lteRsrp, lteRsrq, lteRssnr, lteCqi, true);
             }
         }
 
diff --git a/telephony/java/com/android/internal/telephony/gsm/GsmServiceStateTracker.java b/telephony/java/com/android/internal/telephony/gsm/GsmServiceStateTracker.java
index 84127cf..6e2b262d 100644
--- a/telephony/java/com/android/internal/telephony/gsm/GsmServiceStateTracker.java
+++ b/telephony/java/com/android/internal/telephony/gsm/GsmServiceStateTracker.java
@@ -671,7 +671,9 @@
     }
 
     private void setSignalStrengthDefaultValues() {
-        mSignalStrength = new SignalStrength(99, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, true);
+        // TODO Make a constructor only has boolean gsm as parameter
+        mSignalStrength = new SignalStrength(99, -1, -1, -1, -1, -1, -1,
+                -1, -1, -1, SignalStrength.INVALID_SNR, -1, true);
     }
 
     /**
@@ -1023,7 +1025,7 @@
         int lteSignalStrength = -1;
         int lteRsrp = -1;
         int lteRsrq = -1;
-        int lteRssnr = -1;
+        int lteRssnr = SignalStrength.INVALID_SNR;
         int lteCqi = -1;
 
         if (ar.exception != null) {