Merge change 22379 into donut

* changes:
  	modified:   MediaFrameworkTest/src/com/android/mediaframeworktest/functional/MediaPlayerApiTest.java         Fixed the passing incorrect media names and add the localH263AMRprepareAsync test.
diff --git a/api/current.xml b/api/current.xml
index fc54859..55d9105 100644
--- a/api/current.xml
+++ b/api/current.xml
@@ -4123,17 +4123,6 @@
  visibility="public"
 >
 </field>
-<field name="includeInGlobalSearch"
- type="int"
- transient="false"
- volatile="false"
- value="16843374"
- static="true"
- final="true"
- deprecated="not deprecated"
- visibility="public"
->
-</field>
 <field name="indeterminate"
  type="int"
  transient="false"
@@ -6202,17 +6191,6 @@
  visibility="public"
 >
 </field>
-<field name="queryAfterZeroResults"
- type="int"
- transient="false"
- volatile="false"
- value="16843394"
- static="true"
- final="true"
- deprecated="not deprecated"
- visibility="public"
->
-</field>
 <field name="radioButtonStyle"
  type="int"
  transient="false"
@@ -6708,17 +6686,6 @@
  visibility="public"
 >
 </field>
-<field name="searchSettingsDescription"
- type="int"
- transient="false"
- volatile="false"
- value="16843402"
- static="true"
- final="true"
- deprecated="not deprecated"
- visibility="public"
->
-</field>
 <field name="searchSuggestAuthority"
  type="int"
  transient="false"
@@ -6774,17 +6741,6 @@
  visibility="public"
 >
 </field>
-<field name="searchSuggestThreshold"
- type="int"
- transient="false"
- volatile="false"
- value="16843373"
- static="true"
- final="true"
- deprecated="not deprecated"
- visibility="public"
->
-</field>
 <field name="secondaryProgress"
  type="int"
  transient="false"
@@ -21202,17 +21158,6 @@
  visibility="public"
 >
 </field>
-<field name="INTENT_ACTION_WEB_SEARCH_SETTINGS"
- type="java.lang.String"
- transient="false"
- volatile="false"
- value="&quot;android.search.action.WEB_SEARCH_SETTINGS&quot;"
- static="true"
- final="true"
- deprecated="not deprecated"
- visibility="public"
->
-</field>
 <field name="MENU_KEY"
  type="char"
  transient="false"
@@ -21246,17 +21191,6 @@
  visibility="public"
 >
 </field>
-<field name="SHORTCUT_MIME_TYPE"
- type="java.lang.String"
- transient="false"
- volatile="false"
- value="&quot;vnd.android.cursor.item/vnd.android.search.suggest&quot;"
- static="true"
- final="true"
- deprecated="not deprecated"
- visibility="public"
->
-</field>
 <field name="SUGGEST_COLUMN_FORMAT"
  type="java.lang.String"
  transient="false"
@@ -21345,28 +21279,6 @@
  visibility="public"
 >
 </field>
-<field name="SUGGEST_COLUMN_SHORTCUT_ID"
- type="java.lang.String"
- transient="false"
- volatile="false"
- value="&quot;suggest_shortcut_id&quot;"
- static="true"
- final="true"
- deprecated="not deprecated"
- visibility="public"
->
-</field>
-<field name="SUGGEST_COLUMN_SPINNER_WHILE_REFRESHING"
- type="java.lang.String"
- transient="false"
- volatile="false"
- value="&quot;suggest_spinner_while_refreshing&quot;"
- static="true"
- final="true"
- deprecated="not deprecated"
- visibility="public"
->
-</field>
 <field name="SUGGEST_COLUMN_TEXT_1"
  type="java.lang.String"
  transient="false"
@@ -21400,17 +21312,6 @@
  visibility="public"
 >
 </field>
-<field name="SUGGEST_NEVER_MAKE_SHORTCUT"
- type="java.lang.String"
- transient="false"
- volatile="false"
- value="&quot;_-1&quot;"
- static="true"
- final="true"
- deprecated="not deprecated"
- visibility="public"
->
-</field>
 <field name="SUGGEST_URI_PATH_QUERY"
  type="java.lang.String"
  transient="false"
@@ -21422,17 +21323,6 @@
  visibility="public"
 >
 </field>
-<field name="SUGGEST_URI_PATH_SHORTCUT"
- type="java.lang.String"
- transient="false"
- volatile="false"
- value="&quot;search_suggest_shortcut&quot;"
- static="true"
- final="true"
- deprecated="not deprecated"
- visibility="public"
->
-</field>
 <field name="USER_QUERY"
  type="java.lang.String"
  transient="false"
diff --git a/core/java/android/app/SearchManager.java b/core/java/android/app/SearchManager.java
index d2a3a1d..62faadc 100644
--- a/core/java/android/app/SearchManager.java
+++ b/core/java/android/app/SearchManager.java
@@ -51,8 +51,6 @@
  * <li><a href="#HowSearchIsInvoked">How Search Is Invoked</a>
  * <li><a href="#ImplementingSearchForYourApp">Implementing Search for Your App</a>
  * <li><a href="#Suggestions">Search Suggestions</a>
- * <li><a href="#ExposingSearchSuggestionsToQuickSearchBox">Exposing Search Suggestions to
- * Quick Search Box</a></li>
  * <li><a href="#ActionKeys">Action Keys</a>
  * <li><a href="#SearchabilityMetadata">Searchability Metadata</a>
  * <li><a href="#PassingSearchContext">Passing Search Context</a>
@@ -248,12 +246,6 @@
  * <li>Summaries of possible results</li>
  * </ul>
  * 
- * <p>Once an application is configured to provide search suggestions, those same suggestions can
- * easily be made available to the system-wide Quick Search Box, providing faster access to its
- * content from on central prominent place. See
- * <a href="#ExposingSearchSuggestionsToQuickSearchBox">Exposing Search Suggestions to Quick Search
- * Box</a> for more details.
- * 
  * <p>The primary form of suggestions is known as <i>queried suggestions</i> and is based on query
  * text that the user has already typed.  This would generally be based on partial matches in
  * the available data.  In certain situations - for example, when no query text has been typed yet -
