Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit b90525b1 authored by The Android Automerger's avatar The Android Automerger
Browse files

Merge branch 'gingerbread' into gingerbread-release

parents 51f30b1c f6936a3a
Loading
Loading
Loading
Loading
+4 −4
Original line number Original line Diff line number Diff line
@@ -429,10 +429,10 @@ framework_docs_SDK_CURRENT_DIR:=$(framework_docs_SDK_VERSION)_r$(framework_docs_
framework_docs_SDK_PREVIEW:=0
framework_docs_SDK_PREVIEW:=0


## Latest ADT version identifiers, for reference from published docs
## Latest ADT version identifiers, for reference from published docs
framework_docs_ADT_VERSION:=0.9.7
framework_docs_ADT_VERSION:=0.9.8
framework_docs_ADT_DOWNLOAD:=ADT-0.9.7.zip
framework_docs_ADT_DOWNLOAD:=ADT-0.9.8.zip
framework_docs_ADT_BYTES:=8033750
framework_docs_ADT_BYTES:=8703591
framework_docs_ADT_CHECKSUM:=de2431c8d4786d127ae5bfc95b4605df
framework_docs_ADT_CHECKSUM:=22070f8e52924605a3b3abf87c1ba39f


framework_docs_LOCAL_DROIDDOC_OPTIONS += \
framework_docs_LOCAL_DROIDDOC_OPTIONS += \
		-hdf sdk.version $(framework_docs_SDK_VERSION) \
		-hdf sdk.version $(framework_docs_SDK_VERSION) \
+11 −0
Original line number Original line Diff line number Diff line
@@ -140773,6 +140773,17 @@
 visibility="public"
 visibility="public"
>
>
</field>
</field>
<field name="INTENT_ACTION_MEDIA_PLAY_FROM_SEARCH"
 type="java.lang.String"
 transient="false"
 volatile="false"
 value="&quot;android.media.action.MEDIA_PLAY_FROM_SEARCH&quot;"
 static="true"
 final="true"
 deprecated="not deprecated"
 visibility="public"
>
</field>
<field name="INTENT_ACTION_MEDIA_SEARCH"
<field name="INTENT_ACTION_MEDIA_SEARCH"
 type="java.lang.String"
 type="java.lang.String"
 transient="false"
 transient="false"
+16 −0
Original line number Original line Diff line number Diff line
@@ -74,6 +74,22 @@ public final class MediaStore {
    @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION)
    @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION)
    public static final String INTENT_ACTION_MEDIA_SEARCH = "android.intent.action.MEDIA_SEARCH";
    public static final String INTENT_ACTION_MEDIA_SEARCH = "android.intent.action.MEDIA_SEARCH";


    /**
     * An intent to perform a search for music media and automatically play content from the
     * result when possible. This can be fired, for example, by the result of a voice recognition
     * command to listen to music.
     * <p>
     * Contains the {@link android.app.SearchManager#QUERY} extra, which is a string
     * that can contain any type of unstructured music search, like the name of an artist,
     * an album, a song, a genre, or any combination of these.
     * <p>
     * Because this intent includes an open-ended unstructured search string, it makes the most
     * sense for apps that can support large-scale search of music, such as services connected
     * to an online database of music which can be streamed and played on the device.
     */
    public static final String INTENT_ACTION_MEDIA_PLAY_FROM_SEARCH =
            "android.media.action.MEDIA_PLAY_FROM_SEARCH";
    
    /**
    /**
     * The name of the Intent-extra used to define the artist
     * The name of the Intent-extra used to define the artist
     */
     */
+70 −12
Original line number Original line Diff line number Diff line
@@ -21,6 +21,7 @@ page.title=Developing In Eclipse, with ADT
        <li><a href="#librarySetup">Setting up a library project</a></li>
        <li><a href="#librarySetup">Setting up a library project</a></li>
        <li><a href="#libraryReference">Referencing a library project</a></li>
        <li><a href="#libraryReference">Referencing a library project</a></li>
        <li><a href="#considerations">Development considerations</a></li>
        <li><a href="#considerations">Development considerations</a></li>
        <li><a href="#libraryMigrating">Migrating library projects to ADT 0.9.8</a></li>
      </ol>
      </ol>
    </li>
    </li>
    <li><a href="#Tips">Eclipse Tips</a></li>
    <li><a href="#Tips">Eclipse Tips</a></li>
@@ -644,10 +645,6 @@ across all projects). </p>
is because the library project is compiled by the main project to use the
is because the library project is compiled by the main project to use the
correct resource IDs.</p>
correct resource IDs.</p>


<p><strong>One library project cannot reference another</strong></p>

<p>A library cannot depend on another library.</p>

<p><strong>A library project can include a JAR library</strong></p>
<p><strong>A library project can include a JAR library</strong></p>


<p>You can develop a library project that itself includes a JAR library, however
<p>You can develop a library project that itself includes a JAR library, however
@@ -664,13 +661,6 @@ application must declare the external library their manifest files, in a <a
href="{@docRoot}guide/topics/manifest/uses-library-element.html"><code>&lt;uses-library&gt;</code></a>
href="{@docRoot}guide/topics/manifest/uses-library-element.html"><code>&lt;uses-library&gt;</code></a>
element. </p>
element. </p>


<p><strong>Library project can not include AIDL files</strong></p>

