summaryrefslogtreecommitdiffstats
path: root/docs/html
diff options
context:
space:
mode:
Diffstat (limited to 'docs/html')
-rw-r--r--docs/html/design/index.jd2
-rw-r--r--docs/html/distribute/googleplay/googleplay_toc.cs80
-rw-r--r--docs/html/google/google_toc.cs11
-rw-r--r--docs/html/preview/api-overview.jd66
-rw-r--r--docs/html/preview/behavior-changes.jd69
-rw-r--r--docs/html/preview/download.jd54
-rw-r--r--docs/html/preview/download_mp1.jd355
-rw-r--r--docs/html/preview/features/runtime-permissions.jd213
-rw-r--r--docs/html/preview/index.jd4
-rw-r--r--docs/html/preview/preview_toc.cs89
-rw-r--r--docs/html/preview/support.jd362
-rw-r--r--docs/html/preview/testing/performance.jd24
-rw-r--r--docs/html/training/material/animations.jd8
13 files changed, 1143 insertions, 194 deletions
diff --git a/docs/html/design/index.jd b/docs/html/design/index.jd
index 1ffb0a3..799a64f 100644
--- a/docs/html/design/index.jd
+++ b/docs/html/design/index.jd
@@ -17,7 +17,7 @@ footer.hide=1
<h1 class="dac-hero-title">Up and running with material design</h1>
<p class="dac-hero-description">
Android uses a new design metaphor inspired by paper and ink that provides a reassuring
- sense of tactility. Visit the <a href="http://www.google.com/design/spec/material-design/introduction">material design</a> site for more resources.
+ sense of tactility. Visit the <a href="https://www.google.com/design/spec/material-design/introduction.html">material design</a> site for more resources.
</p>
<a class="dac-hero-cta" href="https://www.google.com/design/spec/material-design/introduction.html">
<span class="dac-sprite dac-auto-chevron"></span>
diff --git a/docs/html/distribute/googleplay/googleplay_toc.cs b/docs/html/distribute/googleplay/googleplay_toc.cs
index d55271b..60da6d2 100644
--- a/docs/html/distribute/googleplay/googleplay_toc.cs
+++ b/docs/html/distribute/googleplay/googleplay_toc.cs
@@ -1,48 +1,104 @@
<ul id="nav">
<li class="nav-section">
- <div class="nav-section-header empty" style="font-weight:normal"><a href="<?cs var:toroot?>distribute/googleplay/about.html">
- <span class="en">The Google Play Opportunity</span></a>
+ <div class="nav-section-header empty" style="font-weight:normal"><a href="<?cs var:toroot?>distribute/googleplay/about.html"
+ es-lang="La oportunidad de Google Play"
+ ja-lang="Google Play の可能性"
+ ko-lang="Google Play 활용 기회"
+ pt-br-lang="A oportunidade do Google Play"
+ ru-lang="Возможности Google Play"
+ zh-cn-lang="Google Play 蕴藏的机会"
+ zh-tw-lang="Google Play商機"
+ >The Google Play Opportunity</span></a>
</div>
</li>
<li class="nav-section">
- <div class="nav-section-header empty" style="font-weight:normal"><a href="<?cs var:toroot?>distribute/googleplay/start.html">
- <span class="en">Get Started <br />with Publishing</span>
+ <div class="nav-section-header empty" style="font-weight:normal"><a href="<?cs var:toroot?>distribute/googleplay/start.html"
+ es-lang="Comienza a publicar"
+ ja-lang="アプリを公開する"
+ ko-lang="게시 시작하기"
+ pt-br-lang="Introdução à publicação"
+ ru-lang="Первые шаги в публикациях"
+ zh-cn-lang="开始发布"
+ zh-tw-lang="開始發行">
+ Get Started <br />with Publishing
</a>
</div>
</li>
<li class="nav-section">
- <div class="nav-section-header empty" style="font-weight:normal"><a href="<?cs var:toroot?>distribute/googleplay/developer-console.html">
- <span class="en">Developer Console</span>
+ <div class="nav-section-header empty" style="font-weight:normal"><a href="<?cs var:toroot?>distribute/googleplay/developer-console.html"
+ es-lang="Consola para desarrolladores"
+ ja-lang="デベロッパー コンソール"
+ ko-lang="개발자 콘솔"
+ pt-br-lang="Console do Desenvolvedor"
+ ru-lang="Консоль разработчика"
+ zh-cn-lang="开发者控制台"
+ zh-tw-lang="Developer Console">
+ Developer Console
</a>
</div>
</li>
<li class="nav-section">
- <div class="nav-section-header empty" style="font-weight:normal"><a href="<?cs var:toroot?>distribute/googleplay/guide.html">
- <span class="en">Find Success on <span style="white-space:nowrap">Google Play</span></span>
+ <div class="nav-section-header empty" style="font-weight:normal"><a href="<?cs var:toroot?>distribute/googleplay/guide.html"
+ es-lang="Cómo tener éxito en Google Play"
+ ja-lang="Google Play で成功を手にする"
+ ko-lang="Google Play에서 성공 모색"
+ pt-br-lang="Obtendo sucesso no Google Play"
+ ru-lang="Найдите свой путь к успеху в Google Play"
+ zh-cn-lang="在 Google Play 上取得成功"
+ zh-tw-lang="在 Google Play 上尋找成功">
+ Find Success on <span style="white-space:nowrap">Google Play
</a>
</div>
</li>
<li class="nav-section">
- <div class="nav-section-header empty" style="font-weight:normal"><a href="<?cs var:toroot?>distribute/googleplay/wear.html">
+ <div class="nav-section-header empty" style="font-weight:normal"><a href="<?cs var:toroot?>distribute/googleplay/wear.html"
+ es-lang="Distribución para Android Wear"
+ ja-lang="Android Wear への配布"
+ ko-lang="Android Wear에 배포"
+ pt-br-lang="Distribuindo para Android Wear"
+ ru-lang="Распространение приложений Android Wear"
+ zh-cn-lang="分发到 Android Wear"
+ zh-tw-lang="散佈至 Android Wear">
<span class="en">Distribute to <br /><span style="white-space:nowrap">Android Wear</span></span>
</a>
</div>
</li>
<li class="nav-section">
- <div class="nav-section-header empty" style="font-weight:normal"><a href="<?cs var:toroot?>distribute/googleplay/tv.html">
+ <div class="nav-section-header empty" style="font-weight:normal"><a href="<?cs var:toroot?>distribute/googleplay/tv.html"
+ es-lang="Distribución para Android TV"
+ ja-lang="Android TV への配布"
+ ko-lang="Android TV에 배포"
+ pt-br-lang="Distribuindo para Android TV"
+ ru-lang="Распространение приложений в Android TV"
+ zh-cn-lang="分发到 Android TV"
+ zh-tw-lang="散佈至 Android 電視">
<span class="en">Distribute to <br /><span style="white-space:nowrap">Android TV</span></span>
</a>
</div>
</li>
<li class="nav-section">
- <div class="nav-section-header empty" style="font-weight:normal"><a href="<?cs var:toroot?>distribute/googleplay/auto.html">
+ <div class="nav-section-header empty" style="font-weight:normal"><a href="<?cs var:toroot?>distribute/googleplay/auto.html"
+ es-lang="Distribución para Android Auto"
+ ja-lang="Android Auto への配布"
+ ko-lang="Android Auto에 배포"
+ pt-br-lang="Distribuindo para o Android Auto"
+ ru-lang="Распространение приложений для Android Auto"
+ zh-cn-lang="分发到 Android Auto"
+ zh-tw-lang="散佈至 Android Auto">
<span class="en">Distribute to <br /><span style="white-space:nowrap">Android Auto</span></span>
</a>
</div>
</li>
<li class="nav-section">
- <div class="nav-section-header empty" style="font-weight:normal"><a href="<?cs var:toroot?>distribute/googleplay/families/about.html">
+ <div class="nav-section-header empty" style="font-weight:normal"><a href="<?cs var:toroot?>distribute/googleplay/families/about.html"
+ es-lang="Diseñado para la familia"
+ ja-lang="Designed for Families"
+ ko-lang="Designed for Families"
+ pt-br-lang="Designed for Families"
+ ru-lang="Для всей семьи"
+ zh-cn-lang="为家庭设计"
+ zh-tw-lang="Designed for Families">
<span class="en">Designed for Families</span>
</a>
</div>
diff --git a/docs/html/google/google_toc.cs b/docs/html/google/google_toc.cs
index dd0e735..ffdc22d 100644
--- a/docs/html/google/google_toc.cs
+++ b/docs/html/google/google_toc.cs
@@ -47,8 +47,15 @@
</li>
<li class="nav-section">
- <div class="nav-section-header empty"><a href="<?cs var:toroot ?>google/play/filters.html">
- <span class="en">Filters on Google Play</span></a>
+ <div class="nav-section-header empty"><a href="<?cs var:toroot ?>google/play/filters.html"
+ es-lang="Filtros en Google Play"
+ ja-lang="Google Play 上のフィルタ"
+ ko-lang="Google Play 필터"
+ pt-br-lang="Filtros no Google Play"
+ ru-lang="Фильтры в Google Play"
+ zh-cn-lang="Google Play 上的筛选器"
+ zh-tw-lang="Google Play 上的篩選器">
+ Filters on Google Play</a>
</div>
</li>
diff --git a/docs/html/preview/api-overview.jd b/docs/html/preview/api-overview.jd
index 1686d79..75b3c52 100644
--- a/docs/html/preview/api-overview.jd
+++ b/docs/html/preview/api-overview.jd
@@ -86,9 +86,11 @@ web link and skip prompting users to select an app. To learn how to implement th
<a href="{@docRoot}preview/features/app-linking.html">App Linking</a>.
<h2 id="backup">Auto Backup for Apps</h2>
-<p>The system now performs automatic full data backup and restore for apps. This behavior is
-enabled by default for apps targeting M Preview; you do not need to add any additional code. If
-users delete their Google accounts, their backup data is deleted as well. To learn how this feature
+<p>The system now performs automatic full data backup and restore for apps. For the
+duration of the <a href="{@docRoot}preview/overview.html">M Developer Preview program</a>, all
+apps are backed up, independent of which SDK version they target. After the final M SDK release,
+your app must target M to enable this behavior; you do not need to add any additional code. If users
+delete their Google accounts, their backup data is deleted as well. To learn how this feature
works and how to configure what to back up on the file system, see
<a href="{@docRoot}preview/backup/index.html">Auto Backup for Apps</a>.</p>
@@ -152,10 +154,9 @@ conjunction with a public or secret key implementation for user authentication.<
<p>To set the timeout duration for which the same key can be re-used after a user is successfully
authenticated, call the new
-{@code android.security.keystore.KeyGenParameterSpec.setUserAuthenticationValidityDurationSeconds()}
+{@code android.security.keystore.KeyGenParameterSpec.Builder.setUserAuthenticationValidityDurationSeconds()}
method when you set up a {@link javax.crypto.KeyGenerator} or
-{@link java.security.KeyPairGenerator}. This feature currently works for symmetric cryptographic
-operations.</p>
+{@link java.security.KeyPairGenerator}.</p>
<p>Avoid showing the re-authentication dialog excessively -- your apps should try using the
cryptographic object first and if the the timeout expires, use the
@@ -236,7 +237,7 @@ can summon the assistant within any app, by long-pressing on the <strong>Home</s
<p>Your app can elect to not share the current context with the assistant by setting the
{@link android.view.WindowManager.LayoutParams#FLAG_SECURE} flag. In addition to the
standard set of information that the platform passes to the assistant, your app can share
-additional information by using the new {@code android.app.Activity.AssistContent} class.</p>
+additional information by using the new {@code android.app.assist.AssistContent} class.</p>
<p>To provide the assistant with additional context from your app, follow these steps:</p>
@@ -273,7 +274,7 @@ and connect a compatible Bluetooth stylus with their phone or tablet. While con
information from the touch screen is fused with pressure and button information from the stylus to
provide a greater range of expression than with the touch screen alone. Your app can listen for
stylus button presses and perform secondary actions, by registering the new
-{@code View.onStylusButtonPressListener} and {@code GestureDetector.OnStylusButtonPressListener}
+{@code View.onContextClickListener} and {@code GestureDetector.onContextClickListener}
callbacks in your activity.</p>
<p>Use the {@link android.view.MotionEvent} methods and constants to detect stylus button
@@ -284,11 +285,11 @@ interactions:</p>
{@link android.view.MotionEvent#TOOL_TYPE_STYLUS}.</li>
<li>For apps targeting M Preview, the
{@link android.view.MotionEvent#getButtonState() getButtonState()}
-method returns {@code MotionEvent.STYLUS_BUTTON_PRIMARY} when the user
+method returns {@code MotionEvent.BUTTON_STYLUS_PRIMARY} when the user
presses the primary stylus button. If the stylus has a second button, the same method returns
-{@code MotionEvent.STYLUS_BUTTON_SECONDARY} when the user presses it. If the user presses
+{@code MotionEvent.BUTTON_STYLUS_SECONDARY} when the user presses it. If the user presses
both buttons simultaneously, the method returns both values OR'ed together
-({@code STYLUS_BUTTON_PRIMARY|STYLUS_BUTTON_SECONDARY}).</li>
+({@code BUTTON_STYLUS_PRIMARY|BUTTON_STYLUS_SECONDARY}).</li>
<li>
For apps targeting a lower platform version, the
{@link android.view.MotionEvent#getButtonState() getButtonState()} method returns
@@ -314,7 +315,7 @@ provision Hotspot 2.0 credentials in your app, use the new methods of the
{@link android.net.wifi.WifiEnterpriseConfig} class, such as {@code setPlmn()} and
{@code setRealm()}. In the {@link android.net.wifi.WifiConfiguration} object, you can set the
{@link android.net.wifi.WifiConfiguration#FQDN} and the {@code providerFriendlyName} fields.
-The new {@code ScanResult.PasspointNetwork} property indicates if a detected
+The new {@code ScanResult.isPasspointNetwork()} method indicates if a detected
network represents a Hotspot 2.0 access point.
</p>
@@ -356,10 +357,10 @@ allows users to start a voice search from a game controller or remote control co
TV. The system invokes the new {@code android.app.Activity.onSearchRequested()} callback when the
user starts a search. To determine if the user's input device has a built-in microphone, retrieve
the {@link android.view.InputDevice} object from that callback, then call the new
-{@code InputDevice.hasMic()} method.</li>
- <li>New {@code android.media.AudioDevicesManager} class which lets you retrieve a list of all
-attached source and sink audio devices. You can also specify an
-{@code android.media.OnAudioDeviceConnectionListener} object if you want your app to be notified
+{@code InputDevice.hasMicrophone()} method.</li>
+ <li>New {@code AudioManager.getDevices() method which lets you retrieve a list of all
+ audio devices currently connected to the system. You can also register an
+{@code android.media.AudioDeviceCallback} object if you want your app to be notified
when an audio device is connected or disconnected.</li>
</ul>
@@ -407,14 +408,15 @@ flash unit. If the torch mode is turned on or off successfully, the
<h3 id="reprocessing">Reprocessing API</h3>
<p>The {@link android.hardware.camera2 Camera2} API is extended to support YUV and private
-opaque format image reprocessing. Your app determine if the reprocessing capabilities are available
-via {@code CameraCharacteristics.REQUEST_AVAILABLE_CAPABILITIES}. If a device supports reprocessing,
-you can create a reprocessable camera capture session by calling
+opaque format image reprocessing. To determine if these reprocessing capabilities are available,
+call {@link android.hardware.camera2.CameraManager#getCameraCharacteristics(java.lang.String)
+getCameraCharacteristics()} and check for the {@code REPROCESS_MAX_CAPTURE_STALL} key. If a
+device supports reprocessing, you can create a reprocessable camera capture session by calling
{@code CameraDevice.createReprocessableCaptureSession()}, and create requests for input
buffer reprocessing.</p>
-<p>Use the {@code ImageWriter} class to connect the input buffer flow to the camera reprocessing
-input. To get an empty buffer, follow this programming model:</p>
+<p>Use the {@code android.media.ImageWriter} class to connect the input buffer flow to the camera
+reprocessing input. To get an empty buffer, follow this programming model:</p>
<ol>
<li>Call the {@code ImageWriter.dequeueInputImage()} method.</li>
@@ -428,10 +430,10 @@ data directly. Instead, pass the {@code ImageFormat.PRIVATE} image directly to t
{@code ImageWriter} by calling the {@code ImageWriter.queueInputImage()} method without any
buffer copy.</p>
-<p>The {@code ImageReader} class now supports {@code android.graphics.ImageFormat.PRIVATE} format
-image streams. This support allows your app to maintain a circular image queue of
-{@code ImageReader} output images, select one or more images, and send them to the
-{@code ImageWriter} for camera reprocessing.</p>
+<p>The {@link android.media.ImageReader} class now supports
+{@code android.graphics.ImageFormat.PRIVATE} format image streams. This support allows your app to
+maintain a circular image queue of {@link android.media.ImageReader} output images, select one or
+more images, and send them to the {@code ImageWriter} for camera reprocessing.</p>
<h2 id="afw">Android for Work Features</h2>
<p>This preview includes the following new APIs for Android for Work:</p>
@@ -441,10 +443,10 @@ can now control the following settings to improve management of
Corporate-Owned, Single-Use (COSU) devices:
<ul>
<li>Disable or re-enable the keyguard with the
-{@code DevicePolicyManager.setKeyguardEnabledState()} method.</li>
+{@code DevicePolicyManager.setKeyguardDisabled()} method.</li>
<li>Disable or re-enable the status bar (including quick settings, notifications, and the
navigation swipe-up gesture that launches Google Now) with the
-{@code DevicePolicyManager.setStatusBarEnabledState()} method.</li>
+{@code DevicePolicyManager.setStatusBarDisabled()} method.</li>
<li>Disable or re-enable safe boot with the {@link android.os.UserManager} constant
{@code DISALLOW_SAFE_BOOT}.</li>
<li>Prevent the screen from turning off while plugged in with the
@@ -489,16 +491,6 @@ uninstallAllUserCaCerts()}</li>
installKeyPair()}</li>
</ul>
</li>
-<li><strong>Enterprise factory reset protection:</strong> When provisioning a Device Owner, you can
-now configure parameters to unlock Factory Reset Protection (FRP) by setting the
-{@code DeviceManagerPolicy.EXTRA_PROVISIONING_RESET_PROTECTION_PARAMETERS} bundle. An NFC Programmer
-app can provide these parameters after a device has been reset to unlock FRP and provision the device,
-without requiring the previously configured Google account. If you don't modify these parameters,
-FRP remains in-place and prevents the device from being activated without the previously activated
-Google credentials.
-<p>Additionally, by setting app restrictions on Google Play services, Device Owners can specify
-alternative Google accounts for unlocking FRP to replace the ones activated on the device.</p>
-</li>
<img src="{@docRoot}preview/images/work-profile-screen.png"
srcset="{@docRoot}preview/images/work-profile-screen.png 1x, {@docRoot}preview/images/work-profile-screen_2x.png 2x"
style="float:right; margin:0 0 10px 20px" width="282" height="476" />
diff --git a/docs/html/preview/behavior-changes.jd b/docs/html/preview/behavior-changes.jd
index 5ddac7a..cb526fa 100644
--- a/docs/html/preview/behavior-changes.jd
+++ b/docs/html/preview/behavior-changes.jd
@@ -23,8 +23,9 @@ sdk.platform.apiLevel=MNC
<li><a href="#behavior-keystore">Android Keystore Changes</a></li>
<li><a href="#behavior-network">Wi-Fi and Networking Changes</a></li>
<li><a href="#behavior-camera">Camera Service Changes</a></li>
- <li><a href="#behavior-art-runtime">ART Runtime</a></li>
+ <li><a href="#behavior-runtime">Runtime</a></li>
<li><a href="#behavior-apk-validation">APK Validation</a></li>
+ <li><a href="#behavior-usb">USB Connection</a></li>
<li><a href="#behavior-afw">Android for Work Changes</a></li>
</ol>
@@ -46,8 +47,8 @@ sdk.platform.apiLevel=MNC
system changes and API behavior changes. This document highlights
some of the key changes that you should understand and account for in your apps.</p>
-<p>If you have previously published an app for Android, be aware that your app
- might be affected by these changes in the platform.</p>
+<p>If you have previously published an app for Android, be aware that these changes in the
+platform affect your app.</p>
<h2 id="behavior-runtime-permissions">Runtime Permissions</h1>
<p>This preview introduces a new permissions model, where users can now directly manage
@@ -55,11 +56,11 @@ app permissions at runtime. This model gives users improved visibility and contr
permissions, while streamlining the installation and auto-update processes for app developers.
Users can grant or revoke permissions individually for installed apps. </p>
-<p>On your apps that target the M Preview, make sure to check and request for permissions at
-runtime. To determine if your app has been granted a permission, call the
-new {@code Context.checkSelfPermission()} method. To request for a permission, call the new
-{@code Activity.requestPermission()} method. Even if your app is not targeting M, you
-should test your app under the new permissions model.</p>
+<p>On your apps that target the M Preview release or higher, make sure to check for and request
+permissions at runtime. To determine if your app has been granted a permission, call the
+new {@code Context.checkSelfPermission()} method. To request a permission, call the new
+{@code Activity.requestPermission()} method. Even if your app is not targeting the M Preview
+release, you should test your app under the new permissions model.</p>
<p>For details on supporting the new permissions model in your app, see the
<a href="{@docRoot}preview/features/runtime-permissions.html">
@@ -329,7 +330,7 @@ processes that use the camera subsystem when the user has switched to a differen
</li>
</ul>
-<h2 id="behavior-art-runtime">ART Runtime</h2>
+<h2 id="behavior-runtime">Runtime</h2>
<p>The ART runtime now properly implements access rules for the
{@link java.lang.reflect.Constructor#newInstance(java.lang.Object...) newInstance()} method. This
change fixes a problem where Dalvik was checking access rules incorrectly in previous versions.
@@ -362,14 +363,22 @@ implemented. Apps which previously worked that have bad {@code DT_NEEDED} entrie
declared in the manifest but not present in the APK itself. An APK must be re-signed if any of the
contents are removed.</p>
+<h2 id="behavior-usb">USB Connection</h2>
+<p>Device connections through the USB port are now set to charge-only mode by default. To access
+the device and its content over a USB connection, users must explicitly grant permission for such
+interactions. If your app supports user interactions with the device over a USB port, take into
+consideration that the interaction must be explicitly enabled.
+</p>
+
<h2 id="behavior-afw">Android for Work Changes</h2>
<p>This preview includes the following behavior changes for Android for Work:</p>
<ul>
<li><strong>Work contacts in personal contexts.</strong> The Google Dialer
Call Log now displays work contacts when the user views past calls.
-Setting {@code DevicePolicyManager.setCrossProfileCallerIdDisabled()} to {@code true} hides the
-work profile contacts in the Google Dialer Call Log. Work contacts can be displayed along with
-personal contacts to devices over Bluetooth only if
+Setting
+{@link android.app.admin.DevicePolicyManager#setCrossProfileCallerIdDisabled(android.content.ComponentName, boolean) setCrossProfileCallerIdDisabled()}
+to {@code true} hides the work profile contacts in the Google Dialer Call Log. Work contacts can be
+displayed along with personal contacts to devices over Bluetooth only if
you set {@code DevicePolicyManager.setBluetoothContactSharingDisabled()} to {@code false}. By
default, it is set to {@code true}.
</li>
@@ -387,18 +396,36 @@ outside of a managed context, the add account flow now prompts the user to insta
appropriate WPC. This behavior also applies to accounts added via
<strong>Settings > Accounts</strong> in the initial device setup wizard.</li>
<li><strong>Changes to specific DevicePolicyManager API behaviors:</strong>
-Calling the {@link android.app.admin.DevicePolicyManager#setCameraDisabled(android.content.ComponentName,boolean) setCameraDisabled()}
+ <ul>
+ <li>Calling the {@link android.app.admin.DevicePolicyManager#setCameraDisabled(android.content.ComponentName,boolean) setCameraDisabled()}
method affects the camera for the calling user only; calling it from the managed profile doesn’t
-affect camera apps running on the primary user. In addition, the
+affect camera apps running on the primary user. </li>
+ <li>In addition, the
{@link android.app.admin.DevicePolicyManager#setKeyguardDisabledFeatures(android.content.ComponentName,int) setKeyguardDisabledFeatures()}
-method is now available for Profile Owners, in addition to Device Owners. A Profile Owner can set
-these keyguard restrictions:
-<ul>
-<li>{@link android.app.admin.DevicePolicyManager#KEYGUARD_DISABLE_TRUST_AGENTS} and
+ method is now available for Profile Owners, in addition to Device Owners. </li>
+ <li>A Profile Owner can set these keyguard restrictions:
+ <ul>
+ <li>{@link android.app.admin.DevicePolicyManager#KEYGUARD_DISABLE_TRUST_AGENTS} and
{@link android.app.admin.DevicePolicyManager#KEYGUARD_DISABLE_FINGERPRINT}, which affect the
keyguard settings for the profile’s parent user.</li>
-<li>{@link android.app.admin.DevicePolicyManager#KEYGUARD_DISABLE_UNREDACTED_NOTIFICATIONS}, which
+ <li>{@link android.app.admin.DevicePolicyManager#KEYGUARD_DISABLE_UNREDACTED_NOTIFICATIONS}, which
only affects notifications generated by applications in the managed profile.</li>
+ </ul>
+ </li>
+ <li>The {@link android.app.admin.DevicePolicyManager#createAndInitializeUser(android.content.ComponentName, java.lang.String, java.lang.String, android.content.ComponentName, android.os.Bundle)} and {@link android.app.admin.DevicePolicyManager#createUser(android.content.ComponentName, java.lang.String) methods createAndInitializeUser have been deprecated.</li>
+ <li>Android for Work APIs are optimized for M runtime permssions, including Work profiles, assist layer, and others. DevicePolicyManager APIs support runtime permissions without affecting pre-M apps. </li>
+ </ul>
+ <li><strong>Changes to global settings</strong> &mdash; the settings below can no longer be set via <code>setGlobalSettings</code>:
+<ul>
+ <li><code>BLUETOOTH_ON</code></li>
+ <li><code>DEVELOPMENT_SETTINGS_ENABLED</code></li>
+ <li><code>MODE_RINGER</code></li>
+ <li><code>NETWORK_PREFERENCE</code></li>
+ <li><code>WIFI_ON</code></li>
</ul>
-</li>
-</ul>
+ </li>
+
+
+ </ul>
+
+
diff --git a/docs/html/preview/download.jd b/docs/html/preview/download.jd
index 6c7c945..0862d97 100644
--- a/docs/html/preview/download.jd
+++ b/docs/html/preview/download.jd
@@ -164,10 +164,15 @@ This is the Android SDK Preview License Agreement (the “License Agreement”).
<div id="qv">
<h2>In this document</h2>
<ol>
- <li><a href="#sdk">Preview SDK</a></li>
+ <li><a href="#sdk">Developer Preview 2 SDK</a></li>
<li><a href="#docs">Developer Documentation</a></li>
<li><a href="#images">Hardware System Images</a></li>
</ol>
+
+ <h2>Legacy downloads</h2>
+ <ol>
+ <li><a href="{@docRoot}preview/download_mp1.html">Developer Preview Archive</a></li>
+ </ol>
</div>
</div>
@@ -179,7 +184,7 @@ This is the Android SDK Preview License Agreement (the “License Agreement”).
</p>
-<h2 id="sdk">Preview SDK</h2>
+<h2 id="sdk">Developer Preview 2 SDK</h2>
<p>
The Preview SDK is available for download through the <a href=
@@ -201,11 +206,11 @@ This is the Android SDK Preview License Agreement (the “License Agreement”).
<th scope="col">Download / Checksums</th>
</tr>
<tr id="docs-dl">
- <td>Android M Preview<br>Developer Docs</td>
+ <td>Android M Preview 2<br>Developer Docs</td>
<td><a href="#top" onclick="onDownload(this)"
- >m-preview-1-developer-docs.zip</a><br>
- MD5: b65201b0d35416f5a1b7a071b52854a7<br>
- SHA-1: d47e856aa65e06897e6edd902ad8d2b1f05ac3ec
+ >m-preview-2-developer-docs.zip</a><br>
+ MD5: 1db6fff9c722b0339757e1cdf43663a8<br>
+ SHA-1: 5a4ae88d644e63824d21b0e18f8e3977a7665157
</td>
</tr>
<table>
@@ -238,35 +243,35 @@ This is the Android SDK Preview License Agreement (the “License Agreement”).
<tr id="hammerhead">
<td>Nexus 5 (GSM/LTE) <br>"hammerhead"</td>
<td><a href="#top" onclick="onDownload(this)"
- >hammerhead-MPZ44Q-preview-55d76d3a.tgz</a><br>
- MD5: 9e2631b06c6525e401ceaae3677ff320<br>
- SHA-1: 55d76d3a379b18f3363f28d8a462c236ab96fc36
+ >hammerhead-MPZ79M-preview-b1f4bde4.tgz</a><br>
+ MD5: 2ca9f18bf47a061b339bab52647ceb0d<br>
+ SHA-1: b1f4bde447eccbf8ce5d9b8b8ba954e3eac8e939
</td>
</tr>
<tr id="shamu">
<td>Nexus 6 <br>"shamu"</td>
<td><a href="#top" onclick="onDownload(this)"
- >shamu-MPZ44Q-preview-c1d6506a.tgz</a><br>
- MD5: 307cbf9dab0a38df4ab2639d02be12aa<br>
- SHA-1: c1d6506a74094bdb2f4b8677c7fe4967334f9ea8
+ >shamu-MPZ79M-preview-e1024040.tgz</a><br>
+ MD5: 24a2118da340b9afedfbdfc026f6ff81<br>
+ SHA-1: e10240408859d5188c4aae140e1c539130ba614b
</td>
</tr>
<tr id="volantis">
<td>Nexus 9 <br>"volantis"</td>
<td><a href="#top" onclick="onDownload(this)"
- >volantis-MPZ44Q-preview-d15ad483.tgz</a><br>
- MD5: fae40377fd999d2b09128665c915264d<br>
- SHA-1: 7ab05f96093b2cb370b226f65931202714cbc2ca
+ >volantis-MPZ79M-preview-9f305342.tgz</a><br>
+ MD5: 9edabf0a4c61b247f1cbb9dfdc0a899e<br>
+ SHA-1: 9f30534216f10899a6a75495fc7e92408ea333a7
</td>
</tr>
+
<tr id="fugu">
<td>Nexus Player <br>"fugu"</td>
- <td><a href="#top" onclick="onDownload(this)"
- >fugu-MPZ44Q-preview-2406ba05.tgz</a><br>
- MD5: 815902141a85cc65e7725f005cad31d5<br>
- SHA-1: 2406ba0598dea1e69110497ac0bc8e16789bc8fb
+ <td>
+ <em>Coming soon</em>
</td>
</tr>
+
</table>
<h3 id="install-image">Install an Image to a Device</h3>
@@ -284,9 +289,14 @@ This is the Android SDK Preview License Agreement (the “License Agreement”).
to flash the image onto your device.</li>
</ol>
-<p class="note">
- <strong>Note:</strong> Once you have flashed a development device the preview system image,
- it is upgraded automatically with the next preview release through over-the-air (OTA) updates.
+<h3 id="update-image">Updating a Device with the Preview</h3>
+
+<p>
+ Once you have installed a preview system image on a development device, the device is upgraded
+ automatically with the next preview release through over-the-air (OTA) updates. When the update
+ is available, the device displays notification that an update is available and allows you to
+ install it. You can also manually install the next preview image by repeating the procedure in
+ the previous section.
</p>
<h3 id="revertDevice">Revert a Device to Factory Specifications</h3>
diff --git a/docs/html/preview/download_mp1.jd b/docs/html/preview/download_mp1.jd
new file mode 100644
index 0000000..cb4d300
--- /dev/null
+++ b/docs/html/preview/download_mp1.jd
@@ -0,0 +1,355 @@
+page.title=Developer Preview Archive
+page.image=images/cards/card-download_16-9_2x.png
+
+@jd:body
+
+<div style="position:relative; min-height:600px">
+
+ <div class="wrap" id="tos" style="position:absolute;display:none;width:inherit;">
+
+ <p class="sdk-terms-intro">Before downloading and installing components of the Android Preview
+ SDK, you must agree to the following terms and conditions.</p>
+
+ <h2 class="norule">Terms and Conditions</h2>
+
+ <div class="sdk-terms" onfocus="this.blur()" style="width:678px">
+This is the Android SDK Preview License Agreement (the “License Agreement”).
+
+1. Introduction
+
+1.1 The Android SDK Preview (referred to in the License Agreement as the “Preview” and specifically including the Android system files, packaged APIs, and Preview library files, if and when they are made available) is licensed to you subject to the terms of the License Agreement. The License Agreement forms a legally binding contract between you and Google in relation to your use of the Preview.
+
+1.2 "Android" means the Android software stack for devices, as made available under the Android Open Source Project, which is located at the following URL: http://source.android.com/, as updated from time to time.
+
+1.3 "Google" means Google Inc., a Delaware corporation with principal place of business at 1600 Amphitheatre Parkway, Mountain View, CA 94043, United States.
+
+2. Accepting the License Agreement
+
+2.1 In order to use the Preview, you must first agree to the License Agreement. You may not use the Preview if you do not accept the License Agreement.
+
+2.2 By clicking to accept and/or using the Preview, you hereby agree to the terms of the License Agreement.
+
+2.3 You may not use the Preview and may not accept the License Agreement if you are a person barred from receiving the Preview under the laws of the United States or other countries including the country in which you are resident or from which you use the Preview.
+
+2.4 If you will use the Preview internally within your company or organization you agree to be bound by the License Agreement on behalf of your employer or other entity, and you represent and warrant that you have full legal authority to bind your employer or such entity to the License Agreement. If you do not have the requisite authority, you may not accept the License Agreement or use the Preview on behalf of your employer or other entity.
+
+3. Preview License from Google
+
+3.1 Subject to the terms of the License Agreement, Google grants you a royalty-free, non-assignable, non-exclusive, non-sublicensable, limited, revocable license to use the Preview, personally or internally within your company or organization, solely to develop applications to run on the Android platform.
+
+3.2 You agree that Google or third parties owns all legal right, title and interest in and to the Preview, including any Intellectual Property Rights that subsist in the Preview. "Intellectual Property Rights" means any and all rights under patent law, copyright law, trade secret law, trademark law, and any and all other proprietary rights. Google reserves all rights not expressly granted to you.
+
+3.3 You may not use the Preview for any purpose not expressly permitted by the License Agreement. Except to the extent required by applicable third party licenses, you may not: (a) copy (except for backup purposes), modify, adapt, redistribute, decompile, reverse engineer, disassemble, or create derivative works of the Preview or any part of the Preview; or (b) load any part of the Preview onto a mobile handset or any other hardware device except a personal computer, combine any part of the Preview with other software, or distribute any software or device incorporating a part of the Preview.
+
+3.4 You agree that you will not take any actions that may cause or result in the fragmentation of Android, including but not limited to distributing, participating in the creation of, or promoting in any way a software development kit derived from the Preview.
+
+3.5 Use, reproduction and distribution of components of the Preview licensed under an open source software license are governed solely by the terms of that open source software license and not the License Agreement. You agree to remain a licensee in good standing in regard to such open source software licenses under all the rights granted and to refrain from any actions that may terminate, suspend, or breach such rights.
+
+3.6 You agree that the form and nature of the Preview that Google provides may change without prior notice to you and that future versions of the Preview may be incompatible with applications developed on previous versions of the Preview. You agree that Google may stop (permanently or temporarily) providing the Preview (or any features within the Preview) to you or to users generally at Google's sole discretion, without prior notice to you.
+
+3.7 Nothing in the License Agreement gives you a right to use any of Google's trade names, trademarks, service marks, logos, domain names, or other distinctive brand features.
+
+3.8 You agree that you will not remove, obscure, or alter any proprietary rights notices (including copyright and trademark notices) that may be affixed to or contained within the Preview.
+
+4. Use of the Preview by You
+
+4.1 Google agrees that nothing in the License Agreement gives Google any right, title or interest from you (or your licensors) under the License Agreement in or to any software applications that you develop using the Preview, including any intellectual property rights that subsist in those applications.
+
+4.2 You agree to use the Preview and write applications only for purposes that are permitted by (a) the License Agreement, and (b) any applicable law, regulation or generally accepted practices or guidelines in the relevant jurisdictions (including any laws regarding the export of data or software to and from the United States or other relevant countries).
+
+4.3 You agree that if you use the Preview to develop applications, you will protect the privacy and legal rights of users. If users provide you with user names, passwords, or other login information or personal information, you must make the users aware that the information will be available to your application, and you must provide legally adequate privacy notice and protection for those users. If your application stores personal or sensitive information provided by users, it must do so securely. If users provide you with Google Account information, your application may only use that information to access the user's Google Account when, and for the limited purposes for which, each user has given you permission to do so.
+
+4.4 You agree that you will not engage in any activity with the Preview, including the development or distribution of an application, that interferes with, disrupts, damages, or accesses in an unauthorized manner the servers, networks, or other properties or services of Google or any third party.
+
+4.5 You agree that you are solely responsible for (and that Google has no responsibility to you or to any third party for) any data, content, or resources that you create, transmit or display through Android and/or applications for Android, and for the consequences of your actions (including any loss or damage which Google may suffer) by doing so.
+
+4.6 You agree that you are solely responsible for (and that Google has no responsibility to you or to any third party for) any breach of your obligations under the License Agreement, any applicable third party contract or Terms of Service, or any applicable law or regulation, and for the consequences (including any loss or damage which Google or any third party may suffer) of any such breach.
+
+4.7 The Preview is in development, and your testing and feedback are an important part of the development process. By using the Preview, you acknowledge that implementation of some features are still under development and that you should not rely on the Preview having the full functionality of a stable release. You agree not to publicly distribute or ship any application using this Preview as this Preview will no longer be supported after the official Android SDK is released.
+
+5. Your Developer Credentials
+
+5.1 You agree that you are responsible for maintaining the confidentiality of any developer credentials that may be issued to you by Google or which you may choose yourself and that you will be solely responsible for all applications that are developed under your developer credentials.
+
+6. Privacy and Information
+
+6.1 In order to continually innovate and improve the Preview, Google may collect certain usage statistics from the software including but not limited to a unique identifier, associated IP address, version number of the software, and information on which tools and/or services in the Preview are being used and how they are being used. Before any of this information is collected, the Preview will notify you and seek your consent. If you withhold consent, the information will not be collected.
+
+6.2 The data collected is examined in the aggregate to improve the Preview and is maintained in accordance with Google's Privacy Policy located at http://www.google.com/policies/privacy/.
+
+7. Third Party Applications
+
+7.1 If you use the Preview to run applications developed by a third party or that access data, content or resources provided by a third party, you agree that Google is not responsible for those applications, data, content, or resources. You understand that all data, content or resources which you may access through such third party applications are the sole responsibility of the person from which they originated and that Google is not liable for any loss or damage that you may experience as a result of the use or access of any of those third party applications, data, content, or resources.
+
+7.2 You should be aware the data, content, and resources presented to you through such a third party application may be protected by intellectual property rights which are owned by the providers (or by other persons or companies on their behalf). You may not modify, rent, lease, loan, sell, distribute or create derivative works based on these data, content, or resources (either in whole or in part) unless you have been specifically given permission to do so by the relevant owners.
+
+7.3 You acknowledge that your use of such third party applications, data, content, or resources may be subject to separate terms between you and the relevant third party.
+
+8. Using Google APIs
+
+8.1 Google APIs
+
+8.1.1 If you use any API to retrieve data from Google, you acknowledge that the data may be protected by intellectual property rights which are owned by Google or those parties that provide the data (or by other persons or companies on their behalf). Your use of any such API may be subject to additional Terms of Service. You may not modify, rent, lease, loan, sell, distribute or create derivative works based on this data (either in whole or in part) unless allowed by the relevant Terms of Service.
+
+8.1.2 If you use any API to retrieve a user's data from Google, you acknowledge and agree that you shall retrieve data only with the user's explicit consent and only when, and for the limited purposes for which, the user has given you permission to do so.
+
+9. Terminating the License Agreement
+
+9.1 the License Agreement will continue to apply until terminated by either you or Google as set out below.
+
+9.2 If you want to terminate the License Agreement, you may do so by ceasing your use of the Preview and any relevant developer credentials.
+
+9.3 Google may at any time, terminate the License Agreement, with or without cause, upon notice to you.
+
+9.4 The License Agreement will automatically terminate without notice or other action upon the earlier of:
+(A) when Google ceases to provide the Preview or certain parts of the Preview to users in the country in which you are resident or from which you use the service; and
+(B) Google issues a final release version of the Android SDK.
+
+9.5 When the License Agreement is terminated, the license granted to you in the License Agreement will terminate, you will immediately cease all use of the Preview, and the provisions of paragraphs 10, 11, 12 and 14 shall survive indefinitely.
+
+10. DISCLAIMERS
+
+10.1 YOU EXPRESSLY UNDERSTAND AND AGREE THAT YOUR USE OF THE PREVIEW IS AT YOUR SOLE RISK AND THAT THE PREVIEW IS PROVIDED "AS IS" AND "AS AVAILABLE" WITHOUT WARRANTY OF ANY KIND FROM GOOGLE.
+
+10.2 YOUR USE OF THE PREVIEW AND ANY MATERIAL DOWNLOADED OR OTHERWISE OBTAINED THROUGH THE USE OF THE PREVIEW IS AT YOUR OWN DISCRETION AND RISK AND YOU ARE SOLELY RESPONSIBLE FOR ANY DAMAGE TO YOUR COMPUTER SYSTEM OR OTHER DEVICE OR LOSS OF DATA THAT RESULTS FROM SUCH USE. WITHOUT LIMITING THE FOREGOING, YOU UNDERSTAND THAT THE PREVIEW IS NOT A STABLE RELEASE AND MAY CONTAIN ERRORS, DEFECTS AND SECURITY VULNERABILITIES THAT CAN RESULT IN SIGNIFICANT DAMAGE, INCLUDING THE COMPLETE, IRRECOVERABLE LOSS OF USE OF YOUR COMPUTER SYSTEM OR OTHER DEVICE.
+
+10.3 GOOGLE FURTHER EXPRESSLY DISCLAIMS ALL WARRANTIES AND CONDITIONS OF ANY KIND, WHETHER EXPRESS OR IMPLIED, INCLUDING, BUT NOT LIMITED TO THE IMPLIED WARRANTIES AND CONDITIONS OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
+
+11. LIMITATION OF LIABILITY
+
+11.1 YOU EXPRESSLY UNDERSTAND AND AGREE THAT GOOGLE, ITS SUBSIDIARIES AND AFFILIATES, AND ITS LICENSORS SHALL NOT BE LIABLE TO YOU UNDER ANY THEORY OF LIABILITY FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, CONSEQUENTIAL OR EXEMPLARY DAMAGES THAT MAY BE INCURRED BY YOU, INCLUDING ANY LOSS OF DATA, WHETHER OR NOT GOOGLE OR ITS REPRESENTATIVES HAVE BEEN ADVISED OF OR SHOULD HAVE BEEN AWARE OF THE POSSIBILITY OF ANY SUCH LOSSES ARISING.
+
+12. Indemnification
+
+12.1 To the maximum extent permitted by law, you agree to defend, indemnify and hold harmless Google, its affiliates and their respective directors, officers, employees and agents from and against any and all claims, actions, suits or proceedings, as well as any and all losses, liabilities, damages, costs and expenses (including reasonable attorneys’ fees) arising out of or accruing from (a) your use of the Preview, (b) any application you develop on the Preview that infringes any Intellectual Property Rights of any person or defames any person or violates their rights of publicity or privacy, and (c) any non-compliance by you of the License Agreement.
+
+13. Changes to the License Agreement
+
+13.1 Google may make changes to the License Agreement as it distributes new versions of the Preview. When these changes are made, Google will make a new version of the License Agreement available on the website where the Preview is made available.
+
+14. General Legal Terms
+
+14.1 the License Agreement constitutes the whole legal agreement between you and Google and governs your use of the Preview (excluding any services which Google may provide to you under a separate written agreement), and completely replaces any prior agreements between you and Google in relation to the Preview.
+
+14.2 You agree that if Google does not exercise or enforce any legal right or remedy which is contained in the License Agreement (or which Google has the benefit of under any applicable law), this will not be taken to be a formal waiver of Google's rights and that those rights or remedies will still be available to Google.
+
+14.3 If any court of law, having the jurisdiction to decide on this matter, rules that any provision of the License Agreement is invalid, then that provision will be removed from the License Agreement without affecting the rest of the License Agreement. The remaining provisions of the License Agreement will continue to be valid and enforceable.
+
+14.4 You acknowledge and agree that each member of the group of companies of which Google is the parent shall be third party beneficiaries to the License Agreement and that such other companies shall be entitled to directly enforce, and rely upon, any provision of the License Agreement that confers a benefit on (or rights in favor of) them. Other than this, no other person or company shall be third party beneficiaries to the License Agreement.
+
+14.5 EXPORT RESTRICTIONS. THE PREVIEW IS SUBJECT TO UNITED STATES EXPORT LAWS AND REGULATIONS. YOU MUST COMPLY WITH ALL DOMESTIC AND INTERNATIONAL EXPORT LAWS AND REGULATIONS THAT APPLY TO THE PREVIEW. THESE LAWS INCLUDE RESTRICTIONS ON DESTINATIONS, END USERS AND END USE.
+
+14.6 The License Agreement may not be assigned or transferred by you without the prior written approval of Google, and any attempted assignment without such approval will be void. You shall not delegate your responsibilities or obligations under the License Agreement without the prior written approval of Google.
+
+14.7 The License Agreement, and your relationship with Google under the License Agreement, shall be governed by the laws of the State of California without regard to its conflict of laws provisions. You and Google agree to submit to the exclusive jurisdiction of the courts located within the county of Santa Clara, California to resolve any legal matter arising from the License Agreement. Notwithstanding this, you agree that Google shall still be allowed to apply for injunctive remedies (or an equivalent type of urgent legal relief) in any jurisdiction.
+ </div><!-- sdk terms -->
+
+
+
+ <div id="sdk-terms-form">
+ <p>
+ <input id="agree" type="checkbox" name="agree" value="1" onclick="onAgreeChecked()" />
+ <label id="agreeLabel" for="agree">I have read and agree with the above terms and conditions</label>
+ </p>
+ <p><a href="" class="button disabled" id="downloadForRealz" onclick="return onDownloadForRealz(this);"></a></p>
+ </div>
+
+
+ </div><!-- end TOS -->
+
+
+ <div id="landing">
+
+<div id="qv-wrapper">
+ <div id="qv">
+ <h2>In this document</h2>
+ <ol>
+ <li><a href="#sdk">Developer Preview 1 SDK</a></li>
+ <li><a href="#docs">Developer Documentation</a></li>
+ <li><a href="#images">Hardware System Images</a></li>
+ </ol>
+ </div>
+</div>
+
+
+<p>
+ The Android M Preview SDK includes development tools, Android system files, and library files to
+ help you test your app and the new APIs coming in the next release of the platform. This document
+ describes how to get the downloadable components of the preview for testing your app.
+</p>
+
+
+<h2 id="sdk">Developer Preview 1 SDK</h2>
+
+<p>
+ The Preview SDK is available for download through the <a href=
+ "{@docRoot}tools/help/sdk-manager.html">Android SDK Manager</a>. For more information on
+ downloading and configuring the Preview SDK, see <a href=
+ "{@docRoot}preview/setup-sdk.html#downloadSdk">Set Up the Preview SDK</a>.
+</p>
+
+
+<h2 id="docs">Developer Documentation</h2>
+
+<p>
+ The developer documentation download package provides detailed API reference information and an API difference report for the preview.
+</p>
+
+<table>
+ <tr>
+ <th scope="col">Description</th>
+ <th scope="col">Download / Checksums</th>
+ </tr>
+ <tr id="docs-dl">
+ <td>Android M Preview 1<br>Developer Docs</td>
+ <td><a href="#top" onclick="onDownload(this)"
+ >m-preview-1-developer-docs.zip</a><br>
+ MD5: b65201b0d35416f5a1b7a071b52854a7<br>
+ SHA-1: d47e856aa65e06897e6edd902ad8d2b1f05ac3ec
+ </td>
+ </tr>
+<table>
+
+
+<h2 id="images">Hardware System Images</h2>
+
+<p>
+ These system images allow you to install a preview version of the platform on a physical device for
+ testing. By configuring a device with one of these images, you can install and test your app to
+ see how it performs on the next version of the platform. The process of installing a system image
+ on a device <em>removes all data from the device</em>, so you should backup your data before
+ installing a system image.
+</p>
+
+<p class="warning">
+ <b>Warning:</b> The following Android system images are previews and are subject to change. Your
+ use of these system images is governed by the Android SDK Preview License Agreement. The Android
+ preview system images are not stable releases, and may contain errors and defects that can result
+ in damage to your computer systems, devices, and data. The preview Android system images are not
+ subject to the same testing as the factory OS and can cause your phone and installed services and
+ applications to stop working.
+</p>
+
+<table>
+ <tr>
+ <th scope="col">Device</th>
+ <th scope="col">Download / Checksums</th>
+ </tr>
+ <tr id="hammerhead">
+ <td>Nexus 5 (GSM/LTE) <br>"hammerhead"</td>
+ <td><a href="#top" onclick="onDownload(this)"
+ >hammerhead-MPZ44Q-preview-55d76d3a.tgz</a><br>
+ MD5: 9e2631b06c6525e401ceaae3677ff320<br>
+ SHA-1: 55d76d3a379b18f3363f28d8a462c236ab96fc36
+ </td>
+ </tr>
+ <tr id="shamu">
+ <td>Nexus 6 <br>"shamu"</td>
+ <td><a href="#top" onclick="onDownload(this)"
+ >shamu-MPZ44Q-preview-c1d6506a.tgz</a><br>
+ MD5: 307cbf9dab0a38df4ab2639d02be12aa<br>
+ SHA-1: c1d6506a74094bdb2f4b8677c7fe4967334f9ea8
+ </td>
+ </tr>
+ <tr id="volantis">
+ <td>Nexus 9 <br>"volantis"</td>
+ <td><a href="#top" onclick="onDownload(this)"
+ >volantis-MPZ44Q-preview-d15ad483.tgz</a><br>
+ MD5: fae40377fd999d2b09128665c915264d<br>
+ SHA-1: 7ab05f96093b2cb370b226f65931202714cbc2ca
+ </td>
+ </tr>
+ <tr id="fugu">
+ <td>Nexus Player <br>"fugu"</td>
+ <td><a href="#top" onclick="onDownload(this)"
+ >fugu-MPZ44Q-preview-2406ba05.tgz</a><br>
+ MD5: 815902141a85cc65e7725f005cad31d5<br>
+ SHA-1: 2406ba0598dea1e69110497ac0bc8e16789bc8fb
+ </td>
+ </tr>
+</table>
+
+<h3 id="install-image">Install an Image to a Device</h3>
+
+<p>
+ In order to use a device image for testing, you must install it on a compatible device. Follow
+ the instructions below to install a system image:
+</p>
+
+<ol>
+ <li>Download and uncompress one of the system image packages listed here.</li>
+ <li>Backup any data you want to preserve from the device.</li>
+ <li>Follow the instructions at
+ <a href="https://developers.google.com/android/nexus/images#instructions">developers.google.com/android</a>
+ to flash the image onto your device.</li>
+</ol>
+
+<p class="note">
+ <strong>Note:</strong> Once you have flashed a development device the preview system image,
+ it is upgraded automatically with the next preview release through over-the-air (OTA) updates.
+</p>
+
+<h3 id="revertDevice">Revert a Device to Factory Specifications</h3>
+
+<p>
+ If you want to uninstall the preview and revert the device to factory specifications, go to
+ <a href="http://developers.google.com/android/nexus/images">developers.google.com/android</a> and
+ download the image you want to flash to for your device. Follow the instructions on that page to
+ flash the image to your device.
+</p>
+
+ </div><!-- landing -->
+
+</div><!-- relative wrapper -->
+
+
+
+<script>
+ var urlRoot = "http://storage.googleapis.com/androiddevelopers/shareables/preview/";
+ function onDownload(link) {
+
+ $("#downloadForRealz").html("Download " + $(link).text());
+ $("#downloadForRealz").attr('href', urlRoot + $(link).text());
+
+ $("#tos").fadeIn('fast');
+ $("#landing").fadeOut('fast');
+
+ return true;
+ }
+
+
+ function onAgreeChecked() {
+ /* verify that the TOS is agreed */
+ if ($("input#agree").is(":checked")) {
+ /* reveal the download button */
+ $("a#downloadForRealz").removeClass('disabled');
+ } else {
+ $("a#downloadForRealz").addClass('disabled');
+ }
+ }
+
+ function onDownloadForRealz(link) {
+ if ($("input#agree").is(':checked')) {
+ /*
+ $("#tos").fadeOut('fast');
+ $("#landing").fadeIn('fast');
+ */
+
+ ga('send', 'event', 'M Preview', 'System Image', $("#downloadForRealz").html());
+
+ /*
+ location.hash = "";
+ */
+ return true;
+ } else {
+ return false;
+ }
+ }
+
+ $(window).hashchange( function(){
+ if (location.hash == "") {
+ location.reload();
+ }
+ });
+
+</script>
diff --git a/docs/html/preview/features/runtime-permissions.jd b/docs/html/preview/features/runtime-permissions.jd
index b4eed9a..765a3d5 100644
--- a/docs/html/preview/features/runtime-permissions.jd
+++ b/docs/html/preview/features/runtime-permissions.jd
@@ -22,7 +22,7 @@ page.image=images/permissions_check.png
<li><a href="#overview">Overview</a></li>
<li><a href="#coding">Coding for Runtime Permissions</a></li>
<li><a href="#testing">Testing Runtime Permissions</a></li>
- <li><a href="#best-practices">Best Practices</a></li>
+ <li><a href="#best-practices">Best Practices and Usage Notes</a></li>
</ol>
<!--
@@ -35,12 +35,23 @@ page.image=images/permissions_check.png
<!--
<h2>See also</h2>
<ol>
- <li></li>
+ <li>
+ </li>
</ol>
-->
+
</div> <!-- qv -->
</div> <!-- qv-wrapper -->
+<!-- video box -->
+<a class="notice-developers-video"
+ href="https://www.youtube.com/watch?v=f17qe9vZ8RM">
+<div>
+ <h3>Video</h3>
+ <p>Google I/O 2015—Android M Permissions: Best Practices for
+ Developers</p>
+</div>
+</a>
<p>
The M Developer Preview introduces a new app permissions model which
@@ -82,15 +93,17 @@ page.image=images/permissions_check.png
<li>
<p><strong>Limited Permissions Granted at Install Time:</strong> When the
user installs or updates the app, the system grants the app all
- permissions that the app requests that fall under {@link
+ permissions listed in the manifest that fall under {@link
android.content.pm.PermissionInfo#PROTECTION_NORMAL PROTECTION_NORMAL}.
For example, alarm clock and internet permissions fall under {@link
android.content.pm.PermissionInfo#PROTECTION_NORMAL PROTECTION_NORMAL}, so
- they are automatically granted at install time.
+ they are automatically granted at install time. For more information about
+ how normal permissions are handled, see <a href="#normal">Normal
+ Permissions</a>.
</p>
- <p>The system may also grant the app signature and system permissions, as
- described in <a href="#system-apps">System apps and signature
+ <p>The system may also grant the app signature permissions, as
+ described in <a href="#system-apps">System components and signature
permissions</a>. The user is <em>not</em> prompted to grant any permissions
at install time.</p>
</li>
@@ -98,9 +111,7 @@ page.image=images/permissions_check.png
<li>
<strong>User Grants Permissions at Run-Time:</strong> When the app requests
a permission, the system shows a dialog to the user, then calls the app's
- callback function to notify it whether the permission was granted. If a
- user grants a permission, the app is given all permissions in that
- permission's functional area that were declared in the app manifest.
+ callback function to notify it whether the user granted the permission.
</li>
</ul>
@@ -117,7 +128,9 @@ page.image=images/permissions_check.png
<strong>Always Check for Permissions:</strong> When the app needs to
perform any action that requires a permission, it should first check
whether it has that permission already. If it does not, it requests to be
- granted that permission.
+ granted that permission. You do not need to check for permissions that
+ fall under {@link
+ android.content.pm.PermissionInfo#PROTECTION_NORMAL PROTECTION_NORMAL}.
</li>
<li>
@@ -164,38 +177,54 @@ page.image=images/permissions_check.png
to access that data.
</p>
+<h3 id="perm-groups">Permission groups</h3>
+
+<p>
+ Related permissions are divided into <em>permission groups</em> to
+ allow users to grant related permissions to an app in a single action.
+ The user only has to grant permission once per app for each permission group.
+ If the app subsequently requests a permission from the same permission
+ group, the system automatically grants the permission without any action from
+ the user. The system calls your app's <code>onRequestPermissionsResult()</code>
+ method just as if the user had granted permission through the dialog box.
+</p>
+
+<p>
+ For example, suppose an app lists in its manifest that it needs the
+ <code>SEND_SMS</code> and <code>RECEIVE_SMS</code> permissions, which both
+ belong to <code>android.permission-group.SMS</code>. When the app needs to
+ send a message, it requests the <code>SEND_SMS</code> permission. The system
+ shows the user a dialog box asking if the app can have access to SMS. If the
+ user agrees, the system grants the app the <code>SEND_SMS</code> permission it
+ requested. Later, the app requests <code>RECEIVE_SMS</code>. The
+ system automatically grants this permission, since the user had already
+ approved a permission in the same permission group.
+</p>
+
<h3 id="system-apps">
- System apps and signature permissions
+ System components and signature permissions
</h3>
<p>
Ordinarily, when the user installs an app, the system only grants the app the
+ permissions listed in the manifest that fall under
{@link android.content.pm.PermissionInfo#PROTECTION_NORMAL
PROTECTION_NORMAL}. However, under some circumstances the system grants the
app more permissions:
</p>
<ul>
- <li>If an app is part of the system image, it is automatically granted all
- the permissions listed in its manifest.
+ <li>System components automatically receive all
+ the permissions listed in their manifests.
</li>
<li>If the app requests permissions in the manifest that fall under {@link
android.content.pm.PermissionInfo#PROTECTION_SIGNATURE PROTECTION_SIGNATURE},
and the app is signed with the same certificate as the app that declared
those permissions, the system grants the requesting app those permissions on
- installation.
- </li>
+ installation. Apps cannot request signature permissions at runtime.</li>
</ul>
-<p>
- In both cases, the user can still revoke permissions at any time by going to
- the system's <strong>Settings</strong> screen and choosing <strong>Apps
- &gt;</strong> <i>app_name</i> <strong>&gt; Permissions</strong>. The app
- should continue to check for permissions at run time and request them if
- necessary.
-</p>
-
<h3 id="compatibility">
Forwards and backwards compatibility
</h3>
@@ -545,8 +574,54 @@ page.image=images/permissions_check.png
</td>
</tr>
+ <tr>
+ <td>
+ <code>android.permission-group.STORAGE</code>
+ </td>
+ <td>
+ <ul>
+ <li>
+ <code>android.permission.READ_EXTERNAL_STORAGE</code>
+ </li>
+ <li>
+ <code>android.permission.WRITE_EXTERNAL_STORAGE</code>
+ </li>
+ </ul>
+ </td>
+ </tr>
+
</table>
+<h4 id="explain-need">Explain why the app needs permissions</h4>
+
+<p>
+ In some circumstances, you might want to help the user understand why your
+ app needs a permission. For example, if a user launches a photography app,
+ the user probably won't be surprised that the app asks for permission to use
+ the camera. But if the user turns down that permission request, then launches
+ the photography app again, that might indicate that the user needs some help
+ understanding why the permission is needed.
+</p>
+
+<p>
+ To help find the situations where you need to provide extra explanation, the
+ system provides the
+ <code>Activity.shouldShowRequestPermissionRationale(String)</code>
+ method. This
+ method returns <code>true</code> if the app has requested this permission
+ previously and the user denied the request.
+ That indicates that you should probably explain to the
+ user why you need the permission.
+</p>
+
+<p>
+ If the user turned down the permission request in the
+ past and chose the <em>Don't ask again</em> option in the permission request system
+ dialog, this method returns <code>false</code>. The method also returns
+ <code>false</code> if the device policy prohibits the app from having that
+ permission.
+</p>
+
<h4 id="request-permissions">Request permissions if necessary</h4>
<p>If the app doesn't already have the permission it needs, the app calls the
@@ -564,6 +639,13 @@ page.image=images/permissions_check.png
<pre>
if (checkSelfPermission(Manifest.permission.READ_CONTACTS)
!= PackageManager.PERMISSION_GRANTED) {
+
+ // Should we show an explanation?
+ if (shouldShowRequestPermissionRationale(
+ Manifest.permission.READ_CONTACTS)) {
+ // Explain to the user why we need to read the contacts
+ }
+
requestPermissions(new String[]{Manifest.permission.READ_CONTACTS},
MY_PERMISSIONS_REQUEST_READ_CONTACTS);
@@ -612,11 +694,10 @@ public void onRequestPermissionsResult(int requestCode,
}
</pre>
- <p>If the user grants a permission, the system gives the app all permissions
- that the app manifest lists for that functional area. If the user denies the
- request, you should take appropriate action. For example, you might disable
- any menu actions that depend on this permission.
- </li>
+<p>
+ If the user denies a permission request, your app should take appropriate
+ action. For example, your app might show a dialog explaining why it could not
+ perform the user's original request.
</p>
<p>
@@ -631,7 +712,6 @@ public void onRequestPermissionsResult(int requestCode,
<h2 id="testing">Testing Runtime Permissions</h2>
-
<p>
If your app targets the M Developer Preview, you must test that it
handles permissions properly. You cannot assume that your app has any
@@ -706,7 +786,7 @@ $ adb pm grant com.example.myapp android.permission.RECORD_AUDIO
$ adb pm revoke &lt;package_name&gt; &lt;permission_name&gt;
</pre>
-<h2 id="best-practices">Best Practices</h2>
+<h2 id="best-practices">Best Practices and Usage Notes</h2>
<p>
The new permissions model gives users a smoother experience, and makes it
@@ -794,3 +874,76 @@ $ adb pm revoke &lt;package_name&gt; &lt;permission_name&gt;
tutorial, so you still need to check for and request permissions during the
app's normal operation.
</p>
+
+<h3 id="normal">Normal Permissions</h3>
+
+<p>
+ Many permissions are designated as {@link
+ android.content.pm.PermissionInfo#PROTECTION_NORMAL PROTECTION_NORMAL},
+ which indicates that
+ there's no great risk to the user's privacy or security in letting apps have
+ those permissions. For example, users would reasonably want to know whether
+ an app can read their contact information, so users have to grant this
+ permission explicitly. By contrast, there's no great risk in allowing an app
+ to vibrate the device, so that permission is designated as <em>normal.</em>
+</p>
+
+<p>
+ If an app declares in its
+ manifest that it needs a normal permission, the system automatically grants
+ the app
+ that permission at install time. The system does not prompt the user
+ to grant normal
+ permissions, and users cannot revoke these permissions.
+</p>
+
+<p>
+ If your app declares that it needs normal permissions, the app does not need to
+ call <code>Activity.checkSelfPermission()</code> or
+ <code>Activity.requestPermissions()</code> for
+ those permissions. Since you declared the permissions in the manifest, you
+ can be sure your app was granted those permissions at install time.
+</p>
+
+<p>Currently, the following permissions are classified as {@link
+ android.content.pm.PermissionInfo#PROTECTION_NORMAL PROTECTION_NORMAL}:</p>
+
+<ul>
+ <li><code>android.permission.ACCESS_LOCATION_EXTRA_COMMANDS</code></li>
+ <li><code>android.permission.ACCESS_NETWORK_STATE</code></li>
+ <li><code>android.permission.ACCESS_WIFI_STATE</code></li>
+ <li><code>android.permission.ACCESS_WIMAX_STATE</code></li>
+ <li><code>android.permission.BLUETOOTH</code></li>
+ <li><code>android.permission.BLUETOOTH_ADMIN</code></li>
+ <li><code>android.permission.BROADCAST_STICKY</code></li>
+ <li><code>android.permission.CHANGE_NETWORK_STATE</code></li>
+ <li><code>android.permission.CHANGE_WIFI_MULTICAST_STATE</code></li>
+ <li><code>android.permission.CHANGE_WIFI_STATE</code></li>
+ <li><code>android.permission.DISABLE_KEYGUARD</code></li>
+ <li><code>android.permission.EXPAND_STATUS_BAR</code></li>
+ <li><code>android.permission.FLASHLIGHT</code></li>
+ <li><code>android.permission.GET_ACCOUNTS</code></li>
+ <li><code>android.permission.GET_PACKAGE_SIZE</code></li>
+ <li><code>android.permission.INTERNET</code></li>
+ <li><code>android.permission.KILL_BACKGROUND_PROCESSES</code></li>
+ <li><code>android.permission.MODIFY_AUDIO_SETTINGS</code></li>
+ <li><code>android.permission.NFC</code></li>
+ <li><code>android.permission.PERSISTENT_ACTIVITY</code></li>
+ <li><code>android.permission.READ_SYNC_SETTINGS</code></li>
+ <li><code>android.permission.READ_SYNC_STATS</code></li>
+ <li><code>android.permission.READ_USER_DICTIONARY</code></li>
+ <li><code>android.permission.RECEIVE_BOOT_COMPLETED</code></li>
+ <li><code>android.permission.REORDER_TASKS</code></li>
+ <li><code>android.permission.SET_TIME_ZONE</code></li>
+ <li><code>android.permission.SET_WALLPAPER</code></li>
+ <li><code>android.permission.SET_WALLPAPER_HINTS</code></li>
+ <li><code>android.permission.SUBSCRIBED_FEEDS_READ</code></li>
+ <li><code>android.permission.TRANSMIT_IR</code></li>
+ <li><code>android.permission.VIBRATE</code></li>
+ <li><code>android.permission.WAKE_LOCK</code></li>
+ <li><code>android.permission.WRITE_SETTINGS</code></li>
+ <li><code>android.permission.WRITE_SYNC_SETTINGS</code></li>
+ <li><code>android.permission.WRITE_USER_DICTIONARY</code></li>
+ <li><code>com.android.alarm.permission.SET_ALARM</code></li>
+ <li><code>com.android.launcher.permission.INSTALL_SHORTCUT</code></li>
+</ul>
diff --git a/docs/html/preview/index.jd b/docs/html/preview/index.jd
index 68186bd..022838b 100644
--- a/docs/html/preview/index.jd
+++ b/docs/html/preview/index.jd
@@ -28,6 +28,10 @@ footer.hide=1
<span class="dac-sprite dac-auto-chevron"></span>
Get started
</a><br>
+ <a class="dac-hero-cta" href="{@docRoot}preview/support.html">
+ <span class="dac-sprite dac-auto-chevron"></span>
+ Update to Developer Preview 2
+ </a><br>
</div>
</div>
<div class="dac-section dac-small">
diff --git a/docs/html/preview/preview_toc.cs b/docs/html/preview/preview_toc.cs
index 6ef75a5..6cd4157 100644
--- a/docs/html/preview/preview_toc.cs
+++ b/docs/html/preview/preview_toc.cs
@@ -8,27 +8,55 @@
pt-br-lang="Visão geral do programa"
ru-lang="Обзор программы"
zh-cn-lang="计划概览"
- zh-tw-lang="程式總覽">Program Overview
- </a></div>
+ zh-tw-lang="程式總覽">
+ Program Overview</a></div>
</li>
<li class="nav-section">
- <div class="nav-section-header empty"><a href="<?cs var:toroot ?>preview/download.html">
+ <div class="nav-section-header empty"><a href="<?cs var:toroot ?>preview/download.html"
+ es-lang="Descargas"
+ ja-lang="ダウンロード"
+ ko-lang="다운로드"
+ pt-br-lang="Downloads"
+ ru-lang="Загрузки"
+ zh-cn-lang="下载"
+ zh-tw-lang="下載">
Downloads</a></div>
</li>
<li class="nav-section">
- <div class="nav-section-header empty"><a href="<?cs var:toroot ?>preview/setup-sdk.html">
+ <div class="nav-section-header empty"><a href="<?cs var:toroot ?>preview/setup-sdk.html"
+ es-lang="Configurar el SDK de la versión preliminar"
+ ja-lang="Preview SDK のセットアップ"
+ ko-lang="미리 보기 SDK 설정하기"
+ pt-br-lang="Configuração do Preview SDK"
+ ru-lang="Настройка пакета SDK Preview"
+ zh-cn-lang="设置预览版 SDK"
+ zh-tw-lang="設定預覽版 SDK">
Set up the SDK</a></div>
</li>
<li class="nav-section">
- <div class="nav-section-header"><a href="<?cs var:toroot ?>preview/testing/guide.html">
+ <div class="nav-section-header"><a href="<?cs var:toroot ?>preview/testing/guide.html"
+ es-lang="Guía de prueba"
+ ja-lang="テストガイド"
+ ko-lang="테스트 가이드"
+ pt-br-lang="Guia de teste"
+ ru-lang="Руководство по тестированию"
+ zh-cn-lang="测试指南"
+ zh-tw-lang="測試指南">
Testing Guide</a></div>
<ul>
- <li><a href="<?cs var:toroot ?>preview/testing/performance.html">
- Performance Testing</a></li>
+ <li><a href="<?cs var:toroot ?>preview/testing/performance.html"
+ es-lang="Prueba de rendimiento de video"
+ ja-lang="表示パフォーマンスのテスト"
+ ko-lang="표시 성능 테스트"
+ pt-br-lang="Teste de desempenho de exibição"
+ ru-lang="Тестирование скорости отображения"
+ zh-cn-lang="测试显示性能"
+ zh-tw-lang="測試顯示效能">
+ Performance Testing</a></li>
</ul>
</li>
@@ -52,9 +80,23 @@
zh-cn-lang="权限"
zh-tw-lang="權限">Permissions
</a></li>
- <li><a href="<?cs var:toroot ?>preview/features/app-linking.html">
- App Links</a></li>
- <li><a href="<?cs var:toroot ?>preview/backup/index.html">
+ <li><a href="<?cs var:toroot ?>preview/features/app-linking.html"
+ es-lang="Vínculos de la aplicación"
+ ja-lang="App Links"
+ ko-lang="앱 링크"
+ pt-br-lang="Links de aplicativos"
+ ru-lang="Связи приложений"
+ zh-cn-lang="应用链接"
+ zh-tw-lang="應用程式連結">
+ App Links</a></li>
+ <li><a href="<?cs var:toroot ?>preview/backup/index.html"
+ es-lang="Copia de seguridad automática para aplicaciones"
+ ja-lang="アプリの自動バックアップ"
+ ko-lang="앱용 자동 백업"
+ pt-br-lang="Backup automático para aplicativos"
+ ru-lang="Автоматическое резервное копирование для приложений"
+ zh-cn-lang="自动备份应用"
+ zh-tw-lang="針對應用程式進行自動備份">
Auto Backup for Apps</a></li>
</ul>
</li>
@@ -71,17 +113,38 @@
</a></div>
</li>
<li class="nav-section">
- <div class="nav-section-header empty"><a href="<?cs var:toroot ?>preview/samples.html">
+ <div class="nav-section-header empty"><a href="<?cs var:toroot ?>preview/samples.html"
+ es-lang="Ejemplos"
+ ja-lang="サンプル"
+ ko-lang="샘플"
+ pt-br-lang="Exemplos"
+ ru-lang="Примеры"
+ zh-cn-lang="示例"
+ zh-tw-lang="範例">
Samples</a></div>
</li>
<li class="nav-section">
- <div class="nav-section-header empty"><a href="<?cs var:toroot ?>preview/support.html">
+ <div class="nav-section-header empty"><a href="<?cs var:toroot ?>preview/support.html"
+ es-lang="Soporte"
+ ja-lang="サポート"
+ ko-lang="지원"
+ pt-br-lang="Suporte"
+ ru-lang="Поддержка"
+ zh-cn-lang="支持"
+ zh-tw-lang="支援">
Support</a></div>
</li>
<li class="nav-section">
- <div class="nav-section-header empty"><a href="<?cs var:toroot ?>preview/license.html">
+ <div class="nav-section-header empty"><a href="<?cs var:toroot ?>preview/license.html"
+ es-lang="Contrato de licencia"
+ ja-lang="使用許諾契約"
+ ko-lang="라이선스 계약"
+ pt-br-lang="Contrato de licença"
+ ru-lang="Лицензионное соглашение"
+ zh-cn-lang="许可协议"
+ zh-tw-lang="授權協議">
License Agreement</a></div>
</li>
diff --git a/docs/html/preview/support.jd b/docs/html/preview/support.jd
index dd9736a..90da200 100644
--- a/docs/html/preview/support.jd
+++ b/docs/html/preview/support.jd
@@ -1,68 +1,334 @@
page.title=Support
+page.tags="preview", "developer preview"
page.image=images/cards/card-support_16-9_2x.png
@jd:body
+<div class="cols" style=
+"background-color:#ffebc3; padding: 5px 0;margin-bottom:1em; text-align:center;">
+<h3>
+ Developer Preview 2 is now available
+ </h3>
+
+ <ul class="dac-section-links">
+ <li class="dac-section-link">
+ <a href="#preview2-notes">
+ <span class="dac-sprite dac-auto-chevron"></span>
+ Release notes</a>
+ </li>
+
+ <li class="dac-section-link">
+ <a href="#preview2-get">
+ <span class="dac-sprite dac-auto-chevron"></span>
+ Get the Update</a>
+ </li>
+
+ <li class="dac-section-link">
+ <a href="https://code.google.com/p/android-developer-preview/">
+ <span class="dac-sprite dac-auto-chevron"></span>
+ Report Issues</a>
+ </li>
+ </ul>
+</div>
+
<p>
- If you've encountered bugs or have feedback about the M Developer Preview,
- <a href="https://code.google.com/p/android-developer-preview/">create an issue</a>
- on our issue tracker.
+ Two primary support channels are available to you when developing and testing
+ with the Android M Developer Preview. If you've encountered bugs or have
+ feedback about the M Developer Preview, you can <a href=
+ "https://code.google.com/p/android-developer-preview/">create an issue</a> on
+ our issue tracker. We'll triage the issue for further review and provide
+ updates as needed.
</p>
<p>
- For more support, join the
- <a href="http://g.co/dev/AndroidMDevPreview">M Developer
- Preview Google+ community</a> to discuss your development experiences.
+ To discuss issues or ideas with other developers working with Android M, join
+ the <a href="http://g.co/dev/AndroidMDevPreview">M Developer Preview Google+
+ community</a>.
</p>
-<h2 id="release-notes">Release Notes</h2>
-
-<!--
-<div class="toggle-content opened">
- <p><a href="#" onclick="return toggleContent(this)">
- <img src="{@docRoot}assets/images/triangle-opened.png" class="toggle-content-img"
- alt=""/>M Developer Preview, Revision 2</a> <em>(Month 2015)</em>
- </p>
-
- <div class="toggle-content-toggleme">
-
- <dl>
-
- <dt>Fix Category 1</dt>
- <dd>
- <ul>
- <li>Fixed issue X.</li>
- <li>Fixed issue Y.</li>
- <li>Fixed issue Z.</li>
- </ul>
- </dd>
-
- <dt>Fix Category 2</dt>
- <dd>
- <ul>
- <li>Fixed issue X.</li>
- <li>Fixed issue Y.</li>
- <li>Fixed issue Z.</li>
- </ul>
- </dd>
-
- </dl>
+<h2 id="preview2-notes">
+ Developer Preview 2
+</h2>
+
+<div class="wrap">
+ <div class="cols">
+ <div class="col-5of12">
+ <p>
+ <em>Date: July 2015<br>
+ Build: MPZ79M<br>
+ Hardware support: Nexus 5,6,9, Player<br>
+ Emulator support: ARM 32/64-bit<br>
+ Google Play services: 7.5</em>
+ </p>
+ </div>
</div>
</div>
--->
-<div class="toggle-content opened">
- <p><a href="#" onclick="return toggleContent(this)">
- <img src="{@docRoot}assets/images/triangle-opened.png" class="toggle-content-img"
- alt=""/>M Developer Preview, Revision 1</a> <em>(May 2015)</em>
- </p>
+<p>
+ Android M Developer Preview 2 is an <strong>incremental update</strong> to
+ the Android M preview platform that was originally released in May 2015. The
+ update includes a variety of enhancements and bug fixes made across the
+ system, including those related to issues reported by developers through the
+ external issue tracker.
+</p>
+
+<p>
+ If you are currently developing or testing on Android M, you should
+ <strong>update your environment</strong> to Developer Preview 2 as soon as
+ possible. This ensures that you are building with the latest platform APIs
+ and testing against the latest behaviors. If you are just getting started
+ with the Android M Developer Preview SDK, follow the instructions in <a href=
+ "/preview/setup-sdk.html">Set up the Preview SDK</a>, then update your
+ environment for Developer Preview 2.
+</p>
+
+<h3>
+ What's included
+</h3>
+
+<p>
+ Developer Preview 2 includes an updated SDK with system images,
+ documentation, and samples for developing against the latest Android M
+ platform.
+</p>
+
+<ul>
+ <li>
+ <strong>SDK platform</strong> and <strong>system images</strong> (Nexus and
+ emulator) for building and testing. You can download the updated tools from
+ the SDK Manager, and the system images are available by over-the-air (OTA)
+ update or download (see below).
+ </li>
+
+ <li>
+ <strong>Updated documentation</strong>. The <a href=
+ "/preview/behavior-changes.html">Behavior Changes</a>, <a href=
+ "/preview/api-overview.html">API Overview</a>, and <a href=
+ "/preview/features/runtime-permissions.html">Permissions</a> documents have
+ been updated to reflect the latest changes in the platform. An updated
+ <a href="/preview/download.html">Developer Documentation download
+ package</a> is available, including full reference docs and API diff
+ reports.
+ </li>
+
+ <li>
+ <strong>Translations</strong> of the documentation are now available. Use
+ the language selector at the bottom right corner of any page to switch
+ languages. Note that some of the translated docs are not yet updated for
+ Developer Preview 2 (coming soon).
+ </li>
+
+ <li>The <a href="/preview/samples.html">Android M code samples</a> are also
+ updated to account for API and behavior changes:
+ <ul>
+ <li>
+ <a href=
+ "https://github.com/googlesamples/android-RuntimePermissions">RuntimePermissions</a>
+ / <a href=
+ "https://github.com/googlesamples/android-RuntimePermissionsBasic">RuntimePermissionsBasic</a>
+ are updated to reflect latest permissions API changes, including
+ <code>shouldShowRequestPermissionRationale()</code>.
+ </li>
+
+ <li>
+ <a href=
+ "https://github.com/googlesamples/android-FingerprintDialog">FingerprintDialog</a>
+ adds a flow to ask for passwords when new fingerprints are added as
+ well as a preference if the app will use fingerprints as a method of
+ authentication.
+ </li>
+
+ <li>The Android Wear samples (<a href=
+ "https://github.com/googlesamples/android-AgendaData">AgendaData</a> /
+ <a href=
+ "https://github.com/googlesamples/android-DataLayer">DataLayer</a> /
+ <a href="https://github.com/googlesamples/android-Quiz">Quiz</a> /
+ <a href="https://github.com/googlesamples/android-XYZTouristAttractions">
+ XYZTouristAttractions</a>) show a simplified usage of Data Items.
+ </li>
+ </ul>
+ </li>
+</ul>
+
+<h3 id="changes">
+ Key changes
+</h3>
+
+<ul>
+ <li>Permissions changes
+ <ul>
+ <li>The <code>android.permission.USE_FINGERPRINT</code> permission now
+ has "normal" protection level, so it is no longer necessary to request
+ this permission directly from the user. The <code>USE_FINGERPRINT</code>
+ permission enables fingerprints to be enabled for authentication, but
+ does not give the requesting app access to the enrollment/fingerprint
+ administration flow.
+ </li>
+
+ <li>The <code>android.permission.WRITE_EXTERNAL_STORAGE</code> permission
+ has protection level "dangerous", meaning that apps wanting to write to
+ external storage will need to request permission from the user at
+ runtime. Both <code>WRITE_EXTERNAL_STORAGE</code> and
+ <code>WRITE_EXTERNAL_STORAGE</code> are members of the
+ <code>STORAGE</code> permission group.
+ </li>
+
+ <li>Remote Bluetooth/Wi-Fi MAC's now require either the
+ <code>android.permission.LOCATION_FINE</code> or
+ <code>android.permission.LOCATION_COURSE</code> permission.
+ </li>
+
+ <li>Some accounts and identity permissions are moved to
+ <code>CONTACTS</code> permissions group and others are removed or granted
+ based on account type. In particular,
+ <code>android.permission.USE_CREDENTIALS</code>,
+ <code>android.permission.MANAGE_ACCOUNTS</code>, and
+ <code>android.permission.AUTHENTICATE_ACCOUNTS</code> are ungrouped
+ pending further changes in a later release.
+ </li>
+
+ <li>The Wi-Fi permissions
+ <code>android.permission.CHANGE_WIFI_STATE</code>,
+ <code>android.permission.CHANGE_WIMAX_STATE</code>, and
+ <code>android.permission.CHANGE_WIFI_MULTICAST_STATE</code> now have
+ protection level "normal".
+ </li>
+
+ <li>The Bluetooth permissions <code>android.permission.BLUETOOTH</code>
+ and <code>android.permission.BLUETOOTH_ADMIN</code> now have protection
+ level "normal".
+ </li>
+
+ <li>Bookmarks and subscribed feeds permissions are removed.
+ </li>
+
+ <li>Apps included in the system image are no longer granted dangerous
+ permissions automatically. All apps should check for and request
+ permissions at runtime.
+ </li>
+
+ <li>Introduces the utility method
+ <code>Activity.shouldShowRequestPermissionRationale(String)</code>, which
+ lets your app see whether users have previously rejected a permission
+ request. This lets you know that your app should explain the the user why
+ it needs that permission. For more information see the <a href=
+ "/preview/features/runtime-permissions.html#explain-need">Permissions</a>
+ developer guide.
+ </li>
+ </ul>
+ </li>
+
+ <li>Other changes
+ <ul>
+ <li>The <code>android.app.AssistContent</code> and
+ <code>android.app.AssistStructure</code> classes are moved into a new
+ package, <code>android.app.assist</code>.
+ </li>
- <div class="toggle-content-toggleme">
+ <li>Bluetooth Stylus APIs are updated and include new callback events.
+ The <code>View.OnStylusButtonPressListener</code> class is renamed to
+ <code>View.OnContextClickListener</code> and
+ <code>GestureDetector.OnStylusButtonPressListener</code> class to <code>
+ GestureDetector.OnContextClickListener</code>.
+ </li>
+ </ul>
+ </li>
+</ul>
- <dl>
- <dt>Initial release.</dt>
- </dl>
+<p>
+ For a complete list of changes, including renamed and removed APIs, please
+ refer to the API Diff Reports included in the <a href=
+ "/preview/download.html#docs">Developer Documentation download package</a>.
+</p>
+
+<h3 id="ki">
+ Known issues
+</h3>
+
+<ul>
+ <li>The system Messenger app crashes on the 64-bit emulator.
+ </li>
+
+ <li>After updating to Developer Preview 2, Contacts sync experiences
+ intermittent issues. The workaround is to clear and re-sync Contact Storage
+ data after update. To clear data, go to <strong>Settings &gt; Apps &gt; Show
+ system &gt; Contacts Storage</strong>. Select "Storage" and then
+ <strong>Clear data</strong>.
+ </li>
+
+ <li>In YouTube app, it's not possible to share a video. The share window is
+ blank.
+ </li>
+
+ <li>Android For Work Profile setup is not working properly, so you won't be
+ able to create a new Work Profile after you update. As a workaround, make
+ sure to create the Work Profiles you need in Developer Preview 1 before
+ updating to Developer Preview 2.
+ </li>
+</ul>
+
+<p>
+ For a complete list of reported issues, please refer to the <a href=
+ "https://code.google.com/p/android/issues/list">open issues list</a> on the
+ Developer Preview <a href=
+ "https://code.google.com/p/android-developer-preview/">issue tracker</a>.
+</p>
+
+<h3 id="preview2-get">
+ Get Developer Preview 2
+</h3>
+
+<p>
+ You can download the Developer Preview 2 platform and emulator images from
+ the SDK Manager.
+</p>
+
+<p>
+ Developer Preview 2 system images for supported Nexus devices are available
+ by download and by over-the-air (OTA) update. The OTA update is available
+ only to supported devices that are currently running Developer Preview 1. If
+ your devices is running Developer Preview 1, you should automatically receive
+ the OTA update within a few days of availability.
+</p>
+
+<p>
+ If you are just getting started with Android M Developer Preview you want to
+ receive Developer Preview 2 by OTA, first download Developer Preview 1 and
+ flash it to your device. Leave the device powered on for several hours until
+ the device is registered and receives the update.
+</p>
+
+<p>
+ For instructions on how to download and flash your device to the Developer
+ Preview, see the links and instructions on the <a href=
+ "/preview/download.html">Downloads</a> page.
+</p>
+
+<p>
+ For instructions on how to start developing and testing with Android M, read
+ <a href="/preview/setup-sdk.html">Setting up the SDK</a>
+</p>
+
+<h2 id="preview1-notes">
+ Developer Preview 1
+</h2>
+
+<div class="wrap">
+ <div class="cols">
+ <div class="col-5of12">
+ <p>
+ <em>Date: May 2015<br>
+ Build: MPZ44Q<br>
+ Hardware support: Nexus 5,6,9, Player<br>
+ Emulator support: x86 & ARM (32/64-bit)<br>
+ Google Play services: 7.5</em>
+ </p>
+ </div>
</div>
</div>
+<p>
+ Initial release.
+</p>
+
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 (&gt;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/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();