diff options
Diffstat (limited to 'docs')
42 files changed, 1093 insertions, 258 deletions
diff --git a/docs/html/about/about_toc.cs b/docs/html/about/about_toc.cs index 45e8eb3..a4bc4a5 100644 --- a/docs/html/about/about_toc.cs +++ b/docs/html/about/about_toc.cs @@ -10,7 +10,6 @@ es-lang="Lollipop"> <span class="en">Lollipop</span></a></div> <ul> - <li><a href="<?cs var:toroot ?>about/versions/android-5.1.html">Android 5.1 APIs</a></li> <li><a href="<?cs var:toroot ?>about/versions/android-5.0.html" zh-tw-lang="Android 5.0 API" zh-cn-lang="Android 5.0 API" diff --git a/docs/html/about/versions/android-1.6.jd b/docs/html/about/versions/android-1.6.jd index 313b77a..8e97ff6 100644 --- a/docs/html/about/versions/android-1.6.jd +++ b/docs/html/about/versions/android-1.6.jd @@ -375,11 +375,11 @@ determining the density of the current device screen.</li> <li>{@link android.Manifest.permission#INSTALL_LOCATION_PROVIDER INSTALL_LOCATION_PROVIDER}: Allows an application to install a location provider into the Location Manager. </li> - <li>{@link android.Manifest.permission#READ_HISTORY_BOOKMARKS READ_HISTORY_BOOKMARKS}: - Allows an application to read (but not write) the user's browsing history + <li>READ_HISTORY_BOOKMARKS: + Allows an application to read (but not write) the user's browsing history and bookmarks. </li> - <li>{@link android.Manifest.permission#WRITE_HISTORY_BOOKMARKS WRITE_HISTORY_BOOKMARKS}: + <li>WRITE_HISTORY_BOOKMARKS: Allows an application to write (but not read) the user's browsing history and bookmarks. </li> diff --git a/docs/html/about/versions/android-4.0.3.jd b/docs/html/about/versions/android-4.0.3.jd index 5fa8547..4c2ccb9 100644 --- a/docs/html/about/versions/android-4.0.3.jd +++ b/docs/html/about/versions/android-4.0.3.jd @@ -78,19 +78,19 @@ can now sync that data with each of the user’s contacts, providing items in a stream along with photos for each.</p> <p>The database table that contains an individual contact’s social stream is -defined by {@link android.provider.ContactsContract.StreamItems}, the Uri for +defined by android.provider.ContactsContract.StreamItems, the Uri for which is nested within the {@link android.provider.ContactsContract.RawContacts} directory to which the stream items belong. Each social stream table includes several columns for metadata about each stream item, such as an icon representing the source (an avatar), a label for the item, the primary text content, comments about the item (such as responses from other people), and more. Photos associated with a stream are stored in another table, defined by -{@link android.provider.ContactsContract.StreamItemPhotos}, which is available -as a sub-directory of the {@link android.provider.ContactsContract.StreamItems} +android.provider.ContactsContract.StreamItemPhotos, which is available +as a sub-directory of the android.provider.ContactsContract.StreamItems Uri.</p> -<p>See {@link android.provider.ContactsContract.StreamItems} and -{@link android.provider.ContactsContract.StreamItemPhotos} for more information.</p> +<p>See android.provider.ContactsContract.StreamItems and +android.provider.ContactsContract.StreamItemPhotos for more information.</p> <p>To read or write social stream items for a contact, an application must request permission from the user by declaring <code><uses-permission @@ -272,8 +272,8 @@ let you check and manage video stabilization for a {@link android.hardware.Camer <p>The following are new permissions:</p> <ul> -<li>{@link android.Manifest.permission#READ_SOCIAL_STREAM} and -{@link android.Manifest.permission#WRITE_SOCIAL_STREAM}: Allow a sync +<li>android.Manifest.permission#READ_SOCIAL_STREAM and +android.Manifest.permission#WRITE_SOCIAL_STREAM: Allow a sync adapter to read and write social stream data to a contact in the shared Contacts Provider.</li> </ul> diff --git a/docs/html/about/versions/android-4.0.jd b/docs/html/about/versions/android-4.0.jd index 6c4ccb4..cc1d1c7 100644 --- a/docs/html/about/versions/android-4.0.jd +++ b/docs/html/about/versions/android-4.0.jd @@ -108,9 +108,9 @@ android.provider.ContactsContract.RawContacts} Uri; instead, you must add a prof the table at {@link android.provider.ContactsContract.Profile#CONTENT_RAW_CONTACTS_URI}. Raw contacts in this table are then aggregated into the single user-visible profile labeled "Me".</p> -<p>Adding a new raw contact for the profile requires the {@link -android.Manifest.permission#WRITE_PROFILE} permission. Likewise, in order to read from the profile -table, you must request the {@link android.Manifest.permission#READ_PROFILE} permission. However, +<p>Adding a new raw contact for the profile requires the +android.Manifest.permission#WRITE_PROFILE permission. Likewise, in order to read from the profile +table, you must request the android.Manifest.permission#READ_PROFILE permission. However, most apps should not need to read the user profile, even when contributing data to the profile. Reading the user profile is a sensitive permission and you should expect users to be skeptical of apps that request it.</p> @@ -1638,9 +1638,9 @@ messages to the device.</li> android.service.textservice.SpellCheckerService} must require this permission for itself.</li> <li>{@link android.Manifest.permission#BIND_VPN_SERVICE}: A service that implements {@link android.net.VpnService} must require this permission for itself.</li> -<li>{@link android.Manifest.permission#READ_PROFILE}: Provides read access to the {@link +<li>android.Manifest.permission#READ_PROFILE: Provides read access to the {@link android.provider.ContactsContract.Profile} provider.</li> -<li>{@link android.Manifest.permission#WRITE_PROFILE}: Provides write access to the {@link +<li>android.Manifest.permission#WRITE_PROFILE: Provides write access to the {@link android.provider.ContactsContract.Profile} provider.</li> </ul> diff --git a/docs/html/about/versions/android-4.1.jd b/docs/html/about/versions/android-4.1.jd index 76b90ac..f8770fa 100644 --- a/docs/html/about/versions/android-4.1.jd +++ b/docs/html/about/versions/android-4.1.jd @@ -871,7 +871,7 @@ read access using this permission. If your application already requests write a automatically get read access as well. There is a new developer option to turn on read access restriction, for developers to test their applications against how Android will behave in the future.</dd> - <dt>{@link android.Manifest.permission#READ_USER_DICTIONARY}</dt> + <dt>android.Manifest.permission.READ_USER_DICTIONARY</dt> <dd>Allows an application to read the user dictionary. This should only be required by an IME, or a dictionary editor like the Settings app.</dd> <dt>{@link android.Manifest.permission#READ_CALL_LOG}</dt> @@ -879,7 +879,7 @@ IME, or a dictionary editor like the Settings app.</dd> incoming and outgoing calls.</dd> <dt>{@link android.Manifest.permission#WRITE_CALL_LOG}</dt> <dd>Allows an application to modify the system's call log stored on your phone</dd> - <dt>{@link android.Manifest.permission#WRITE_USER_DICTIONARY}</dt> + <dt>android.Manifest.permission.WRITE_USER_DICTIONARY</dt> <dd>Allows an application to write to the user's word dictionary.</dd> </dl> diff --git a/docs/html/about/versions/android-5.1.jd b/docs/html/about/versions/android-5.1.jd deleted file mode 100644 index 1238680..0000000 --- a/docs/html/about/versions/android-5.1.jd +++ /dev/null @@ -1,124 +0,0 @@ -page.title=Android 5.1 APIs -excludeFromSuggestions=true -sdk.platform.version=5.1 -sdk.platform.apiLevel=22 -@jd:body - - -<div id="qv-wrapper"> -<div id="qv"> - -<h2>In this document - <a href="#" onclick="hideNestedItems('#toc44',this);return false;" class="header-toggle"> - <span class="more">show more</span> - <span class="less" style="display:none">show less</span></a></h2> - -<ol id="toc44" class="hide-nested"> - <li><a href="#ApiLevel">Update your target API level</a></li> - - <li><a href="#multisim">Multiple SIM Card Support</a></li> - <li><a href="#http">Deprecated HTTP Classes</a></li> - <li><a href="#carrier">Carrier Services</a></li> -</ol> - -<h2>API Differences</h2> -<ol> -<li><a href="{@docRoot}sdk/api_diff/22/changes.html">API level 21 to 22 »</a> </li> -</ol> - -<h2>See Also</h2> -<ol> -<li><a href="{@docRoot}about/versions/lollipop.html">Android Lollipop Highlights</a> </li> -</ol> - - -</div> -</div> - -<p>API Level: {@sdkPlatformApiLevel}</p> - -<p> - Android 5.1 - (<a href="{@docRoot}reference/android/os/Build.VERSION_CODES.html#LOLLIPOP_MR1">LOLLIPOP_MR1</a>) - is an update to the Lollipop release that offers new features for users and app developers. - This document provides an introduction to the most notable new APIs. -</p> - -<p> - For a high-level look at the new platform features, see the <a href= - "{@docRoot}about/versions/lollipop.html">Android Lollipop highlights</a>. -</p> - - -<h3 id="ApiLevel">Update your target API level</h3> - -<p> - To start building apps for Android 5.1, use the - <a href="{@docRoot}tools/help/sdk-manager.html">SDK Manager</a> to download the Android 5.1 SDK - Platform and System Images. Then set your app development project to use a - <a href="{@docRoot}guide/topics/manifest/uses-sdk-element.html#target">{@code targetSdkVersion}</a> - of <code>"{@sdkPlatformApiLevel}"</code>. Install your app on an Android {@sdkPlatformVersion} - system image, test it, then publish the updated app with this change. -</p> - -<p> - You can use Android {@sdkPlatformVersion} APIs while also supporting older versions by adding - conditions to your code that check for the system API level before executing APIs not supported - by your <a href="{@docRoot}guide/topics/manifest/uses-sdk-element.html#min">{@code - minSdkVersion}</a>. To learn more about maintaining backward compatibility, read <a href= - "{@docRoot}training/basics/supporting-devices/platforms.html">Supporting Different Platform - Versions</a>. -</p> - -<p> - For more information about how API levels work, read <a href= - "{@docRoot}guide/topics/manifest/uses-sdk-element.html#ApiLevels">What is API Level?</a> -</p> - -<h2 id="multisim">Multiple SIM Card Support</h2> - -<p> - Android 5.1 adds support for using more than one cellular carrier SIM card at a time. This - feature lets users activate and use additional SIMs on devices that have two or more SIM card - slots. -</p> - -<p> - You can access information about the currently active SIM through the {@link - android.telephony.SubscriptionManager} class, including whether or not the device is considered - to be roaming on the current network. This information is useful for developers who want to - throttle their apps' data access down or off for device users who are sensitive to data access - charges. Your app can be alerted to changes in a device's current network connection by - requesting the {@link android.Manifest.permission#READ_PHONE_STATE} permission and setting {@link - android.telephony.SubscriptionManager.OnSubscriptionsChangedListener} on the {@link - android.telephony.SubscriptionManager} object. -</p> - - -<h2 id="http">Deprecated HTTP Classes</h2> - -<p> - The {@code org.apache.http} classes and the {@link android.net.http.AndroidHttpClient} class - have been deprecated in Android 5.1. These classes are no longer being maintained and you should - migrate any app code using these APIs to the {@link java.net.URLConnection} classes as soon as - possible. -</p> - - -<h2 id="carrier">Carrier Services</h2> - -<p> - Android 5.1 provides support for telecommunication service providers to create apps that can - perform carrier provisioning tasks on an Android device. These APIs provide a secure and flexible - way for carrier-developed apps to perform these tasks and be distributed through Google Play. Apps - that use these functions must be signed by a certificate that matches the certificate in the - device's Universal Integrated Circuit Card (UICC). -</p> - -<p> - The carrier service APIs have been added to the {@link android.telephony.TelephonyManager} class, - the {@link android.telephony.SmsManager} class, and the new {@link - android.service.carrier.CarrierMessagingService} class. Apps can check for access to these APIs - by calling the {@link android.telephony.TelephonyManager#hasCarrierPrivileges} method. Apps that - call these APIs without access receive a {@link java.lang.SecurityException}. -</p> diff --git a/docs/html/guide/components/intents-common.jd b/docs/html/guide/components/intents-common.jd index dbc14fa..8aa5fa9 100644 --- a/docs/html/guide/components/intents-common.jd +++ b/docs/html/guide/components/intents-common.jd @@ -1018,7 +1018,7 @@ and include email details such as the recipient and subject using the extra keys <dt><b>MIME Type</b></dt> <dd> <dl> - <dt>{@link org.apache.http.protocol.HTTP#PLAIN_TEXT_TYPE} ("text/plain") + <dt><code>"text/plain"</code> <dt><code>"*/*"</code> </dl> </dd> @@ -2053,7 +2053,7 @@ details such as the phone number, subject, and message body using the extra keys <dt><b>MIME Type</b></dt> <dd> <dl> - <dt>{@link org.apache.http.protocol.HTTP#PLAIN_TEXT_TYPE} (<code>"text/plain"</code>) + <dt><code>"text/plain"</code> <dt><code>"image/*"</code> <dt><code>"video/*"</code> </dl> @@ -2164,7 +2164,7 @@ and specify the web URL in the intent data.</p> <dt><b>MIME Type</b></dt> <dd> <dl> - <dt>{@link org.apache.http.protocol.HTTP#PLAIN_TEXT_TYPE} (<code>"text/plain"</code>) + <dt><code>"text/plain"</code> <dt><code>"text/html"</code> <dt><code>"application/xhtml+xml"</code> <dt><code>"application/vnd.wap.xhtml+xml"</code> diff --git a/docs/html/guide/components/intents-filters.jd b/docs/html/guide/components/intents-filters.jd index 3dec216..0759088 100644 --- a/docs/html/guide/components/intents-filters.jd +++ b/docs/html/guide/components/intents-filters.jd @@ -376,9 +376,7 @@ the intent.</p> Intent sendIntent = new Intent(); sendIntent.setAction(Intent.ACTION_SEND); sendIntent.putExtra(Intent.EXTRA_TEXT, textMessage); -sendIntent.setType({@link - org.apache.http.protocol.HTTP#PLAIN_TEXT_TYPE - HTTP.PLAIN_TEXT_TYPE}); // "text/plain" MIME type +sendIntent.setType("text/plain"); // Verify that the intent will resolve to an activity if (sendIntent.resolveActivity(getPackageManager()) != null) { diff --git a/docs/html/guide/topics/graphics/hardware-accel.jd b/docs/html/guide/topics/graphics/hardware-accel.jd index 3d1935a..e3f1d9e 100644 --- a/docs/html/guide/topics/graphics/hardware-accel.jd +++ b/docs/html/guide/topics/graphics/hardware-accel.jd @@ -284,7 +284,7 @@ changed.</li> </tr> <tr> <td class="label_neg">drawPicture()</td> - <td class="value_neg">✗</td> + <td class="value_neg">23</td> </tr> <tr> <td class="label_pos">drawPosText()</td> diff --git a/docs/html/guide/topics/manifest/application-element.jd b/docs/html/guide/topics/manifest/application-element.jd index b5af9c3..e63ba71 100644 --- a/docs/html/guide/topics/manifest/application-element.jd +++ b/docs/html/guide/topics/manifest/application-element.jd @@ -32,6 +32,7 @@ page.title=<application> android:<a href="#testOnly">testOnly</a>=["true" | "false"] android:<a href="#theme">theme</a>="<i>resource or theme</i>" android:<a href="#uioptions">uiOptions</a>=["none" | "splitActionBarWhenNarrow"] + android:<a href="#usesCleartextTraffic">usesCleartextTraffic</a>=["true" | "false"] android:<a href="#vmSafeMode">vmSafeMode</a>=["true" | "false"] > . . . </application></pre></dd> @@ -446,6 +447,33 @@ href="{@docRoot}guide/topics/ui/actionbar.html">Action Bar</a> developer guide.< <p>This attribute was added in API level 14.</p> </dd> +<dt><a name="usesCleartextTraffic"></a>{@code android:usesCleartextTraffic}</dt> +<dd>Indicates whether the app intends to use cleartext network traffic, such as cleartext HTTP. +The default value is {@code "true"}. + +<p>When the attribute is set to {@code "false"}, platform components (for example, HTTP and FTP +stacks, {@link android.app.DownloadManager}, {@link android.media.MediaPlayer}) will refuse the +app's requests to use cleartext traffic. Third-party libraries are strongly encouraged to honor this +setting as well. The key reason for avoiding cleartext traffic is the lack of confidentiality, +authenticity, and protections against tampering: a network attacker can eavesdrop on transmitted +data and also modify it without being detected. + +<p>This flag is honored on a best effort basis because it's impossible to prevent all cleartext +traffic from Android applications given the level of access provided to them. For example, there's +no expectation that the {@link java.net.Socket} API will honor this flag because it cannot +determine whether its traffic is in cleartext. However, most network traffic from applications is +handled by higher-level network stacks/components which can honor this flag by either reading it +from {@link android.content.pm.ApplicationInfo#flags ApplicationInfo.flags} or +{@link android.security.NetworkSecurityPolicy#isCleartextTrafficPermitted() NetworkSecurityPolicy.isCleartextTrafficPermitted()}. + +<p>NOTE: {@link android.webkit.WebView} does not honor this flag. + +<p>During app development, StrictMode can be used to identify any cleartext traffic from the app: see +{@link android.os.StrictMode.VmPolicy.Builder#detectCleartextNetwork() StrictMode.VmPolicy.Builder.detectCleartextNetwork()}. + +<p>This attribute was added in API level 23.</p> +</dd> + <dt><a name="vmSafeMode"></a>{@code android:vmSafeMode}</dt> <dd>Indicates whether the app would like the virtual machine (VM) to operate in safe mode. The default value is {@code "false"}. diff --git a/docs/html/guide/topics/providers/contacts-provider.jd b/docs/html/guide/topics/providers/contacts-provider.jd index e3b998a..2b14558 100644 --- a/docs/html/guide/topics/providers/contacts-provider.jd +++ b/docs/html/guide/topics/providers/contacts-provider.jd @@ -57,7 +57,7 @@ page.title=Contacts Provider <li>{@link android.provider.ContactsContract.Contacts}</li> <li>{@link android.provider.ContactsContract.RawContacts}</li> <li>{@link android.provider.ContactsContract.Data}</li> - <li>{@link android.provider.ContactsContract.StreamItems}</li> + <li>android.provider.ContactsContract.StreamItems</li> </ol> <h2>Related Samples</h2> <ol> @@ -606,13 +606,13 @@ page.title=Contacts Provider Access to the user profile requires special permissions. In addition to the {@link android.Manifest.permission#READ_CONTACTS} and {@link android.Manifest.permission#WRITE_CONTACTS} permissions needed to read and write, access - to the user profile requires the {@link android.Manifest.permission#READ_PROFILE} and - {@link android.Manifest.permission#WRITE_PROFILE} permissions for read and write access, + to the user profile requires the android.Manifest.permission#READ_PROFILE and + android.Manifest.permission#WRITE_PROFILE permissions for read and write access, respectively. </p> <p> Remember that you should consider a user's profile to be sensitive. The permission - {@link android.Manifest.permission#READ_PROFILE} allows you to access the device user's + android.Manifest.permission#READ_PROFILE allows you to access the device user's personally-identifying data. Make sure to tell the user why you need user profile access permissions in the description of your application. </p> @@ -1826,8 +1826,8 @@ child elements that provide specific data to the </dl> <h2 id="SocialStream">Social Stream Data</h2> <p> - The {@link android.provider.ContactsContract.StreamItems} and - {@link android.provider.ContactsContract.StreamItemPhotos} tables + The android.provider.ContactsContract.StreamItems and + android.provider.ContactsContract.StreamItemPhotos tables manage incoming data from social networks. You can write a sync adapter that adds stream data from your own network to these tables, or you can read stream data from these tables and display it in your own application, or both. With these features, your social networking @@ -1836,7 +1836,7 @@ child elements that provide specific data to the <h3 id="StreamText">Social stream text</h3> <p> Stream items are always associated with a raw contact. The - {@link android.provider.ContactsContract.StreamItemsColumns#RAW_CONTACT_ID} links to the + android.provider.ContactsContract.StreamItemsColumns#RAW_CONTACT_ID links to the <code>_ID</code> value for the raw contact. The account type and account name of the raw contact are also stored in the stream item row. </p> @@ -1845,14 +1845,14 @@ child elements that provide specific data to the </p> <dl> <dt> - {@link android.provider.ContactsContract.StreamItemsColumns#ACCOUNT_TYPE} + android.provider.ContactsContract.StreamItemsColumns#ACCOUNT_TYPE </dt> <dd> <strong>Required.</strong> The user's account type for the raw contact associated with this stream item. Remember to set this value when you insert a stream item. </dd> <dt> - {@link android.provider.ContactsContract.StreamItemsColumns#ACCOUNT_NAME} + android.provider.ContactsContract.StreamItemsColumns#ACCOUNT_NAME </dt> <dd> <strong>Required.</strong> The user's account name for the raw contact associated with this @@ -1866,30 +1866,30 @@ child elements that provide specific data to the insert a stream item: <ul> <li> - {@link android.provider.ContactsContract.StreamItemsColumns#CONTACT_ID}: The - {@link android.provider.BaseColumns#_ID} value of the contact that this stream + android.provider.ContactsContract.StreamItemsColumns#CONTACT_ID: The + android.provider.BaseColumns#_ID value of the contact that this stream item is associated with. </li> <li> - {@link android.provider.ContactsContract.StreamItemsColumns#CONTACT_LOOKUP_KEY}: The - {@link android.provider.ContactsContract.ContactsColumns#LOOKUP_KEY} value of the + android.provider.ContactsContract.StreamItemsColumns#CONTACT_LOOKUP_KEY: The + android.provider.ContactsContract.ContactsColumns#LOOKUP_KEY value of the contact this stream item is associated with. </li> <li> - {@link android.provider.ContactsContract.StreamItemsColumns#RAW_CONTACT_ID}: The - {@link android.provider.BaseColumns#_ID} value of the raw contact that this stream + android.provider.ContactsContract.StreamItemsColumns#RAW_CONTACT_ID: The + android.provider.BaseColumns#_ID value of the raw contact that this stream item is associated with. </li> </ul> </dd> <dt> - {@link android.provider.ContactsContract.StreamItemsColumns#COMMENTS} + android.provider.ContactsContract.StreamItemsColumns#COMMENTS </dt> <dd> Optional. Stores summary information that you can display at the beginning of a stream item. </dd> <dt> - {@link android.provider.ContactsContract.StreamItemsColumns#TEXT} + android.provider.ContactsContract.StreamItemsColumns#TEXT </dt> <dd> The text of the stream item, either the content that was posted by the source of the item, @@ -1899,7 +1899,7 @@ child elements that provide specific data to the ellipsize long content, but it will try to avoid breaking tags. </dd> <dt> - {@link android.provider.ContactsContract.StreamItemsColumns#TIMESTAMP} + android.provider.ContactsContract.StreamItemsColumns#TIMESTAMP </dt> <dd> A text string containing the time the stream item was inserted or updated, in the form @@ -1910,42 +1910,42 @@ child elements that provide specific data to the </dl> <p> To display identifying information for your stream items, use the - {@link android.provider.ContactsContract.StreamItemsColumns#RES_ICON}, - {@link android.provider.ContactsContract.StreamItemsColumns#RES_LABEL}, and - {@link android.provider.ContactsContract.StreamItemsColumns#RES_PACKAGE} to link to resources + android.provider.ContactsContract.StreamItemsColumns#RES_ICON, + android.provider.ContactsContract.StreamItemsColumns#RES_LABEL, and + android.provider.ContactsContract.StreamItemsColumns#RES_PACKAGE to link to resources in your application. </p> <p> - The {@link android.provider.ContactsContract.StreamItems} table also contains the columns - {@link android.provider.ContactsContract.StreamItemsColumns#SYNC1} through - {@link android.provider.ContactsContract.StreamItemsColumns#SYNC4} for the exclusive use of + The android.provider.ContactsContract.StreamItems table also contains the columns + android.provider.ContactsContract.StreamItemsColumns#SYNC1 through + android.provider.ContactsContract.StreamItemsColumns#SYNC4 for the exclusive use of sync adapters. </p> <h3 id="StreamPhotos">Social stream photos</h3> <p> - The {@link android.provider.ContactsContract.StreamItemPhotos} table stores photos associated + The android.provider.ContactsContract.StreamItemPhotos table stores photos associated with a stream item. The table's - {@link android.provider.ContactsContract.StreamItemPhotosColumns#STREAM_ITEM_ID} column + android.provider.ContactsContract.StreamItemPhotosColumns#STREAM_ITEM_ID column links to values in the {@link android.provider.BaseColumns#_ID} column of - {@link android.provider.ContactsContract.StreamItems} table. Photo references are stored in the + android.provider.ContactsContract.StreamItems table. Photo references are stored in the table in these columns: </p> <dl> <dt> - {@link android.provider.ContactsContract.StreamItemPhotos#PHOTO} column (a BLOB). + android.provider.ContactsContract.StreamItemPhotos#PHOTO column (a BLOB). </dt> <dd> A binary representation of the photo, resized by the provider for storage and display. This column is available for backwards compatibility with previous versions of the Contacts Provider that used it for storing photos. However, in the current version you should not use this column to store photos. Instead, use - either {@link android.provider.ContactsContract.StreamItemPhotosColumns#PHOTO_FILE_ID} or - {@link android.provider.ContactsContract.StreamItemPhotosColumns#PHOTO_URI} (both of + either android.provider.ContactsContract.StreamItemPhotosColumns#PHOTO_FILE_ID or + android.provider.ContactsContract.StreamItemPhotosColumns#PHOTO_URI (both of which are described in the following points) to store photos in a file. This column now contains a thumbnail of the photo, which is available for reading. </dd> <dt> - {@link android.provider.ContactsContract.StreamItemPhotosColumns#PHOTO_FILE_ID} + android.provider.ContactsContract.StreamItemPhotosColumns#PHOTO_FILE_ID </dt> <dd> A numeric identifier of a photo for a raw contact. Append this value to the constant @@ -1955,7 +1955,7 @@ child elements that provide specific data to the openAssetFileDescriptor()} to get a handle to the photo file. </dd> <dt> - {@link android.provider.ContactsContract.StreamItemPhotosColumns#PHOTO_URI} + android.provider.ContactsContract.StreamItemPhotosColumns#PHOTO_URI </dt> <dd> A content URI pointing directly to the photo file for the photo represented by this row. @@ -1970,27 +1970,27 @@ child elements that provide specific data to the <ul> <li> These tables require additional access permissions. To read from them, your application - must have the permission {@link android.Manifest.permission#READ_SOCIAL_STREAM}. To + must have the permission android.Manifest.permission#READ_SOCIAL_STREAM. To modify them, your application must have the permission - {@link android.Manifest.permission#WRITE_SOCIAL_STREAM}. + android.Manifest.permission#WRITE_SOCIAL_STREAM. </li> <li> - For the {@link android.provider.ContactsContract.StreamItems} table, the number of rows + For the android.provider.ContactsContract.StreamItems table, the number of rows stored for each raw contact is limited. Once this limit is reached, the Contacts Provider makes space for new stream item rows by automatically deleting the rows having the oldest - {@link android.provider.ContactsContract.StreamItemsColumns#TIMESTAMP}. To get the + android.provider.ContactsContract.StreamItemsColumns#TIMESTAMP. To get the limit, issue a query to the content URI - {@link android.provider.ContactsContract.StreamItems#CONTENT_LIMIT_URI}. You can leave + android.provider.ContactsContract.StreamItems#CONTENT_LIMIT_URI. You can leave all the arguments other than the content URI set to <code>null</code>. The query returns a Cursor containing a single row, with the single column - {@link android.provider.ContactsContract.StreamItems#MAX_ITEMS}. + android.provider.ContactsContract.StreamItems#MAX_ITEMS. </li> </ul> <p> - The class {@link android.provider.ContactsContract.StreamItems.StreamItemPhotos} defines a - sub-table of {@link android.provider.ContactsContract.StreamItemPhotos} containing the photo + The class android.provider.ContactsContract.StreamItems.StreamItemPhotos defines a + sub-table of android.provider.ContactsContract.StreamItemPhotos containing the photo rows for a single stream item. </p> <h3 id="SocialStreamInteraction">Social stream interactions</h3> @@ -2003,8 +2003,8 @@ child elements that provide specific data to the <li> By syncing your social networking service to the Contacts Provider with a sync adapter, you can retrieve recent activity for a user's contacts and store it in - the {@link android.provider.ContactsContract.StreamItems} and - {@link android.provider.ContactsContract.StreamItemPhotos} tables for later use. + the android.provider.ContactsContract.StreamItems and + android.provider.ContactsContract.StreamItemPhotos tables for later use. </li> <li> Besides regular synchronization, you can trigger your sync adapter to retrieve @@ -2356,6 +2356,6 @@ child elements that provide specific data to the </p> <p> Social stream data for a person may also include photos. These are stored in the - {@link android.provider.ContactsContract.StreamItemPhotos} table, which is described in more + android.provider.ContactsContract.StreamItemPhotos table, which is described in more detail in the section <a href="#StreamPhotos">Social stream photos</a>. </p> diff --git a/docs/html/guide/topics/resources/providing-resources.jd b/docs/html/guide/topics/resources/providing-resources.jd index b06da56..63eee96 100644 --- a/docs/html/guide/topics/resources/providing-resources.jd +++ b/docs/html/guide/topics/resources/providing-resources.jd @@ -549,6 +549,22 @@ is not related to the screen orientation.</p> which indicates whether the screen is long.</p> </td> </tr> + <tr id="ScreenRoundQualifier"> + <td>Round screen</td> + <td> + <code>round</code><br/> + <code>notround</code> + </td> + <td> + <ul class="nolist"> + <li>{@code round}: Round screens, such as a round wearable device</li> + <li>{@code notround}: Rectangular screens, such as phones or tablets</li> + </ul> + <p><em>Added in API level 23.</em></p> + <p>Also see the {@link android.content.res.Configuration#isScreenRound()} configuration +method, which indicates whether the screen is round.</p> + </td> + </tr> <tr id="OrientationQualifier"> <td>Screen orientation</td> <td> diff --git a/docs/html/images/camera2/metadata/android.tonemap.curveRed/gamma_tonemap.png b/docs/html/images/camera2/metadata/android.tonemap.curveRed/gamma_tonemap.png Binary files differindex ec89e37..a02fd89 100644 --- a/docs/html/images/camera2/metadata/android.tonemap.curveRed/gamma_tonemap.png +++ b/docs/html/images/camera2/metadata/android.tonemap.curveRed/gamma_tonemap.png diff --git a/docs/html/images/camera2/metadata/android.tonemap.curveRed/inverse_tonemap.png b/docs/html/images/camera2/metadata/android.tonemap.curveRed/inverse_tonemap.png Binary files differindex cf0c63d..c309ac5 100644 --- a/docs/html/images/camera2/metadata/android.tonemap.curveRed/inverse_tonemap.png +++ b/docs/html/images/camera2/metadata/android.tonemap.curveRed/inverse_tonemap.png diff --git a/docs/html/images/camera2/metadata/android.tonemap.curveRed/linear_tonemap.png b/docs/html/images/camera2/metadata/android.tonemap.curveRed/linear_tonemap.png Binary files differindex f226a54..414fad4 100644 --- a/docs/html/images/camera2/metadata/android.tonemap.curveRed/linear_tonemap.png +++ b/docs/html/images/camera2/metadata/android.tonemap.curveRed/linear_tonemap.png diff --git a/docs/html/images/camera2/metadata/android.tonemap.curveRed/rec709_tonemap.png b/docs/html/images/camera2/metadata/android.tonemap.curveRed/rec709_tonemap.png Binary files differnew file mode 100644 index 0000000..c147a87 --- /dev/null +++ b/docs/html/images/camera2/metadata/android.tonemap.curveRed/rec709_tonemap.png diff --git a/docs/html/images/camera2/metadata/android.tonemap.curveRed/srgb_tonemap.png b/docs/html/images/camera2/metadata/android.tonemap.curveRed/srgb_tonemap.png Binary files differindex ded0645..4ce2125 100644 --- a/docs/html/images/camera2/metadata/android.tonemap.curveRed/srgb_tonemap.png +++ b/docs/html/images/camera2/metadata/android.tonemap.curveRed/srgb_tonemap.png diff --git a/docs/html/images/media/mediacodec_async_states.png b/docs/html/images/media/mediacodec_async_states.png Binary files differnew file mode 100644 index 0000000..c21f5c0 --- /dev/null +++ b/docs/html/images/media/mediacodec_async_states.png diff --git a/docs/html/images/media/mediacodec_async_states.svg b/docs/html/images/media/mediacodec_async_states.svg new file mode 100644 index 0000000..7349511 --- /dev/null +++ b/docs/html/images/media/mediacodec_async_states.svg @@ -0,0 +1,151 @@ +<?xml version="1.0" encoding="utf-8" standalone="no"?> +<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"> +<svg xmlns="http://www.w3.org/2000/svg" xmlns:xl="http://www.w3.org/1999/xlink" version="1.1" viewBox="649 397 519 356" width="519pt" height="356pt" xmlns:dc="http://purl.org/dc/elements/1.1/"> + <defs> + <marker orient="auto" overflow="visible" markerUnits="strokeWidth" id="FilledArrow_Marker" viewBox="-1 -3 7 6" markerWidth="7" markerHeight="6" color="#ea8008"> + <g> + <path d="M 4.8 0 L 0 -1.8 L 0 1.8 Z" fill="currentColor" stroke="currentColor" stroke-width="1"/> + </g> + </marker> + <marker orient="auto" overflow="visible" markerUnits="strokeWidth" id="FilledArrow_Marker_2" viewBox="-1 -3 7 6" markerWidth="7" markerHeight="6" color="#274ecc"> + <g> + <path d="M 4.8 0 L 0 -1.8 L 0 1.8 Z" fill="currentColor" stroke="currentColor" stroke-width="1"/> + </g> + </marker> + <marker orient="auto" overflow="visible" markerUnits="strokeWidth" id="FilledArrow_Marker_3" viewBox="-1 -3 7 6" markerWidth="7" markerHeight="6" color="#d02e2a"> + <g> + <path d="M 4.8 0 L 0 -1.8 L 0 1.8 Z" fill="currentColor" stroke="currentColor" stroke-width="1"/> + </g> + </marker> + <marker orient="auto" overflow="visible" markerUnits="strokeWidth" id="FilledArrow_Marker_4" viewBox="-1 -3 7 6" markerWidth="7" markerHeight="6" color="#262626"> + <g> + <path d="M 4.8 0 L 0 -1.8 L 0 1.8 Z" fill="currentColor" stroke="currentColor" stroke-width="1"/> + </g> + </marker> + <font-face font-family="Roboto" font-size="20" panose-1="2 0 0 0 0 0 0 0 0 0" units-per-em="1000" underline-position="-73.242188" underline-thickness="48.828125" slope="0" x-height="538.08594" cap-height="720.70312" ascent="927.7344" descent="-244.14062" font-weight="500"> + <font-face-src> + <font-face-name name="Roboto-Regular"/> + </font-face-src> + </font-face> + <font-face font-family="Roboto Condensed" font-size="16" panose-1="0 0 4 6 0 0 0 0 0 0" units-per-em="1000" underline-position="-73.242188" underline-thickness="48.828125" slope="0" x-height="538.08594" cap-height="720.70312" ascent="927.7344" descent="-244.14062" font-weight="300" font-stretch="condensed"> + <font-face-src> + <font-face-name name="RobotoCondensed-Light"/> + </font-face-src> + </font-face> + <marker orient="auto" overflow="visible" markerUnits="strokeWidth" id="FilledArrow_Marker_5" viewBox="-1 -3 7 6" markerWidth="7" markerHeight="6" color="#126f33"> + <g> + <path d="M 4.8 0 L 0 -1.8 L 0 1.8 Z" fill="currentColor" stroke="currentColor" stroke-width="1"/> + </g> + </marker> + </defs> + <g stroke="none" stroke-opacity="1" stroke-dasharray="none" fill="none" fill-opacity="1"> + <title>MediaCodec state diagram for asynchronous operation</title> + <g> + <line x1="740" y1="508.5" x2="740" y2="471.4" marker-end="url(#FilledArrow_Marker)" stroke="#ea8008" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/> + <line x1="740" y1="598.5" x2="740" y2="561.4" marker-end="url(#FilledArrow_Marker_2)" stroke="#274ecc" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/> + <line x1="763.33333" y1="458.5" x2="763.33333" y2="495.6" marker-end="url(#FilledArrow_Marker_2)" stroke="#274ecc" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/> + <line x1="920" y1="542" x2="822.9" y2="541.85288" marker-end="url(#FilledArrow_Marker_2)" stroke="#274ecc" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/> + <line x1="920" y1="617.5" x2="822.89947" y2="618.38273" marker-end="url(#FilledArrow_Marker_3)" stroke="#d02e2a" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/> + <line x1="919.5" y1="528.5" x2="822.9" y2="528.5" marker-end="url(#FilledArrow_Marker)" stroke="#ea8008" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/> + <line x1="827.11573" y1="674.83365" x2="843.6129" y2="701.97642" marker-end="url(#FilledArrow_Marker_4)" stroke="#262626" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/> + <line x1="922.88427" y1="674.83365" x2="904.22416" y2="702.32635" marker-end="url(#FilledArrow_Marker_4)" stroke="#262626" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/> + <path d="M 927.5 400 L 1092.5 400 C 1095.8137 400 1098.5 402.6863 1098.5 406 L 1098.5 671 C 1098.5 674.3137 1095.8137 677 1092.5 677 L 927.5 677 C 924.1863 677 921.5 674.3137 921.5 671 L 921.5 406 C 921.5 402.6863 924.1863 400 927.5 400 Z" fill="#178f46"/> + <path d="M 927.5 400 L 1092.5 400 C 1095.8137 400 1098.5 402.6863 1098.5 406 L 1098.5 671 C 1098.5 674.3137 1095.8137 677 1092.5 677 L 927.5 677 C 924.1863 677 921.5 674.3137 921.5 671 L 921.5 406 C 921.5 402.6863 924.1863 400 927.5 400 Z" stroke="#178f46" stroke-linecap="round" stroke-linejoin="round" stroke-width="3"/> + <text transform="translate(926.5 648.5)" fill="#aadbc2"> + <tspan font-family="Roboto" font-size="20" font-weight="500" fill="#aadbc2" x="40.091797" y="19" textLength="21.279297">Ex</tspan> + <tspan font-family="Roboto" font-size="20" font-weight="500" fill="#aadbc2" x="61.17578" y="19" textLength="65.73242">ecuting</tspan> + </text> + <path d="M 657.5 400 L 822.5 400 C 825.8137 400 828.5 402.6863 828.5 406 L 828.5 671 C 828.5 674.3137 825.8137 677 822.5 677 L 657.5 677 C 654.1863 677 651.5 674.3137 651.5 671 L 651.5 406 C 651.5 402.6863 654.1863 400 657.5 400 Z" stroke="#d02e2a" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/> + <text transform="translate(656.5 648.5)" fill="#d02e2a"> + <tspan font-family="Roboto" font-size="20" font-weight="500" fill="#d02e2a" x="46.53711" y="19" textLength="18.398438">St</tspan> + <tspan font-family="Roboto" font-size="20" font-weight="500" fill="#d02e2a" x="64.740234" y="19" textLength="55.722656">opped</tspan> + </text> + <text transform="translate(1130.1743 479.5)" fill="#262626"> + <tspan font-family="Roboto Condensed" font-size="16" font-weight="300" font-stretch="condensed" fill="#262626" x=".64453125" y="15" textLength="30.710938">flush</tspan> + </text> + <text transform="translate(968 467)" fill="#262626"> + <tspan font-family="Roboto Condensed" font-size="16" font-weight="300" font-stretch="condensed" fill="#262626" x="4.4101562" y="15" textLength="24.148438">star</tspan> + <tspan font-family="Roboto Condensed" font-size="16" font-weight="300" font-stretch="condensed" fill="#262626" x="28.949219" y="15" textLength="4.640625">t</tspan> + </text> + <text transform="translate(844.054 419.2185)" fill="#136f34"> + <tspan font-family="Roboto Condensed" font-size="16" font-weight="300" font-stretch="condensed" fill="#136f34" x="14.255245" y="15" textLength="24.148438">star</tspan> + <tspan font-family="Roboto Condensed" font-size="16" font-weight="300" font-stretch="condensed" fill="#136f34" x="38.794307" y="15" textLength="4.640625">t</tspan> + </text> + <text transform="translate(848.3963 505)" fill="#ea8008"> + <tspan font-family="Roboto Condensed" font-size="16" font-weight="300" font-stretch="condensed" fill="#ea8008" x="11.621094" y="15" textLength="11.78125">st</tspan> + <tspan font-family="Roboto Condensed" font-size="16" font-weight="300" font-stretch="condensed" fill="#ea8008" x="23.246094" y="15" textLength="15.6328125">op</tspan> + </text> + <text transform="translate(858.68587 621.3852)" fill="#b6251f"> + <tspan font-family="Roboto Condensed" font-size="16" font-weight="300" font-stretch="condensed" fill="#b6251f" x=".21875" y="15" textLength="16.992188">err</tspan> + <tspan font-family="Roboto Condensed" font-size="16" font-weight="300" font-stretch="condensed" fill="#b6251f" x="17.054688" y="15" textLength="12.6875">or</tspan> + <tspan font-family="Roboto Condensed" font-size="16" font-weight="300" font-stretch="condensed" fill="#b6251f" x="28.78125" y="15" textLength="9">…</tspan> + </text> + <text transform="translate(857.8257 546.43005)" fill="#274ecc"> + <tspan font-family="Roboto Condensed" font-size="16" font-weight="300" font-stretch="condensed" fill="#274ecc" x=".4453125" y="15" textLength="4.8359375">r</tspan> + <tspan font-family="Roboto Condensed" font-size="16" font-weight="300" font-stretch="condensed" fill="#274ecc" x="5.1328125" y="15" textLength="26.421875">eset</tspan> + </text> + <text transform="translate(768.33333 466.62302)" fill="#274ecc"> + <tspan font-family="Roboto Condensed" font-size="16" font-weight="300" font-stretch="condensed" fill="#274ecc" x=".4453125" y="15" textLength="4.8359375">r</tspan> + <tspan font-family="Roboto Condensed" font-size="16" font-weight="300" font-stretch="condensed" fill="#274ecc" x="5.1328125" y="15" textLength="26.421875">eset</tspan> + </text> + <text transform="translate(744 571.12)" fill="#274ecc"> + <tspan font-family="Roboto Condensed" font-size="16" font-weight="300" font-stretch="condensed" fill="#274ecc" x=".4453125" y="15" textLength="4.8359375">r</tspan> + <tspan font-family="Roboto Condensed" font-size="16" font-weight="300" font-stretch="condensed" fill="#274ecc" x="5.1328125" y="15" textLength="26.421875">eset</tspan> + </text> + <text transform="translate(675 479.5)" fill="#ea8008"> + <tspan font-family="Roboto Condensed" font-size="16" font-weight="300" font-stretch="condensed" fill="#ea8008" x="2.8125" y="15" textLength="30.382812">confi</tspan> + <tspan font-family="Roboto Condensed" font-size="16" font-weight="300" font-stretch="condensed" fill="#ea8008" x="33.195312" y="15" textLength="20.320312">gur</tspan> + <tspan font-family="Roboto Condensed" font-size="16" font-weight="300" font-stretch="condensed" fill="#ea8008" x="53.367187" y="15" textLength="7.3203125">e</tspan> + </text> + <path d="M 676 418.5 L 804 418.5 C 807.3137 418.5 810 421.1863 810 424.5 L 810 452.5 C 810 455.8137 807.3137 458.5 804 458.5 L 676 458.5 C 672.6863 458.5 670 455.8137 670 452.5 L 670 424.5 C 670 421.1863 672.6863 418.5 676 418.5 Z" fill="#f0a608"/> + <text transform="translate(675 426.5)" fill="#fbe4a3"> + <tspan font-family="Roboto" font-size="20" font-weight="500" fill="#fbe4a3" x="16.381836" y="19" textLength="46.533203">Confi</tspan> + <tspan font-family="Roboto" font-size="20" font-weight="500" fill="#fbe4a3" x="62.91504" y="19" textLength="29.013672">gur</tspan> + <tspan font-family="Roboto" font-size="20" font-weight="500" fill="#fbe4a3" x="91.743164" y="19" textLength="21.875">ed</tspan> + </text> + <path d="M 946 508.5 L 1074 508.5 C 1077.3137 508.5 1080 511.1863 1080 514.5 L 1080 542.5 C 1080 545.8137 1077.3137 548.5 1074 548.5 L 946 548.5 C 942.6863 548.5 940 545.8137 940 542.5 L 940 514.5 C 940 511.1863 942.6863 508.5 946 508.5 Z" fill="#f8f8f8"/> + <path d="M 946 508.5 L 1074 508.5 C 1077.3137 508.5 1080 511.1863 1080 514.5 L 1080 542.5 C 1080 545.8137 1077.3137 548.5 1074 548.5 L 946 548.5 C 942.6863 548.5 940 545.8137 940 542.5 L 940 514.5 C 940 511.1863 942.6863 508.5 946 508.5 Z" stroke="#49b077" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/> + <text transform="translate(945 516.5)" fill="#178f46"> + <tspan font-family="Roboto" font-size="20" font-weight="500" fill="#178f46" x="28.740234" y="19" textLength="72.51953">Running</tspan> + </text> + <path d="M 676 508.5 L 804 508.5 C 807.3137 508.5 810 511.1863 810 514.5 L 810 542.5 C 810 545.8137 807.3137 548.5 804 548.5 L 676 548.5 C 672.6863 548.5 670 545.8137 670 542.5 L 670 514.5 C 670 511.1863 672.6863 508.5 676 508.5 Z" fill="#346df1"/> + <text transform="translate(675 516.5)" fill="#bad0fb"> + <tspan font-family="Roboto" font-size="20" font-weight="500" fill="#bad0fb" x="10.825195" y="19" textLength="86.63086">Uninitializ</tspan> + <tspan font-family="Roboto" font-size="20" font-weight="500" fill="#bad0fb" x="97.299805" y="19" textLength="21.875">ed</tspan> + </text> + <path d="M 676 598.5 L 804 598.5 C 807.3137 598.5 810 601.1863 810 604.5 L 810 632.5 C 810 635.8137 807.3137 638.5 804 638.5 L 676 638.5 C 672.6863 638.5 670 635.8137 670 632.5 L 670 604.5 C 670 601.1863 672.6863 598.5 676 598.5 Z" fill="#d02e2a"/> + <text transform="translate(675 606.5)" fill="white"> + <tspan font-family="Roboto" font-size="20" font-weight="500" fill="white" x="43.55957" y="19" textLength="24.902344">Err</tspan> + <tspan font-family="Roboto" font-size="20" font-weight="500" fill="white" x="68.2666" y="19" textLength="18.173828">or</tspan> + </text> + <path d="M 946 418.5 L 1074 418.5 C 1077.3137 418.5 1080 421.1863 1080 424.5 L 1080 452.5 C 1080 455.8137 1077.3137 458.5 1074 458.5 L 946 458.5 C 942.6863 458.5 940 455.8137 940 452.5 L 940 424.5 C 940 421.1863 942.6863 418.5 946 418.5 Z" fill="#f8f8f8"/> + <path d="M 946 418.5 L 1074 418.5 C 1077.3137 418.5 1080 421.1863 1080 424.5 L 1080 452.5 C 1080 455.8137 1077.3137 458.5 1074 458.5 L 946 458.5 C 942.6863 458.5 940 455.8137 940 452.5 L 940 424.5 C 940 421.1863 942.6863 418.5 946 418.5 Z" stroke="#de6560" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/> + <text transform="translate(945 426.5)" fill="#178f46"> + <tspan font-family="Roboto" font-size="20" font-weight="500" fill="#178f46" x="29.93164" y="19" textLength="70.13672">Flushed</tspan> + </text> + <path d="M 946 598.5 L 1074 598.5 C 1077.3137 598.5 1080 601.1863 1080 604.5 L 1080 632.5 C 1080 635.8137 1077.3137 638.5 1074 638.5 L 946 638.5 C 942.6863 638.5 940 635.8137 940 632.5 L 940 604.5 C 940 601.1863 942.6863 598.5 946 598.5 Z" fill="#f8f8f8"/> + <path d="M 946 598.5 L 1074 598.5 C 1077.3137 598.5 1080 601.1863 1080 604.5 L 1080 632.5 C 1080 635.8137 1077.3137 638.5 1074 638.5 L 946 638.5 C 942.6863 638.5 940 635.8137 940 632.5 L 940 604.5 C 940 601.1863 942.6863 598.5 946 598.5 Z" stroke="#f4c23d" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/> + <text transform="translate(945 606.5)" fill="#178f46"> + <tspan font-family="Roboto" font-size="20" font-weight="500" fill="#178f46" x="2.0410156" y="19" textLength="87.09961">End of Str</tspan> + <tspan font-family="Roboto" font-size="20" font-weight="500" fill="#178f46" x="88.95508" y="19" textLength="39.003906">eam</tspan> + </text> + <path d="M 810 438.5 C 810 438.5 878.0599 435.16865 921.5 455 C 947.861 467.03438 957.6335 484.16434 961.2431 495.77385" marker-end="url(#FilledArrow_Marker_5)" stroke="#126f33" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/> + <line x1="963.33333" y1="458.5" x2="963.33333" y2="495.6" marker-end="url(#FilledArrow_Marker_4)" stroke="#262626" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/> + <line x1="963.33333" y1="548.5" x2="963.33333" y2="585.6" marker-end="url(#FilledArrow_Marker_4)" stroke="#262626" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/> + <path d="M 1080 521.83333 C 1080 521.83333 1106 504.33135 1106 484.5 C 1106 473.46106 1097.9439 464.58984 1090.80046 458.89346" marker-end="url(#FilledArrow_Marker_4)" stroke="#262626" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/> + <path d="M 1056.66667 598.5 C 1056.66667 598.5 1110.38955 548.8288 1117 503.5 C 1121.4143 473.23063 1103.434 454.40253 1090.9997 445.23311" marker-end="url(#FilledArrow_Marker_4)" stroke="#262626" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/> + <text transform="translate(968.25 550.5)" fill="#262626"> + <tspan font-family="Roboto Condensed" font-size="16" font-weight="300" font-stretch="condensed" fill="#262626" x="2.171875" y="15" textLength="111.25">queueInputBuffer</tspan> + <tspan font-family="Roboto Condensed" font-size="16" font-weight="300" font-stretch="condensed" fill="#262626" x="38.46875" y="34" textLength="35.0625">(EOS)</tspan> + </text> + <path d="M 809.6463 713 L 937.6463 713 C 940.96 713 943.6463 715.6863 943.6463 719 L 943.6463 747 C 943.6463 750.3137 940.96 753 937.6463 753 L 809.6463 753 C 806.3326 753 803.6463 750.3137 803.6463 747 L 803.6463 719 C 803.6463 715.6863 806.3326 713 809.6463 713 Z" fill="#535353"/> + <text transform="translate(808.6463 721)" fill="#d5d5d5"> + <tspan font-family="Roboto" font-size="20" font-weight="500" fill="#d5d5d5" x="24.28711" y="19" textLength="81.42578">Released</tspan> + </text> + <text transform="translate(852.18587 683)" fill="#262626"> + <tspan font-family="Roboto Condensed" font-size="16" font-weight="300" font-stretch="condensed" fill="#262626" x=".15625" y="15" textLength="4.8359375">r</tspan> + <tspan font-family="Roboto Condensed" font-size="16" font-weight="300" font-stretch="condensed" fill="#262626" x="4.84375" y="15" textLength="40">elease</tspan> + </text> + </g> + </g> +</svg> diff --git a/docs/html/images/media/mediacodec_buffers.png b/docs/html/images/media/mediacodec_buffers.png Binary files differnew file mode 100644 index 0000000..f17f4ac --- /dev/null +++ b/docs/html/images/media/mediacodec_buffers.png diff --git a/docs/html/images/media/mediacodec_buffers.svg b/docs/html/images/media/mediacodec_buffers.svg new file mode 100644 index 0000000..fa121ee --- /dev/null +++ b/docs/html/images/media/mediacodec_buffers.svg @@ -0,0 +1,102 @@ +<?xml version="1.0" encoding="utf-8" standalone="no"?> +<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"> +<svg xmlns="http://www.w3.org/2000/svg" xmlns:xl="http://www.w3.org/1999/xlink" version="1.1" viewBox="20 17 540 208" width="45pc" height="208pt" xmlns:dc="http://purl.org/dc/elements/1.1/"> + <defs> + <font-face font-family="Roboto" font-size="20" panose-1="2 0 0 0 0 0 0 0 0 0" units-per-em="1000" underline-position="-73.242188" underline-thickness="48.828125" slope="0" x-height="538.08594" cap-height="720.70312" ascent="927.7344" descent="-244.14062" font-weight="500"> + <font-face-src> + <font-face-name name="Roboto-Regular"/> + </font-face-src> + </font-face> + <font-face font-family="Roboto" font-size="12" panose-1="2 0 0 0 0 0 0 0 0 0" units-per-em="1000" underline-position="-73.242188" underline-thickness="48.828125" slope="0" x-height="538.08594" cap-height="720.70312" ascent="927.7344" descent="-244.14062" font-weight="300"> + <font-face-src> + <font-face-name name="Roboto-Light"/> + </font-face-src> + </font-face> + <marker orient="auto" overflow="visible" markerUnits="strokeWidth" id="FilledArrow_Marker" viewBox="-4 -2 5 4" markerWidth="5" markerHeight="4" color="#262626"> + <g> + <path d="M -2.16 0 L 0 .81 L 0 -.81 Z" fill="currentColor" stroke="currentColor" stroke-width="1"/> + </g> + </marker> + </defs> + <g stroke="none" stroke-opacity="1" stroke-dasharray="none" fill="none" fill-opacity="1"> + <title>MediaCodec buffer flow diagram</title> + <g> + <line x1="291" y1="20" x2="290" y2="220" stroke="#535353" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" stroke-dasharray="4,4"/> + <path d="M 560 71 L 560 179 L 560 185 L 554 185 L 510 185 L 466 185 C 462.6863 185 460 182.31371 460 179 L 460 71 C 460 67.68629 462.6863 65 466 65 L 510 65 L 554 65 L 560 65 Z M 554 65 C 554 65 554 65 554 65 Z" fill="#178f46"/> + <text transform="translate(465 113)" fill="#aadcc2"> + <tspan font-family="Roboto" font-size="20" font-weight="500" fill="#aadcc2" x="19.555664" y="19" textLength="50.888672">Client</tspan> + </text> + <path d="M 246 75 L 334 75 C 337.3137 75 340 77.68629 340 81 L 340 169 C 340 172.31371 337.3137 175 334 175 L 246 175 C 242.68629 175 240 172.31371 240 169 L 240 81 C 240 77.68629 242.68629 75 246 75 Z" fill="#346df1"/> + <text transform="translate(245 113)" fill="#bad0fb"> + <tspan font-family="Roboto" font-size="20" font-weight="500" fill="#bad0fb" x="16.616211" y="19" textLength="56.767578">Codec</tspan> + </text> + <path d="M 132 140 L 148 140 C 149.10457 140 150 140.89543 150 142 L 150 158 C 150 159.10457 149.10457 160 148 160 L 132 160 C 130.89543 160 130 159.10457 130 158 L 130 142 C 130 140.89543 130.89543 140 132 140 Z" fill="#de6560"/> + <path d="M 132 140 L 148 140 C 149.10457 140 150 140.89543 150 142 L 150 158 C 150 159.10457 149.10457 160 148 160 L 132 160 C 130.89543 160 130 159.10457 130 158 L 130 142 C 130 140.89543 130.89543 140 132 140 Z" stroke="#b6251f" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/> + <path d="M 172 140 L 188 140 C 189.10457 140 190 140.89543 190 142 L 190 158 C 190 159.10457 189.10457 160 188 160 L 172 160 C 170.89543 160 170 159.10457 170 158 L 170 142 C 170 140.89543 170.89543 140 172 140 Z" fill="#de6560"/> + <path d="M 172 140 L 188 140 C 189.10457 140 190 140.89543 190 142 L 190 158 C 190 159.10457 189.10457 160 188 160 L 172 160 C 170.89543 160 170 159.10457 170 158 L 170 142 C 170 140.89543 170.89543 140 172 140 Z" stroke="#b6251f" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/> + <path d="M 212 140 L 228 140 C 229.10457 140 230 140.89543 230 142 L 230 158 C 230 159.10457 229.10457 160 228 160 L 212 160 C 210.89543 160 210 159.10457 210 158 L 210 142 C 210 140.89543 210.89543 140 212 140 Z" fill="#de6560"/> + <path d="M 212 140 L 228 140 C 229.10457 140 230 140.89543 230 142 L 230 158 C 230 159.10457 229.10457 160 228 160 L 212 160 C 210.89543 160 210 159.10457 210 158 L 210 142 C 210 140.89543 210.89543 140 212 140 Z" stroke="#b6251f" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/> + <path d="M 212 90 L 228 90 C 229.10457 90 230 90.89543 230 92 L 230 108 C 230 109.10457 229.10457 110 228 110 L 212 110 C 210.89543 110 210 109.10457 210 108 L 210 92 C 210 90.89543 210.89543 90 212 90 Z" stroke="#b6251f" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/> + <path d="M 172 90 L 188 90 C 189.10457 90 190 90.89543 190 92 L 190 108 C 190 109.10457 189.10457 110 188 110 L 172 110 C 170.89543 110 170 109.10457 170 108 L 170 92 C 170 90.89543 170.89543 90 172 90 Z" stroke="#b6251f" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/> + <path d="M 132 90 L 148 90 C 149.10457 90 150 90.89543 150 92 L 150 108 C 150 109.10457 149.10457 110 148 110 L 132 110 C 130.89543 110 130 109.10457 130 108 L 130 92 C 130 90.89543 130.89543 90 132 90 Z" stroke="#b6251f" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/> + <text transform="translate(128.5 70.5)" fill="#262626"> + <tspan font-family="Roboto" font-size="12" font-weight="300" fill="#262626" x=".19238281" y="11" textLength="86.44336">empty input buff</tspan> + <tspan font-family="Roboto" font-size="12" font-weight="300" fill="#262626" x="86.495117" y="11" textLength="16.3125">ers</tspan> + </text> + <path d="M 20 71 L 20 179 L 20 185 L 26 185 L 70 185 L 114 185 C 117.31371 185 120 182.31371 120 179 L 120 71 C 120 67.68629 117.31371 65 114 65 L 70 65 L 26 65 L 20 65 Z M 26 65 C 26 65 26 65 26 65 Z" fill="#178f46"/> + <text transform="translate(25 113)" fill="#aadcc2"> + <tspan font-family="Roboto" font-size="20" font-weight="500" fill="#aadcc2" x="19.555664" y="19" textLength="50.888672">Client</tspan> + </text> + <path d="M 352 110 L 368 110 C 369.10457 110 370 109.10457 370 108 L 370 92 C 370 90.89543 369.10457 90 368 90 L 352 90 C 350.89543 90 350 90.89543 350 92 L 350 108 C 350 109.10457 350.89543 110 352 110 Z" fill="#f4c23d"/> + <path d="M 352 110 L 368 110 C 369.10457 110 370 109.10457 370 108 L 370 92 C 370 90.89543 369.10457 90 368 90 L 352 90 C 350.89543 90 350 90.89543 350 92 L 350 108 C 350 109.10457 350.89543 110 352 110 Z" stroke="#eb8007" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/> + <path d="M 392 110 L 408 110 C 409.10457 110 410 109.10457 410 108 L 410 92 C 410 90.89543 409.10457 90 408 90 L 392 90 C 390.89543 90 390 90.89543 390 92 L 390 108 C 390 109.10457 390.89543 110 392 110 Z" fill="#f4c23d"/> + <path d="M 392 110 L 408 110 C 409.10457 110 410 109.10457 410 108 L 410 92 C 410 90.89543 409.10457 90 408 90 L 392 90 C 390.89543 90 390 90.89543 390 92 L 390 108 C 390 109.10457 390.89543 110 392 110 Z" stroke="#eb8007" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/> + <path d="M 432 110 L 448 110 C 449.10457 110 450 109.10457 450 108 L 450 92 C 450 90.89543 449.10457 90 448 90 L 432 90 C 430.89543 90 430 90.89543 430 92 L 430 108 C 430 109.10457 430.89543 110 432 110 Z" fill="#f4c23d"/> + <path d="M 432 110 L 448 110 C 449.10457 110 450 109.10457 450 108 L 450 92 C 450 90.89543 449.10457 90 448 90 L 432 90 C 430.89543 90 430 90.89543 430 92 L 430 108 C 430 109.10457 430.89543 110 432 110 Z" stroke="#eb8007" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/> + <path d="M 432 160 L 448 160 C 449.10457 160 450 159.10457 450 158 L 450 142 C 450 140.89543 449.10457 140 448 140 L 432 140 C 430.89543 140 430 140.89543 430 142 L 430 158 C 430 159.10457 430.89543 160 432 160 Z" fill="#f4c23d"/> + <path d="M 432 160 L 448 160 C 449.10457 160 450 159.10457 450 158 L 450 142 C 450 140.89543 449.10457 140 448 140 L 432 140 C 430.89543 140 430 140.89543 430 142 L 430 158 C 430 159.10457 430.89543 160 432 160 Z" stroke="#eb8007" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/> + <path d="M 392 160 L 408 160 C 409.10457 160 410 159.10457 410 158 L 410 142 C 410 140.89543 409.10457 140 408 140 L 392 140 C 390.89543 140 390 140.89543 390 142 L 390 158 C 390 159.10457 390.89543 160 392 160 Z" fill="#f4c23d"/> + <path d="M 392 160 L 408 160 C 409.10457 160 410 159.10457 410 158 L 410 142 C 410 140.89543 409.10457 140 408 140 L 392 140 C 390.89543 140 390 140.89543 390 142 L 390 158 C 390 159.10457 390.89543 160 392 160 Z" stroke="#eb8007" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/> + <path d="M 352 160 L 368 160 C 369.10457 160 370 159.10457 370 158 L 370 142 C 370 140.89543 369.10457 140 368 140 L 352 140 C 350.89543 140 350 140.89543 350 142 L 350 158 C 350 159.10457 350.89543 160 352 160 Z" fill="#f4c23d"/> + <path d="M 352 160 L 368 160 C 369.10457 160 370 159.10457 370 158 L 370 142 C 370 140.89543 369.10457 140 368 140 L 352 140 C 350.89543 140 350 140.89543 350 142 L 350 158 C 350 159.10457 350.89543 160 352 160 Z" stroke="#eb8007" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/> + <line x1="230" y1="120.03223" x2="110" y2="120" stroke="#262626" stroke-linecap="square" stroke-linejoin="round" stroke-width="2" stroke-dasharray="8,5"/> + <line x1="232.38" y1="130.03034" x2="110" y2="130" marker-start="url(#FilledArrow_Marker)" stroke="#262626" stroke-linecap="square" stroke-linejoin="round" stroke-width="2" stroke-dasharray="8,5"/> + <path d="M 110 130 C 107.238576 130 105 127.76142 105 125 C 105 122.238576 107.238576 120 110 120" stroke="#262626" stroke-linecap="square" stroke-linejoin="round" stroke-width="2" stroke-dasharray="8,5"/> + <line x1="350" y1="120.53223" x2="470" y2="120.5" stroke="#262626" stroke-linecap="square" stroke-linejoin="round" stroke-width="2" stroke-dasharray="8,5"/> + <line x1="347.62" y1="130.53034" x2="470" y2="130.5" marker-start="url(#FilledArrow_Marker)" stroke="#262626" stroke-linecap="square" stroke-linejoin="round" stroke-width="2" stroke-dasharray="8,5"/> + <path d="M 470 130.5 C 472.76142 130.5 475 128.26142 475 125.5 C 475 122.738576 472.76142 120.5 470 120.5" stroke="#262626" stroke-linecap="square" stroke-linejoin="round" stroke-width="2" stroke-dasharray="8,5"/> + <text transform="translate(132.5 166.5)" fill="#262626"> + <tspan font-family="Roboto" font-size="12" font-weight="300" fill="#262626" x=".3671875" y="11" textLength="6.4453125">fi</tspan> + <tspan font-family="Roboto" font-size="12" font-weight="300" fill="#262626" x="6.8125" y="11" textLength="71.648438">lled input buff</tspan> + <tspan font-family="Roboto" font-size="12" font-weight="300" fill="#262626" x="78.320312" y="11" textLength="16.3125">ers</tspan> + </text> + <text transform="translate(348.5 70.5)" fill="#262626"> + <tspan font-family="Roboto" font-size="12" font-weight="300" fill="#262626" x=".42382812" y="11" textLength="6.4453125">fi</tspan> + <tspan font-family="Roboto" font-size="12" font-weight="300" fill="#262626" x="6.8691406" y="11" textLength="79.535156">lled output buff</tspan> + <tspan font-family="Roboto" font-size="12" font-weight="300" fill="#262626" x="86.26367" y="11" textLength="16.3125">ers</tspan> + </text> + <text transform="translate(366.5 165)" fill="#262626"> + <tspan font-family="Roboto" font-size="12" font-weight="300" fill="#262626" x="11.748047" y="11" textLength="32.080078">discar</tspan> + <tspan font-family="Roboto" font-size="12" font-weight="300" fill="#262626" x="43.716797" y="11" textLength="19.535156">ded</tspan> + <tspan font-family="Roboto" font-size="12" font-weight="300" fill="#262626" x=".22851562" y="25" textLength="58.371094">output buff</tspan> + <tspan font-family="Roboto" font-size="12" font-weight="300" fill="#262626" x="58.458984" y="25" textLength="16.3125">ers</tspan> + </text> + <text transform="translate(35.5 192)" fill="#262626"> + <tspan font-family="Roboto" font-size="12" font-weight="300" fill="#262626" x=".13378906" y="11" textLength="41.8125">client pr</tspan> + <tspan font-family="Roboto" font-size="12" font-weight="300" fill="#262626" x="41.829102" y="11" textLength="6.720703">o</tspan> + <tspan font-family="Roboto" font-size="12" font-weight="300" fill="#262626" x="48.461914" y="11" textLength="27.404297">vides</tspan> + <tspan font-family="Roboto" font-size="12" font-weight="300" fill="#262626" x="11.6621094" y="25" textLength="52.67578">input data</tspan> + </text> + <text transform="translate(466.5 192)" fill="#262626"> + <tspan font-family="Roboto" font-size="12" font-weight="300" fill="#262626" x=".40136719" y="11" textLength="86.197266">client consumes</tspan> + <tspan font-family="Roboto" font-size="12" font-weight="300" fill="#262626" x="13.21875" y="25" textLength="60.5625">output data</tspan> + </text> + <text transform="translate(157.5 30)" fill="#d02d2a"> + <tspan font-family="Roboto" font-size="20" font-weight="500" fill="#d02d2a" x=".166015625" y="19" textLength="44.66797">input</tspan> + </text> + <text transform="translate(371 30)" fill="#f0a608"> + <tspan font-family="Roboto" font-size="20" font-weight="500" fill="#f0a608" x=".12792969" y="19" textLength="57.74414">output</tspan> + </text> + </g> + </g> +</svg> diff --git a/docs/html/images/media/mediacodec_states.png b/docs/html/images/media/mediacodec_states.png Binary files differnew file mode 100644 index 0000000..a34b613 --- /dev/null +++ b/docs/html/images/media/mediacodec_states.png diff --git a/docs/html/images/media/mediacodec_states.svg b/docs/html/images/media/mediacodec_states.svg new file mode 100644 index 0000000..81646fd --- /dev/null +++ b/docs/html/images/media/mediacodec_states.svg @@ -0,0 +1,150 @@ +<?xml version="1.0" encoding="utf-8" standalone="no"?> +<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"> +<svg xmlns="http://www.w3.org/2000/svg" xmlns:xl="http://www.w3.org/1999/xlink" version="1.1" viewBox="649 8 519 357" width="519pt" height="357pt" xmlns:dc="http://purl.org/dc/elements/1.1/"> + <defs> + <marker orient="auto" overflow="visible" markerUnits="strokeWidth" id="FilledArrow_Marker" viewBox="-1 -3 7 6" markerWidth="7" markerHeight="6" color="#ea8008"> + <g> + <path d="M 4.8 0 L 0 -1.8 L 0 1.8 Z" fill="currentColor" stroke="currentColor" stroke-width="1"/> + </g> + </marker> + <marker orient="auto" overflow="visible" markerUnits="strokeWidth" id="FilledArrow_Marker_2" viewBox="-1 -3 7 6" markerWidth="7" markerHeight="6" color="#274ecc"> + <g> + <path d="M 4.8 0 L 0 -1.8 L 0 1.8 Z" fill="currentColor" stroke="currentColor" stroke-width="1"/> + </g> + </marker> + <marker orient="auto" overflow="visible" markerUnits="strokeWidth" id="FilledArrow_Marker_3" viewBox="-1 -3 7 6" markerWidth="7" markerHeight="6" color="#d02e2a"> + <g> + <path d="M 4.8 0 L 0 -1.8 L 0 1.8 Z" fill="currentColor" stroke="currentColor" stroke-width="1"/> + </g> + </marker> + <marker orient="auto" overflow="visible" markerUnits="strokeWidth" id="FilledArrow_Marker_4" viewBox="-1 -3 7 6" markerWidth="7" markerHeight="6" color="#262626"> + <g> + <path d="M 4.8 0 L 0 -1.8 L 0 1.8 Z" fill="currentColor" stroke="currentColor" stroke-width="1"/> + </g> + </marker> + <font-face font-family="Roboto" font-size="20" panose-1="2 0 0 0 0 0 0 0 0 0" units-per-em="1000" underline-position="-73.242188" underline-thickness="48.828125" slope="0" x-height="538.08594" cap-height="720.70312" ascent="927.7344" descent="-244.14062" font-weight="500"> + <font-face-src> + <font-face-name name="Roboto-Regular"/> + </font-face-src> + </font-face> + <font-face font-family="Roboto Condensed" font-size="16" panose-1="0 0 4 6 0 0 0 0 0 0" units-per-em="1000" underline-position="-73.242188" underline-thickness="48.828125" slope="0" x-height="538.08594" cap-height="720.70312" ascent="927.7344" descent="-244.14062" font-weight="300" font-stretch="condensed"> + <font-face-src> + <font-face-name name="RobotoCondensed-Light"/> + </font-face-src> + </font-face> + <marker orient="auto" overflow="visible" markerUnits="strokeWidth" id="FilledArrow_Marker_5" viewBox="-1 -3 7 6" markerWidth="7" markerHeight="6" color="#126f33"> + <g> + <path d="M 4.8 0 L 0 -1.8 L 0 1.8 Z" fill="currentColor" stroke="currentColor" stroke-width="1"/> + </g> + </marker> + </defs> + <g stroke="none" stroke-opacity="1" stroke-dasharray="none" fill="none" fill-opacity="1"> + <title>MediaCodec state diagram</title> + <g> + <line x1="740" y1="120" x2="740" y2="82.9" marker-end="url(#FilledArrow_Marker)" stroke="#ea8008" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/> + <line x1="740" y1="210" x2="740" y2="172.9" marker-end="url(#FilledArrow_Marker_2)" stroke="#274ecc" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/> + <line x1="763.33333" y1="70" x2="763.33333" y2="107.1" marker-end="url(#FilledArrow_Marker_2)" stroke="#274ecc" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/> + <line x1="920" y1="153.5" x2="822.9" y2="153.35288" marker-end="url(#FilledArrow_Marker_2)" stroke="#274ecc" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/> + <line x1="920" y1="229" x2="822.89947" y2="229.88273" marker-end="url(#FilledArrow_Marker_3)" stroke="#d02e2a" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/> + <line x1="919.5" y1="140" x2="822.9" y2="140" marker-end="url(#FilledArrow_Marker)" stroke="#ea8008" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/> + <line x1="827.11573" y1="286.33365" x2="843.6129" y2="313.47642" marker-end="url(#FilledArrow_Marker_4)" stroke="#262626" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/> + <line x1="922.88427" y1="286.33365" x2="904.22416" y2="313.82635" marker-end="url(#FilledArrow_Marker_4)" stroke="#262626" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/> + <path d="M 927.5 11.5 L 1092.5 11.5 C 1095.8137 11.5 1098.5 14.1862915 1098.5 17.5 L 1098.5 282.5 C 1098.5 285.8137 1095.8137 288.5 1092.5 288.5 L 927.5 288.5 C 924.1863 288.5 921.5 285.8137 921.5 282.5 L 921.5 17.5 C 921.5 14.1862915 924.1863 11.5 927.5 11.5 Z" fill="#178f46"/> + <path d="M 927.5 11.5 L 1092.5 11.5 C 1095.8137 11.5 1098.5 14.1862915 1098.5 17.5 L 1098.5 282.5 C 1098.5 285.8137 1095.8137 288.5 1092.5 288.5 L 927.5 288.5 C 924.1863 288.5 921.5 285.8137 921.5 282.5 L 921.5 17.5 C 921.5 14.1862915 924.1863 11.5 927.5 11.5 Z" stroke="#178f46" stroke-linecap="round" stroke-linejoin="round" stroke-width="3"/> + <text transform="translate(926.5 260)" fill="#aadbc2"> + <tspan font-family="Roboto" font-size="20" font-weight="500" fill="#aadbc2" x="40.091797" y="19" textLength="21.279297">Ex</tspan> + <tspan font-family="Roboto" font-size="20" font-weight="500" fill="#aadbc2" x="61.17578" y="19" textLength="65.73242">ecuting</tspan> + </text> + <path d="M 657.5 11.5 L 822.5 11.5 C 825.8137 11.5 828.5 14.1862915 828.5 17.5 L 828.5 282.5 C 828.5 285.8137 825.8137 288.5 822.5 288.5 L 657.5 288.5 C 654.1863 288.5 651.5 285.8137 651.5 282.5 L 651.5 17.5 C 651.5 14.1862915 654.1863 11.5 657.5 11.5 Z" stroke="#d02e2a" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/> + <text transform="translate(656.5 260)" fill="#d02e2a"> + <tspan font-family="Roboto" font-size="20" font-weight="500" fill="#d02e2a" x="46.53711" y="19" textLength="18.398438">St</tspan> + <tspan font-family="Roboto" font-size="20" font-weight="500" fill="#d02e2a" x="64.740234" y="19" textLength="55.722656">opped</tspan> + </text> + <text transform="translate(1130.1743 91)" fill="#262626"> + <tspan font-family="Roboto Condensed" font-size="16" font-weight="300" font-stretch="condensed" fill="#262626" x=".64453125" y="15" textLength="30.710938">flush</tspan> + </text> + <text transform="translate(968 78.5)" fill="#262626"> + <tspan font-family="Roboto Condensed" font-size="16" font-weight="300" font-stretch="condensed" fill="#262626" x=".859375" y="15" textLength="122.78125">dequeueInputBuffer</tspan> + </text> + <text transform="translate(846.272 20.5)" fill="#126f33"> + <tspan font-family="Roboto Condensed" font-size="16" font-weight="300" font-stretch="condensed" fill="#126f33" x="14.255245" y="15" textLength="24.148438">star</tspan> + <tspan font-family="Roboto Condensed" font-size="16" font-weight="300" font-stretch="condensed" fill="#126f33" x="38.794307" y="15" textLength="4.640625">t</tspan> + </text> + <text transform="translate(848.3963 116.5)" fill="#eb8007"> + <tspan font-family="Roboto Condensed" font-size="16" font-weight="300" font-stretch="condensed" fill="#eb8007" x="11.621094" y="15" textLength="11.78125">st</tspan> + <tspan font-family="Roboto Condensed" font-size="16" font-weight="300" font-stretch="condensed" fill="#eb8007" x="23.246094" y="15" textLength="15.6328125">op</tspan> + </text> + <text transform="translate(858.68587 232.88521)" fill="#b6251f"> + <tspan font-family="Roboto Condensed" font-size="16" font-weight="300" font-stretch="condensed" fill="#b6251f" x=".21875" y="15" textLength="16.992188">err</tspan> + <tspan font-family="Roboto Condensed" font-size="16" font-weight="300" font-stretch="condensed" fill="#b6251f" x="17.054688" y="15" textLength="12.6875">or</tspan> + <tspan font-family="Roboto Condensed" font-size="16" font-weight="300" font-stretch="condensed" fill="#b6251f" x="28.78125" y="15" textLength="9">…</tspan> + </text> + <text transform="translate(857.8257 157.930055)" fill="#274ecd"> + <tspan font-family="Roboto Condensed" font-size="16" font-weight="300" font-stretch="condensed" fill="#274ecd" x=".4453125" y="15" textLength="4.8359375">r</tspan> + <tspan font-family="Roboto Condensed" font-size="16" font-weight="300" font-stretch="condensed" fill="#274ecd" x="5.1328125" y="15" textLength="26.421875">eset</tspan> + </text> + <text transform="translate(768.33333 78.12302)" fill="#274ecd"> + <tspan font-family="Roboto Condensed" font-size="16" font-weight="300" font-stretch="condensed" fill="#274ecd" x=".4453125" y="15" textLength="4.8359375">r</tspan> + <tspan font-family="Roboto Condensed" font-size="16" font-weight="300" font-stretch="condensed" fill="#274ecd" x="5.1328125" y="15" textLength="26.421875">eset</tspan> + </text> + <text transform="translate(744 182.62)" fill="#274ecd"> + <tspan font-family="Roboto Condensed" font-size="16" font-weight="300" font-stretch="condensed" fill="#274ecd" x=".4453125" y="15" textLength="4.8359375">r</tspan> + <tspan font-family="Roboto Condensed" font-size="16" font-weight="300" font-stretch="condensed" fill="#274ecd" x="5.1328125" y="15" textLength="26.421875">eset</tspan> + </text> + <text transform="translate(675 91)" fill="#eb8007"> + <tspan font-family="Roboto Condensed" font-size="16" font-weight="300" font-stretch="condensed" fill="#eb8007" x="2.8125" y="15" textLength="30.382812">confi</tspan> + <tspan font-family="Roboto Condensed" font-size="16" font-weight="300" font-stretch="condensed" fill="#eb8007" x="33.195312" y="15" textLength="20.320312">gur</tspan> + <tspan font-family="Roboto Condensed" font-size="16" font-weight="300" font-stretch="condensed" fill="#eb8007" x="53.367187" y="15" textLength="7.3203125">e</tspan> + </text> + <path d="M 676 30 L 804 30 C 807.3137 30 810 32.686292 810 36 L 810 64 C 810 67.31371 807.3137 70 804 70 L 676 70 C 672.6863 70 670 67.31371 670 64 L 670 36 C 670 32.686292 672.6863 30 676 30 Z" fill="#f0a608"/> + <text transform="translate(675 38)" fill="#fbe4a3"> + <tspan font-family="Roboto" font-size="20" font-weight="500" fill="#fbe4a3" x="16.381836" y="19" textLength="46.533203">Confi</tspan> + <tspan font-family="Roboto" font-size="20" font-weight="500" fill="#fbe4a3" x="62.91504" y="19" textLength="29.013672">gur</tspan> + <tspan font-family="Roboto" font-size="20" font-weight="500" fill="#fbe4a3" x="91.743164" y="19" textLength="21.875">ed</tspan> + </text> + <path d="M 946 120 L 1074 120 C 1077.3137 120 1080 122.68629 1080 126 L 1080 154 C 1080 157.31371 1077.3137 160 1074 160 L 946 160 C 942.6863 160 940 157.31371 940 154 L 940 126 C 940 122.68629 942.6863 120 946 120 Z" fill="#f8f8f8"/> + <path d="M 946 120 L 1074 120 C 1077.3137 120 1080 122.68629 1080 126 L 1080 154 C 1080 157.31371 1077.3137 160 1074 160 L 946 160 C 942.6863 160 940 157.31371 940 154 L 940 126 C 940 122.68629 942.6863 120 946 120 Z" stroke="#49b077" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/> + <text transform="translate(945 128)" fill="#178f46"> + <tspan font-family="Roboto" font-size="20" font-weight="500" fill="#178f46" x="28.740234" y="19" textLength="72.51953">Running</tspan> + </text> + <path d="M 676 120 L 804 120 C 807.3137 120 810 122.68629 810 126 L 810 154 C 810 157.31371 807.3137 160 804 160 L 676 160 C 672.6863 160 670 157.31371 670 154 L 670 126 C 670 122.68629 672.6863 120 676 120 Z" fill="#346df1"/> + <text transform="translate(675 128)" fill="#bad0fb"> + <tspan font-family="Roboto" font-size="20" font-weight="500" fill="#bad0fb" x="10.825195" y="19" textLength="86.63086">Uninitializ</tspan> + <tspan font-family="Roboto" font-size="20" font-weight="500" fill="#bad0fb" x="97.299805" y="19" textLength="21.875">ed</tspan> + </text> + <path d="M 676 210 L 804 210 C 807.3137 210 810 212.68629 810 216 L 810 244 C 810 247.31371 807.3137 250 804 250 L 676 250 C 672.6863 250 670 247.31371 670 244 L 670 216 C 670 212.68629 672.6863 210 676 210 Z" fill="#d02e2a"/> + <text transform="translate(675 218)" fill="white"> + <tspan font-family="Roboto" font-size="20" font-weight="500" fill="white" x="43.55957" y="19" textLength="24.902344">Err</tspan> + <tspan font-family="Roboto" font-size="20" font-weight="500" fill="white" x="68.2666" y="19" textLength="18.173828">or</tspan> + </text> + <path d="M 946 30 L 1074 30 C 1077.3137 30 1080 32.686292 1080 36 L 1080 64 C 1080 67.31371 1077.3137 70 1074 70 L 946 70 C 942.6863 70 940 67.31371 940 64 L 940 36 C 940 32.686292 942.6863 30 946 30 Z" fill="#f8f8f8"/> + <path d="M 946 30 L 1074 30 C 1077.3137 30 1080 32.686292 1080 36 L 1080 64 C 1080 67.31371 1077.3137 70 1074 70 L 946 70 C 942.6863 70 940 67.31371 940 64 L 940 36 C 940 32.686292 942.6863 30 946 30 Z" stroke="#de6560" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/> + <text transform="translate(945 38)" fill="#178f46"> + <tspan font-family="Roboto" font-size="20" font-weight="500" fill="#178f46" x="29.93164" y="19" textLength="70.13672">Flushed</tspan> + </text> + <path d="M 946 210 L 1074 210 C 1077.3137 210 1080 212.68629 1080 216 L 1080 244 C 1080 247.31371 1077.3137 250 1074 250 L 946 250 C 942.6863 250 940 247.31371 940 244 L 940 216 C 940 212.68629 942.6863 210 946 210 Z" fill="#f8f8f8"/> + <path d="M 946 210 L 1074 210 C 1077.3137 210 1080 212.68629 1080 216 L 1080 244 C 1080 247.31371 1077.3137 250 1074 250 L 946 250 C 942.6863 250 940 247.31371 940 244 L 940 216 C 940 212.68629 942.6863 210 946 210 Z" stroke="#f4c23d" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/> + <text transform="translate(945 218)" fill="#178f46"> + <tspan font-family="Roboto" font-size="20" font-weight="500" fill="#178f46" x="2.0410156" y="19" textLength="87.09961">End of Str</tspan> + <tspan font-family="Roboto" font-size="20" font-weight="500" fill="#178f46" x="88.95508" y="19" textLength="39.003906">eam</tspan> + </text> + <line x1="810" y1="50" x2="927.1" y2="50" marker-end="url(#FilledArrow_Marker_5)" stroke="#126f33" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/> + <line x1="963.33333" y1="70" x2="963.33333" y2="107.1" marker-end="url(#FilledArrow_Marker_4)" stroke="#262626" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/> + <line x1="963.33333" y1="160" x2="963.33333" y2="197.1" marker-end="url(#FilledArrow_Marker_4)" stroke="#262626" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/> + <path d="M 1080 133.33333 C 1080 133.33333 1106 115.83135 1106 96 C 1106 84.961065 1097.9439 76.089842 1090.80046 70.39346" marker-end="url(#FilledArrow_Marker_4)" stroke="#262626" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/> + <path d="M 1056.66667 210 C 1056.66667 210 1110.38955 160.3288 1117 115 C 1121.4143 84.73063 1103.434 65.902535 1090.9997 56.733113" marker-end="url(#FilledArrow_Marker_4)" stroke="#262626" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/> + <text transform="translate(968.25 162)" fill="#262626"> + <tspan font-family="Roboto Condensed" font-size="16" font-weight="300" font-stretch="condensed" fill="#262626" x="2.171875" y="15" textLength="111.25">queueInputBuffer</tspan> + <tspan font-family="Roboto Condensed" font-size="16" font-weight="300" font-stretch="condensed" fill="#262626" x="38.46875" y="34" textLength="35.0625">(EOS)</tspan> + </text> + <path d="M 809.6463 324.5 L 937.6463 324.5 C 940.96 324.5 943.6463 327.1863 943.6463 330.5 L 943.6463 358.5 C 943.6463 361.8137 940.96 364.5 937.6463 364.5 L 809.6463 364.5 C 806.3326 364.5 803.6463 361.8137 803.6463 358.5 L 803.6463 330.5 C 803.6463 327.1863 806.3326 324.5 809.6463 324.5 Z" fill="#535353"/> + <text transform="translate(808.6463 332.5)" fill="#d5d5d5"> + <tspan font-family="Roboto" font-size="20" font-weight="500" fill="#d5d5d5" x="24.28711" y="19" textLength="81.42578">Released</tspan> + </text> + <text transform="translate(852.18587 294.5)" fill="#262626"> + <tspan font-family="Roboto Condensed" font-size="16" font-weight="300" font-stretch="condensed" fill="#262626" x=".15625" y="15" textLength="4.8359375">r</tspan> + <tspan font-family="Roboto Condensed" font-size="16" font-weight="300" font-stretch="condensed" fill="#262626" x="4.84375" y="15" textLength="40">elease</tspan> + </text> + </g> + </g> +</svg> diff --git a/docs/html/preview/testing/performance.jd b/docs/html/preview/testing/performance.jd index abb41c4..6f0a5f1 100644 --- a/docs/html/preview/testing/performance.jd +++ b/docs/html/preview/testing/performance.jd @@ -112,10 +112,10 @@ Number Slow draw: 23342 </p> <pre class="noprettyprint"> -0,49762224585003,49762241251670,9223372036854775807,0,49762257627204,49762257646058,49762257969704,49762258002100,49762265541631,49762273951162,49762300914808,49762303675954, -0,49762445152142,49762445152142,9223372036854775807,0,49762446678818,49762446705589,49762447268818,49762447388037,49762453551527,49762457134131,49762474889027,49762476150120, -0,49762462118845,49762462118845,9223372036854775807,0,49762462595381,49762462619287,49762462919964,49762462968454,49762476194547,49762476483454,49762480214964,49762480911527, -0,49762479085548,49762479085548,9223372036854775807,0,49762480066370,49762480099339,49762481013089,49762481085850,49762482232152,49762482478350,49762485657620,49762486116683, +0,27965466202353,27965466202353,27965449758000,27965461202353,27965467153286,27965471442505,27965471925682,27965474025318,27965474588547,27965474860786,27965475078599,27965479796151,27965480589068, +0,27965482993342,27965482993342,27965465835000,27965477993342,27965483807401,27965486875630,27965487288443,27965489520682,27965490184380,27965490568703,27965491408078,27965496119641,27965496619641, +0,27965499784331,27965499784331,27965481404000,27965494784331,27965500785318,27965503736099,27965504201151,27965506776568,27965507298443,27965507515005,27965508405474,27965513495318,27965514061984, +0,27965516575320,27965516575320,27965497155000,27965511575320,27965517697349,27965521276151,27965521734797,27965524350474,27965524884536,27965525160578,27965526020891,27965531371203,27965532114484, </pre> <p> @@ -283,6 +283,22 @@ Number Slow draw: 23342 </ul> </li> + <li>SYNC_QUEUED + <ul> + <li>The time at which a sync request was sent to the RenderThread. + </li> + + <li>This marks the point at which a message to start the sync + phase was sent to the RenderThread. If the time between this and + SYNC_START is substantial (>0.1ms or so), it means that + the RenderThread was busy working on a different frame. Internally + this is used to differentiate between the frame doing too much work + and exceeding the 16ms budget and the frame being stalled due to + the previous frame exceeding the 16ms budget. + </li> + </ul> + </li> + <li>SYNC_START <ul> <li>The time at which the sync phase of the drawing started. diff --git a/docs/html/sdk/index.jd b/docs/html/sdk/index.jd index 93e9fad..7b1169f 100644 --- a/docs/html/sdk/index.jd +++ b/docs/html/sdk/index.jd @@ -287,7 +287,6 @@ width: 400px;text-align: center;">The official Android IDE</p> <li>Android 5.0 emulator system image with Google APIs</li> </ul> - <a class="online landing-button green download-bundle-button" href="#Other" >Download Android Studio</a> diff --git a/docs/html/sdk/installing/adding-packages.jd b/docs/html/sdk/installing/adding-packages.jd index 88619bd..58a8065 100644 --- a/docs/html/sdk/installing/adding-packages.jd +++ b/docs/html/sdk/installing/adding-packages.jd @@ -64,10 +64,10 @@ So before you can start, there are a few packages you should add to your Android <p>To start adding packages, launch the Android SDK Manager in one of the following ways:</p> <ul> - <li>In Android Studio, click <strong>SDK Manager</strong> + <li>In Eclipse or Android Studio, click <strong>SDK Manager</strong> <img src="{@docRoot}images/tools/sdk-manager-studio.png" style="vertical-align:bottom;margin:0;height:17px" /> in the toolbar.</li> - <li>If you're not using Android Studio: + <li>If you're not using Eclipse or Android Studio: <ul> <li>Windows: Double-click the <code>SDK Manager.exe</code> file at the root of the Android SDK directory.</li> @@ -77,7 +77,7 @@ style="vertical-align:bottom;margin:0;height:17px" /> in the toolbar.</li> </li> </ul> -<p>When you open the SDK Manager for the first time, several packages are selected by +<p>When you open the SDK Manager for the first time, several packages will be selected by default. Leave these selected, but be sure you have everything you need to get started by following these steps:</p> diff --git a/docs/html/sdk/installing/index.jd b/docs/html/sdk/installing/index.jd index dc258db..45d1890 100644 --- a/docs/html/sdk/installing/index.jd +++ b/docs/html/sdk/installing/index.jd @@ -87,7 +87,7 @@ where they are installed. For example:</p> <p><b>To set up Android Studio on Mac OSX:</b></p> <ol> - <li>Launch the {@code .dmg} file you just downloaded.</li> + <li>Unzip the downloaded zip file, {@code android-studio-ide-<version>-mac.zip}.</li> <li>Drag and drop Android Studio into the Applications folder. <li>Open Android Studio and follow the setup wizard to install any necessary SDK tools. <p> @@ -97,11 +97,13 @@ where they are installed. For example:</p> <strong>Allow applications downloaded from</strong>, select <strong>Anywhere</strong>. Then open Android Studio again.</p> </li> + <li>Follow the links to install the SDK outside of the Android Studio directories.</li> </ol> -<p>If you need use the Android SDK tools from a command line, -you can access them at:</p> -<p><code>/Users/<user>/Library/Android/sdk/</code></p> +<p>The individual tools and other SDK packages are saved outside the Android Studio application +directory. If you need access the tools directly, use a terminal to navigate into the location +where they are installed. For example:</p> +<p><code>/Applications/sdk/</code></p> </div><!-- end mac --> @@ -112,7 +114,7 @@ you can access them at:</p> <p><b>To set up Android Studio on Linux:</b></p> <ol> - <li>Unpack the downloaded ZIP file into an + <li>Unpack the downloaded Tar file, {@code android-studio-ide-<version>-linux.zip}, into an appropriate location for your applications. <li>To launch Android Studio, navigate to the {@code android-studio/bin/} directory in a terminal and execute {@code studio.sh}. diff --git a/docs/html/tools/building/buidling-cmdline-ant.jd b/docs/html/tools/building/buidling-cmdline-ant.jd new file mode 100644 index 0000000..51158de --- /dev/null +++ b/docs/html/tools/building/buidling-cmdline-ant.jd @@ -0,0 +1,381 @@ +page.title=Building and Running from the Command Line +parent.title=Building and Running +parent.link=index.html +@jd:body + + <div id="qv-wrapper"> + <div id="qv"> + <h2>In this document</h2> + <ol> + <li><a href="#DebugMode">Building in Debug Mode</a></li> + <li><a href="#ReleaseMode">Building in Release Mode</a> + <ol> + <li><a href="#ManualReleaseMode">Build unsigned</a></li> + <li><a href="#AutoReleaseMode">Build signed and aligned</a></li> + <li><a href="#OnceBuilt">Once built and signed in release mode</a></li> + </ol> + </li> + <li><a href="#RunningOnEmulator">Running on the Emulator</a></li> + <li><a href="#RunningOnDevice">Running on a Device</a></li> + <li><a href="#Signing">Application Signing</a></li> + <li><a href="#AntReference">Ant Command Reference</a></li> + </ol> + <h2>See also</h2> + <ol> + <li><a href="{@docRoot}tools/devices/managing-avds-cmdline.html">Managing AVDs from +the Command Line</a></li> + <li><a href="{@docRoot}tools/devices/emulator.html">Using the Android +Emulator</a></li> + <li><a href="{@docRoot}tools/publishing/app-signing.html">Signing Your Applications</a></li> + </ol> + </div> + </div> + + <p>There are two ways to build your application using the Ant build script: one for + testing/debugging your application — <em>debug mode</em> — and one for building your + final package for release — <em>release mode</em>. Regardless of which way you build your application, + it must be signed before it can install on an emulator or device—with a debug key when building + in debug mode and with your own private key when building in release mode.</p> + + <p>Whether you're building in debug mode or release mode, you need to use the Ant tool to compile + and build your project. This will create the .apk file that you can install on an emulator or device. + When you build in debug mode, the .apk file is automatically signed by the SDK tools with + a debug key, so it's instantly ready for installation onto an emulator or attached + development device. You cannot distribute an application that is signed with a debug key. + When you build in release mode, the .apk file is <em>unsigned</em>, so you + must manually sign it with your own private key, using Keytool and Jarsigner.</p> + + <p>It's important that you read and understand <a href= + "{@docRoot}tools/publishing/app-signing.html">Signing Your Applications</a>, particularly once + you're ready to release your application and share it with end-users. That document describes the + procedure for generating a private key and then using it to sign your .apk file. If you're just + getting started, however, you can quickly run your applications on an emulator or your own + development device by building in debug mode.</p> + + <p>If you don't have Ant, you can obtain it from the <a href="http://ant.apache.org/">Apache Ant + home page</a>. Install it and make sure it is in your executable PATH. Before calling Ant, you + need to declare the JAVA_HOME environment variable to specify the path to where the JDK is + installed.</p> + + <p class="note"><strong>Note:</strong> When installing JDK on Windows, the default is to install + in the "Program Files" directory. This location will cause <code>ant</code> to fail, because of + the space. To fix the problem, you can specify the JAVA_HOME variable like this: + <pre>set JAVA_HOME=c:\Progra~1\Java\<jdkdir></pre> + + <p>The easiest solution, however, is to install JDK in a non-space directory, for example:</p> + + <pre>c:\java\jdk1.7</pre> + + <h2 id="DebugMode">Building in Debug Mode</h2> + + <p>For immediate application testing and debugging, you can build your application in debug mode + and immediately install it on an emulator. In debug mode, the build tools automatically sign your + application with a debug key and optimize the package with {@code zipalign}.</p> + + <p>To build in debug mode:</p> + + <ol> + <li>Open a command-line and navigate to the root of your project directory.</li> + <li>Use Ant to compile your project in debug mode: + <pre> +ant debug +</pre> + + <p>This creates your debug <code>.apk</code> file inside the project <code>bin/</code> directory, named + <code><your_project_name>-debug.apk</code>. The file is already signed with + the debug key and has been aligned with + <a href="{@docRoot}tools/help/zipalign.html"><code>zipalign</code></a>. + </p> + </li> + </ol> + + <p>Each time you change a source file or resource, you must run Ant again in order to package up + the latest version of the application.</p> + + <p>To install and run your application on an emulator, see the following section about <a href= + "#RunningOnEmulator">Running on the Emulator</a>.</p> + + <h2 id="ReleaseMode">Building in Release Mode</h2> + + <p>When you're ready to release and distribute your application to end-users, you must build your + application in release mode. Once you have built in release mode, it's a good idea to perform + additional testing and debugging with the final .apk.</p> + + <p>Before you start building your application in release mode, be aware that you must sign the + resulting application package with your private key, and should then align it using the {@code + zipalign} tool. There are two approaches to building in release mode: build an unsigned package + in release mode and then manually sign and align the package, or allow the build script to sign + and align the package for you.</p> + + <h3 id="ManualReleaseMode">Build unsigned</h3> + + <p>If you build your application <em>unsigned</em>, then you will need to manually sign and align + the package.</p> + + <p>To build an <em>unsigned</em> .apk in release mode:</p> + + <ol> + <li>Open a command-line and navigate to the root of your project directory.</li> + + <li>Use Ant to compile your project in release mode: + <pre> +ant release +</pre> + </li> + </ol> + + <p>This creates your Android application .apk file inside the project <code>bin/</code> + directory, named <code><em><your_project_name></em>-unsigned.apk</code>.</p> + + <p class="note"><strong>Note:</strong> The .apk file is <em>unsigned</em> at this point and can't + be installed until signed with your private key.</p> + + <p>Once you have created the unsigned .apk, your next step is to sign the .apk with your private + key and then align it with {@code zipalign}. To complete this procedure, read <a href= + "{@docRoot}tools/publishing/app-signing.html">Signing Your Applications</a>.</p> + + <p>When your <code>.apk</code> has been signed and aligned, it's ready to be distributed to end-users. + You should test the final build on different devices or AVDs to ensure that it + runs properly on different platforms.</p> + + <h3 id="AutoReleaseMode">Build signed and aligned</h3> + + <p>If you would like, you can configure the Android build script to automatically sign and align + your application package. To do so, you must provide the path to your keystore and the name of + your key alias in your project's {@code ant.properties} file. With this information provided, + the build script will prompt you for your keystore and alias password when you build in release + mode and produce your final application package, which will be ready for distribution.</p> + + <p class="caution"><strong>Caution:</strong> Due to the way Ant handles input, the password that + you enter during the build process <strong>will be visible</strong>. If you are concerned about + your keystore and alias password being visible on screen, then you may prefer to perform the + application signing manually, via Jarsigner (or a similar tool). To instead perform the signing + procedure manually, <a href="#ManualReleaseMode">build unsigned</a> and then continue with + <a href="{@docRoot}tools/publishing/app-signing.html">Signing Your Applications</a>.</p> + + <p>To specify your keystore and alias, open the project {@code ant.properties} file (found in + the root of the project directory) and add entries for {@code key.store} and {@code key.alias}. + For example:</p> + <pre> +key.store=path/to/my.keystore +key.alias=mykeystore +</pre> + + <p>Save your changes. Now you can build a <em>signed</em> .apk in release mode:</p> + + <ol> + <li>Open a command-line and navigate to the root of your project directory.</li> + + <li>Use Ant to compile your project in release mode: + <pre> +ant release +</pre> + </li> + + <li>When prompted, enter you keystore and alias passwords. + + <p class="caution"><strong>Caution:</strong> As described above, your password will be + visible on the screen.</p> + </li> + </ol> + + <p>This creates your Android application .apk file inside the project <code>bin/</code> + directory, named <code><em><your_project_name></em>-release.apk</code>. This .apk file has + been signed with the private key specified in {@code ant.properties} and aligned with {@code + zipalign}. It's ready for installation and distribution.</p> + + <h3 id="OnceBuilt">Once built and signed in release mode</h3> + + <p>Once you have signed your application with a private key, you can install and run it on an + <a href="#RunningOnEmulator">emulator</a> or <a href="#RunningOnDevice">device</a>. You can + also try installing it onto a device from a web server. Simply upload the signed .apk to a web + site, then load the .apk URL in your Android web browser to download the application and begin + installation. (On your device, be sure you have enabled + <em>Settings > Applications > Unknown sources</em>.)</p> + + <h2 id="RunningOnEmulator">Running on the Emulator</h2> + + <p>Before you can run your application on the Android Emulator, you must <a href= + "{@docRoot}tools/devices/managing-avds.html">create an AVD</a>.</p> + + <p>To run your application:</p> + + <ol> + <li> + <strong>Open the AVD Manager and launch a virtual device</strong> + + <p>From your SDK's <code>platform-tools/</code> directory, execute the {@code android} tool +with the <code>avd</code> options:</p> + <pre> +android avd +</pre> + + <p>In the <em>Virtual Devices</em> view, select an AVD and click <strong>Start</strong>.</p> + </li> + + <li> + <strong>Install your application</strong> + + <p>From your SDK's <code>tools/</code> directory, install the {@code .apk} on the + emulator:</p> + <pre> +adb install <em><path_to_your_bin></em>.apk +</pre> + + <p>Your .apk file (signed with either a release or debug key) is in your project {@code bin/} + directory after you build your application.</p> + + <p>If there is more than one emulator running, you must specify the emulator upon which to + install the application, by its serial number, with the <code>-s</code> option. For + example:</p> + <pre> +adb -s emulator-5554 install <em>path/to/your/app</em>.apk +</pre> + + <p>To see a list of available device serial numbers, execute {@code adb devices}.</p> + </li> + </ol> + + <p>If you don't see your application on the emulator, try closing the emulator and launching the + virtual device again from the AVD Manager. Sometimes when you install an application for the + first time, it won't show up in the application launcher or be accessible by other applications. + This is because the package manager usually examines manifests completely only on emulator + startup.</p> + + <p>Be certain to create multiple AVDs upon which to test your application. You should have one + AVD for each platform and screen type with which your application is compatible. For instance, if + your application compiles against the Android 4.0 (API Level 14) platform, you should create an + AVD for each platform equal to and greater than 4.0 and an AVD for each <a href= + "{@docRoot}guide/practices/screens_support.html">screen type</a> you support, then test your + application on each one.</p> + + <p class="note"><strong>Tip:</strong> If you have <em>only one</em> emulator running, you can + build your application and install it on the emulator in one simple step. Navigate to the root of + your project directory and use Ant to compile the project with <em>install mode</em>: <code>ant + install</code>. This will build your application, sign it with the debug key, and install it on + the currently running emulator.</p> + + <h2 id="RunningOnDevice">Running on a Device</h2> + + <p>Before you can run your application on a device, you must perform some basic setup for your + device:</p> + + <ul> + <li>Enable <strong>USB debugging</strong> on your device. + <ul> + <li>On most devices running Android 3.2 or older, you can find the option under + <strong>Settings > Applications > Development</strong>.</li> + <li>On Android 4.0 and newer, it's in <strong>Settings > Developer options</strong>. + <p class="note"><strong>Note:</strong> On Android 4.2 and newer, <strong>Developer + options</strong> is hidden by default. To make it available, go + to <strong>Settings > About phone</strong> and tap <strong>Build number</strong> + seven times. Return to the previous screen to find <strong>Developer options</strong>.</p> + </li> + </ul> + </li> + + <li>Ensure that your development computer can detect your device when connected via USB</li> + </ul> + + <p>Read <a href="{@docRoot}tools/device.html#setting-up">Setting up a Device for + Development</a> for more information.</p> + + <p>Once your device is set up and connected via USB, navigate to your SDK's <code>platform-tools/</code> + directory and install the <code>.apk</code> on the device:</p> + <pre> +adb -d install <em>path/to/your/app</em>.apk +</pre> + + <p>The {@code -d} flag specifies that you want to use the attached device (in case you also have + an emulator running).</p> + + <p>For more information on the tools used above, please see the following documents:</p> + + <ul> + <li><a href="{@docRoot}tools/help/android.html">android Tool</a></li> + + <li><a href="{@docRoot}tools/devices/emulator.html">Android Emulator</a></li> + + <li><a href="{@docRoot}tools/help/adb.html">Android Debug Bridge</a> (ADB)</li> + </ul> + + <h2 id="Signing">Application Signing</h2> + + <p>As you begin developing Android applications, understand that all Android applications must be + digitally signed before the system will install them on an emulator or device. There are two ways + to do this: with a <em>debug key</em> (for immediate testing on an emulator or development + device) or with a <em>private key</em> (for application distribution).</p> + + <p>The Android build tools help you get started by automatically signing your .apk files with a + debug key at build time. This means that you can compile your application and install it on the + emulator without having to generate your own private key. However, please note that if you intend + to publish your application, you <strong>must</strong> sign the application with your own private + key, rather than the debug key generated by the SDK tools.</p> + + <p>The ADT plugin helps you get started quickly by signing your .apk files with a debug key, + prior to installing them on an emulator or development device. This means that you can quickly + run your application from Eclipse without having to generate your own private key. No specific + action on your part is needed, provided ADT has access to Keytool. However, please note that if + you intend to publish your application, you <strong>must</strong> sign the application with your + own private key, rather than the debug key generated by the SDK tools.</p> + + <p>Please read <a href="{@docRoot}tools/publishing/app-signing.html">Signing Your + Applications</a>, which provides a thorough guide to application signing on Android and what it + means to you as an Android application developer. The document also includes a guide to exporting + and signing your application with the ADT's Export Wizard.</p> + + <h2 id="AntReference">Ant Command Reference</h2> + <dt><code>ant clean</code></dt> + <dd>Cleans the project. If you include the <code>all</code> target before <code>clean</code> +(<code>ant all clean</code>), other projects are also cleaned. For instance if you clean a +test project, the tested project is also cleaned.</dd> + + <dt><code>ant debug</code></dt> + <dd>Builds a debug package. Works on application, library, and test projects and compiles + dependencies as needed.</dd> + + <dt id="emma"><code>ant emma debug</code></dt> + <dd>Builds a test project while building the tested project with instrumentation turned on. + This is used to run tests with code coverage enabled.</dd> + + <dt><code>ant release</code></dt> + <dd>Builds a release package.</dd> + + <dt><code>ant instrument</code> + </dt> + <dd>Builds an instrumented debug package. This is generally called automatically when building a + test project with code coverage enabled (with the <code>emma</code> + target)</dd> + + <dt><code>ant <build_target> install</code></dt> + <dd>Builds and installs a package. Using <code>install</code> by itself fails.</dd> + + <dt><code>ant installd</code></dt> + <dd>Installs an already compiled debug package. This fails if the <code>.apk</code> is not + already built.</dd> + + <dt><code>ant installr</code></dt> + <dd>Installs an already compiled release package. This fails if the <code>.apk</code> is not + already built.</dd> + + <dt><code>ant installt</code></dt> + <dd>Installs an already compiled test package. Also installs the <code>.apk</code> of the + tested application. This fails if the <code>.apk</code> is not already built.</dd> + + <dt><code>ant installi</code></dt> + <dd>Installs an already compiled instrumented package. This is generally not used manually as + it's called when installing a test package. This fails if the <code>.apk</code> is not already + built.</dd> + + <dt><code>ant test</code></dt> + <dd>Runs the tests (for test projects). The tested and test <code>.apk</code> files must be + previously installed.</dd> + + <dt><code>ant debug installt test</code></dt> + <dd>Builds a test project and the tested project, installs both <code>.apk</code> files, and + runs the tests.</dd> + + <dt><code>ant emma debug install test</code></dt> + <dd>Builds a test project and the tested project, installs both <code>.apk</code> files, and + runs the tests with code coverage enabled.</dd> + diff --git a/docs/html/tools/building/building-eclipse.jd b/docs/html/tools/building/building-eclipse.jd index 89c3e16..79ef3de 100644 --- a/docs/html/tools/building/building-eclipse.jd +++ b/docs/html/tools/building/building-eclipse.jd @@ -34,12 +34,12 @@ parent.link=index.html <p>This document shows you how to run your application on an emulator or a real device from Eclipse—all of which is done using the debug version of your application. For more information about how to sign your application with a private key for release, see <a href= - "{@docRoot}tools/publishing/app-signing.html#ExportWizard">Signing Your Applications</a></p> + "{@docRoot}tools/workflow/publishing/app-signing.html#ExportWizard">Signing Your Applications</a></p> <h2 id="RunningOnEmulatorEclipse">Running on the emulator</h2> <p>Before you can run your application on the Android Emulator, you must <a href= - "{@docRoot}tools/devices/managing-avds.html">create an AVD</a>.</p> + "{@docRoot}tools/workflow/devices/managing-avds.html">create an AVD</a>.</p> <p>To run (or debug) your application, select <strong>Run</strong> > <strong>Run</strong> (or <strong>Run</strong> > <strong>Debug</strong>) from the Eclipse menu bar. The ADT plugin will @@ -100,7 +100,7 @@ parent.link=index.html <li>Ensure that your development computer can detect your device when connected via USB</li> </ul> - <p>Read <a href="{@docRoot}tools/device.html">Using Hardware Devices</a> + <p>Read <a href="{@docRoot}tools/workflow/devices/device.html">Using Hardware Devices</a> for more information.</p> <p>Once set up and your device is connected via USB, install your application on the device by diff --git a/docs/html/tools/debugging/ddms.jd b/docs/html/tools/debugging/ddms.jd index 5822e27..28ad11e 100644 --- a/docs/html/tools/debugging/ddms.jd +++ b/docs/html/tools/debugging/ddms.jd @@ -250,10 +250,8 @@ TrafficStats.tagSocket(outputSocket); // Transfer data using socket TrafficStats.untagSocket(outputSocket);</pre> -<p>Alternatively, the Apache {@link org.apache.http.client.HttpClient} and -{@link java.net.URLConnection} APIs included in the platform -automatically tag sockets internally based on the active tag (as -identified by +<p>Alternatively, the {@link java.net.URLConnection} APIs included in the platform +automatically tag sockets internally based on the active tag (as identified by {@link android.net.TrafficStats#getThreadStatsTag getThreadStatsTag()}). These APIs correctly tag/untag sockets when recycled through keep-alive pools. In the following example, @@ -262,15 +260,14 @@ sets the active tag to be {@code 0xF00D}. There can only be one active tag per thread. That is the value that will be returned by {@link android.net.TrafficStats#getThreadStatsTag getThreadStatsTag()} -and thus used by {@link org.apache.http.client.HttpClient} - to tag sockets. The {@code finally} statement +and thus used by the HTTP client to tag sockets. The {@code finally} statement invokes {@link android.net.TrafficStats#clearThreadStatsTag clearThreadStatsTag()} to clear the tag.</p> <pre>TrafficStats.setThreadStatsTag(0xF00D); try { - // Make network request using HttpClient.execute() + // Make network request using your http client. } finally { TrafficStats.clearThreadStatsTag(); }</pre> diff --git a/docs/html/training/articles/keystore.jd b/docs/html/training/articles/keystore.jd index bbbda67..52cb13e 100644 --- a/docs/html/training/articles/keystore.jd +++ b/docs/html/training/articles/keystore.jd @@ -5,6 +5,7 @@ page.title=Android Keystore System <div id="qv"> <h2>In this document</h2> <ol> + <li><a href="#SecurityFeatures">Security Features</a></li> <li><a href="#WhichShouldIUse">Choosing Between a Keychain or the Android Keystore Provider</a></li> <li><a href="#UsingAndroidKeyStore">Using Android Keystore Provider </a></li> @@ -26,11 +27,13 @@ page.title=Android Keystore System </div> </div> -<p>The Android Keystore system lets you store private keys - in a container to make it more difficult to extract from the - device. Once keys are in the keystore, they can be used for - cryptographic operations with the private key material remaining - non-exportable.</p> +<p>The Android Keystore system lets you store cryptographic keys in a container + to make it more difficult to extract from the device. Once keys are in the + keystore, they can be used for cryptographic operations with the key material + remaining non-exportable. Moreover, it offers facilities to restrict when and + how keys can be used, such as requiring user authentication for key use or + restricting keys to be used only in certain cryptographic modes. See + <a href="#SecurityFeatures">Security Features</a> section for more information.</p> <p>The Keystore system is used by the {@link android.security.KeyChain} API as well as the Android @@ -38,6 +41,70 @@ page.title=Android Keystore System (API level 18). This document goes over when and how to use the Android Keystore provider.</p> + +<h2 id="SecurityFeatures">Security Features</h2> + +Android Keystore system protects key material from unauthorized use. Firstly, Android Keystore +mitigates unauthorized use of key material outside of the Android device by preventing extraction of +the key material from application processes and from the Android device as a whole. Secondly, +Android KeyStore mitigates unauthorized use of key material on the Android device by making apps +specify authorized uses of their keys and then enforcing these restrictions outside of the apps' +processes. + +<h3 id="ExtractionPrevention">Extraction Prevention</h3> + +Key material of Android Keystore keys is protected from extraction using two security measures: +<ul> +<li>Key material never enters the application process. When an application performs cryptographic + operations using an Android Keystore key, behind the scenes plaintext, ciphertext, and messages to + be signed or verified are fed to a system process which carries out the cryptographic operations. + If the app's process is compromised, the attacker may be able to use the app's keys but will not + be able to extract their key material (for example, to be used outside of the Android device). + </li> +<li>Key material may be bound to the secure hardware (e.g., Trusted Execution Environment (TEE), + Secure Element (SE)) of the Android device. When this feature is enabled for a key, its key + material is never exposed outside of secure hardware. If the Android OS is compromised or an + attacker can read the device's internal storage, the attacker may be able to use any app's Android + Keystore keys on the Android device, but not extract them from the device. This feature is enabled + only if the device's secure hardware supports the particular combination of key algorithm, block + modes, padding schemes, and digests with which the key is authorized to be used. To check whether + the feature is enabled for a key, obtain a {@link android.security.keystore.KeyInfo} for the key + and inspect the return value of + {@link android.security.keystore.KeyInfo#isInsideSecureHardware() KeyInfo.isInsideSecurityHardware()}. + </li> +</ul> + +<h3 id="KeyUseAuthorizations">Key Use Authorizations</h3> + +To mitigate unauthorized use of keys on the Android device, Android Keystore lets apps specify +authorized uses of their keys when generating or importing the keys. Once a key is generated or +imported, its authorizations can not be changed. Authorizations are then enforced by the Android +Keystore whenever the key is used. This is an advanced security feature which is generally useful +only if your requirements are that a compromise of your application process after key +generation/import (but not before or during) cannot lead to unauthorized uses of the key. + +<p>Supported key use authorizations fall into the following categories: +<ul> +<li><em>cryptography</em>: authorized key algorithm, operations or purposes (encrypt, decrypt, sign, + verify), padding schemes, block modes, digests with which the key can be used;</li> +<li><em>temporal validity interval</em>: interval of time during which the key is authorized for + use;</li> +<li><em>user authentication</em>: the key can only be used if the user has been authenticated + recently enough. See <a href="#UserAuthentication">Requiring User Authentication For Key Use</a>. + </li> +</ul> + +<p>As an additional security measure, for keys whose key material is inside secure hardware (see + {@link android.security.keystore.KeyInfo#isInsideSecureHardware() KeyInfo.isInsideSecurityHardware()}) + some key use authorizations may be enforced by secure hardware, depending on the Android device. + Cryptographic and user authentication authorizations are likely to be enforced by secure hardware. + Temporal validity interval authorizations are unlikely to be enforced by the secure hardware + because it normally does not have an independent secure real-time clock. + +<p>Whether a key's user authentication authorization is enforced by the secure hardware can be + queried using + {@link android.security.keystore.KeyInfo#isUserAuthenticationRequirementEnforcedBySecureHardware() KeyInfo.isUserAuthenticationRequirementEnforcedBySecureHardware()}. + <h2 id="WhichShouldIUse">Choosing Between a Keychain or the Android Keystore Provider</h2> @@ -59,7 +126,8 @@ Android Keystore Provider</h2> <p> To use this feature, you use the standard {@link java.security.KeyStore} -and {@link java.security.KeyPairGenerator} classes along with the +and {@link java.security.KeyPairGenerator} or +{@link javax.crypto.KeyGenerator} classes along with the {@code AndroidKeyStore} provider introduced in Android 4.3 (API level 18).</p> <p>{@code AndroidKeyStore} is registered as a {@link @@ -67,7 +135,9 @@ and {@link java.security.KeyPairGenerator} classes along with the java.security.KeyStore#getInstance(String) KeyStore.getInstance(type)} method and as a provider for use with the {@link java.security.KeyPairGenerator#getInstance(String, String) - KeyPairGenerator.getInstance(algorithm, provider)} method.</p> + KeyPairGenerator.getInstance(algorithm, provider)} and {@link + javax.crypto.KeyGenerator#getInstance(String, String) + KeyGenerator.getInstance(algorithm, provider)} methods.</p> <h3 id="GeneratingANewPrivateKey">Generating a New Private Key</h3> @@ -81,6 +151,11 @@ and {@link java.security.KeyPairGenerator} classes along with the {@sample development/samples/ApiDemos/src/com/example/android/apis/security/KeyStoreUsage.java generate} +<h3 id="GeneratingANewSecretKey">Generating a New Secret Key</h3> + +<p>To generate the key, use a {@link javax.crypto.KeyGenerator} with + {@link android.security.keystore.KeyGenParameterSpec}. + <h3 id="WorkingWithKeyStoreEntries">Working with Keystore Entries</h3> <p>Using the {@code AndroidKeyStore} provider takes place through @@ -105,3 +180,37 @@ and {@link java.security.KeyPairGenerator} classes along with the <p>Similarly, verify data with the {@link java.security.Signature#verify(byte[])} method:</p> {@sample development/samples/ApiDemos/src/com/example/android/apis/security/KeyStoreUsage.java verify} + +<h3 id="UserAuthentication">Requiring User Authentication For Key Use</h3> + +<p>When generating or importing a key into the {@code AndroidKeyStore} you can specify that the key +is only authorized to be used if the user has been authenticated. The user is authenticated using a +subset of their secure lock screen credentials (pattern/PIN/password, fingerprint). + +<p>This is an advanced security feature which is generally useful only if your requirements are that +a compromise of your application process after key generation/import (but not before or during) +cannot bypass the requirement for the user to be authenticated to use the key. + +<p>When a key is authorized to be used only if the user has been authenticated, it is configured to +operate in one of the two modes: +<ul> +<li>User authentication authorizes the use of keys for a duration of time. All keys in this mode are + authorized for use as soon as the user unlocks the secure lock screen or confirms their secure + lock screen credential using the + {@link android.app.KeyguardManager#createConfirmDeviceCredentialIntent(CharSequence, CharSequence) KeyguardManager.createConfirmDeviceCredentialIntent} + flow. The duration for which the authorization remains valid is specific to each key, as specified + using {@code setUserAuthenticationValidityDurationSeconds} during key generation or import. Such + keys can only be generated or imported if the secure lock screen is enabled (see + {@link android.app.KeyguardManager#isDeviceSecure() KeyguardManager.isDeviceSecure()}). These keys + become permanently invalidated once the secure lock screen is disabled (reconfigured to None, + Swipe or other mode which does not authenticate the user) or forcibly reset (e.g. by a Device + Administrator).</li> +<li>User authentication authorizes a specific cryptographic operation associated with one key. In + this mode, each operation involving such a key must be individually authorized by the user. + Currently, the only means of such authorization is fingerprint authentication: + {@link android.hardware.fingerprint.FingerprintManager#authenticate(CryptoObject, CancellationSignal, int, AuthenticationCallback, Handler) FingerprintManager.authenticate}. + Such keys can only be generated or imported if at least one fingerprint is enrolled (see + {@link android.hardware.fingerprint.FingerprintManager#hasEnrolledFingerprints() FingerprintManager.hasEnrolledFingerprints}). + These keys become permanently invalidated once a new fingerprint is enrolled or all fingerprints + are unenrolled.</li> +</ul>
\ No newline at end of file diff --git a/docs/html/training/articles/security-gms-provider.jd b/docs/html/training/articles/security-gms-provider.jd index 0d3cf1e..59983cc 100644 --- a/docs/html/training/articles/security-gms-provider.jd +++ b/docs/html/training/articles/security-gms-provider.jd @@ -52,8 +52,7 @@ android.net.SSLCertificateSocketFactory android.net.SSLCertificateSocketFactory}. Rather than using this class, we encourage app developers to use high-level methods for interacting with cryptography. Most apps can use APIs like {@link -javax.net.ssl.HttpsURLConnection}, {@link org.apache.http.client.HttpClient}, -and {@link android.net.http.AndroidHttpClient} without needing to set a custom +javax.net.ssl.HttpsURLConnection} without needing to set a custom {@link javax.net.ssl.TrustManager} or create an {@link android.net.SSLCertificateSocketFactory}.</p> diff --git a/docs/html/training/basics/firstapp/creating-project.jd b/docs/html/training/basics/firstapp/creating-project.jd index 4bd92ee..79268a0 100644 --- a/docs/html/training/basics/firstapp/creating-project.jd +++ b/docs/html/training/basics/firstapp/creating-project.jd @@ -24,6 +24,8 @@ next.link=running-app.html <h2>You should also read</h2> <ul> + <li><a href="{@docRoot}sdk/installing/index.html">Installing the +SDK</a></li> <li><a href="{@docRoot}tools/projects/index.html">Managing Projects</a></li> </ul> @@ -32,7 +34,8 @@ next.link=running-app.html </div> <p>An Android project contains all the files that comprise the source code for your Android -app.</p> +app. The Android SDK tools make it easy to start a new Android project with a set of +default project directories and files.</p> <p>This lesson shows how to create a new project either using Android Studio or using the diff --git a/docs/html/training/basics/firstapp/index.jd b/docs/html/training/basics/firstapp/index.jd index 4e3689a..1b6e00f 100644 --- a/docs/html/training/basics/firstapp/index.jd +++ b/docs/html/training/basics/firstapp/index.jd @@ -12,7 +12,7 @@ helpoutsWidget=true <div id="tb-wrapper"> <div id="tb"> -<h2>Dependencies</h2> +<h2>Dependencies and prerequisites</h2> <ul> <li><a href="{@docRoot}sdk/index.html">Android Studio</a></li> @@ -37,11 +37,14 @@ to:</p> <a href="{@docRoot}tools/help/sdk-manager.html">SDK Manager</a>.</li> </ol> -<p class="note"><strong>Note:</strong> Although most of this training class -expects that you're using Android Studio, some procedures include alternative -instructions for using -the SDK tools from the command line instead.</p> +<p class="note"><strong>Note:</strong> Make sure you install the most recent versions of Android +Studio and the Android SDK before you start this class. The procedures described in this class may +not apply to earlier versions.</p> -<p>This class uses a tutorial format to create a small Android app that teaches +<p>If you haven't already done these tasks, start by downloading the + <a href="{@docRoot}sdk/index.html">Android SDK</a> and following the install steps. + Once you've finished the setup, you're ready to begin this class.</p> + +<p>This class uses a tutorial format that incrementally builds a small Android app that teaches you some fundamental concepts about Android development, so it's important that you follow each step.</p> diff --git a/docs/html/training/basics/firstapp/running-app.jd b/docs/html/training/basics/firstapp/running-app.jd index 6e4605f..fdf0d1f 100644 --- a/docs/html/training/basics/firstapp/running-app.jd +++ b/docs/html/training/basics/firstapp/running-app.jd @@ -25,7 +25,7 @@ helpoutsWidget=true <ul> <li><a href="{@docRoot}tools/device.html">Using Hardware Devices</a></li> - <li><a href="{@docRoot}tools/devices/managing-avds.html">Managing AVDs with AVD Manager</a></li> + <li><a href="{@docRoot}tools/devices/index.html">Managing Virtual Devices</a></li> <li><a href="{@docRoot}tools/projects/index.html">Managing Projects</a></li> </ul> @@ -128,6 +128,10 @@ to first create an <a href="{@docRoot}tools/devices/index.html">Android Virtual AVD is a device configuration for the Android emulator that allows you to model a specific device.</p> +<div class="figure" style="width:457px"> + <img src="{@docRoot}images/screens_support/as-mac-avds-config.png" /> + <p class="img-caption"><strong>Figure 1.</strong> The AVD Manager showing a virtual device.</p> +</div> <h3>Create an AVD</h3> <ol> @@ -157,11 +161,19 @@ device.</p> </li> <li>Verify the configuration settings, then click <strong>Finish</strong>. </li> + <li>In the <strong>Android Virtual Device Manager</strong> window, click <strong>Create</strong>.</li> + <li>Enter an <strong>AVD Name</strong>.</li> + <li>Select a <strong>Device</strong> type. + <p>When you select a device type, most of the fields auto-populate.</p> + <li>For <strong>Skin</strong> select <strong>HVGA</strong>.</li> + <li>For <strong>SD Card</strong>, enter something small, like 10 MiB. + <p>It really doesn't matter what you enter here since you're not using any storage. But if you + reuse this AVD, you might have to adjust this setting.</p></li> + <li>Ignore the <strong>Emulation Options</strong> and click <strong>OK</strong>.</li> + <li>In the <strong>Result</strong> screen, click <strong>OK</strong>.</li> + <li>Close the <strong>Android Virtual Device Manager</strong> window.</li> </ol> -<p>For more information about using AVDs, see -<a href="{@docRoot}tools/devices/managing-avds.html">Managing AVDs with AVD Manager</a>.</p> - <h3>Run the app from Android Studio</h3> <ol> <li>In <strong>Android Studio</strong>, select your project and click <strong>Run</strong> diff --git a/docs/html/training/basics/network-ops/connecting.jd b/docs/html/training/basics/network-ops/connecting.jd index 1452ded..0601480 100644 --- a/docs/html/training/basics/network-ops/connecting.jd +++ b/docs/html/training/basics/network-ops/connecting.jd @@ -50,8 +50,8 @@ application manifest must include the following permissions:</p> <h2 id="http-client">Choose an HTTP Client</h2> <p>Most network-connected Android apps use HTTP to send and receive data. -Android includes two HTTP clients: {@link java.net.HttpURLConnection} and Apache - {@link org.apache.http.client.HttpClient}. Both support HTTPS, streaming uploads and downloads, configurable +Android includes two HTTP clients: {@link java.net.HttpURLConnection} and the Apache HTTP client. +Both support HTTPS, streaming uploads and downloads, configurable timeouts, IPv6, and connection pooling. We recommend using {@link java.net.HttpURLConnection} for applications targeted at Gingerbread and higher. For more discussion of this topic, see the blog post <a diff --git a/docs/html/training/location/location-testing.jd b/docs/html/training/location/location-testing.jd index 5021fc0..8f73d51 100644 --- a/docs/html/training/location/location-testing.jd +++ b/docs/html/training/location/location-testing.jd @@ -79,7 +79,7 @@ trainingnavtop=true <h2 id="TurnOnMockMode">Turn On Mock Mode</h2> <p> To send mock locations to Location Services in mock mode, a test app must request the permission - {@link android.Manifest.permission#ACCESS_MOCK_LOCATION}. In addition, you must enable mock + android.Manifest.permission#ACCESS_MOCK_LOCATION. In addition, you must enable mock locations on the test device using the option <b>Enable mock locations</b>. To learn how to enable mock locations on the device, see <a href="{@docRoot}tools/device.html#setting-up">Setting up a Device for Development</a>. diff --git a/docs/html/training/material/animations.jd b/docs/html/training/material/animations.jd index 86e91a7..6f263db 100644 --- a/docs/html/training/material/animations.jd +++ b/docs/html/training/material/animations.jd @@ -81,8 +81,8 @@ reveal or hide a view.</p> View myView = findViewById(R.id.my_view); // get the center for the clipping circle -int cx = (myView.getLeft() + myView.getRight()) / 2; -int cy = (myView.getTop() + myView.getBottom()) / 2; +int cx = myView.getWidth() / 2; +int cy = myView.getHeight() / 2; // get the final radius for the clipping circle int finalRadius = Math.max(myView.getWidth(), myView.getHeight()); @@ -103,8 +103,8 @@ anim.start(); final View myView = findViewById(R.id.my_view); // get the center for the clipping circle -int cx = (myView.getLeft() + myView.getRight()) / 2; -int cy = (myView.getTop() + myView.getBottom()) / 2; +int cx = myView.getWidth() / 2; +int cy = myView.getHeight() / 2; // get the initial radius for the clipping circle int initialRadius = myView.getWidth(); diff --git a/docs/html/training/material/drawables.jd b/docs/html/training/material/drawables.jd index a2de8e9..c58075e 100644 --- a/docs/html/training/material/drawables.jd +++ b/docs/html/training/material/drawables.jd @@ -36,8 +36,9 @@ alpha masks. You can tint them with color resources or theme attributes that res resources (for example, <code>?android:attr/colorPrimary</code>). Usually, you create these assets only once and color them automatically to match your theme.</p> -<p>You can apply a tint to {@link android.graphics.drawable.BitmapDrawable} or {@link -android.graphics.drawable.NinePatchDrawable} objects with the {@code setTint()} method. You can +<p>You can apply a tint to {@link android.graphics.drawable.BitmapDrawable}, {@link +android.graphics.drawable.NinePatchDrawable} or {@link +android.graphics.drawable.VectorDrawable} objects with the {@code setTint()} method. You can also set the tint color and mode in your layouts with the <code>android:tint</code> and <code>android:tintMode</code> attributes.</p> diff --git a/docs/html/training/sync-adapters/creating-stub-provider.jd b/docs/html/training/sync-adapters/creating-stub-provider.jd index b8190d1..e9e18ef 100644 --- a/docs/html/training/sync-adapters/creating-stub-provider.jd +++ b/docs/html/training/sync-adapters/creating-stub-provider.jd @@ -85,11 +85,11 @@ public class StubProvider extends ContentProvider { return true; } /* - * Return an empty String for MIME type + * Return no type for MIME type */ @Override - public String getType() { - return new String(); + public String getType(Uri uri) { + return null; } /* * query() always returns no results diff --git a/docs/html/training/sync-adapters/creating-sync-adapter.jd b/docs/html/training/sync-adapters/creating-sync-adapter.jd index b13ce07..9bd17ba 100644 --- a/docs/html/training/sync-adapters/creating-sync-adapter.jd +++ b/docs/html/training/sync-adapters/creating-sync-adapter.jd @@ -583,13 +583,6 @@ public class MainActivity extends FragmentActivity { running the sync adapter, see <a href="running-sync-adapter.html" >Running A Sync Adapter</a>. </dd> - <dt> -{@link android.Manifest.permission#AUTHENTICATE_ACCOUNTS android.permission.AUTHENTICATE_ACCOUNTS} - </dt> - <dd> - Allows you to use the authenticator component you created in the lesson - <a href="creating-authenticator.html">Creating a Stub Authenticator</a>. - </dd> </dl> <p> The following snippet shows how to add the permissions: diff --git a/docs/html/training/volley/requestqueue.jd b/docs/html/training/volley/requestqueue.jd index 63c743a..6d19cee 100644 --- a/docs/html/training/volley/requestqueue.jd +++ b/docs/html/training/volley/requestqueue.jd @@ -39,14 +39,14 @@ as a singleton, which makes the {@code RequestQueue} last the lifetime of your a of the requests, and a cache to handle caching. There are standard implementations of these available in the Volley toolbox: {@code DiskBasedCache} provides a one-file-per-response cache with an in-memory index, and {@code BasicNetwork} provides a network transport based -on your choice of {@link android.net.http.AndroidHttpClient} or {@link java.net.HttpURLConnection}.</p> +on your choice of the Apache HTTP client {@code android.net.http.AndroidHttpClient} or +{@link java.net.HttpURLConnection}.</p> <p>{@code BasicNetwork} is Volley's default network implementation. A {@code BasicNetwork} must be initialized with the HTTP client your app is using to connect to the network. -Typically this is {@link android.net.http.AndroidHttpClient} or -{@link java.net.HttpURLConnection}:</p> +Typically this is a {@link java.net.HttpURLConnection}:</p> <ul> -<li>Use {@link android.net.http.AndroidHttpClient} for apps targeting Android API levels +<li>Use {@code android.net.http.AndroidHttpClient} for apps targeting Android API levels lower than API Level 9 (Gingerbread). Prior to Gingerbread, {@link java.net.HttpURLConnection} was unreliable. For more discussion of this topic, see <a href="http://android-developers.blogspot.com/2011/09/androids-http-clients.html"> |