@@ -488,26 +480,6 @@
  *             {@link android.content.Intent#ACTION_SEARCH ACTION_SEARCH}, optional otherwise.</td>
  *     </tr>
  *
- *     <tr><th>{@link #SUGGEST_COLUMN_SHORTCUT_ID}</th>
- *         <td>This column is used to indicate whether a search suggestion should be stored as a
- *             shortcut, and whether it should be validated.  Shortcuts are usually formed when the
- *             user clicks a suggestion from Quick Search Box.  If missing, the result will be
- *             stored as a shortcut and never refreshed.  If set to
- *             {@link #SUGGEST_NEVER_MAKE_SHORTCUT}, the result will not be stored as a shortcut.
- *             Otherwise, the shortcut id will be used to check back for for an up to date
- *             suggestion using {@link #SUGGEST_URI_PATH_SHORTCUT}. Read more about shortcut
- *             refreshing in the section about
- *             <a href="#ExposingSearchSuggestionsToQuickSearchBox">exposing search suggestions to
- *             Quick Search Box</a>.</td>
- *         <td align="center">No.  Only applicable to sources included in Quick Search Box.</td>
- *     </tr>
- *
- *     <tr><th>{@link #SUGGEST_COLUMN_SPINNER_WHILE_REFRESHING}</th>
- *         <td>This column is used to specify that a spinner should be shown in lieu of an icon2
- *             while the shortcut of this suggestion is being refreshed.</td>
- *         <td align="center">No.  Only applicable to sources included in Quick Search Box.</td>
- *     </tr>
- * 
  *     <tr><th><i>Other Columns</i></th>
  *         <td>Finally, if you have defined any <a href="#ActionKeys">Action Keys</a> and you wish 
  *             for them to have suggestion-specific definitions, you'll need to define one 
@@ -581,59 +553,6 @@
  * query text is provided and the SUGGEST_COLUMN_INTENT_DATA values are not suitable for user 
  * inspection and editing.</li></ul>
  *
- * <a name="ExposingSearchSuggestionsToQuickSearchBox"></a>
- * <h3>Exposing Search Suggestions to Quick Search Box</h3>
- * 
- * <p>Once your application is setup to provide search suggestions, making them available to the
- * globally accessable Quick Search Box is as easy as setting android:includeInGlobalSearch to
- * "true" in your searchable metadata file.  Beyond that, here are some more details of how
- * suggestions interact with Quick Search Box, and optional ways that you may customize suggestions
- * for your application.
- *
- * <p><b>Source Ranking:</b>  Once your application's search results are made available to Quick
- * Search Box, how they surface to the user for a particular query will depend on how many
- * other apps have results for that query, and how often the user has clicked on your results
- * compared to the other apps'.  The apps with the best track record within Quick Search
- * Box will get queried earlier and have a better chance of showing their results in the top few
- * slots.  If there are more results than can be displayed to the user within a screen or two, the
- * results may spill into a "more results" section that groups the remaining results by
- * source.  The newest apps with little usage information are given middle of the road positioning
- * until enough usage information is available to rank it as usual.  The exact formula for ranking
- * the results is not set in stone, but suffice it is to say that providing quality results will
- * increase the likelihood that your app's suggestions are provided in a prominent position, and
- * apps that provide lower quality suggestions will be more likely to be pushed into the spillover
- * area.
- *
- * <p><b>Search Settings:</b>  Each app that is available to Quick Search Box has an entry in the
- * system settings where the user can enable or disable the inclusion of its results.  Below the
- * name of the application, each application may provide a brief description of what kind of
- * information will be made available via a search settings description string pointed to by the
- * android:searchSettingsDescription attribute in the searchable metadata.
- *
- * <p><b>Shortcuts:</b>  Suggestions that are clicked on by the user are automatically made into
- * shortcuts, or, copied so they can quickly be displayed to the user before querying any of
- * the sources. Thereafter, the shortcutted suggestion will be displayed for the query that yielded
- * the suggestion and for any prefixes of that query.  When multiple shortcuts are made available
- * for a given query, they are ranked based on recency and the number of clicks they have received.
- * You can control how your suggestions are made into shortcuts, and whether they are refreshed,
- * using the {@link #SUGGEST_COLUMN_SHORTCUT_ID} column:
- * <ul><li>Suggestions that do not include a shortcut id column will be made into shortcuts and
- * never refreshed.  This makes sense for suggestions that refer to data that will never be changed
- * or removed.</li>
- * <li>Suggestions that include a shortcut id will be re-queried for a fresh version of the
- * suggestion each time the shortcut is displayed.  The shortcut will be quickly displayed with
- * whatever data was most recently available until the refresh query returns, after which the
- * suggestion will be dynamically refreshed with the up to date information.  The shortcut refresh
- * query will be sent to your suggestion provider with a uri of {@link #SUGGEST_URI_PATH_SHORTCUT}.
- * The result should contain one suggestion using the same columns as the suggestion query, or be
- * empty, indicating that the shortcut is no longer valid.  Shortcut ids make sense when referring
- * to data that may change over time, such as a contact's presence status.  If a suggestion refers
- * to data that could take longer to refresh, such as a network based refresh of a stock quote, you
- * may include {@link #SUGGEST_COLUMN_SPINNER_WHILE_REFRESHING} to show a progress spinner for the
- * right hand icon until the refresh is complete.</li>
- * <li>Finally, to prevent a suggestion from being copied into a shortcut, you may provide a
- * shortcut id with a value of {@link #SUGGEST_NEVER_MAKE_SHORTCUT}.</li></ul>
- * 
  * <a name="ActionKeys"></a>
  * <h3>Action Keys</h3>
  * 
@@ -950,47 +869,6 @@
  *     </tbody>
  * </table>
  *
- * <p>Elements of search metadata that configure search suggestions being available to Quick Search
- * Box:
- * <table border="2" width="85%" align="center" frame="hsides" rules="rows">
- *
- *     <thead>
- *     <tr><th>Attribute</th> <th>Description</th> <th>Required?</th></tr>
- *     </thead>
- *
- *     <tr><th>android:includeInGlobalSearch</th>
- *         <td>If true, indicates the search suggestions provided by your application should be
- *             included in the globally accessible Quick Search Box.  The attributes below are only
- *             applicable if this is set to true.</td>
- *         <td align="center">Yes</td>
- *     </tr>
- *
- *     <tr><th>android:searchSettingsDescription</th>
- *         <td>If provided, provides a brief description of the search suggestions that are provided
- *             by your application to Quick Search Box, and will be displayed in the search settings
- *             entry for your application.</td>
- *         <td align="center">No</td>
- *     </tr>
- *
- *     <tr><th>android:queryAfterZeroResults</th>
- *         <td>Indicates whether a source should be invoked for supersets of queries it has
- *             returned zero results for in the past.  For example, if a source returned zero
- *             results for "bo", it would be ignored for "bob".  If set to false, this source
- *             will only be ignored for a single session; the next time the search dialog is
- *             invoked, all sources will be queried.  The default value is false.</td>
- *         <td align="center">No</td>
- *     </tr>
- *
- *     <tr><th>android:searchSuggestThreshold</th>
- *         <td>Indicates the minimum number of characters needed to trigger a source from Quick
- *             Search Box.  Only guarantees that a source will not be queried for anything shorter
- *             than the threshold.  The default value is 0.</td>
- *         <td align="center">No</td>
- *     </tr>
- *
- *     </tbody>
- * </table>
- *
  * <p><b>Additional metadata for search action keys.</b>  For each action key that you would like to
  * define, you'll need to add an additional element defining that key, and using the attributes
  * discussed in <a href="#ActionKeys">Action Keys</a>.  A simple example is shown here:
@@ -1368,12 +1246,16 @@
      * result indicates the shortcut refers to a no longer valid sugggestion.
      *
      * @see #SUGGEST_COLUMN_SHORTCUT_ID
+     *
+     * @hide pending enabling of global search for third parties
      */
     public final static String SUGGEST_URI_PATH_SHORTCUT = "search_suggest_shortcut";
     
     /**
      * MIME type for shortcut validation.  You'll use this in your suggestions content provider
      * in the getType() function.
+     *
+     * @hide pending enabling of global search for third parties
      */
     public final static String SHORTCUT_MIME_TYPE = 
             "vnd.android.cursor.item/vnd.android.search.suggest";
@@ -1386,7 +1268,7 @@
      * In addition to the columns below, the suggestion columns are used to pass along the full
      * suggestion so it can be shortcutted.
      *
-     * @hide
+     * @hide an implementation detail not part of the public api
      */
     public final static String SEARCH_CLICK_REPORT_AUTHORITY =
             "com.android.globalsearch.stats";
@@ -1394,21 +1276,21 @@
     /**
      * The path the write goes to.
      *
-     * @hide
+     * @hide an implementation detail not part of the public api
      */
     public final static String SEARCH_CLICK_REPORT_URI_PATH = "click";
 
     /**
      * The column storing the query for the click.
      *
-     * @hide
+     * @hide an implementation detail not part of the public api
      */
     public final static String SEARCH_CLICK_REPORT_COLUMN_QUERY = "query";
 
     /**
      * The column storing the component name of the application that was pivoted into.
      *
-     * @hide
+     * @hide an implementation detail not part of the public api
      */
     public final static String SEARCH_CLICK_REPORT_COLUMN_COMPONENT = "component";
 
@@ -1493,7 +1375,7 @@
      *  {@link #COMPONENT_NAME_KEY}. For use by the global search system only - if other providers
      *  attempt to use this column, the value will be overwritten by global search.
      *
-     * @hide
+     * @hide an implementation detail not part of the public api
      */
     public final static String SUGGEST_COLUMN_INTENT_COMPONENT_NAME = "suggest_intent_component";
     /**
@@ -1518,6 +1400,8 @@
      * {@link #SUGGEST_NEVER_MAKE_SHORTCUT}, the result will not be stored as a shortcut.
      * Otherwise, the shortcut id will be used to check back for an up to date suggestion using
      * {@link #SUGGEST_URI_PATH_SHORTCUT}.
+     *
+     * @hide pending reenabling of global search for third parties
      */
     public final static String SUGGEST_COLUMN_SHORTCUT_ID = "suggest_shortcut_id";
 
@@ -1526,7 +1410,7 @@
      * cursor item's background color if it needs a non-default background color. A non-zero value
      * indicates a valid background color to override the default.
      *
-     * @hide For internal use, not part of the public API.
+     * @hide an implementation detail not part of the public api
      */
     public final static String SUGGEST_COLUMN_BACKGROUND_COLOR = "suggest_background_color";
     
@@ -1534,6 +1418,8 @@
      * Column name for suggestions cursor. <i>Optional.</i> This column is used to specify
      * that a spinner should be shown in lieu of an icon2 while the shortcut of this suggestion
      * is being refreshed.
+     *
+     * @hide pending reenabling of global search for third parties
      */
     public final static String SUGGEST_COLUMN_SPINNER_WHILE_REFRESHING =
             "suggest_spinner_while_refreshing";
@@ -1541,6 +1427,8 @@
     /**
      * Column value for suggestion column {@link #SUGGEST_COLUMN_SHORTCUT_ID} when a suggestion
      * should not be stored as a shortcut in global search.
+     *
+     * @hide pending reenabling of global search for third parties
      */
     public final static String SUGGEST_NEVER_MAKE_SHORTCUT = "_-1";
 
@@ -1587,6 +1475,8 @@
      * Intent action for starting a web search provider's settings activity.
      * Web search providers should handle this intent if they have provider-specific
      * settings to implement.
+     *
+     * @hide implementation detail only relevent to web search providers
      */
     public final static String INTENT_ACTION_WEB_SEARCH_SETTINGS
             = "android.search.action.WEB_SEARCH_SETTINGS";
@@ -1601,8 +1491,7 @@
     
     /**
      * Intent action broadcasted to inform that the search settings have changed in some way.
-     * Either searchables have been enabled or disabled, or a different web search provider
-     * has been chosen.
+     * Either searchables have been enabled or disabled.
      */
     public final static String INTENT_ACTION_SEARCH_SETTINGS_CHANGED
             = "android.search.action.SETTINGS_CHANGED";
@@ -1611,7 +1500,7 @@
      * If a suggestion has this value in {@link #SUGGEST_COLUMN_INTENT_ACTION},
      * the search dialog will take no action.
      *
-     * @hide
+     * @hide an implentation detail not part of the public api
      */
     public final static String INTENT_ACTION_NONE = "android.search.action.ZILCH";
     
diff --git a/core/java/android/net/SSLCertificateSocketFactory.java b/core/java/android/net/SSLCertificateSocketFactory.java
index deaa3c3..a97b9e5 100644
--- a/core/java/android/net/SSLCertificateSocketFactory.java
+++ b/core/java/android/net/SSLCertificateSocketFactory.java
@@ -41,6 +41,7 @@
 
 import org.apache.harmony.xnet.provider.jsse.SSLClientSessionCache;
 import org.apache.harmony.xnet.provider.jsse.SSLContextImpl;
+import org.apache.harmony.xnet.provider.jsse.SSLParameters;
 
 /**
  * SSLSocketFactory that provides optional (on debug devices, only) skipping of ssl certificfate
@@ -54,28 +55,6 @@
 
     private static final String LOG_TAG = "SSLCertificateSocketFactory";
 
-    private static X509TrustManager sDefaultTrustManager;
-
-    static {
-        try {
-            TrustManagerFactory tmf = TrustManagerFactory.getInstance("X509");
-            tmf.init((KeyStore)null);
-            TrustManager[] tms = tmf.getTrustManagers();
-            if (tms != null) {
-                for (TrustManager tm : tms) {
-                    if (tm instanceof X509TrustManager) {
-                        sDefaultTrustManager = (X509TrustManager)tm;
-                        break;
-                    }
-                }
-            }
-        } catch (NoSuchAlgorithmException e) {
-            Log.e(LOG_TAG, "Unable to get X509 Trust Manager ", e);
-        } catch (KeyStoreException e) {
-            Log.e(LOG_TAG, "Key Store exception while initializing TrustManagerFactory ", e);
-        }
-    }
-
     private static final TrustManager[] TRUST_MANAGER = new TrustManager[] {
         new X509TrustManager() {
             public X509Certificate[] getAcceptedIssuers() {
@@ -155,20 +134,13 @@
 
     private boolean hasValidCertificateChain(Certificate[] certs) 
             throws IOException {
-        if (sDefaultTrustManager == null) {
-            if (Config.LOGD) {
-                Log.d(LOG_TAG,"hasValidCertificateChain():" +
-                          " null default trust manager!");
-            }
-            throw new IOException("null default trust manager");
-        }
-
         boolean trusted = (certs != null && (certs.length > 0));
 
         if (trusted) {
             try {
                 // the authtype we pass in doesn't actually matter
-                sDefaultTrustManager.checkServerTrusted((X509Certificate[]) certs, "RSA");
+                SSLParameters.getDefaultTrustManager()
+                        .checkServerTrusted((X509Certificate[]) certs, "RSA");
             } catch (GeneralSecurityException e) { 
                 String exceptionMessage = e != null ? e.getMessage() : "none";
                 if (Config.LOGD) {
diff --git a/core/java/android/net/http/CertificateChainValidator.java b/core/java/android/net/http/CertificateChainValidator.java
index 91fa900..ed6b4c2 100644
--- a/core/java/android/net/http/CertificateChainValidator.java
+++ b/core/java/android/net/http/CertificateChainValidator.java
@@ -16,6 +16,8 @@
 
 package android.net.http;
 
+import org.apache.harmony.xnet.provider.jsse.SSLParameters;
+
 import java.io.IOException;
 
 import java.security.cert.Certificate;
@@ -47,11 +49,6 @@
             = new CertificateChainValidator();
 
     /**
-     * Default trust manager (used to perform CA certificate validation)
-     */
-    private X509TrustManager mDefaultTrustManager;
-
-    /**
      * @return The singleton instance of the certificator chain validator
      */
     public static CertificateChainValidator getInstance() {
@@ -62,28 +59,7 @@
      * Creates a new certificate chain validator. This is a pivate constructor.
      * If you need a Certificate chain validator, call getInstance().
      */
-    private CertificateChainValidator() {
-        try {
-            TrustManagerFactory trustManagerFactory
-                = TrustManagerFactory.getInstance("X509");
-            trustManagerFactory.init((KeyStore)null);
-            TrustManager[] trustManagers =
-                trustManagerFactory.getTrustManagers();
-            if (trustManagers != null && trustManagers.length > 0) {
-                for (TrustManager trustManager : trustManagers) {
-                    if (trustManager instanceof X509TrustManager) {
-                        mDefaultTrustManager = (X509TrustManager)(trustManager);
-                        break;
-                    }
-                }
-            }
-        } catch (Exception exc) {
-            if (HttpLog.LOGV) {
-                HttpLog.v("CertificateChainValidator():" +
-                          " failed to initialize the trust manager");
-            }
-        }
-    }
+    private CertificateChainValidator() {}
 
     /**
      * Performs the handshake and server certificates validation
@@ -156,7 +132,7 @@
         // report back to the user.
         //
         try {
-            mDefaultTrustManager.checkServerTrusted(
+            SSLParameters.getDefaultTrustManager().checkServerTrusted(
                 serverCertificates, "RSA");
 
             // no errors!!!
@@ -186,7 +162,7 @@
         // check if the last certificate in the chain (root) is trusted
         X509Certificate[] rootCertificateChain = { currCertificate };
         try {
-            mDefaultTrustManager.checkServerTrusted(
+            SSLParameters.getDefaultTrustManager().checkServerTrusted(
                 rootCertificateChain, "RSA");
         } catch (CertificateExpiredException e) {
             String errorMessage = e.getMessage();
diff --git a/core/java/android/server/search/Searchables.java b/core/java/android/server/search/Searchables.java
index c615957..a2add73 100644
--- a/core/java/android/server/search/Searchables.java
+++ b/core/java/android/server/search/Searchables.java
@@ -26,6 +26,7 @@
 import android.content.pm.ActivityInfo;
 import android.content.pm.PackageManager;
 import android.content.pm.ResolveInfo;
+import android.content.pm.ApplicationInfo;
 import android.os.Bundle;
 import android.util.Log;
 
@@ -230,14 +231,16 @@
                         : webSearchInfoList.get(ii - search_count);
                 ActivityInfo ai = info.activityInfo;
                 // Check first to avoid duplicate entries.
-                if (newSearchablesMap.get(new ComponentName(ai.packageName, ai.name)) == null) {
-                    SearchableInfo searchable = SearchableInfo.getActivityMetaData(mContext, ai);
-                    if (searchable != null) {
-                        newSearchablesList.add(searchable);
-                        newSearchablesMap.put(searchable.getSearchActivity(), searchable);
-                        if (searchable.shouldIncludeInGlobalSearch()) {
-                            newSearchablesInGlobalSearchList.add(searchable);
-                        }
+                if (newSearchablesMap.containsKey(new ComponentName(ai.packageName, ai.name))) {
+                    continue;
+                }
+                SearchableInfo searchable = SearchableInfo.getActivityMetaData(mContext, ai);
+                if (searchable != null) {
+                    newSearchablesList.add(searchable);
+                    newSearchablesMap.put(searchable.getSearchActivity(), searchable);
+                    if (searchable.shouldIncludeInGlobalSearch()
+                            && isWhitelistedForGlobalSearch(pm, searchable.getSearchActivity())) {
+                        newSearchablesInGlobalSearchList.add(searchable);
                     }
                 }
             }
@@ -289,6 +292,25 @@
     }
 
     /**
+     * Determines whether an activity may be included in quick search box.  For now this is
+     * restricted to system installed apps.
+     *
+     * TODO: remove when we are ready to enable global search for third party applications.
+     *
+     * @param pm The package manager.
+     * @param searchActivity The component of the search activity.
+     * @return True if the search activity may include its search suggestions in quick search box.
+     */
+    private boolean isWhitelistedForGlobalSearch(PackageManager pm, ComponentName searchActivity) {
+        try {
+            ActivityInfo ai = pm.getActivityInfo(searchActivity, 0);
+            return ((ai.applicationInfo.flags & ApplicationInfo.FLAG_SYSTEM) != 0);
+        } catch (PackageManager.NameNotFoundException e) {
+            return false;
+        }
+    }
+
+    /**
      * Checks if the given activity component is present in the system and if so makes it the
      * preferred activity for handling ACTION_WEB_SEARCH.
      * @param component Name of the component to check and set as preferred.
diff --git a/core/java/android/widget/TextView.java b/core/java/android/widget/TextView.java
index 3fab692..260799e 100644
--- a/core/java/android/widget/TextView.java
+++ b/core/java/android/widget/TextView.java
@@ -7210,6 +7210,7 @@
                 if (word != null) {
                     Intent i = new Intent("com.android.settings.USER_DICTIONARY_INSERT");
                     i.putExtra("word", word);
+                    i.setFlags(i.getFlags() | Intent.FLAG_ACTIVITY_NEW_TASK);
                     getContext().startActivity(i);
                 }
 
diff --git a/core/res/res/values-cs/strings.xml b/core/res/res/values-cs/strings.xml
index d858a79..8c6704e 100644
--- a/core/res/res/values-cs/strings.xml
+++ b/core/res/res/values-cs/strings.xml
@@ -318,10 +318,8 @@
     <string name="permdesc_bindGadget" msgid="2098697834497452046">"Umožňuje aplikaci sdělit systému, které aplikace mohou používat které widgety. Aplikace s tímto oprávněním mohou zpřístupnit osobní údaje jiným aplikacím. Není určeno pro běžné aplikace."</string>
     <string name="permlab_modifyPhoneState" msgid="8423923777659292228">"změna stavu telefonu"</string>
     <string name="permdesc_modifyPhoneState" msgid="3302284561346956587">"Umožňuje aplikaci ovládat telefonní funkce zařízení. Aplikace s tímto oprávněním může přepínat sítě nebo zapnout či vypnout bezdrátové připojení telefonu bez vašeho svolení."</string>
-    <!-- no translation found for permlab_readPhoneState (2326172951448691631) -->
-    <skip />
-    <!-- no translation found for permdesc_readPhoneState (188877305147626781) -->
-    <skip />
+    <string name="permlab_readPhoneState" msgid="2326172951448691631">"čtení stavu a identity telefonu"</string>
+    <string name="permdesc_readPhoneState" msgid="188877305147626781">"Umožňuje aplikaci získat přístup k telefonním funkcím zařízení. Aplikace s tímto oprávněním mohou určit telefonní a sériové číslo tohoto telefonu, zda zrovna probíhá hovor, volané telefonní číslo a podobně."</string>
     <string name="permlab_wakeLock" msgid="573480187941496130">"zabránění přechodu telefonu do režimu spánku"</string>
     <string name="permdesc_wakeLock" msgid="7584036471227467099">"Umožňuje aplikaci zabránit přechodu telefonu do režimu spánku."</string>
     <string name="permlab_devicePower" msgid="4928622470980943206">"zapnutí či vypnutí telefonu"</string>
diff --git a/core/res/res/values-de/strings.xml b/core/res/res/values-de/strings.xml
index 34e52a5..10a736c 100644
--- a/core/res/res/values-de/strings.xml
+++ b/core/res/res/values-de/strings.xml
@@ -318,10 +318,8 @@
     <string name="permdesc_bindGadget" msgid="2098697834497452046">"Ermöglicht der Anwendung, dem System zu melden, welche Widgets von welcher Anwendung verwendet werden können. Mit dieser Berechtigung können Anwendungen anderen Anwendungen Zugriff auf persönliche Daten gewähren. Nicht für normale Anwendungen vorgesehen."</string>
     <string name="permlab_modifyPhoneState" msgid="8423923777659292228">"Telefonstatus ändern"</string>
     <string name="permdesc_modifyPhoneState" msgid="3302284561346956587">"Ermöglicht einer Anwendung, die Telefonfunktionen des Gerätes zu steuern. Eine Anwendung mit dieser Berechtigung kann unter anderem das Netzwerk wechseln oder die Mobilfunkverbindung des Telefons ein- und ausschalten, ohne Sie darüber zu informieren."</string>
-    <!-- no translation found for permlab_readPhoneState (2326172951448691631) -->
-    <skip />
-    <!-- no translation found for permdesc_readPhoneState (188877305147626781) -->
-    <skip />
+    <string name="permlab_readPhoneState" msgid="2326172951448691631">"Telefonstatus lesen und identifizieren"</string>
+    <string name="permdesc_readPhoneState" msgid="188877305147626781">"Ermöglicht der Anwendung, auf die Telefonfunktionen des Gerätes zuzugreifen. Eine Anwendung mit dieser Berechtigung kann unter anderem bestimmen, welche Telefonnummer dieses Telefon verwendet, ob ein Anruf aktiv ist oder mit welcher Nummer der Anrufer verbunden ist."</string>
     <string name="permlab_wakeLock" msgid="573480187941496130">"Standby-Modus deaktivieren"</string>
     <string name="permdesc_wakeLock" msgid="7584036471227467099">"Ermöglicht einer Anwendung, den Standby-Modus des Telefons zu deaktivieren."</string>
     <string name="permlab_devicePower" msgid="4928622470980943206">"Gerät ein- oder ausschalten"</string>
diff --git a/core/res/res/values-es/strings.xml b/core/res/res/values-es/strings.xml
index f9fd376..c00a4be 100644
--- a/core/res/res/values-es/strings.xml
+++ b/core/res/res/values-es/strings.xml
@@ -318,10 +318,8 @@
     <string name="permdesc_bindGadget" msgid="2098697834497452046">"Permite que una aplicación indique al sistema los widgets que puede utilizar cada aplicación. Se trata de un permiso que no pueden utilizar las aplicaciones normales y que permite que una aplicación conceda acceso a datos personales a otras aplicaciones."</string>
     <string name="permlab_modifyPhoneState" msgid="8423923777659292228">"modificar estado del teléfono"</string>
     <string name="permdesc_modifyPhoneState" msgid="3302284561346956587">"Permite que la aplicación controle las funciones de teléfono del dispositivo. Una aplicación con este permiso puede cambiar redes, activar y desactivar la señal móvil, etc., sin necesidad de notificar al usuario."</string>
-    <!-- no translation found for permlab_readPhoneState (2326172951448691631) -->
-    <skip />
-    <!-- no translation found for permdesc_readPhoneState (188877305147626781) -->
-    <skip />
+    <string name="permlab_readPhoneState" msgid="2326172951448691631">"leer la identidad y el estado del teléfono"</string>
+    <string name="permdesc_readPhoneState" msgid="188877305147626781">"Permite que la aplicación acceda a las funciones de teléfono del dispositivo. Una aplicación con este permiso puede determinar el número de teléfono y el número de serie de este teléfono, si una llamada está activa, el número al que está vinculada esa llamada, etc."</string>
     <string name="permlab_wakeLock" msgid="573480187941496130">"impedir que el teléfono entre en modo de suspensión"</string>
     <string name="permdesc_wakeLock" msgid="7584036471227467099">"Permite que una aplicación impida que el teléfono entre en modo de suspensión."</string>
     <string name="permlab_devicePower" msgid="4928622470980943206">"encender o apagar el teléfono"</string>
diff --git a/core/res/res/values-fr/strings.xml b/core/res/res/values-fr/strings.xml
index 865b2d1..377d202 100644
--- a/core/res/res/values-fr/strings.xml
+++ b/core/res/res/values-fr/strings.xml
@@ -318,10 +318,8 @@
     <string name="permdesc_bindGadget" msgid="2098697834497452046">"Permet à l\'application de signaler au système quels widgets peuvent être utilisés par quelle application. Grâce à cette autorisation, les applications peuvent accorder l\'accès à des données personnelles à d\'autres applications. Cette option n\'est pas utilisée par les applications standard."</string>
     <string name="permlab_modifyPhoneState" msgid="8423923777659292228">"Modification de l\'état du téléphone"</string>
     <string name="permdesc_modifyPhoneState" msgid="3302284561346956587">"Permet à une application de contrôler les fonctionnalités téléphoniques de l\'appareil. Une application bénéficiant de cette autorisation peut changer de réseau, éteindre et allumer le signal radio du téléphone, etc., sans vous en avertir."</string>
-    <!-- no translation found for permlab_readPhoneState (2326172951448691631) -->
-    <skip />
-    <!-- no translation found for permdesc_readPhoneState (188877305147626781) -->
-    <skip />
+    <string name="permlab_readPhoneState" msgid="2326172951448691631">"Lire l\'état et l\'identité du téléphone"</string>
+    <string name="permdesc_readPhoneState" msgid="188877305147626781">"Permet à l\'application d\'accéder aux fonctionnalités d\'appel du téléphone. L\'application peut alors déterminer le numéro de téléphone et le numéro de série de l\'appareil, savoir si un appel est en cours, identifier le numéro appelé, etc."</string>
     <string name="permlab_wakeLock" msgid="573480187941496130">"Arrêt du mode veille sur le téléphone"</string>
     <string name="permdesc_wakeLock" msgid="7584036471227467099">"Permet à une application d\'empêcher votre téléphone de passer en mode veille."</string>
     <string name="permlab_devicePower" msgid="4928622470980943206">"Éteindre ou allumer le téléphone"</string>
diff --git a/core/res/res/values-it/strings.xml b/core/res/res/values-it/strings.xml
index 9ccc6f3..fde4f23 100644
--- a/core/res/res/values-it/strings.xml
+++ b/core/res/res/values-it/strings.xml
@@ -318,10 +318,8 @@
     <string name="permdesc_bindGadget" msgid="2098697834497452046">"Consente all\'applicazione di indicare al sistema quali widget possono essere utilizzati e da quale applicazione. Con questa autorizzazione, le applicazioni possono consentire ad altre applicazioni di accedere a dati personali. Da non usare per normali applicazioni."</string>
     <string name="permlab_modifyPhoneState" msgid="8423923777659292228">"modifica stato del telefono"</string>
     <string name="permdesc_modifyPhoneState" msgid="3302284561346956587">"Consente all\'applicazione di controllare le funzioni telefoniche del dispositivo. Un\'applicazione con questa autorizzazione può cambiare rete, attivare e disattivare il segnale cellulare e così via, senza alcuna notifica."</string>
-    <!-- no translation found for permlab_readPhoneState (2326172951448691631) -->
-    <skip />
-    <!-- no translation found for permdesc_readPhoneState (188877305147626781) -->
-    <skip />
+    <string name="permlab_readPhoneState" msgid="2326172951448691631">"lettura stato e identità del telefono"</string>
+    <string name="permdesc_readPhoneState" msgid="188877305147626781">"Consente l\'accesso dell\'applicazione alle funzioni telefoniche del dispositivo. Un\'applicazione con questa autorizzazione può determinare il numero del telefono in uso e il suo numero di serie, se una chiamata è attiva o meno, il numero a cui è collegata la chiamata e simili."</string>
     <string name="permlab_wakeLock" msgid="573480187941496130">"disattivazione stand-by del telefono"</string>
     <string name="permdesc_wakeLock" msgid="7584036471227467099">"Consente a un\'applicazione di impedire lo stand-by del telefono."</string>
     <string name="permlab_devicePower" msgid="4928622470980943206">"accensione o spegnimento del telefono"</string>
diff --git a/core/res/res/values-ja/strings.xml b/core/res/res/values-ja/strings.xml
index 29e3818..f6a546f 100644
--- a/core/res/res/values-ja/strings.xml
+++ b/core/res/res/values-ja/strings.xml
@@ -318,10 +318,8 @@
     <string name="permdesc_bindGadget" msgid="2098697834497452046">"どのアプリケーションがどのウィジェットを使用できるかシステムに指定することをこのアプリケーションに許可します。これにより、アプリケーション間で個人データにアクセスできるようになります。通常のアプリケーションでは使用しません。"</string>
     <string name="permlab_modifyPhoneState" msgid="8423923777659292228">"端末ステータスの変更"</string>
     <string name="permdesc_modifyPhoneState" msgid="3302284561346956587">"端末の電話機能のコントロールをアプリケーションに許可します。アプリケーションは、ネットワークの切り替え、携帯電話の無線通信のオン/オフなどを通知せずに行うことができます。"</string>
-    <!-- no translation found for permlab_readPhoneState (2326172951448691631) -->
-    <skip />
-    <!-- no translation found for permdesc_readPhoneState (188877305147626781) -->
-    <skip />
+    <string name="permlab_readPhoneState" msgid="2326172951448691631">"携帯のステータスとIDの読み取り"</string>
+    <string name="permdesc_readPhoneState" msgid="188877305147626781">"端末の電話機能へのアクセスをアプリケーションに許可します。この権限が許可されたアプリケーションでは、この携帯の電話番号やシリアル番号、通話中かどうか、通話相手の電話番号などを特定できます。"</string>
     <string name="permlab_wakeLock" msgid="573480187941496130">"端末のスリープを無効にする"</string>
     <string name="permdesc_wakeLock" msgid="7584036471227467099">"端末のスリープを無効にすることをアプリケーションに許可します。"</string>
     <string name="permlab_devicePower" msgid="4928622470980943206">"電源のON/OFF"</string>
diff --git a/core/res/res/values-nl/strings.xml b/core/res/res/values-nl/strings.xml
index 00b03d8..709e7cc 100644
--- a/core/res/res/values-nl/strings.xml
+++ b/core/res/res/values-nl/strings.xml
@@ -318,10 +318,8 @@
     <string name="permdesc_bindGadget" msgid="2098697834497452046">"Hiermee kan een toepassing het systeem melden welke widgets door welke toepassing kunnen worden gebruikt. Met deze toestemming kunnen toepassingen andere toepassingen toegang geven tot persoonlijke gegevens. Niet voor gebruik door normale toepassingen."</string>
     <string name="permlab_modifyPhoneState" msgid="8423923777659292228">"telefoonstatus wijzigen"</string>
     <string name="permdesc_modifyPhoneState" msgid="3302284561346956587">"Hiermee kan de toepassing de telefoonfuncties van het apparaat beheren. Een toepassing met deze machtiging kan schakelen tussen netwerken, de radio van de telefoon in- of uitschakelen en dergelijke zonder dat u hiervan op de hoogte wordt gesteld."</string>
-    <!-- no translation found for permlab_readPhoneState (2326172951448691631) -->
-    <skip />
-    <!-- no translation found for permdesc_readPhoneState (188877305147626781) -->
-    <skip />
+    <string name="permlab_readPhoneState" msgid="2326172951448691631">"telefoonstatus en -identiteit lezen"</string>
+    <string name="permdesc_readPhoneState" msgid="188877305147626781">"Hiermee krijgt de toepassing toegang tot de telefoonfuncties van het apparaat. Een toepassing met de betreffende machtiging kan het telefoonnummer en serienummer van deze telefoon achterhalen, bepalen of een oproep actief is, het gekozen nummer achterhalen en dergelijke."</string>
     <string name="permlab_wakeLock" msgid="573480187941496130">"voorkomen dat telefoon overschakelt naar slaapmodus"</string>
     <string name="permdesc_wakeLock" msgid="7584036471227467099">"Hiermee kan een toepassing voorkomen dat de telefoon overschakelt naar de slaapmodus."</string>
     <string name="permlab_devicePower" msgid="4928622470980943206">"telefoon in- of uitschakelen"</string>
diff --git a/core/res/res/values-pl/strings.xml b/core/res/res/values-pl/strings.xml
index 45e0795..a33e94e 100644
--- a/core/res/res/values-pl/strings.xml
+++ b/core/res/res/values-pl/strings.xml
@@ -318,10 +318,8 @@
     <string name="permdesc_bindGadget" msgid="2098697834497452046">"Zezwala aplikacjom na wskazywanie systemowi, które widżety mogą być używane przez inne aplikacje. Z użyciem tego pozwolenia aplikacje mogą udzielać dostępu do danych osobistych innym aplikacjom. Nie jest ono przeznaczone dla zwykłych aplikacji."</string>
     <string name="permlab_modifyPhoneState" msgid="8423923777659292228">"zmiana stanu telefonu"</string>
     <string name="permdesc_modifyPhoneState" msgid="3302284561346956587">"Pozwala aplikacji na kontrolowanie funkcji telefonu w urządzeniu. Aplikacja z tymi uprawnieniami może zmieniać, włączać i wyłączać sieci bezprzewodowe itp. bez informowania użytkownika."</string>
-    <!-- no translation found for permlab_readPhoneState (2326172951448691631) -->
-    <skip />
-    <!-- no translation found for permdesc_readPhoneState (188877305147626781) -->
-    <skip />
+    <string name="permlab_readPhoneState" msgid="2326172951448691631">"odczytywanie stanu i informacji o telefonie"</string>
+    <string name="permdesc_readPhoneState" msgid="188877305147626781">"Umożliwia aplikacji dostęp do funkcji telefonu w tym urządzeniu. Aplikacja z takim pozwoleniem może określić numer telefonu i numer seryjny tego telefonu, czy aktywne jest połączenie, numer, z którym nawiązane jest połączenie itp."</string>
     <string name="permlab_wakeLock" msgid="573480187941496130">"zapobieganie przejściu telefonu w stan uśpienia"</string>
     <string name="permdesc_wakeLock" msgid="7584036471227467099">"Pozwala aplikacji na zapobieganie przejściu telefonu w stan uśpienia."</string>
     <string name="permlab_devicePower" msgid="4928622470980943206">"włączanie lub wyłączanie telefonu"</string>
diff --git a/core/res/res/values-zh-rTW/strings.xml b/core/res/res/values-zh-rTW/strings.xml
index fd677ce..7b4b962 100644
--- a/core/res/res/values-zh-rTW/strings.xml
+++ b/core/res/res/values-zh-rTW/strings.xml
@@ -318,10 +318,8 @@
     <string name="permdesc_bindGadget" msgid="2098697834497452046">"允許應用程式告知系統哪個應用程式可以使用哪些小工具。開啟此權限後,應用程式會讓其他程式使用個人資料,但一般應用程式不適合使用此功能。"</string>
     <string name="permlab_modifyPhoneState" msgid="8423923777659292228">"修改手機狀態"</string>
     <string name="permdesc_modifyPhoneState" msgid="3302284561346956587">"允許應用程式控制電話功能。擁有此權限的程式可自行切換網路、開關無線通訊功能。"</string>
-    <!-- no translation found for permlab_readPhoneState (2326172951448691631) -->
-    <skip />
-    <!-- no translation found for permdesc_readPhoneState (188877305147626781) -->
-    <skip />
+    <string name="permlab_readPhoneState" msgid="2326172951448691631">"讀取手機狀態和識別碼"</string>
+    <string name="permdesc_readPhoneState" msgid="188877305147626781">"允許應用程式存取裝置的電話功能資料。獲得此權限的應用程式可取得手機的號碼和序號、是否在通話中,以及通話另一方的電話號碼等資料。"</string>
     <string name="permlab_wakeLock" msgid="573480187941496130">"防止手機進入待命狀態"</string>
     <string name="permdesc_wakeLock" msgid="7584036471227467099">"允許應用程式防止手機進入待命。"</string>
     <string name="permlab_devicePower" msgid="4928622470980943206">"開啟或關閉電源"</string>
diff --git a/core/res/res/values/attrs.xml b/core/res/res/values/attrs.xml
index fd78f83..d5f8dcb 100644
--- a/core/res/res/values/attrs.xml
+++ b/core/res/res/values/attrs.xml
@@ -2866,16 +2866,16 @@
             when the user clicks a suggestion.  <i>Optional attribute.</i> -->
         <attr name="searchSuggestIntentData" format="string" />
 
-        <!-- If provided, this is the minimum number of characters needed to trigger
+        <!-- @hide If provided, this is the minimum number of characters needed to trigger
              search suggestions. The default value is 0. <i>Optional attribute.</i> -->
         <attr name="searchSuggestThreshold" format="integer" />
 
-        <!-- If provided and <code>true</code>, this searchable activity will be
+        <!-- @hide If provided and <code>true</code>, this searchable activity will be
              included in any global lists of search targets.
-             The default value is <code>false</code>. <i>Optional attribute.</i>. -->
+             The default value is <code>false</code>. <i>Optional attribute.</i>.-->
         <attr name="includeInGlobalSearch" format="boolean" />
 
-        <!-- If provided and <code>true</code>, this searchable activity will be invoked for all
+        <!-- @hide If provided and <code>true</code>, this searchable activity will be invoked for all
              queries in a particular session. If set to <code>false</code> and the activity
              returned zero results for a query, it will not be invoked again in that session for
              supersets of that zero-results query. For example, if the activity returned zero
@@ -2883,7 +2883,7 @@
              The default value is <code>false</code>. <i>Optional attribute.</i>. -->
         <attr name="queryAfterZeroResults" format="boolean" />
         
-        <!-- If provided, this string will be used to describe the searchable item in the
+        <!-- @hide If provided, this string will be used to describe the searchable item in the
              searchable items settings within system search settings. <i>Optional
              attribute.</i> -->
         <attr name="searchSettingsDescription" format="string" />
diff --git a/core/res/res/values/public.xml b/core/res/res/values/public.xml
index c92cf51..d722413 100644
--- a/core/res/res/values/public.xml
+++ b/core/res/res/values/public.xml
@@ -1094,7 +1094,9 @@
   <public type="attr" name="tension" id="0x0101026a" />
   <public type="attr" name="extraTension" id="0x0101026b" />
   <public type="attr" name="anyDensity" id="0x0101026c" />
+  <!-- {@hide} -->
   <public type="attr" name="searchSuggestThreshold" id="0x0101026d" />
+  <!-- {@hide} -->
   <public type="attr" name="includeInGlobalSearch" id="0x0101026e" />
   <public type="attr" name="onClick" id="0x0101026f" />
   <public type="attr" name="targetSdkVersion" id="0x01010270" />
@@ -1115,6 +1117,7 @@
   <public type="attr" name="backupAgent" id="0x0101027f" />
   <public type="attr" name="allowBackup" id="0x01010280" />
   <public type="attr" name="glEsVersion" id="0x01010281" />
+  <!-- {@hide} -->
   <public type="attr" name="queryAfterZeroResults" id="0x01010282" />
   <public type="attr" name="dropDownHeight" id="0x01010283" />
   <public type="attr" name="smallScreens" id="0x01010284" />
@@ -1123,6 +1126,7 @@
   <public type="attr" name="progressBarStyleInverse" id="0x01010287" />
   <public type="attr" name="progressBarStyleSmallInverse" id="0x01010288" />
   <public type="attr" name="progressBarStyleLargeInverse" id="0x01010289" />
+  <!-- {@hide} -->
   <public type="attr" name="searchSettingsDescription" id="0x0101028a" />
   <public type="attr" name="textColorPrimaryInverseDisableOnly" id="0x0101028b" />
   <public type="attr" name="autoUrlDetect" id="0x0101028c" />
diff --git a/docs/html/guide/guide_toc.cs b/docs/html/guide/guide_toc.cs
index 11f8c7b..0b33739 100644
--- a/docs/html/guide/guide_toc.cs
+++ b/docs/html/guide/guide_toc.cs
@@ -139,6 +139,7 @@
           <li><a href="<?cs var:toroot ?>guide/topics/manifest/intent-filter-element.html">&lt;intent-filter&gt;</a></li>
           <li><a href="<?cs var:toroot ?>guide/topics/manifest/manifest-element.html">&lt;manifest&gt;</a></li>
           <li><a href="<?cs var:toroot ?>guide/topics/manifest/meta-data-element.html">&lt;meta-data&gt;</a></li>
+          <li><a href="<?cs var:toroot ?>guide/topics/manifest/path-permission-element.html">&lt;path-permission&gt;</a></li>
           <li><a href="<?cs var:toroot ?>guide/topics/manifest/permission-element.html">&lt;permission&gt;</a></li>
           <li><a href="<?cs var:toroot ?>guide/topics/manifest/permission-group-element.html">&lt;permission-group&gt;</a></li>
           <li><a href="<?cs var:toroot ?>guide/topics/manifest/permission-tree-element.html">&lt;permission-tree&gt;</a></li>
diff --git a/docs/html/guide/topics/manifest/manifest-intro.jd b/docs/html/guide/topics/manifest/manifest-intro.jd
index 9e1b18d..89171c1 100644
--- a/docs/html/guide/topics/manifest/manifest-intro.jd
+++ b/docs/html/guide/topics/manifest/manifest-intro.jd
@@ -112,6 +112,7 @@
 
         <a href="{@docRoot}guide/topics/manifest/provider-element.html">&lt;provider&gt;</a>
             <a href="{@docRoot}guide/topics/manifest/grant-uri-permission-element.html">&lt;grant-uri-permission /&gt;</a>
+            <a href="{@docRoot}guide/topics/manifest/path-permission-element.html">&lt;path-permission /&gt;</a>
             <a href="{@docRoot}guide/topics/manifest/meta-data-element.html">&lt;meta-data /&gt;</a>
         <a href="{@docRoot}guide/topics/manifest/provider-element.html">&lt;/provider&gt;</a>
 
@@ -140,6 +141,7 @@
 <br/><code><a href="{@docRoot}guide/topics/manifest/intent-filter-element.html">&lt;intent-filter&gt;</a></code>
 <br/><code><a href="{@docRoot}guide/topics/manifest/manifest-element.html">&lt;manifest&gt;</a></code>
 <br/><code><a href="{@docRoot}guide/topics/manifest/meta-data-element.html">&lt;meta-data&gt;</a></code>
+<br/><code><a href="{@docRoot}guide/topics/manifest/path-permission-element.html">&lt;path-permission /&gt;</a></code>
 <br/><code><a href="{@docRoot}guide/topics/manifest/permission-element.html">&lt;permission&gt;</a></code>
 <br/><code><a href="{@docRoot}guide/topics/manifest/permission-group-element.html">&lt;permission-group&gt;</a></code>
 <br/><code><a href="{@docRoot}guide/topics/manifest/permission-tree-element.html">&lt;permission-tree&gt;</a></code>
diff --git a/docs/html/guide/topics/manifest/path-permission-element.jd b/docs/html/guide/topics/manifest/path-permission-element.jd
new file mode 100644
index 0000000..5c271a7
--- /dev/null
+++ b/docs/html/guide/topics/manifest/path-permission-element.jd
@@ -0,0 +1,104 @@
+page.title=&lt;path-permission&gt;
+@jd:body
+
+<dl class="xml">
+<dt>syntax:</dt>
+<dd><pre class="stx">
+&lt;path-permission android:<a href="#path">path</a>="<i>string</i>"
+                 android:<a href="#pathPrefix">pathPrefix</a>="<i>string</i>"
+                 android:<a href="#pathPattern">pathPattern</a>="<i>string</i>"
+                 android:<a href="#permission">permission</a>="<i>string</i>"
+                 android:<a href="#readPermission">readPermission</a>="<i>string</i>"
+                 android:<a href="#writePermission">writePermission</a>="<i>string</i>" /&gt;
+</pre></dd>
+
+<dt>contained in:</dt>
+<dd><code><a href="{@docRoot}guide/topics/manifest/provider-element.html">&lt;provider&gt;</a></code></dd>
+
+<!--
+<dt>can contain:</dt>
+</dd>
+-->
+
+<dt>description:</dt>
+<dd>Defines the path and required permissions for a specific subset of data
+within a content provider. This element can be
+specified multiple times to supply multiple paths.
+
+</dd>
+
+<dt>attributes:</dt>
+
+<dd><dl class="attr">
+<dt><a name="path"></a>{@code android:path}</dt>
+<dd>A complete URI path for a subset of content provider data. 
+Permission can be granted only to the particular data identified by this path. 
+When used to provide search suggestion content, it must be appended 
+with "/search_suggest_query".
+</dd>
+
+<dt><a name="pathPrefix"></a>{@code android:pathPrefix}</dt>
+<dd>The initial part of a URI path for a subset of content provider data.
+Permission can be granted to all data subsets with paths that share this initial part.
+</dd>
+
+<dt><a name="pathPattern"></a>{@code android:pathPattern}</dt>
+<dd>A complete URI path for a subset of content provider data,
+but one that can use the following wildcards:
+ 
+<ul> 
+<li>An asterisk ('<code class="Code prettyprint">*</code>'). This matches a sequence of 0 to many occurrences of
+the immediately preceding character.</li> 
+ 
+<li>A period followed by an asterisk ("<code class="Code prettyprint">.*</code>"). This matches any sequence of 
+0 or more characters.</li> 
+</ul> 
+ 
+<p> 
+Because '<code class="Code prettyprint">\</code>' is used as an escape character when the string is read 
+from XML (before it is parsed as a pattern), you will need to double-escape.
+For example, a literal '<code class="Code prettyprint">*</code>' would be written as "<code class="Code prettyprint">\\*</code>" and a 
+literal '<code class="Code prettyprint">\</code>' would be written as "<code class="Code prettyprint">\\</code>".  This is basically 
+the same as what you would need to write if constructing the string in Java code.
+</p> 
+<p> 
+For more information on these types of patterns, see the descriptions of 
+<a href="/reference/android/os/PatternMatcher.html#PATTERN_LITERAL">PATTERN_LITERAL</a>,
+<a href="/reference/android/os/PatternMatcher.html#PATTERN_PREFIX">PATTERN_PREFIX</a>, and
+<a href="/reference/android/os/PatternMatcher.html#PATTERN_SIMPLE_GLOB">PATTERN_SIMPLE_GLOB</a> in the
+<a href="/reference/android/os/PatternMatcher.html">PatternMatcher</a> class.
+</p>
+</dd>
+
+<dt><a name="permission"></a>{@code android:permission}</dt>
+<dd>The name of a permission that clients must have in order to read or write the
+content provider's data.  This attribute is a convenient way of setting a 
+single permission for both reading and writing.  However, the 
+<code>readPermission</code> and 
+<code>writePermission</code> attributes take precedence
+over this one.
+</dd> 
+
+<dt><a name="readPermission"></a>{@code android:readPermission}</dt>
+<dd>A permission that clients must have in order to query the content provider.
+</dd> 
+
+<dt><a name="writePermission"></a>{@code android:writePermission}</dt>
+<dd>A permission that clients must have in order to make changes to the data controlled by the content provider.
+</dd> 
+
+
+
+</dl></dd>
+
+<!-- ##api level indication## -->
+<dt>introduced in:</dt>
+<dd>API Level 4</dd>
+
+<dt>see also:</dt>
+<dd>{@link android.app.SearchManager}</dd>
+<dd>{@link android.Manifest.permission}</dd>
+<dd><a href="/guide/topics/security/security.html">Security and
+Permissions</a></dd>
+
+</dl>
diff --git a/docs/html/guide/topics/manifest/provider-element.jd b/docs/html/guide/topics/manifest/provider-element.jd
index 2bb4ff4..3942f95 100644
--- a/docs/html/guide/topics/manifest/provider-element.jd
+++ b/docs/html/guide/topics/manifest/provider-element.jd
@@ -25,7 +25,9 @@
 
 <dt>can contain:</dt>
 <dd><code><a href="{@docRoot}guide/topics/manifest/meta-data-element.html">&lt;meta-data&gt;</a></code>
-<br/><code><a href="{@docRoot}guide/topics/manifest/grant-uri-permission-element.html">&lt;grant-uri-permission&gt;</a></code></dd>
+<br/><code><a href="{@docRoot}guide/topics/manifest/grant-uri-permission-element.html">&lt;grant-uri-permission&gt;</a></code>
+<br/><code><a href="{@docRoot}guide/topics/manifest/path-permission-element.html">&lt;path-permission /&gt;</a></code>
+</dd>
 
 <dt>description:</dt>
 <dd>Declares a content provider &mdash; a subclass of