<p>The tools do not support the use of <a
href="{@docRoot}guide/developing/tools/aidl.html">AIDL</a> files in a library project.
Any AIDL files used by an application must be stored in the application project
itself.</p>

<p><strong>Library project can not include raw assets</strong></p>
<p><strong>Library project can not include raw assets</strong></p>


<p>The tools do not support the use of raw asset files in a library project.
<p>The tools do not support the use of raw asset files in a library project.
@@ -730,6 +720,74 @@ project can reference the library project by a relative link. You can place the
library project What is important is that the main project can reference the
library project What is important is that the main project can reference the
library project through a relative link.</p>
library project through a relative link.</p>


<h3 id="libraryMigrating">Migrating library projects to ADT 0.9.8</h3>

<p>This section provides information about how to migrate a library project
created with ADT 0.9.7 to ADT 0.9.8 (or higher). The migration is needed only if
you are developing in Eclipse with ADT and assumes that you have also upgraded
to SDK Tools r7 (or higher). </p>

<p>The way that ADT handles library projects has changed between
ADT 0.9.7 and ADT 0.9.8. Specifically, in ADT 0.9.7, the <code>src/</code>
source folder of the library was linked into the dependent application project
as a folder that had the same name as the library project. This worked because
of two restrictions on the library projects:</p>

<ul>
<li>The library was only able to contain a single source folder (excluding the
special <code>gen/</code> source folder), and</li>
<li>The source folder was required to have the name <code>src/</code> and be
stored at the root of the project.</li>
</ul>

<p>In ADT 0.9.8, both of those restrictions were removed. A library project can
have as many source folders as needed and each can have any name. Additionally,
a library project can store source folders in any location of the project. For
example, you could store sources in a <code>src/java/</code> directory. In order
to support this, the name of the linked source folders in the main project are
now called &lt;<em>library-name</em>&gt;_&lt;<em>folder-name</em>&gt; For
example: <code>MyLibrary_src/</code> or <code>MyLibrary_src_java/</code>.</p>

<p>Additionally, the linking process now flags those folders in order for ADT to
recognize that it created them. This will allow ADT to automatically migrate the
project to new versions of ADT, should they contain changes to the handling of
library projects. ADT 0.9.7 did not flag the linked source folders, so ADT 0.9.8
cannot be sure whether the old linked folders can be removed safely. After
upgrading ADT to 0.9.8, you will need to remove the old linked folders manually
in a simple two-step process, as described below.</p>

<p>Before you begin, make sure to create a backup copy of your application or
save the latest version to your code version control system. This ensures that
you will be able to easily revert the migration changes in case there is a
problem in your environment.</p>

<p>When you first upgrade to ADT 0.9.8, your main project will look as shown
below, with two linked folders (in this example, <code>MyLibrary</code> and
<code>MyLibrary_src</code> &mdash; both of which link to
<code>MyLibrary/src</code>. Eclipse shows an error on one of them because they
are duplicate links to a single class.</p>

<img src="{@docRoot}images/developing/lib-migration-0.png" alt="">

<p>To fix the error, remove the linked folder that <em>does not</em> contain the
<code>_src</code> suffix. </p>

<ol>
<li>Right click the folder that you want to remove (in this case, the
<code>MyLibrary</code> folder) and choose <strong>Build Path</strong> &gt;
<strong>Remove from Build Path</strong>, as shown below.</li>

<img src="{@docRoot}images/developing/lib-migration-1.png" style="height:600px"
alt="">

<li>Next, When asked about unlinking the folder from the project, select
<strong>Yes</strong>, as shown below.</li>

<img src="{@docRoot}images/developing/lib-migration-2.png" alt="">
</ol>

<p>This should resolve the error and migrate your library project to the new
ADT environment. </p>


<h2 id="Tips">Eclipse Tips</h2>
<h2 id="Tips">Eclipse Tips</h2>


+0 −11
Original line number Original line Diff line number Diff line
@@ -838,10 +838,6 @@ across all projects). </p>
is because the library project is compiled by the main project to use the
is because the library project is compiled by the main project to use the
correct resource IDs.</p>
correct resource IDs.</p>


<p><strong>One library project cannot reference another</strong></p>

<p>A library cannot depend on another library.</p>

<p><strong>A library project can include a JAR library</strong></p>
<p><strong>A library project can include a JAR library</strong></p>


<p>You can develop a library project that itself includes a JAR library. When
<p>You can develop a library project that itself includes a JAR library. When
@@ -858,13 +854,6 @@ application must declare the external library their manifest files, in a <a
href="{@docRoot}guide/topics/manifest/uses-library-element.html"><code>&lt;uses-library&gt;</code></a>
href="{@docRoot}guide/topics/manifest/uses-library-element.html"><code>&lt;uses-library&gt;</code></a>
element. </p>
element. </p>


<p><strong>Library project cannot include AIDL files</strong></p>

<p>The tools do not support the use of <a
href="{@docRoot}guide/developing/tools/aidl.html">AIDL</a> files in a library project.
Any AIDL files used by an application must be stored in the application project
itself.</p>

<p><strong>Library project cannot include raw assets</strong></p>
<p><strong>Library project cannot include raw assets</strong></p>


<p>The tools do not support the use of raw asset files in a library project.
<p>The tools do not support the use of raw asset files in a library project.
Loading