Merge "docs: Fixed url typo in googleplay/work/about" into mnc-docs
am: 81edefd
* commit '81edefdb34f1df7de76471fa4cf240f64c66a696':
docs: Fixed url typo in googleplay/work/about
diff --git a/Android.mk b/Android.mk
index b4d21e4..7e42edd 100644
--- a/Android.mk
+++ b/Android.mk
@@ -930,6 +930,42 @@
$(full_target): $(static_doc_index_redirect)
$(full_target): $(framework_built)
+# ==== static html in the sdk, reference only ===============================
+include $(CLEAR_VARS)
+
+LOCAL_SRC_FILES:=$(framework_docs_LOCAL_SRC_FILES)
+LOCAL_INTERMEDIATE_SOURCES:=$(framework_docs_LOCAL_INTERMEDIATE_SOURCES)
+LOCAL_JAVA_LIBRARIES:=$(framework_docs_LOCAL_JAVA_LIBRARIES)
+LOCAL_MODULE_CLASS:=$(framework_docs_LOCAL_MODULE_CLASS)
+LOCAL_DROIDDOC_SOURCE_PATH:=$(framework_docs_LOCAL_DROIDDOC_SOURCE_PATH)
+LOCAL_DROIDDOC_HTML_DIR:=$(framework_docs_LOCAL_DROIDDOC_HTML_DIR)
+LOCAL_ADDITIONAL_JAVA_DIR:=$(framework_docs_LOCAL_ADDITIONAL_JAVA_DIR)
+LOCAL_ADDITIONAL_DEPENDENCIES:=$(framework_docs_LOCAL_ADDITIONAL_DEPENDENCIES)
+
+LOCAL_MODULE := offline-refonly
+
+LOCAL_DROIDDOC_OPTIONS:=\
+ $(framework_docs_LOCAL_DROIDDOC_OPTIONS) \
+ -offlinemode \
+ -title "Android SDK" \
+ -proofread $(OUT_DOCS)/$(LOCAL_MODULE)-proofread.txt \
+ -sdkvalues $(OUT_DOCS) \
+ -hdf android.whichdoc offline \
+ -referenceonly
+
+LOCAL_DROIDDOC_CUSTOM_TEMPLATE_DIR:=build/tools/droiddoc/templates-sdk-refonly
+
+include $(BUILD_DROIDDOC)
+
+static_doc_index_redirect := $(out_dir)/index.html
+$(static_doc_index_redirect): \
+ $(LOCAL_PATH)/docs/docs-preview-index.html | $(ACP)
+ $(hide) mkdir -p $(dir $@)
+ $(hide) $(ACP) $< $@
+
+$(full_target): $(static_doc_index_redirect)
+$(full_target): $(framework_built)
+
# ==== docs for the web (on the androiddevdocs app engine server) =======================
include $(CLEAR_VARS)
diff --git a/docs/docs-documentation-redirect.html b/docs/docs-documentation-redirect.html
index 98a265e..dbdf8b4 100644
--- a/docs/docs-documentation-redirect.html
+++ b/docs/docs-documentation-redirect.html
@@ -1,9 +1,9 @@
<html>
<head>
-<meta http-equiv="refresh" content="0;url=documentation.html">
+<meta http-equiv="refresh" content="0;url=reference/packages.html">
</head>
<body>
-<a href="documentation.html">click here if you are not redirected</a>
+<a href="reference/packages.html">click here if you are not redirected</a>
</body>
</html>
diff --git a/docs/docs-preview-index.html b/docs/docs-preview-index.html
new file mode 100644
index 0000000..e26b57c
--- /dev/null
+++ b/docs/docs-preview-index.html
@@ -0,0 +1,103 @@
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+<meta name="viewport" content="width=device-width,initial-scale=1.0,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no" />
+<meta content="IE=edge" http-equiv="X-UA-Compatible">
+<link rel="shortcut icon" type="image/x-icon" href="favicon.ico" />
+
+<title>Android N Developer Preview</title>
+
+<!-- STYLESHEETS -->
+<link rel="stylesheet"
+href="http://fonts.googleapis.com/css?family=Roboto+Condensed">
+<link rel="stylesheet" href="http://fonts.googleapis.com/css?family=Roboto:light,regular,medium,thin,italic,mediumitalic,bold"
+ title="roboto">
+<link href="assets/css/default.css?v=17" rel="stylesheet" type="text/css">
+<!-- JAVASCRIPT -->
+<script src="https://www.google.com/jsapi" type="text/javascript"></script>
+<script src="assets/js/android_3p-bundle.js" type="text/javascript"></script>
+<script type="text/javascript">
+ var toRoot = "../";
+ var metaTags = ["develop, getstarted, sdk, appquality, landing"];
+ var devsite = false;
+</script>
+<script src="assets/js/docs.js?v=3" type="text/javascript"></script>
+</head>
+
+<body>
+<div id="header-wrapper">
+ <div class="dac-header" id="header">
+ <div class="dac-header-inner">
+ <a class="dac-nav-toggle" data-dac-toggle-nav="" href="javascript:;"
+ title="Open navigation">
+ <span class="dac-nav-hamburger">
+ <span class="dac-nav-hamburger-top"></span>
+ <span class="dac-nav-hamburger-mid"></span>
+ <span class="dac-nav-hamburger-bot"></span>
+ </span>
+ </a>
+ <a class="dac-header-logo" href="index.html">
+ <img class="dac-header-logo-image" src="assets/images/android_logo.png"
+ srcset="assets/images/android_logo@2x.png 2x" width="32" height="36"
+ alt="Android"> Developers
+ </a>
+ </div>
+ </div>
+</div>
+<nav class="dac-nav">
+ <div class="dac-nav-dimmer" data-dac-toggle-nav=""></div>
+ <ul class="dac-nav-list" data-dac-nav="">
+ <li class="dac-nav-item dac-nav-head">
+ <a class="dac-nav-link dac-nav-logo" data-dac-toggle-nav=""
+ href="javascript:;" title="Close navigation">
+ <img class="dac-logo-image" src="assets/images/android_logo.png"
+ srcset="assets/images/android_logo@2x.png 2x" width="32" height="36"
+ alt="Android"> Developers
+ </a>
+ </li>
+ <li class="dac-nav-item develop">
+ <a class="dac-nav-link" href="reference/packages.html"
+ >API Reference</a>
+ </li>
+ </ul>
+</nav>
+
+<section class="dac-expand" style="padding-top:40px;background-color:#eee">
+ <div class="wrap" style="max-width:1100px;margin-top:0;height:100%">
+ <div class="cols dac-hero-content" style="padding-bottom:1em;">
+ <div class="col-11of16">
+
+
+<h1>Android N Developer Preview</h1>
+<p>
+ Get ready for Android N!
+ <strong>Test your apps</strong> on Nexus devices. Support new system
+ behaviors to <strong>save power and memory</strong>.
+ Extend your apps with <strong>multi-window UI</strong>,
+ <strong>direct reply notifications</strong> and more.
+</p>
+
+<h2>Get Started</h2>
+<ul>
+ <li>View the <a href="reference/packages.html">API Reference</a></li>
+ <li>Read Diff Reports:</a>
+ <ul>
+ <li><a href="sdk/api_diff/n-preview-1/changes.html"
+ >API 23 --> Preview 1</a></li>
+ </ul>
+ </li>
+ <li>Downloads and additional documentation are available at the
+ <a href="http://developer.android.com/preview/index.html">
+ Android N Developer Preview site</a></li>
+ <li>For information about Developer Preview 1, visit the
+ <a href="http://developer.android.com/preview/support.html">Support</a>
+ page.</li>
+</ul>
+
+
+ </div>
+ </div>
+ </div>
+</section>
+</body>
+</html>
diff --git a/docs/html-intl/intl/es/index.jd b/docs/html-intl/intl/es/index.jd
index 46974cfe..66f9bf0 100644
--- a/docs/html-intl/intl/es/index.jd
+++ b/docs/html-intl/intl/es/index.jd
@@ -15,39 +15,37 @@
})
</script>
-<!-- <div class="dac-hero-carousel" data-carousel-query="collection:index/carousel">
-</div> -->
-<section class="dac-hero-carousel">
-
-<!-- <article class="dac-expand dac-hero dac-invert active" style="background-color: rgb(38, 50, 56);"> -->
-<article class="dac-expand dac-hero dac-invert dac-darken mprev active" style="background-color: #75d1ff;">
-<a href="about/versions/marshmallow/index.html">
+<section class="dac-expand dac-hero dac-invert" style="background-color:#455A64">
<div class="wrap" style="max-width:1100px;margin-top:0">
- <div class="cols dac-hero-content">
- <div class="col-8of16 col-push-6of16 dac-hero-figure mprev">
- </div>
- <div class="col-8of16 col-pull-7of16">
- <div class="dac-hero-tag"></div>
-
- <h1 class="dac-hero-title" style="white-space:nowrap;">Android 6.0 Marshmallow</h1>
- </div>
- <div class="col-6of16 col-push-1of16">
- <p class="dac-hero-description" style="color:white"><strong>The
- official Android 6.0 SDK is now available!</strong>
- Explore what's new — runtime permissions,
- Doze and App Standby power-saving features, new
- assist technology, and more.</p>
-
- <a class="dac-hero-cta" href="{@docRoot}about/versions/marshmallow/index.html">
+ <div class="col-7of16 col-push-9of16" style="padding-left:2em;">
+ <a href="{@docRoot}preview/index.html">
+ <h1 class="dac-hero-title">Android N Developer Preview</h1>
+ <p class="dac-hero-description">
+ Get ready for the next version of Android!
+ <strong>Test your apps</strong> on Nexus and other devices. Support new system
+ behaviors to <strong>save power and memory</strong>.
+ Extend your apps with <strong>multi-window UI</strong>,
+ <strong>direct reply notifications</strong> and more.
+ </p>
+ <a class="dac-hero-cta" href="/preview/index.html">
<span class="dac-sprite dac-auto-chevron"></span>
Learn more
- </a><br>
- </div>
- </div>
+ </a><!--<br>
+ <a class="dac-hero-cta" href="/preview/support.html">
+ <span class="dac-sprite dac-auto-chevron"></span>
+ Update to Developer Preview (final SDK)
+ </a><br>-->
+ </a>
+ </div>
+ <div class="col-9of16 col-pull-7of16 dac-hero-figure" style="margin-top:0em;padding-right:1.5em;">
+ <a href="{@docRoot}preview/index.html">
+ <img style="" class="dac-hero-image" src="/images/home/n-preview-hero.png"
+ srcset="/images/home/n-preview-hero.png 1x,
+ /images/home/n-preview-hero_2x.png 2x">
+ </a>
</div>
</div>
-</a>
-</article></section>
+</section>
<div id="useUpdatedTemplates" style="display:none" class="dac-section dac-slim dac-gray dac-expand">
<div class="wrap dac-offset-parent">
diff --git a/docs/html-intl/intl/ja/index.jd b/docs/html-intl/intl/ja/index.jd
index 6dfa0dd..755ec62 100644
--- a/docs/html-intl/intl/ja/index.jd
+++ b/docs/html-intl/intl/ja/index.jd
@@ -15,39 +15,37 @@
})
</script>
-<!-- <div class="dac-hero-carousel" data-carousel-query="collection:index/carousel">
-</div> -->
-<section class="dac-hero-carousel">
-
-<!-- <article class="dac-expand dac-hero dac-invert active" style="background-color: rgb(38, 50, 56);"> -->
-<article class="dac-expand dac-hero dac-invert dac-darken mprev active" style="background-color: #75d1ff;">
-<a href="about/versions/marshmallow/index.html">
+<section class="dac-expand dac-hero dac-invert" style="background-color:#455A64">
<div class="wrap" style="max-width:1100px;margin-top:0">
- <div class="cols dac-hero-content">
- <div class="col-8of16 col-push-6of16 dac-hero-figure mprev">
- </div>
- <div class="col-8of16 col-pull-7of16">
- <div class="dac-hero-tag"></div>
-
- <h1 class="dac-hero-title" style="white-space:nowrap;">Android 6.0 Marshmallow</h1>
- </div>
- <div class="col-6of16 col-push-1of16">
- <p class="dac-hero-description" style="color:white"><strong>The
- official Android 6.0 SDK is now available!</strong>
- Explore what's new — runtime permissions,
- Doze and App Standby power-saving features, new
- assist technology, and more.</p>
-
- <a class="dac-hero-cta" href="{@docRoot}about/versions/marshmallow/index.html">
+ <div class="col-7of16 col-push-9of16" style="padding-left:2em;">
+ <a href="{@docRoot}preview/index.html">
+ <h1 class="dac-hero-title">Android N Developer Preview</h1>
+ <p class="dac-hero-description">
+ Get ready for the next version of Android!
+ <strong>Test your apps</strong> on Nexus and other devices. Support new system
+ behaviors to <strong>save power and memory</strong>.
+ Extend your apps with <strong>multi-window UI</strong>,
+ <strong>direct reply notifications</strong> and more.
+ </p>
+ <a class="dac-hero-cta" href="/preview/index.html">
<span class="dac-sprite dac-auto-chevron"></span>
Learn more
- </a><br>
- </div>
- </div>
+ </a><!--<br>
+ <a class="dac-hero-cta" href="/preview/support.html">
+ <span class="dac-sprite dac-auto-chevron"></span>
+ Update to Developer Preview (final SDK)
+ </a><br>-->
+ </a>
+ </div>
+ <div class="col-9of16 col-pull-7of16 dac-hero-figure" style="margin-top:0em;padding-right:1.5em;">
+ <a href="{@docRoot}preview/index.html">
+ <img style="" class="dac-hero-image" src="/images/home/n-preview-hero.png"
+ srcset="/images/home/n-preview-hero.png 1x,
+ /images/home/n-preview-hero_2x.png 2x">
+ </a>
</div>
</div>
-</a>
-</article></section>
+</section>
<div id="useUpdatedTemplates" style="display:none" class="dac-section dac-slim dac-gray dac-expand">
<div class="wrap dac-offset-parent">
diff --git a/docs/html-intl/intl/ko/index.jd b/docs/html-intl/intl/ko/index.jd
index 8b1bfbc..01c8587 100644
--- a/docs/html-intl/intl/ko/index.jd
+++ b/docs/html-intl/intl/ko/index.jd
@@ -15,39 +15,37 @@
})
</script>
-<!-- <div class="dac-hero-carousel" data-carousel-query="collection:index/carousel">
-</div> -->
-<section class="dac-hero-carousel">
-
-<!-- <article class="dac-expand dac-hero dac-invert active" style="background-color: rgb(38, 50, 56);"> -->
-<article class="dac-expand dac-hero dac-invert dac-darken mprev active" style="background-color: #75d1ff;">
-<a href="about/versions/marshmallow/index.html">
+<section class="dac-expand dac-hero dac-invert" style="background-color:#455A64">
<div class="wrap" style="max-width:1100px;margin-top:0">
- <div class="cols dac-hero-content">
- <div class="col-8of16 col-push-6of16 dac-hero-figure mprev">
- </div>
- <div class="col-8of16 col-pull-7of16">
- <div class="dac-hero-tag"></div>
-
- <h1 class="dac-hero-title" style="white-space:nowrap;">Android 6.0 Marshmallow</h1>
- </div>
- <div class="col-6of16 col-push-1of16">
- <p class="dac-hero-description" style="color:white"><strong>The
- official Android 6.0 SDK is now available!</strong>
- Explore what's new — runtime permissions,
- Doze and App Standby power-saving features, new
- assist technology, and more.</p>
-
- <a class="dac-hero-cta" href="{@docRoot}about/versions/marshmallow/index.html">
+ <div class="col-7of16 col-push-9of16" style="padding-left:2em;">
+ <a href="{@docRoot}preview/index.html">
+ <h1 class="dac-hero-title">Android N Developer Preview</h1>
+ <p class="dac-hero-description">
+ Get ready for the next version of Android!
+ <strong>Test your apps</strong> on Nexus and other devices. Support new system
+ behaviors to <strong>save power and memory</strong>.
+ Extend your apps with <strong>multi-window UI</strong>,
+ <strong>direct reply notifications</strong> and more.
+ </p>
+ <a class="dac-hero-cta" href="/preview/index.html">
<span class="dac-sprite dac-auto-chevron"></span>
Learn more
- </a><br>
- </div>
- </div>
+ </a><!--<br>
+ <a class="dac-hero-cta" href="/preview/support.html">
+ <span class="dac-sprite dac-auto-chevron"></span>
+ Update to Developer Preview (final SDK)
+ </a><br>-->
+ </a>
+ </div>
+ <div class="col-9of16 col-pull-7of16 dac-hero-figure" style="margin-top:0em;padding-right:1.5em;">
+ <a href="{@docRoot}preview/index.html">
+ <img style="" class="dac-hero-image" src="/images/home/n-preview-hero.png"
+ srcset="/images/home/n-preview-hero.png 1x,
+ /images/home/n-preview-hero_2x.png 2x">
+ </a>
</div>
</div>
-</a>
-</article></section>
+</section>
<div id="useUpdatedTemplates" style="display:none" class="dac-section dac-slim dac-gray dac-expand">
<div class="wrap dac-offset-parent">
diff --git a/docs/html-intl/intl/pt-br/index.jd b/docs/html-intl/intl/pt-br/index.jd
index 8605ab8..f5e1569 100644
--- a/docs/html-intl/intl/pt-br/index.jd
+++ b/docs/html-intl/intl/pt-br/index.jd
@@ -15,39 +15,37 @@
})
</script>
-<!-- <div class="dac-hero-carousel" data-carousel-query="collection:index/carousel">
-</div> -->
-<section class="dac-hero-carousel">
-
-<!-- <article class="dac-expand dac-hero dac-invert active" style="background-color: rgb(38, 50, 56);"> -->
-<article class="dac-expand dac-hero dac-invert dac-darken mprev active" style="background-color: #75d1ff;">
-<a href="about/versions/marshmallow/index.html">
+<section class="dac-expand dac-hero dac-invert" style="background-color:#455A64">
<div class="wrap" style="max-width:1100px;margin-top:0">
- <div class="cols dac-hero-content">
- <div class="col-8of16 col-push-6of16 dac-hero-figure mprev">
- </div>
- <div class="col-8of16 col-pull-7of16">
- <div class="dac-hero-tag"></div>
-
- <h1 class="dac-hero-title" style="white-space:nowrap;">Android 6.0 Marshmallow</h1>
- </div>
- <div class="col-6of16 col-push-1of16">
- <p class="dac-hero-description" style="color:white"><strong>The
- official Android 6.0 SDK is now available!</strong>
- Explore what's new — runtime permissions,
- Doze and App Standby power-saving features, new
- assist technology, and more.</p>
-
- <a class="dac-hero-cta" href="{@docRoot}about/versions/marshmallow/index.html">
+ <div class="col-7of16 col-push-9of16" style="padding-left:2em;">
+ <a href="{@docRoot}preview/index.html">
+ <h1 class="dac-hero-title">Android N Developer Preview</h1>
+ <p class="dac-hero-description">
+ Get ready for the next version of Android!
+ <strong>Test your apps</strong> on Nexus and other devices. Support new system
+ behaviors to <strong>save power and memory</strong>.
+ Extend your apps with <strong>multi-window UI</strong>,
+ <strong>direct reply notifications</strong> and more.
+ </p>
+ <a class="dac-hero-cta" href="/preview/index.html">
<span class="dac-sprite dac-auto-chevron"></span>
Learn more
- </a><br>
- </div>
- </div>
+ </a><!--<br>
+ <a class="dac-hero-cta" href="/preview/support.html">
+ <span class="dac-sprite dac-auto-chevron"></span>
+ Update to Developer Preview (final SDK)
+ </a><br>-->
+ </a>
+ </div>
+ <div class="col-9of16 col-pull-7of16 dac-hero-figure" style="margin-top:0em;padding-right:1.5em;">
+ <a href="{@docRoot}preview/index.html">
+ <img style="" class="dac-hero-image" src="/images/home/n-preview-hero.png"
+ srcset="/images/home/n-preview-hero.png 1x,
+ /images/home/n-preview-hero_2x.png 2x">
+ </a>
</div>
</div>
-</a>
-</article></section>
+</section>
<div id="useUpdatedTemplates" style="display:none" class="dac-section dac-slim dac-gray dac-expand">
<div class="wrap dac-offset-parent">
diff --git a/docs/html-intl/intl/ru/index.jd b/docs/html-intl/intl/ru/index.jd
index 7faaac0..e917a8d 100644
--- a/docs/html-intl/intl/ru/index.jd
+++ b/docs/html-intl/intl/ru/index.jd
@@ -15,39 +15,37 @@
})
</script>
-<!-- <div class="dac-hero-carousel" data-carousel-query="collection:index/carousel">
-</div> -->
-<section class="dac-hero-carousel">
-
-<!-- <article class="dac-expand dac-hero dac-invert active" style="background-color: rgb(38, 50, 56);"> -->
-<article class="dac-expand dac-hero dac-invert dac-darken mprev active" style="background-color: #75d1ff;">
-<a href="about/versions/marshmallow/index.html">
+<section class="dac-expand dac-hero dac-invert" style="background-color:#455A64">
<div class="wrap" style="max-width:1100px;margin-top:0">
- <div class="cols dac-hero-content">
- <div class="col-8of16 col-push-6of16 dac-hero-figure mprev">
- </div>
- <div class="col-8of16 col-pull-7of16">
- <div class="dac-hero-tag"></div>
-
- <h1 class="dac-hero-title" style="white-space:nowrap;">Android 6.0 Marshmallow</h1>
- </div>
- <div class="col-6of16 col-push-1of16">
- <p class="dac-hero-description" style="color:white"><strong>The
- official Android 6.0 SDK is now available!</strong>
- Explore what's new — runtime permissions,
- Doze and App Standby power-saving features, new
- assist technology, and more.</p>
-
- <a class="dac-hero-cta" href="{@docRoot}about/versions/marshmallow/index.html">
+ <div class="col-7of16 col-push-9of16" style="padding-left:2em;">
+ <a href="{@docRoot}preview/index.html">
+ <h1 class="dac-hero-title">Android N Developer Preview</h1>
+ <p class="dac-hero-description">
+ Get ready for the next version of Android!
+ <strong>Test your apps</strong> on Nexus and other devices. Support new system
+ behaviors to <strong>save power and memory</strong>.
+ Extend your apps with <strong>multi-window UI</strong>,
+ <strong>direct reply notifications</strong> and more.
+ </p>
+ <a class="dac-hero-cta" href="/preview/index.html">
<span class="dac-sprite dac-auto-chevron"></span>
Learn more
- </a><br>
- </div>
- </div>
+ </a><!--<br>
+ <a class="dac-hero-cta" href="/preview/support.html">
+ <span class="dac-sprite dac-auto-chevron"></span>
+ Update to Developer Preview (final SDK)
+ </a><br>-->
+ </a>
+ </div>
+ <div class="col-9of16 col-pull-7of16 dac-hero-figure" style="margin-top:0em;padding-right:1.5em;">
+ <a href="{@docRoot}preview/index.html">
+ <img style="" class="dac-hero-image" src="/images/home/n-preview-hero.png"
+ srcset="/images/home/n-preview-hero.png 1x,
+ /images/home/n-preview-hero_2x.png 2x">
+ </a>
</div>
</div>
-</a>
-</article></section>
+</section>
<div id="useUpdatedTemplates" style="display:none" class="dac-section dac-slim dac-gray dac-expand">
<div class="wrap dac-offset-parent">
diff --git a/docs/html-intl/intl/zh-cn/index.jd b/docs/html-intl/intl/zh-cn/index.jd
index c915863..ca3a84b 100644
--- a/docs/html-intl/intl/zh-cn/index.jd
+++ b/docs/html-intl/intl/zh-cn/index.jd
@@ -15,39 +15,37 @@
})
</script>
-<!-- <div class="dac-hero-carousel" data-carousel-query="collection:index/carousel">
-</div> -->
-<section class="dac-hero-carousel">
-
-<!-- <article class="dac-expand dac-hero dac-invert active" style="background-color: rgb(38, 50, 56);"> -->
-<article class="dac-expand dac-hero dac-invert dac-darken mprev active" style="background-color: #75d1ff;">
-<a href="about/versions/marshmallow/index.html">
+<section class="dac-expand dac-hero dac-invert" style="background-color:#455A64">
<div class="wrap" style="max-width:1100px;margin-top:0">
- <div class="cols dac-hero-content">
- <div class="col-8of16 col-push-6of16 dac-hero-figure mprev">
- </div>
- <div class="col-8of16 col-pull-7of16">
- <div class="dac-hero-tag"></div>
-
- <h1 class="dac-hero-title" style="white-space:nowrap;">Android 6.0 Marshmallow</h1>
- </div>
- <div class="col-6of16 col-push-1of16">
- <p class="dac-hero-description" style="color:white"><strong>The
- official Android 6.0 SDK is now available!</strong>
- Explore what's new — runtime permissions,
- Doze and App Standby power-saving features, new
- assist technology, and more.</p>
-
- <a class="dac-hero-cta" href="{@docRoot}about/versions/marshmallow/index.html">
+ <div class="col-7of16 col-push-9of16" style="padding-left:2em;">
+ <a href="{@docRoot}preview/index.html">
+ <h1 class="dac-hero-title">Android N Developer Preview</h1>
+ <p class="dac-hero-description">
+ Get ready for the next version of Android!
+ <strong>Test your apps</strong> on Nexus and other devices. Support new system
+ behaviors to <strong>save power and memory</strong>.
+ Extend your apps with <strong>multi-window UI</strong>,
+ <strong>direct reply notifications</strong> and more.
+ </p>
+ <a class="dac-hero-cta" href="/preview/index.html">
<span class="dac-sprite dac-auto-chevron"></span>
Learn more
- </a><br>
- </div>
- </div>
+ </a><!--<br>
+ <a class="dac-hero-cta" href="/preview/support.html">
+ <span class="dac-sprite dac-auto-chevron"></span>
+ Update to Developer Preview (final SDK)
+ </a><br>-->
+ </a>
+ </div>
+ <div class="col-9of16 col-pull-7of16 dac-hero-figure" style="margin-top:0em;padding-right:1.5em;">
+ <a href="{@docRoot}preview/index.html">
+ <img style="" class="dac-hero-image" src="/images/home/n-preview-hero.png"
+ srcset="/images/home/n-preview-hero.png 1x,
+ /images/home/n-preview-hero_2x.png 2x">
+ </a>
</div>
</div>
-</a>
-</article></section>
+</section>
<div id="useUpdatedTemplates" style="display:none" class="dac-section dac-slim dac-gray dac-expand">
<div class="wrap dac-offset-parent">
diff --git a/docs/html-intl/intl/zh-cn/training/wearables/apps/creating-app-china.jd b/docs/html-intl/intl/zh-cn/training/wearables/apps/creating-app-china.jd
new file mode 100644
index 0000000..4e33d36
--- /dev/null
+++ b/docs/html-intl/intl/zh-cn/training/wearables/apps/creating-app-china.jd
@@ -0,0 +1,156 @@
+page.title=创建面向中国市场的 Android Wear 应用
+parent.title=培训
+parent.link=creating.html
+page.tags= "可穿戴式", "应用", "中国"
+page.article=true
+
+@jd:body
+
+<div id="tb-wrapper">
+<div id="tb">
+<h2>本课程将向您展示如何</h2>
+<ol>
+ <li><a href="#ChinaSDK">在面向中国市场的 Android Wear 上支持您的应用</a></li>
+ <li><a href="#other-services">使用其他 Google Play Services API</a></li>
+</ol>
+<h2>依赖项和先决条件</h2>
+<ol>
+<li> 在手持式设备和可穿戴式设备上安装 Android 4.3(API 级别 18)或更高版本。</li>
+</ol>
+<h2>下载</h2>
+<ol>
+<div class="download-box">
+<a href="https://dl.google.com/androidwear/developers/china/google-play-services-7-8-87.zip" class="button">独立客户端库</a>
+<p class="filename">google-play-services-7-8-87.zip</p>
+</div>
+</ol>
+</div>
+</div>
+
+
+<p>
+在中国销售的手持式设备没有预装 Google Play 服务。为此,在面向中国市场的设备上运行的可穿戴式设备应用必须通过 Android Wear 协同应用与配对的手持式设备进行通信。
+
+为了让您能够开发出可与面向中国市场的 Android Wear 和面向全球其他市场的 Android Wear 配合使用的 APK,我们提供了专用版本的 Google Play services 客户端库。
+
+</p>
+
+<p>
+此客户端库与 Android 4.3(API 级别 18)及更高版本兼容,您只需将其拖放到您的应用中。
+您无需编写任何新代码,只需更改几个项目配置设置,然后重新编译应用。
+
+</p>
+
+
+<p>本页面的其余部分将介绍如何执行此过程。</p>
+
+
+
+<h2 id = "ChinaSDK">在面向中国市场的 Android Wear 上支持您的应用</h2>
+
+<p>
+<p>为了在所有手持式设备上支持您的可穿戴式设备应用,您必须下载 Google Play
+services 7.8.87 客户端库,并将其作为 Maven 存储库添加到您的项目中,配置开发项目以使用该库,然后重新编译您的应用。
+
+</p>
+
+<h3>添加 Google Play services 7.8.87 库</h3>
+
+<p>Google Play services 7.8.87 客户端库作为 Maven 存储库分发。要将此存储库添加到项目,请:
+</p>
+
+<ol>
+<li><a href="https://dl.google.com/androidwear/developers/china/google-play-services-7-8-87.zip">下载</a>客户端库。
+文件名为 {@code google-play-services-7-8-87.zip}。
+</li>
+<li>通过从下载的 zip 文件提取 {@code google-play-services-7-8-87/} 目录来创建本地 Maven 存储库,并将其放入项目的根目录中。
+
+</li>
+<li>在顶级项目 {@code build.gradle} 文件中,指定新创建的本地 Maven {@code google-play-services-7-8-87} 存储库的位置。
+
+</li>
+<p>
+以下示例向您展示如何操作:
+</p>
+<pre>
+allprojects {
+ repositories {
+
+ maven {
+ url "${rootProject.projectDir}/google-play-services-7-8-87"
+ }
+ // ... other repositories may go here ...
+
+ }</pre>
+</ol>
+<h3>配置应用以使用库</h3>
+<p>在 <em>mobile</em> 模块的 {@code build.gradle} 文件中,将 Google Play services 依赖项替换为指向客户端库(来自新添加的存储库)的引用。
+以下示例向您展示如何操作:
+
+</p>
+
+
+<pre>
+dependencies{
+ ...
+ wearApp project(':wear')
+ compile 'com.google.android.gms:play-services-wearable:7.8.87'
+ ...
+ }
+</pre>
+<p><em>wear</em> 模块的 {@code build.gradle} 文件也必须使用此版本的客户端库,例如:
+
+</p>
+<pre>
+dependencies {
+ compile 'com.google.android.support:wearable:1.3.0'
+ compile 'com.google.android.gms:play-services-wearable:7.8.87'
+}
+</pre>
+
+<p class="note"><strong>注</strong>:如果您在可穿戴式设备应用中使用任何其他 Google Play services API,则必须有选择地将这些 Google Play services API 添加到应用中,并显式指定 7.8.87 版本。
+
+例如,若要将 Google 位置 API 包含到可穿戴式设备应用中,则在您的 {@code build.gradle} 文件中添加以下行:
+
+</p>
+<pre>
+compile 'com.google.android.gms:play-services-location:7.8.87'
+</pre>
+</p>
+<h3>构建项目</h3>
+
+
+<p>现在,您可以<a href="{@docRoot}training/wearables/apps/packaging.html">构建</a>应用的新版本,并将其全局部署到 Android 手持式设备。
+</p>
+</ol>
+
+
+<h2 id= "other-services">使用其他 Google Play services API</h2>
+
+<p>
+如果您的应用使用 Google Play services API 而不是 Wearable API,那么您的应用需要检查这些 API 在运行时是否可用以及是否能够做出恰当的响应。
+检查 Google Play services API 可用性的方式有两种:
+
+</p>
+
+<ol>
+<li>使用独立的 <a href="https://developers.google.com/android/reference/com/google/android/gms/
+common/api/GoogleApiClient.html">{@code GoogleApiClient}</a> 实例来连接到其他 API。此界面包含回调以提醒您的应用连接成功还是失败。若要了解如何处理连接故障,请参阅<a href="https://developers.google.com/android/guides/api-client">访问 Google API</a>。
+
+
+</li>
+
+<li>使用
+<a href="https://developers.google.com/android/
+reference/com/google/android/gms/common/api/GoogleApiClient.Builder.html">{@code GoogleApiClient.Builder}
+</a>
+的 <a href="https://developers.google.com/android/reference/com/google/android/gms/common/
+api/GoogleApiClient.Builder.html#addApiIfAvailable(com.google.android.gms.common.api.Api<O>, O,
+com.google.android.gms.common.api.Scope...)"> {@code addApiIfAvailable()}</a> 方法以连接到必需的 API。在触发 <a href="https://developers.google.com/android/reference/
+com/google/android/gms/common/api/GoogleApiClient.ConnectionCallbacks#onConnected(android.os.Bundle)">
+{@code onConnected()}</a> 回调后,使用 <a href="https://developers.google.com/android/reference/com/google/android/gms/common/api/
+GoogleApiClient.html#hasConnectedApi(com.google.android.gms.common.api.Api<?>)">
+ {@code hasConnectedApi()}</a> 方法检查所请求的每个 API 是否均已正确连接。
+
+
+</ol>
diff --git a/docs/html-intl/intl/zh-cn/training/wearables/apps/creating.jd b/docs/html-intl/intl/zh-cn/training/wearables/apps/creating.jd
new file mode 100644
index 0000000..5c9ec3f
--- /dev/null
+++ b/docs/html-intl/intl/zh-cn/training/wearables/apps/creating.jd
@@ -0,0 +1,225 @@
+page.title=创建并运行可穿戴式设备应用
+page.tags=wear
+helpoutsWidget=true
+
+@jd:body
+
+<div id="tb-wrapper">
+<div id="tb">
+<h2>本课程将向您展示如何</h2>
+<ol>
+ <li><a href="#UpdateSDK">更新 SDK</a></li>
+ <li><a href="#SetupEmulator">设置 Android Wear 模拟器或设备</a></li>
+ <li><a href="#CreateProject">创建项目</a></li>
+ <li><a href="#Install">安装可穿戴式设备应用</a></li>
+ <li><a href="#Libraries">包含正确的库</a></li>
+</ol>
+</div>
+</div>
+
+<p>可穿戴式设备应用直接在可穿戴式设备上运行,让您可以直接访问可穿戴式设备上的底层硬件(如传感器)、Activity、服务等。
+
+</p>
+
+<p>如果您想要发布到 Google Play 商店,还需要提供包含可穿戴式设备应用的协同手持式设备应用。可穿戴式设备不支持 Google Play 商店,因此,用户可下载协同手持式设备应用,后者自动将可穿戴式设备应用推送到可穿戴式设备上。
+
+
+手持式设备应用还可用于执行繁重的处理、网络操作或其他工作,以及将处理结果发送到可穿戴式设备。
+
+
+</p>
+
+<p>此课程介绍如何设置设备或模拟器,并创建一个同时包含可穿戴式设备应用和手持式设备应用的项目。
+
+</p>
+
+<h2 id="UpdateSDK">更新 SDK</h2>
+
+<p>在您着手构建可穿戴式设备应用前,必须:</p>
+
+<ul>
+ <li><strong>将您的 SDK 工具更新到 23.0.0 或更高版本</strong>
+ <br>
+ 利用更新后的 SDK 工具,您可以构建和测试可穿戴式设备应用。
+ </li>
+ <li><strong>将您的 SDK 平台更新为 Android 4.4W.2 (API 20) 或更高版本</strong>
+ <br>
+ 更新后的平台版本提供了新的可穿戴式设备应用 API。
+ </li>
+</ul>
+
+<p>若要将 SDK 更新为上述组件,请参阅<a href="{@docRoot}sdk/installing/adding-packages.html#GetTools">获取最新的 SDK 工具</a>
+。</p>
+
+
+<h2 id="SetupEmulator">设置 Android Wear 模拟器或设备</h2>
+<p>我们建议您在真实的硬件上进行开发,以便您可以更好地衡量用户体验。
+不过,通过模拟器,您可以测试不同类型的屏幕形状,这对于测试非常有用。
+</p>
+
+<h3>设置 Android Wear 虚拟设备</h3>
+
+<p>若要设置 Android Wear 虚拟设备,请:</p>
+<ol>
+ <li>点击 <b>Tools > Android > AVD Manager</b>。</li>
+ <li>点击 <b>Create Virtual Device...</b>。</li>
+ <ol>
+ <li>在“Category”列表中点击 <b>Wear</b>:</li>
+ <li>选择 Android Wear Square 或 Android Wear Round。</li>
+ <li>点击 <b>Next</b>。</li>
+ <li>选择版本名称(例如,KitKat Wear)。</li>
+ <li>点击 <b>Next</b>。</li>
+ <li>(可选)更改虚拟设备的任意首选项。</li>
+ <li>点击 <b>Finish</b>。</li>
+ </ol>
+<li>启动模拟器:
+<ol>
+ <li>选择您刚创建的虚拟设备。</li>
+ <li>点击 <b>Play</b> 按钮。</li>
+ <li>等待模拟器初始化并显示 Android Wear 主屏幕。</li>
+</ol>
+</li>
+<li>将手持式设备与模拟器配对:
+<ol>
+ <li>在手持式设备上,从 Google Play 安装 Android Wear 应用。</li>
+ <li>通过 USB 将手持式设备连接到计算机。</li>
+ <li>将 AVD 的通信端口转发到连接的手持式设备(每次连接手持式设备时必须进行此操作):
+
+ <pre>adb -d forward tcp:5601 tcp:5601</pre>
+ </li>
+ <li>在手持式设备上启动 Android Wear 应用并连接到模拟器。</li>
+ <li>点击 Android Wear 应用右上角的菜单并选择
+<b>Demo Cards</b>。</li>
+ <li>您选择的卡片作为通知显示在模拟器主屏幕上。</li>
+</ol>
+</li>
+</ol>
+
+<h3 id="SetupDevice">设置 Android Wear 设备</h3>
+<p>若要设置 Android Wear 设备,请:</p>
+<ol>
+ <li>在手持式设备上安装 Android Wear 应用,可通过 Google Play 获取。</li>
+ <li>按照应用的说明将手持式设备与可穿戴式设备配对。
+ 这样,您可以测试同步的手持式设备通知(如果您正在构建这些通知)。</li>
+ <li>在您的手机上使 Android Wear 应用保持打开状态。</li>
+ <li>在 Android Wear 设备上启用 adb 调试。</li>
+ <ol>
+ <li>请转到 <strong>Settings > About</strong>。</li>
+ <li>连续点击 <strong>Build number</strong> 七次。</li>
+ <li>向右滑动返回“Settings”菜单。</li>
+ <li>转到屏幕底部的 <strong>Developer options</strong>。
+ </li>
+ <li>点击 <strong>ADB Debugging</strong> 以启用 adb。</li>
+ </ol>
+ <li>通过 USB 将可穿戴式设备连接到您的计算机,以便您可以在开发时将应用直接安装在可穿戴式设备上。
+可穿戴式设备应用和 Android Wear 应用上会显示一条消息,提示您允许调试。
+</li>
+
+ <p class="note"><strong>注</strong>:如果您无法通过 USB 将可穿戴式设备连接到计算机,您可以尝试<a href="{@docRoot}training/wearables/apps/bt-debugging.html">通过蓝牙连接</a>。
+
+
+ </p>
+
+ <li>在 Android Wear 应用上,选择 <strong>Always allow from this computer</strong> 并点击
+<strong>OK</strong>。</li>
+</ol>
+
+<p>Android Studio 上的 Android 工具窗口显示来自可穿戴式设备的系统日志。<i></i>
+运行 <code>adb devices</code> 命令也可列出可穿戴式设备。</p>
+
+<h2 id="CreateProject">创建项目</h2>
+
+<p>若要着手开发,请先创建包含可穿戴式设备和手持式设备应用模块的应用项目。
+在 Android Studio 中,点击 <b>File</b> >
+ <b>New Project</b>,并按照项目向导说明操作,如<a href="{@docRoot}sdk/installing/create-project.html">创建项目</a>中所述。
+
+按照向导进行操作时,请输入以下信息:</p>
+
+<ol>
+ <li>在 <b>Configure your Project</b> 窗口中,输入应用名称和软件包名称。
+</li>
+ <li>在 <b>Form Factors</b> 窗口中:
+ <ul>
+ <li>选择 <b>Phone and Tablet</b>,然后在 <b>Minimum SDK</b> 下选择 <b>API 9: Android 2.3 (Gingerbread)</b>。
+</li>
+ <li>选择 <b>Wear</b>,然后在 <b>Minimum SDK</b> 下选择 <b>API 20: Android 4.4 (KitKat Wear)</b>。
+</li>
+ </ul>
+ </li>
+ <li>在第一个 <b>Add an Activity</b> 窗口中,针对移动设备添加空白 Activity。</li>
+ <li>在第二个 <b>Add an Activity</b> 窗口中,针对穿戴设备添加空白 Activity。</li>
+</ol>
+ <p>向导完成时,Android Studio 将创建一个包含两个模块(<b>mobile</b>
+和 <b>wear</b>)的新项目。现在,您有一个可供手持式设备应用和可穿戴式设备应用使用的项目,您可以针对该项目创建 Activity、服务和自定义布局。
+手持式设备应用处理大多数繁重事务,如网络通信、密集型处理或需要大量用户交互的任务。
+
+当应用完成这些操作时,您的应用可通过通知或同步数据并将其发送到可穿戴式设备,将处理结果通知给可穿戴式设备。
+
+</p>
+
+ <p class="note"><b>注</b>:<b>wear</b> 模块还包含一个使用
+<a href="{@docRoot}reference/android/support/wearable/view/WatchViewStub.html"><code>WatchViewStub</code></a>的 "Hello World" Activity。
+
+ 该类可根据设备屏幕是圆形还是方形扩充布局。
+ <a href="{@docRoot}reference/android/support/wearable/view/WatchViewStub.html"><code>WatchViewStub</code></a>
+ 类是<a href="{@docRoot}training/wearables/apps/layouts.html#UiLibrary">可穿戴式设备支持库</a>提供的 UI 小工具之一。
+
+
+ </p>
+</li>
+
+<h2 id="Install">安装可穿戴式设备应用</h2>
+
+<p>开发时,与手持式设备应用相似,直接将应用安装到可穿戴式设备。使用 Android Studio 上的 <code>adb install</code> 或 <b>Play</b> 按钮。
+</p>
+
+<p>准备向用户发布应用时,将可穿戴式设备应用嵌入手持式设备应用的内部。
+用户从 Google Play 安装手持式设备应用时,已连接的可穿戴式设备会自动接收可穿戴式设备应用。
+</p>
+
+<p class="note"><b>注</b>:自动安装可穿戴式设备应用的功能仅支持发布密钥,如果您使用调试密钥签署应用,将无法自动安装。
+有关如何正确打包可穿戴式设备应用的完整信息,请参阅<a href="{@docRoot}training/wearables/apps/packaging.html">打包可穿戴式设备应用</a>
+
+。</p>
+
+<li>
+要将“Hello World”应用安装到可穿戴式设备,请从 <b>Run/Debug
+configuration</b> 下拉菜单中选择 <b>wear</b>,然后点击 <b>Play</b> 按钮。此时,该 Activity 将出现在可穿戴式设备上并显示“Hello world!”
+
+</li></ol>
+<h2 id="Libraries">包含正确的库</h2>
+
+<p>项目向导将在相应模块的 <code>build.gradle</code> 文件中为您导入正确的依赖项。不过,这些依赖项并不是必需的,因此,请阅读以下说明以了解您是否需要它们:
+
+
+</p>
+
+<b>通知</b>
+<p><a href="{@docRoot}tools/support-library/features.html#v4">Android
+v4 支持库</a>(或 v13,其包含 v4)包含的 API 可扩展手持式设备上的现有通知,使之支持可穿戴式设备。
+</p>
+
+<p>对于仅显示在可穿戴式设备上的通知(意味着这些通知由可穿戴式设备上运行的应用发出),您只需在可穿戴式设备上使用标准框架 API(API 级别 20),并在项目的 <b>mobile</b> 模块中移除支持库依赖项。
+
+
+
+</p>
+
+<b>Wearable Data Layer</b>
+<p>若要通过 Wearable Data Layer API 在可穿戴式设备和手持式设备之间同步和发送数据,您需要最新版本的
+<a href="{@docRoot}google/play-services/setup.html">Google Play 服务</a>。如果您不打算使用这些 API,则从这两个模块中移除依赖项。
+
+</p>
+
+<b>Wearable UI 支持库</b>
+<p>这是非官方库,其包含<a href="{@docRoot}training/wearables/apps/layouts.html#UiLibrary">专为可穿戴式设备设计的 UI 小工具</a>。
+
+我们建议您在应用中使用这些库,因为它们可作为最佳实践的范例,但仍可随时进行更改。
+不过,更新库时,您的应用不会中断,因为这些库已编译到您的应用中。
+要从更新的库中获取新功能,您只需静态链接新版本,然后相应更新您的应用。
+此库仅适用于创建可穿戴式设备应用。
+
+</p>
+
+<p>在后面的课程中,您将学习如何创建专为可穿戴式设备设计的布局,以及如何使用平台支持的各种语音操作。
+</p>
diff --git a/docs/html-intl/intl/zh-tw/index.jd b/docs/html-intl/intl/zh-tw/index.jd
index 493283b..a5772ef 100644
--- a/docs/html-intl/intl/zh-tw/index.jd
+++ b/docs/html-intl/intl/zh-tw/index.jd
@@ -15,39 +15,37 @@
})
</script>
-<!-- <div class="dac-hero-carousel" data-carousel-query="collection:index/carousel">
-</div> -->
-<section class="dac-hero-carousel">
-
-<!-- <article class="dac-expand dac-hero dac-invert active" style="background-color: rgb(38, 50, 56);"> -->
-<article class="dac-expand dac-hero dac-invert dac-darken mprev active" style="background-color: #75d1ff;">
-<a href="about/versions/marshmallow/index.html">
+<section class="dac-expand dac-hero dac-invert" style="background-color:#455A64">
<div class="wrap" style="max-width:1100px;margin-top:0">
- <div class="cols dac-hero-content">
- <div class="col-8of16 col-push-6of16 dac-hero-figure mprev">
- </div>
- <div class="col-8of16 col-pull-7of16">
- <div class="dac-hero-tag"></div>
-
- <h1 class="dac-hero-title" style="white-space:nowrap;">Android 6.0 Marshmallow</h1>
- </div>
- <div class="col-6of16 col-push-1of16">
- <p class="dac-hero-description" style="color:white"><strong>The
- official Android 6.0 SDK is now available!</strong>
- Explore what's new — runtime permissions,
- Doze and App Standby power-saving features, new
- assist technology, and more.</p>
-
- <a class="dac-hero-cta" href="{@docRoot}about/versions/marshmallow/index.html">
+ <div class="col-7of16 col-push-9of16" style="padding-left:2em;">
+ <a href="{@docRoot}preview/index.html">
+ <h1 class="dac-hero-title">Android N Developer Preview</h1>
+ <p class="dac-hero-description">
+ Get ready for the next version of Android!
+ <strong>Test your apps</strong> on Nexus and other devices. Support new system
+ behaviors to <strong>save power and memory</strong>.
+ Extend your apps with <strong>multi-window UI</strong>,
+ <strong>direct reply notifications</strong> and more.
+ </p>
+ <a class="dac-hero-cta" href="/preview/index.html">
<span class="dac-sprite dac-auto-chevron"></span>
Learn more
- </a><br>
- </div>
- </div>
+ </a><!--<br>
+ <a class="dac-hero-cta" href="/preview/support.html">
+ <span class="dac-sprite dac-auto-chevron"></span>
+ Update to Developer Preview (final SDK)
+ </a><br>-->
+ </a>
+ </div>
+ <div class="col-9of16 col-pull-7of16 dac-hero-figure" style="margin-top:0em;padding-right:1.5em;">
+ <a href="{@docRoot}preview/index.html">
+ <img style="" class="dac-hero-image" src="/images/home/n-preview-hero.png"
+ srcset="/images/home/n-preview-hero.png 1x,
+ /images/home/n-preview-hero_2x.png 2x">
+ </a>
</div>
</div>
-</a>
-</article></section>
+</section>
<div id="useUpdatedTemplates" style="display:none" class="dac-section dac-slim dac-gray dac-expand">
<div class="wrap dac-offset-parent">
diff --git a/docs/html/design/downloads/index.jd b/docs/html/design/downloads/index.jd
index e37b305..788c7c1 100644
--- a/docs/html/design/downloads/index.jd
+++ b/docs/html/design/downloads/index.jd
@@ -31,10 +31,10 @@
</div>
<div class="col-4">
<a class="download-button" onClick="ga('send', 'event', 'Design', 'Download', 'Wear Toolkit AI');"
- href="{@docRoot}downloads/design/Android_Wear_Toolkit_20140722.ai">Adobe® Illustrator® Toolkit</a>
+ href="{@docRoot}downloads/design/Android_Wear_Toolkit_371.ai">Adobe® Illustrator® Toolkit</a>
<a class="download-button" onClick="ga('send', 'event', 'Design', 'Download', 'Wear Toolkit PDF');"
- href="{@docRoot}downloads/design/Android_Wear_Toolkit_20140722.pdf">PDF Toolkit</a>
+ href="{@docRoot}downloads/design/Android_Wear_Toolkit_371.pdf">PDF Toolkit</a>
</div>
</div>
@@ -108,7 +108,7 @@
<div class="col-4">
<img src="{@docRoot}design/media/downloads_wear_Slide_Ai_Icon.png" width="150"
- style="width:150px;margin:0 auto;display:block">
+ style="width:150px;margin:0 auto 15px;display:block">
</div>
<div class="col-4">
@@ -128,7 +128,7 @@
<div class="col-4">
<img src="{@docRoot}design/media/downloads_wear_Slide_Psd_Icon.png" width="150"
- style="width:150px;margin:0 auto;display:block">
+ style="width:150px;margin:0 auto 15px;display:block">
</div>
<div class="col-4">
@@ -148,11 +148,35 @@
<div class="col-4">
<img src="{@docRoot}design/media/downloads_wear_Slide_IconExample.png" width="150"
- style="width:150px;margin:0 auto;display:block">
+ style="width:150px;margin:0 auto 20px;display:block">
</div>
<div class="col-4">
<a class="download-button" onClick="ga('send', 'event', 'Design', 'Download', 'Wear Watch Face Example Specifications');"
href="{@docRoot}downloads/design/Slide_IconExample.psd">Adobe® Photoshop® Icon</a>
</div>
+</div>
+
+<div class="cols">
+ <div class="col-5">
+ <h4>Hardware technical drawings</h4>
+<p>Technical drawings and specifications for the latest Android Wear devices.
+</p>
+
+ </div>
+ <div class="col-4">
+
+ <img src="{@docRoot}design/media/nemo_preview.png" width="150"
+ style="width:150px;margin:0 auto;display:block">
+
+ </div>
+ <div class="col-4">
+ <a class="download-button" onClick="ga('send', 'event', 'Design', 'Download', 'Hardware Technical Drawings');"
+ href="{@docRoot}downloads/design/AndroidWear_AllGear_TechDrawings&Spec_20151101_square.png">
+PNG Toolkit (Square)</a>
+
+ <a class="download-button" onClick="ga('send', 'event', 'Design', 'Download', 'Hardware Technical Drawings');"
+ href="{@docRoot}downloads/design/AndroidWear_AllGear_TechDrawings&Spec_20151101_round.png">
+PNG Toolkit (Round)</a>
+ </div>
</div>
\ No newline at end of file
diff --git a/docs/html/design/media/nemo_preview.png b/docs/html/design/media/nemo_preview.png
new file mode 100644
index 0000000..757b87a
--- /dev/null
+++ b/docs/html/design/media/nemo_preview.png
Binary files differ
diff --git a/docs/html/design/patterns/pure-android.jd b/docs/html/design/patterns/pure-android.jd
index e617711..6446e39 100644
--- a/docs/html/design/patterns/pure-android.jd
+++ b/docs/html/design/patterns/pure-android.jd
@@ -65,28 +65,6 @@
<div class="vspace size-2"> </div>
-<div class="cols">
- <div class="col-5">
-
-<h4>Don't use bottom tab bars</h4>
-<p>Other platforms use the bottom tab bar to switch between the app's views. Per platform convention,
-Android's tabs for view control are shown in action bars at the top of the screen instead. In
-addition, Android apps may use a bottom bar to display actions on a split action bar.</p>
-<p>You should follow this guideline to create a consistent experience with other apps on the Android
-platform and to avoid confusion between actions and view switching on Android.</p>
-<p>For more information on how to properly use action bars for view control, see
-<a href="{@docRoot}design/patterns/actionbar.html">Action Bars</a>.</p>
-
- </div>
- <div class="col-8">
-
- <img src="{@docRoot}design/media/migrating_ios_dialers.png">
- <div class="figure-caption">
- Android dialer with tabs in an action bar vs. bottom tabs in iOS.
- </div>
-
- </div>
-</div>
<div class="cols">
<div class="col-5">
diff --git a/docs/html/develop/index.jd b/docs/html/develop/index.jd
index 3b29318..460d056 100644
--- a/docs/html/develop/index.jd
+++ b/docs/html/develop/index.jd
@@ -63,7 +63,6 @@
<h2 class="norule">Latest</h2>
<div class="resource-widget resource-flow-layout col-16"
data-query="type:youtube+tag:develop+tag:featured, type:blog+tag:develop+tag:featured"
- data-query="collection:develop/landing/latest"
data-sortOrder="-timestamp"
data-cardSizes="6x6"
data-items-per-page="6"
diff --git a/docs/html/google/play/billing/billing_admin.jd b/docs/html/google/play/billing/billing_admin.jd
index 383ef5d..ff7acc9 100644
--- a/docs/html/google/play/billing/billing_admin.jd
+++ b/docs/html/google/play/billing/billing_admin.jd
@@ -155,8 +155,8 @@
application.</p>
</li>
<li><strong>Title</strong>
- <p>The title is a short descriptor for the item. For example, "Sleeping potion." Titles must be
- unique across an application's namespace. Every item must have a title. The title is visible to
+ <p>The title is a short descriptor for the item. For example, "Sleeping potion."
+ Every item must have a title. The title is visible to
users during checkout. For optimum appearance, titles should be no longer than 25 characters;
however, titles can be up to 55 characters in length.</p>
</li>
@@ -201,7 +201,7 @@
<p>To add a batch of items to a product list using a CSV file, you first need to create your CSV
file. The data values that you specify in the CSV file represent the same data values you specify
manually through the In-app Products UI (see <a href="#billing-form-add">Adding items one at a time
-to a product list</a>).
+to a product list</a>).
<p>If you are importing and exporting CSV files with in-app products, please
keep tax-inclusive pricing in mind. If you use auto-fill, you can provide a
diff --git a/docs/html/images/cards/card-n-apis_2x.png b/docs/html/images/cards/card-n-apis_2x.png
new file mode 100644
index 0000000..296ea6c
--- /dev/null
+++ b/docs/html/images/cards/card-n-apis_2x.png
Binary files differ
diff --git a/docs/html/images/cards/card-n-changes_2x.png b/docs/html/images/cards/card-n-changes_2x.png
new file mode 100644
index 0000000..7d08e37
--- /dev/null
+++ b/docs/html/images/cards/card-n-changes_2x.png
Binary files differ
diff --git a/docs/html/images/cards/card-n-downloads_2x.png b/docs/html/images/cards/card-n-downloads_2x.png
new file mode 100644
index 0000000..febc661
--- /dev/null
+++ b/docs/html/images/cards/card-n-downloads_2x.png
Binary files differ
diff --git a/docs/html/images/cards/card-n-overview_2x.png b/docs/html/images/cards/card-n-overview_2x.png
new file mode 100644
index 0000000..2c7392a
--- /dev/null
+++ b/docs/html/images/cards/card-n-overview_2x.png
Binary files differ
diff --git a/docs/html/images/cards/card-n-samples_2x.png b/docs/html/images/cards/card-n-samples_2x.png
new file mode 100644
index 0000000..d6621eb
--- /dev/null
+++ b/docs/html/images/cards/card-n-samples_2x.png
Binary files differ
diff --git a/docs/html/images/cards/card-n-sdk_2x.png b/docs/html/images/cards/card-n-sdk_2x.png
new file mode 100644
index 0000000..05d2eb9
--- /dev/null
+++ b/docs/html/images/cards/card-n-sdk_2x.png
Binary files differ
diff --git a/docs/html/images/cards/card-n-support_2x.png b/docs/html/images/cards/card-n-support_2x.png
new file mode 100644
index 0000000..0aec6cf
--- /dev/null
+++ b/docs/html/images/cards/card-n-support_2x.png
Binary files differ
diff --git a/docs/html/images/home/androidn-hero-n5.png b/docs/html/images/home/androidn-hero-n5.png
new file mode 100644
index 0000000..58c0837
--- /dev/null
+++ b/docs/html/images/home/androidn-hero-n5.png
Binary files differ
diff --git a/docs/html/images/home/n-preview-hero.png b/docs/html/images/home/n-preview-hero.png
new file mode 100644
index 0000000..b9636dd
--- /dev/null
+++ b/docs/html/images/home/n-preview-hero.png
Binary files differ
diff --git a/docs/html/images/home/n-preview-hero_2x.png b/docs/html/images/home/n-preview-hero_2x.png
new file mode 100644
index 0000000..c59d195
--- /dev/null
+++ b/docs/html/images/home/n-preview-hero_2x.png
Binary files differ
diff --git a/docs/html/images/n-preview-updates-narrow_2x.png b/docs/html/images/n-preview-updates-narrow_2x.png
new file mode 100644
index 0000000..cf2ad90
--- /dev/null
+++ b/docs/html/images/n-preview-updates-narrow_2x.png
Binary files differ
diff --git a/docs/html/images/n-preview-updates_2x.png b/docs/html/images/n-preview-updates_2x.png
new file mode 100644
index 0000000..ec64d68
--- /dev/null
+++ b/docs/html/images/n-preview-updates_2x.png
Binary files differ
diff --git a/docs/html/index.jd b/docs/html/index.jd
index 1777e72..2f67c58 100644
--- a/docs/html/index.jd
+++ b/docs/html/index.jd
@@ -16,39 +16,37 @@
})
</script>
-<!-- <div class="dac-hero-carousel" data-carousel-query="collection:index/carousel">
-</div> -->
-<section class="dac-hero-carousel">
-
-<!-- <article class="dac-expand dac-hero dac-invert active" style="background-color: rgb(38, 50, 56);"> -->
-<article class="dac-expand dac-hero dac-invert dac-darken mprev active" style="background-color: #75d1ff;">
-<a href="about/versions/marshmallow/index.html">
+<section class="dac-expand dac-hero dac-invert" style="background-color:#455A64">
<div class="wrap" style="max-width:1100px;margin-top:0">
- <div class="cols dac-hero-content">
- <div class="col-8of16 col-push-6of16 dac-hero-figure mprev">
- </div>
- <div class="col-8of16 col-pull-7of16">
- <div class="dac-hero-tag"></div>
-
- <h1 class="dac-hero-title" style="white-space:nowrap;">Android 6.0 Marshmallow</h1>
- </div>
- <div class="col-6of16 col-push-1of16">
- <p class="dac-hero-description" style="color:white"><strong>The
- official Android 6.0 SDK is now available!</strong>
- Explore what's new — runtime permissions,
- Doze and App Standby power-saving features, new
- assist technology, and more.</p>
-
- <a class="dac-hero-cta" href="{@docRoot}about/versions/marshmallow/index.html">
+ <div class="col-7of16 col-push-9of16" style="padding-left:2em;">
+ <a href="{@docRoot}preview/index.html">
+ <h1 class="dac-hero-title">Android N Developer Preview</h1>
+ <p class="dac-hero-description">
+ Get ready for the next version of Android!
+ <strong>Test your apps</strong> on Nexus and other devices. Support new system
+ behaviors to <strong>save power and memory</strong>.
+ Extend your apps with <strong>multi-window UI</strong>,
+ <strong>direct reply notifications</strong> and more.
+ </p>
+ <a class="dac-hero-cta" href="/preview/index.html">
<span class="dac-sprite dac-auto-chevron"></span>
Learn more
- </a><br>
- </div>
- </div>
+ </a><!--<br>
+ <a class="dac-hero-cta" href="/preview/support.html">
+ <span class="dac-sprite dac-auto-chevron"></span>
+ Update to Developer Preview (final SDK)
+ </a><br>-->
+ </a>
+ </div>
+ <div class="col-9of16 col-pull-7of16 dac-hero-figure" style="margin-top:0em;padding-right:1.5em;">
+ <a href="{@docRoot}preview/index.html">
+ <img style="" class="dac-hero-image" src="/images/home/n-preview-hero.png"
+ srcset="/images/home/n-preview-hero.png 1x,
+ /images/home/n-preview-hero_2x.png 2x">
+ </a>
</div>
</div>
-</a>
-</article></section>
+</section>
<div id="useUpdatedTemplates" style="display:none" class="dac-section dac-slim dac-gray dac-expand">
<div class="wrap dac-offset-parent">
@@ -59,7 +57,7 @@
<li class="dac-action">
<a class="dac-action-link" href="{@docRoot}sdk/index.html">
<i class="dac-action-sprite dac-sprite dac-auto-chevron-large"></i>
- Get the SDK
+ Get Android Studio
</a>
</li>
<li class="dac-action">
@@ -86,7 +84,7 @@
<div class="actions">
<div><a href="{@docRoot}sdk/index.html">
<span class="dac-sprite dac-auto-chevron-large"></span>
- Get the SDK
+ Get Android Studio
</a></div>
<div><a href="{@docRoot}samples/index.html">
<span class="dac-sprite dac-auto-chevron-large"></span>
diff --git a/docs/html/jd_collections.js b/docs/html/jd_collections.js
index fd76d19..bedbd2e 100644
--- a/docs/html/jd_collections.js
+++ b/docs/html/jd_collections.js
@@ -16,8 +16,8 @@
"index/secondary/carousel": {
"title": "",
"resources": [
- "http://www.youtube.com/watch?v=Pms0pcyPbAM",
"http://www.youtube.com/watch?v=9m6MoBM-sFI",
+ "http://www.youtube.com/watch?v=Pms0pcyPbAM",
"http://www.youtube.com/watch?v=e7t3svG9PTk",
"http://www.youtube.com/watch?v=J3IvOfvH1ys"
]
@@ -135,6 +135,33 @@
"https://www.youtube.com/watch?v=5Be2mJzP-Uw&list=PLWz5rJ2EKKc9e0d55YHgJFHXNZbGHEXJX"
]
},
+ "preview/landing/resources": {
+ "title": "",
+ "resources": [
+ "preview/overview.html",
+ "preview/api-overview.html",
+ "preview/behavior-changes.html",
+ "preview/setup-sdk.html",
+ "preview/samples.html",
+ "preview/support.html"
+ ]
+ },
+ "preview/landing/more": {
+ "title": "",
+ "resources": [
+ "https://www.youtube.com/watch?v=CsulIu3UaUM",
+ "preview/features/multi-window.html",
+ "preview/features/notification-updates.html",
+ "preview/features/background-optimization.html",
+ "preview/features/data-saver.html",
+ "preview/features/direct-boot.html",
+ "preview/features/icu4j-framework.html",
+ "preview/features/multilingual-support.html",
+ "preview/features/scoped-folder-access.html",
+ "preview/features/picture-in-picture.html",
+ "preview/features/tv-recording-api.html"
+ ]
+ },
"google/landing/services": {
"title": "",
"resources": [
diff --git a/docs/html/jd_extras.js b/docs/html/jd_extras.js
index e108d13..75b51fb 100644
--- a/docs/html/jd_extras.js
+++ b/docs/html/jd_extras.js
@@ -3281,6 +3281,18 @@
"type":"distribute"
},
{
+ "title":"What’s New in Android N Developer Preview",
+ "titleFriendly":"",
+ "summary":"Learn all about the new features in the Android N Preview.",
+ "url":"https://www.youtube.com/watch?v=CsulIu3UaUM",
+ "group":"",
+ "keywords": ["n preview"],
+ "tags": [],
+ "image":"https://i1.ytimg.com/vi/CsulIu3UaUM/maxresdefault.jpg",
+ "lang":"en",
+ "type":"Video"
+ },
+ {
"title":"Developing for Android 6.0 (Marshmallow)",
"titleFriendly":"",
"summary":"This video covers how to get started with the preview, important APIs to test and how to provide feedback on the preview.",
diff --git a/docs/html/jd_extras_en.js b/docs/html/jd_extras_en.js
index d35dbb54..f43ddd6 100644
--- a/docs/html/jd_extras_en.js
+++ b/docs/html/jd_extras_en.js
@@ -4718,6 +4718,32 @@
"sdk/installing/studio-tips.html",
]
},
+ "preview/landing/resources": {
+ "title": "",
+ "resources": [
+ "preview/overview.html",
+ "preview/api-overview.html",
+ "preview/behavior-changes.html",
+ "preview/setup-sdk.html",
+ "preview/samples.html",
+ "preview/support.html"
+ ]
+ },
+ "preview/landing/more": {
+ "title": "",
+ "resources": [
+ "preview/features/multi-window.html",
+ "preview/features/notification-updates.html",
+ "preview/features/background-optimization.html",
+ "preview/features/data-saver.html",
+ "preview/features/direct-boot.html",
+ "preview/features/icu4j-framework.html",
+ "preview/features/multilingual-support.html",
+ "preview/features/scoped-folder-access.html",
+ "preview/features/picture-in-picture.html",
+ "preview/features/tv-recording-api.html"
+ ]
+ }
};
/**
diff --git a/docs/html/jd_tag_helpers.js b/docs/html/jd_tag_helpers.js
index 7538e4d..3ad3633 100644
--- a/docs/html/jd_tag_helpers.js
+++ b/docs/html/jd_tag_helpers.js
@@ -16,7 +16,8 @@
TOOLS_RESOURCES,
TRAINING_RESOURCES,
YOUTUBE_RESOURCES,
- BLOGGER_RESOURCES
+ BLOGGER_RESOURCES,
+ PREVIEW_RESOURCES
);
for (var i = 0; i < ALL_RESOURCES.length; i++) {
@@ -72,6 +73,7 @@
'samples': SAMPLES_RESOURCES,
'tools': TOOLS_RESOURCES,
'training': TRAINING_RESOURCES,
+ 'preview': PREVIEW_RESOURCES,
'youtube': YOUTUBE_RESOURCES,
'blog': BLOGGER_RESOURCES
};
diff --git a/docs/html/ndk/downloads/index.jd b/docs/html/ndk/downloads/index.jd
index 301eea1..9ac3b46 100644
--- a/docs/html/ndk/downloads/index.jd
+++ b/docs/html/ndk/downloads/index.jd
@@ -307,7 +307,7 @@
</div>
- <p>Select, from the table below, the NDK package for your development platform. For information
+ <p>Select, from the table above, the NDK package for your development platform. For information
about the changes in the newest version of the NDK, see <a href="#rel">Release Notes</a>. For
information about earlier revisions, see <a href="{@docRoot}ndk/downloads/revision_history.html">
NDK Revision History.</a></p>
@@ -356,157 +356,256 @@
<h2 id="rel">Release Notes</h2>
- <p>Android NDK, Revision 10e</a> <em>(May 2015)</em></p>
+ <p>Android NDK, Revision 11</a> <em>(March 2016)</em></p>
<dl>
- <dt>Important changes:</dt>
+ <dt>Clang</dt>
<dd>
<ul>
- <li>Integrated the workaround for Cortex-A53 Erratum 843419 into the
- {@code aarch64-linux-android-4.9} linker. For more information on this workaround, see
- <a href="https://sourceware.org/ml/binutils/2015-03/msg00446.html">Workaround for cortex-a53
- erratum 843419.</a></li>
-
- <li>Added Clang 3.6; {@code NDK_TOOLCHAIN_VERSION=clang} now picks that version
- of Clang by default.</li>
-
- <li>Removed Clang 3.4.</li>
-
- <li>Removed GCC 4.6.</li>
-
- <li>Implemented multithreading support in {@code ld.gold} for all architectures. It can
- now link with or without support for multithreading; the default is to do it without.
+ <li>Important announcements
+ <ul>
+ <li>We strongly recommend switching to Clang.
<ul>
- <li>To compile with multithreading, use the {@code --threads} option.</li>
- <li>To compile without multithreading, use the {@code --no-threads} option.</li>
+ <li>If you experience problems with Clang, file bugs
+ <a href="https://github.com/android-ndk/ndk/issues">here</a> for issues
+ specific to Clang in the NDK. For more general Clang issues,
+ file bugs by following the instructions on
+ <a href="http://llvm.org/docs/HowToSubmitABug.html">this page</a>.</li>
</ul>
- </li>
+ </li>
+ <li>Clang has been updated to 3.8svn (r243773, build 2481030).
+ <ul>
+ <li>This version is a nearly pure upstream Clang.</li>
+ <li>The Windows 64-bit downloadable NDK package contains a 32-bit
+ version of Clang.</li>
+ </ul>
+ </li>
+ </ul>
+ </li>
- <li>Upgraded GDB/gdbserver to 7.7 for all architectures.</li>
-
- <li>Removed the NDK package for 32-bit Darwin.</li>
- </ul>
+ <li>Additions
+ <ul>
+ <li>Clang now provides support for emulated TLS.
+ <ul>
+ <li>The compiler now supports {@code __thread} by emulating
+ ELF TLS with pthread thread-specific data.</li>
+ <li>C++11 {@code thread_local} works in some cases, but not
+ for data with non-trivial destructors, because those cases
+ require support from libc. This limitation does not
+ apply when running on Android 6.0 (API level 23) or newer.</li>
+ <li>Emulated TLS does not yet work with Aarch64 when
+ TLS variables are accessed from a shared library.</li>
+ </ul>
+ </li>
+ </ul>
</dd>
<dl>
-
- <dt>Important bug fixes:</dt>
- <dd>
- <ul>
- <li>Fixed a crash that occurred when there were OpenMP loops outside of the main thread.</li>
-
- <li>Fixed a GCC 4.9 internal compiler error (<i>ICE</i>) that occured when the user declared
- {@code #pragma GCC optimize ("O0")}, but had a different level of optimization specified
- on the command line. The {@code pragma} takes precedence.</li>
-
- <li>Fixed an error that used to produce a crash with the following error message:
-<pre>
-in add_stores, at var-tracking.c:6000
-</pre>
- </li>
-
- <li>Implemented a workaround for a Clang 3.5 issue in which LLVM auto-vectorization
- generates {@code llvm.cttz.v2i64()}, an instruction with no counterpart in the ARM
- instruction set.</li>
- </ul>
- </dd>
-
- <dt>Other bug fixes:</dt>
- <dd>
- <ul>
- <li>Made the following header and library fixes:</li>
- <ul>
- <li>Fixed {@code PROPERTY_*} in {@code media/NdkMediaDrm.h}.</li>
- <li>Fixed {@code sys/ucontext.h} for {@code mips64}.</li>
- <li>Dropped the Clang version check for {@code __builtin_isnan} and
- {@code __builtin_isinf}.</li>
- <li>Added {@code android-21/arch-mips/usr/include/asm/reg.h}
- and {@code android-21/arch-mips64/usr/include/asm/reg.h}.</li>
- </ul>
- </li>
-
- <li>Fixed a spurious array-bounds warning that GCC 4.9 produced for x86, and reenabled the
- array bounds warning that GCC 4.9 had produced for ARM. The warning for ARM had
- previously been unconditionally disabled.</li>
-
- <li>Fixed Clang 3.5 for {@code mips} and {@code mips64} to create a writable
- {@code .gcc_except_table} section, thus matching GCC behavior. This change allows you
- to avoid the following linker warning:
-
-<pre>
-.../ld: warning: creating a DT_TEXTREL in a shared object
-</pre>
+ <dl>
+ <dt>GCC</dt>
+ <dd>
+ <ul>
+ <li>Important announcements</li>
+ <ul>
+ <li>GCC in the NDK is now deprecated in favor of Clang.
+ <ul>
+ <li>The NDK will neither be upgrading to 5.x, nor accept
+ non-critical backports.</li>
+ <li>Maintenance for miscompiles and internal compiler errors
+ in 4.9 will be handled on a case by case basis.</li>
+ </ul>
</li>
+ </ul>
+ <li>Removals
+ <ul>
+ <li>Removed GCC 4.8. All targets now use GCC 4.9.</li>
+ </ul>
+ </li>
+ <li>Other changes
+ <ul>
+ <li>Synchronized google/gcc-4_9 to r224707. Previously, it had been
+ synchronized with r214835.</li>
+ </ul>
+ </li>
+ </ul>
+ </dd>
+ <dl>
+ <dl>
+ <dt>NDK</dt>
+ <dd>
+ <ul>
+ <li>Important announcements
+ <ul>
+ <li>The samples are no longer included in the NDK package.
+ They are instead available on
+ <a href="https://github.com/googlesamples/android-ndk">GitHub.</a>
+ </li>
+ <li>The documentation is no longer included in the NDK package.
+ Instead, it is on the <a href="{@docRoot}ndk/index.html">Android
+ developer website.</a></li>
+ </ul>
+ </li>
- <li>Backported a fix for {@code compiler-rt} issues that were causing crashes when Clang
- compiled for {@code mips64}. For more information, see LLVM Issue
- <a href="http://llvm.org/bugs/show_bug.cgi?id=20098">20098</a>.</li>
+ <li>Additions
+ <ul>
+ <li>Added a native tracing API to {@code android-23}.</li>
+ <li>Added a native multinetwork API to {@code android-23}.</li>
+ <li>Enabled libc, m, and dl to provide versioned symbols, starting
+ from API level 21.</li>
+ <li>Added Vulkan headers and library to API level N.</li>
+ </ul>
+ </li>
- <li>Fixed Clang 3.5 crashes that occurred on non-ASCII comments. (Issue
- <a href="https://code.google.com/p/android/issues/detail?id=81440">81440</a>)</li>
+ <li>Removals
+ <ul>
+ <li>Removed support for {@code _WCHAR_IS_8BIT}.</li>
+ <li>Removed sed.</li>
+ <li>Removed mclinker.</li>
+ <li>Removed Perl.</li>
+ <li>Removed from all versions of NDK libc, m, and dl all symbols which
+ the platform versions of those libs do not support.</li>
+ <li>Partially removed support for mips64r2. The rest will be removed
+ in the future.</li>
+ </ul>
+ </li>
- <li>Fixed {@code stlport collate::compare} to return {@code -1} and {@code 1}. Previously,
- it had returned arbitrary signed numbers.</li>
+ <li>Other changes
+ <ul>
+ <li>Changed ARM standalone toolchains to default to arm7.
+ <ul>
+ <li>You can restore the old behavior by passing specifying the
+ {@code -target} option as {@code armv5te-linux-androideabi}.
+ </li>
+ </ul>
+ </li>
+ <li>Changed the build system to use {@code -isystem} for platform
+ includes.
+ <ul>
+ <li>Warnings that bionic causes no longer break app builds.</li>
+ </ul>
+ </li>
+ <li>Fixed a segfault that occurred when a binary threw exceptions
+ via gabi++. (Issue <a href="http://b.android.com/179410">179410</a>)
+ </li>
+ <li>Changed libc++’s inline namespace to {@code std::__ndk1}
+ to prevent ODR issues with platform libc++.</li>
- <li>Fixed {@code ndk-gdb} for 64-bit ABIs. (Issue
- <a href="https://code.google.com/p/android/issues/detail?id=118300">118300</a>)</li>
-
- <li>Fixed the crash that the HelloComputeNDK sample for RenderScript was producing on
- Android 4.4 (Android API level 19). For more information, see
- <a href="http://stackoverflow.com/questions/28057049/targeting-pre-lollipop-devices-using-renderscript-from-ndk-c">this page</a>.</li>
-
- <li>Fixed {@code libc++ __wrap_iter} for GCC. For more information, see LLVM Issue
- <a href="http://llvm.org/bugs/show_bug.cgi?id=22355">22355</a>.</li>
-
- <li>Fixed {@code .asm} support for ABI {@code x86_64}.</li>
-
- <li>Implemented a workaround for the GCC 4.8 {@code stlport} issue. (Issue
- <a href="https://android-review.googlesource.com/#/c/127773">127773</a>)</li>
-
- <li>Removed the trailing directory separator {@code \\} from the project path in Windows.
- (Issue <a href="https://code.google.com/p/android/issues/detail?id=160584">160584</a>)
+ <li>All libc++ libraries are now built with libc++abi.
+ <li>Bumped default {@code APP_PLATFORM} to Gingerbread.
+ <ul>
+ <li>Expect support for Froyo and older to be dropped in a
+ future release.</ul>
+ </ul>
+ <li>Updated gabi++ {@code _Unwind_Exception} struct for 64 bits.
+ <li>Added the following capabilities to cpufeatures:
+ <ul>
+ <li>Detect SSE4.1 and SSE4.2.</li>
+ <li>Detect cpu features on x86_64.</li>
+ </ul>
</li>
+ <li>Updated libc++abi to upstream
+ <a href="http://lists.llvm.org/pipermail/cfe-commits/Week-of-Mon-20150302/124603.html">
+ r231075</a>.
+ <li>Updated {@code byteswap.h}, {@code endian.h}, {@code sys/procfs.h},
+ {@code sys/ucontext.h}, {@code sys/user.h}, and {@code uchar.h} from
+ ToT Bionic.
+ <li>Synchronized {@code sys/cdefs.h} across all API levels.
- <li>Fixed a {@code no rule to make target} error that occurred when compiling a single
- {@code .c} file by executing the {@code ndk-build.cmd} command from {@code gradle}. (Issue
- <a href="https://code.google.com/p/android/issues/detail?id=66937">66937</a>)</li>
+ <li>Fixed {@code fegetenv and fesetenv} for arm.
+ <li>Fix end pointer size/alignment of {@code crtend_*} for mips64
+ and x86_64.
+ </ul>
+ </li>
+ </ul>
+ </ul>
+ </dd>
+ <dl>
+ <dl>
+ <dt>Binutils</dt>
+ <dd>
+ <ul>
+ <li>Additions
+ <ul>
+ <li>Added a new option: {@code --pic-veneer}.</li>
+ </ul>
+ </li>
- <li>Added the {@code libatomic.a} and {@code libgomp.a} libraries that had been missing from
- the following host toolchains:
- <ul>
- <li>{@code aarch64-linux-android-4.9}</li>
- <li>{@code mips64el-linux-android-4.9}</li>
- <li>{@code mipsel-linux-android-4.9}</li>
- <li>{@code x86_64-4.9}</li>
- </ul>
- </ul>
- </dd>
+ <li>Removals
+ <ul>
+ <li>The 32-bit Windows package no longer contains ld.gold.
+ You can instead get ld.gold from the 64-bit Windows package.</li>
+ </ul>
+ </li>
- <dt>Other changes:</dt>
- <dd>
- <ul>
- <li>Added {@code ld.gold} for {@code aarch64}. The default linker remains {@code ld.bfd}.
- To explicitly enable {@code ld.gold}, add {@code -fuse-ld=gold} to the
- {@code LOCAL_LDFLAGS} or {@code APP_LDFLAGS} variable.</li>
+ <li>Changes
+ <ul>
+ <li>Unified binutils source between Android and ChromiumOS.
+ For more information on this change, see the comments
+ <a href="https://android-review.googlesource.com/#/c/182865/">
+ here.</a></li>
+ <li>Improved reliability of Gold for aarch64. Use
+ {@code -fuse-ld=gold} at link time to use gold instead of bfd.
+ The default will likely switch in the next release.</li>
+ <li>Improved linking time for huge binaries for Gold ARM back end
+ (up to 50% linking time reduction for debuggable Chrome Browser).
+ </li>
+ </ul>
+ </li>
+ </ul>
+ </dd>
+ <dl>
+ <dl>
+ <dt>GDB</dt>
+ <dd>
+ <ul>
- <li>Built the MIPS and MIPS64 toolchains with {@code binutils-2.25}, which provides improved
- R6 support.</li>
+ <li>Removals
+ <ul>
+ <li>Removed ndk-gdb in favor of ndk-gdb.py.</li>
+ </ul>
+ </li>
- <li>Made {@code -fstandalone-debug} (full debug info) a default option for Clang.</li>
+ <li>Changes
+ <ul>
+ <li>Updated gdb to version 7.10.</li>
+ <li>Improved performance.</li>
+ <li>Improved error messages.</li>
+ <li>Fixed relative project paths.</li>
+ <li>Stopped Ctrl-C from killing the backgrounded gdbserver.</li>
+ <li>Improved Windows support.</li>
+ </ul>
+ </li>
+ </ul>
+ </dd>
- <li>Replaced {@code -fstack-protector} with {@code -fstack-protector-strong} for
- the ARM, AArch64, X86, and X86_64 toolchains for GCC 4.9, Clang 3.5, and
- Clang 3.6.</li>
+ <dl>
+ <dl>
+ <dt>YASM</dt>
+ <dd>
+ <ul>
- <li>Added the {@code --package} command-line switch to {@code ndk-gdb} to allow the build
- system to override the package name. (Issue
- <a href="https://code.google.com/p/android/issues/detail?id=56189">56189</a>)</li>
+ <li>Changes
+ <ul>
+ <li>Updated YASM to version 1.3.0.</li>
+ </ul>
+ </li>
+ </ul>
+ </dd>
- <li> Deprecated {@code -mno-ldc1-stc1} for MIPS. This option may not work with the new
- {@code -fpxx} and {@code -mno-odd-spreg} options, or with the FPXX ABI.</li>
-
- <li>Added MIPS MSA and R6 detection to {@code cpu-features}.</li>
-
- </ul>
- </dd>
-
- </dl>
+ <dl>
+ <dl>
+ <dt>Known issues</dt>
+ <dd>
+ <ul>
+ <li>x86 ASAN does not currently work. For more information, see the
+ discussion <a href="https://android-review.googlesource.com/#/c/186276/">
+ here.</a></li>
+ <li>The combination of Clang, x86, stlport_static, and optimization
+ levels higher than {@code -O0} causes test failures with
+ {@code dynamic_cast}. For more information, see the comments
+ <a href="https://android-review.googlesource.com/#/c/185920">here</a>.
+ </li>
+ <li>Exception handling often fails with c++_shared on ARM32. The root
+ cause is incompatibility between the LLVM unwinder that libc++abi uses
+ for ARM32 and libgcc. This behavior is not a regression from r10e.</li>
+ </ul>
+ </dd>
diff --git a/docs/html/ndk/downloads/revision_history.jd b/docs/html/ndk/downloads/revision_history.jd
index a32b814..b3ea858 100644
--- a/docs/html/ndk/downloads/revision_history.jd
+++ b/docs/html/ndk/downloads/revision_history.jd
@@ -5,6 +5,170 @@
took place in each new version.</p>
<div class="toggle-content closed">
+<a name="10e"></a>
+ <p>
+ <a href="#" onclick="return toggleContent(this)"> <img
+ src="/assets/images/triangle-closed.png" class="toggle-content-img" alt=""
+ >Android NDK, Revision 10e</a> <em>(May 2015)</em>
+ </p>
+ <div class="toggle-content-toggleme">
+ <dl>
+ <dt>Important changes:</dt>
+ <dd>
+ <ul>
+ <li>Integrated the workaround for Cortex-A53 Erratum 843419 into the
+ {@code aarch64-linux-android-4.9} linker. For more information on this workaround, see
+ <a href="https://sourceware.org/ml/binutils/2015-03/msg00446.html">Workaround for cortex-a53
+ erratum 843419.</a></li>
+
+ <li>Added Clang 3.6; {@code NDK_TOOLCHAIN_VERSION=clang} now picks that version
+ of Clang by default.</li>
+
+ <li>Removed Clang 3.4.</li>
+
+ <li>Removed GCC 4.6.</li>
+
+ <li>Implemented multithreading support in {@code ld.gold} for all architectures. It can
+ now link with or without support for multithreading; the default is to do it without.
+ <ul>
+ <li>To compile with multithreading, use the {@code --threads} option.</li>
+ <li>To compile without multithreading, use the {@code --no-threads} option.</li>
+ </ul>
+ </li>
+
+ <li>Upgraded GDB/gdbserver to 7.7 for all architectures.</li>
+
+ <li>Removed the NDK package for 32-bit Darwin.</li>
+ </ul>
+ </dd>
+ <dl>
+
+
+ <dt>Important bug fixes:</dt>
+ <dd>
+ <ul>
+ <li>Fixed a crash that occurred when there were OpenMP loops outside of the main thread.</li>
+
+ <li>Fixed a GCC 4.9 internal compiler error (<i>ICE</i>) that occured when the user declared
+ {@code #pragma GCC optimize ("O0")}, but had a different level of optimization specified
+ on the command line. The {@code pragma} takes precedence.</li>
+
+ <li>Fixed an error that used to produce a crash with the following error message:
+<pre>
+in add_stores, at var-tracking.c:6000
+</pre>
+ </li>
+
+ <li>Implemented a workaround for a Clang 3.5 issue in which LLVM auto-vectorization
+ generates {@code llvm.cttz.v2i64()}, an instruction with no counterpart in the ARM
+ instruction set.</li>
+ </ul>
+ </dd>
+
+ <dt>Other bug fixes:</dt>
+ <dd>
+ <ul>
+ <li>Made the following header and library fixes:</li>
+ <ul>
+ <li>Fixed {@code PROPERTY_*} in {@code media/NdkMediaDrm.h}.</li>
+ <li>Fixed {@code sys/ucontext.h} for {@code mips64}.</li>
+ <li>Dropped the Clang version check for {@code __builtin_isnan} and
+ {@code __builtin_isinf}.</li>
+ <li>Added {@code android-21/arch-mips/usr/include/asm/reg.h}
+ and {@code android-21/arch-mips64/usr/include/asm/reg.h}.</li>
+ </ul>
+ </li>
+
+ <li>Fixed a spurious array-bounds warning that GCC 4.9 produced for x86, and reenabled the
+ array bounds warning that GCC 4.9 had produced for ARM. The warning for ARM had
+ previously been unconditionally disabled.</li>
+
+ <li>Fixed Clang 3.5 for {@code mips} and {@code mips64} to create a writable
+ {@code .gcc_except_table} section, thus matching GCC behavior. This change allows you
+ to avoid the following linker warning:
+
+<pre>
+.../ld: warning: creating a DT_TEXTREL in a shared object
+</pre>
+ </li>
+
+ <li>Backported a fix for {@code compiler-rt} issues that were causing crashes when Clang
+ compiled for {@code mips64}. For more information, see LLVM Issue
+ <a href="http://llvm.org/bugs/show_bug.cgi?id=20098">20098</a>.</li>
+
+ <li>Fixed Clang 3.5 crashes that occurred on non-ASCII comments. (Issue
+ <a href="https://code.google.com/p/android/issues/detail?id=81440">81440</a>)</li>
+
+ <li>Fixed {@code stlport collate::compare} to return {@code -1} and {@code 1}. Previously,
+ it had returned arbitrary signed numbers.</li>
+
+ <li>Fixed {@code ndk-gdb} for 64-bit ABIs. (Issue
+ <a href="https://code.google.com/p/android/issues/detail?id=118300">118300</a>)</li>
+
+ <li>Fixed the crash that the HelloComputeNDK sample for RenderScript was producing on
+ Android 4.4 (Android API level 19). For more information, see
+ <a href="http://stackoverflow.com/questions/28057049/targeting-pre-lollipop-devices-using-renderscript-from-ndk-c">this page</a>.</li>
+
+ <li>Fixed {@code libc++ __wrap_iter} for GCC. For more information, see LLVM Issue
+ <a href="http://llvm.org/bugs/show_bug.cgi?id=22355">22355</a>.</li>
+
+ <li>Fixed {@code .asm} support for ABI {@code x86_64}.</li>
+
+ <li>Implemented a workaround for the GCC 4.8 {@code stlport} issue. (Issue
+ <a href="https://android-review.googlesource.com/#/c/127773">127773</a>)</li>
+
+ <li>Removed the trailing directory separator {@code \\} from the project path in Windows.
+ (Issue <a href="https://code.google.com/p/android/issues/detail?id=160584">160584</a>)
+ </li>
+
+ <li>Fixed a {@code no rule to make target} error that occurred when compiling a single
+ {@code .c} file by executing the {@code ndk-build.cmd} command from {@code gradle}. (Issue
+ <a href="https://code.google.com/p/android/issues/detail?id=66937">66937</a>)</li>
+
+ <li>Added the {@code libatomic.a} and {@code libgomp.a} libraries that had been missing from
+ the following host toolchains:
+ <ul>
+ <li>{@code aarch64-linux-android-4.9}</li>
+ <li>{@code mips64el-linux-android-4.9}</li>
+ <li>{@code mipsel-linux-android-4.9}</li>
+ <li>{@code x86_64-4.9}</li>
+ </ul>
+ </ul>
+ </dd>
+
+ <dt>Other changes:</dt>
+ <dd>
+ <ul>
+ <li>Added {@code ld.gold} for {@code aarch64}. The default linker remains {@code ld.bfd}.
+ To explicitly enable {@code ld.gold}, add {@code -fuse-ld=gold} to the
+ {@code LOCAL_LDFLAGS} or {@code APP_LDFLAGS} variable.</li>
+
+ <li>Built the MIPS and MIPS64 toolchains with {@code binutils-2.25}, which provides improved
+ R6 support.</li>
+
+ <li>Made {@code -fstandalone-debug} (full debug info) a default option for Clang.</li>
+
+ <li>Replaced {@code -fstack-protector} with {@code -fstack-protector-strong} for
+ the ARM, AArch64, X86, and X86_64 toolchains for GCC 4.9, Clang 3.5, and
+ Clang 3.6.</li>
+
+ <li>Added the {@code --package} command-line switch to {@code ndk-gdb} to allow the build
+ system to override the package name. (Issue
+ <a href="https://code.google.com/p/android/issues/detail?id=56189">56189</a>)</li>
+
+ <li> Deprecated {@code -mno-ldc1-stc1} for MIPS. This option may not work with the new
+ {@code -fpxx} and {@code -mno-odd-spreg} options, or with the FPXX ABI.</li>
+
+ <li>Added MIPS MSA and R6 detection to {@code cpu-features}.</li>
+
+ </ul>
+ </dd>
+ </dl>
+
+ </div>
+</div>
+
+<div class="toggle-content closed">
<a name="10d"></a>
<p>
<a href="#" onclick="return toggleContent(this)"> <img
diff --git a/docs/html/preview/api-overview.jd b/docs/html/preview/api-overview.jd
new file mode 100644
index 0000000..eb52c13
--- /dev/null
+++ b/docs/html/preview/api-overview.jd
@@ -0,0 +1,703 @@
+page.title=Android N for Developers
+meta.tags="preview", "androidn"
+page.tags="preview", "developer preview"
+page.image=images/cards/card-n-apis_2x.png
+@jd:body
+
+
+
+
+<div id="qv-wrapper">
+<div id="qv">
+ <h2>Key developer features</h2>
+ <ol>
+ <ul style="list-style-type:none;">
+ <li><a href="#multi-window_support">Multi-window support</a></li>
+ <li><a href="#notification_enhancements">Notifications</a></li>
+ <li><a href="#jit_aot">JIT/AOT compilation</a></li>
+ <li><a href="#quick_path_to_app_install">Quick path to app install</a></li>
+ <li><a href="#doze_on_the_go">Doze on the go</a></li>
+ <li><a href="#background_optimizations">Background optimizations</a></li>
+ <li><a href="#data_saver">Data Saver</a></li>
+ <li><a href="#tile_api">Quick Settings Tile API</a></li>
+ <li><a href="#number-blocking">Number-blocking</a></li>
+ <li><a href="#call_screening">Call screening</a></li>
+ <li><a href="#multi-locale_languages">Locales and languages</a></li>
+ <li><a href="#icu4">ICU4J APIs in Android</a></li>
+ <li><a href="#gles_32">OpenGL ES 3.2 API</a></li>
+ <li><a href="#android_tv_recording">Android TV recording</a></li>
+ <li><a href="#android_for_work">Android for Work</a></li>
+ <li><a href="#accessibility_enhancements">Accessibility</a></li>
+ <li><a href="#direct_boot">Direct Boot</a></li>
+ <li><a href="#key_attestation">Key Attestation</a></li>
+ <li><a href="#network_security_config">Network Security Config</a></li>
+ <li><a href="#default_trusted_ca">Default Trusted CA</a></li>
+ <li><a href="apk_signature_v2">APK signature scheme v2</a></li>
+ <li><a href="#scoped_directory_access">Scoped directory access</a></li>
+ </ol>
+</div>
+</div>
+
+
+
+<p>Android N is still in active development, but you can try it
+now as part of the N Developer Preview. The sections below highlight some of
+the new features for developers. </p>
+
+<p>
+ Make sure to check out the <a href=
+ "{@docRoot}preview/behavior-changes.html">Behavior Changes</a> to learn about
+ areas where platform changes may affect your apps, take a look at the
+ developer guides to learn more about key features, and download the <a href=
+ "{@docRoot}preview/setup-sdk.html#docs-dl">API Reference</a> for details on
+ new APIs.
+</p>
+
+<h2 id="multi-window_support">Multi-window support</h2>
+
+
+<p>In Android N, we're introducing a new and much-requested multitasking feature
+into the platform — multi-window support. </p>
+
+ <p>Users can now pop open two apps on the screen at once. </p>
+ <ul>
+ <li>On phones and tablets
+running Android N, users can run two apps side-by-side or
+one-above-the-other in splitscreen mode. Users can resize the apps by dragging
+the divider between them. </li>
+
+<li>On Android TV devices, apps can put themselves in <a
+href="{@docRoot}preview/features/picture-in-picture.html">picture-in-picture
+mode</a>, allowing them to continue showing content while the user browses or
+interacts with other apps.</li>
+ </ul>
+
+<div class="col-4of10">
+<img src="{@docRoot}preview/images/mw-portrait.png" alt="" style="height:460px;padding-left:1em;"
+ id="img-split-screen" />
+<p class="img-caption">
+ <strong>Figure 1.</strong> Apps running in split-screen mode.
+</p>
+ </div>
+
+<p>Especially on tablets and other larger-screen devices, multi-window support
+gives you new ways to engage users. You can even enable drag-and-drop in
+your app to let users conveniently drag content to or from your app — a great
+way to enhance your user experience. </p>
+
+<p>It's straightforward to add multi-window support to your app and configure how it
+handles multi-window display. For example, you can specify your activity's
+minimum allowable dimensions, preventing users from resizing the activity below
+that size. You can also disable multi-window display for your app, which
+ ensures that the system will only show your app in full-screen mode.</p>
+
+<p>
+ For more information, see the <a href=
+ "{@docRoot}preview/features/multi-window.html">Multi-Window Support</a>
+ developer documentation.
+</p>
+
+<h2 id="notification_enhancements">Notification enhancements</h2>
+
+<p>In Android N we've redesigned notifications to make them easier and faster to
+use. Some of the changes include:</p>
+
+<ul>
+ <li>
+ <strong>Template updates</strong>: We're updating notification templates to
+ put a new emphasis on hero image and avatar. Developers will be able to
+ take advantage of the new templates with minimal adjustments in their code.
+ </li>
+
+ <li>
+ <strong>Bundled notifications</strong>: The system can group messages
+ together, for example by message topic, and display the group. A user can
+ take actions, such as Dismiss or Archive, on them in place. If you’ve
+ implemented notifications for Android Wear, you’ll already be familiar with
+ this model.
+ </li>
+
+ <li>
+ <strong>Direct reply</strong>: For real-time communication apps, the
+ Android system supports inline replies so that users can quickly respond to
+ an SMS or text message directly within the notification interface.
+ </li>
+
+ <li>
+ <strong>Custom views</strong>: Two new APIs enable you to leverage system
+ decorations, such as notification headers and actions, when using custom
+ views in notifications.
+ </li>
+</ul>
+
+<div class="col-4of12">
+ <img src="{@docRoot}preview/images/notifications-1.png" alt=""
+ style="padding:.5em;max-width:226px">
+</div>
+
+<div class="col-4of12">
+ <img src="{@docRoot}preview/images/notifications-3.png" alt=""
+ style="padding:.5em;max-width:226px">
+</div>
+
+<div class="col-4of12">
+ <img src="{@docRoot}preview/images/notifications-2.png" alt=""
+ style="padding:.5em;max-width:226px">
+</div>
+
+
+<p class="img-caption">
+ <strong>Figure 2.</strong> Bundled notifications and direct reply.
+</p>
+
+<p>To learn how to implement the new features, see the
+ <a href="{@docRoot}preview/features/notification-updates.html">Notifications</a>
+ guide.</p>
+
+
+
+<h2 id="jit_aot">Profile-guided JIT/AOT compilation</h2>
+
+<p>In Android N, we've added a Just in Time (JIT) compiler with code profiling to
+ART, which lets it constantly improve the performance of Android apps as they
+run. The JIT compiler complements ART's current Ahead of Time (AOT) compiler
+and helps improve runtime performance, save storage space, and speed up app
+updates and system updates.</p>
+
+<p>Profile-guided compilation lets ART manage the AOT/JIT compilation for each app
+according to its actual usage, as well as conditions on the device. For
+example, ART maintains a profile of each app's hot methods and can precompile
+and cache those methods for best performance. It leaves other parts of the app
+uncompiled until they are actually used.</p>
+
+<p>Besides improving performance for key parts of the app, profile-guided
+compilation helps reduce an app's overall RAM footprint, including associated
+binaries. This feature is especially important on low-memory devices.</p>
+
+<p>ART manages profile-guided compilation in a way that minimizes impact on the
+device battery. It does precompilation only when then the device is idle and
+charging, saving time and battery by doing that work in advance.</p>
+
+<h2 id="quick_path_to_app_install">Quick path to app install</h2>
+
+<p>One of the most tangible benefits of ART's JIT compiler is the speed of app
+installs and system updates. Even large apps that required several minutes to
+optimize and install in Android 6.0 can now install in just a matter of
+seconds. System updates are also faster, since there's no more optimizing step. </p>
+
+<h2 id="doze_on_the_go">Doze on the go...</h2>
+
+<p>Android 6.0 introduced Doze, a system mode that saves battery by deferring
+apps' CPU and network activities when the device is idle, such as when it's
+sitting on a table or in a drawer. </p>
+
+<p>Now in Android N, Doze takes a step further and saves battery while on the go.
+Any time the screen is off for a period of time and the device is unplugged,
+Doze applies a subset of the familiar CPU and network restrictions to apps.
+This means users can save battery even when carrying their devices in their
+pockets.</p>
+
+
+<img src="/preview/images/doze-diagram-1.png"
+ alt="" id="figure1" />
+<p class="img-caption">
+ <strong>Figure 3.</strong> Doze now applies
+ restrictions to improve battery life even when the device is not stationary.
+</p>
+
+
+<p>A short time after the screen turns off while the device is on battery, Doze
+restricts network access and defers jobs and syncs. During brief maintenance
+windows, applications are allowed network access and any of their deferred
+jobs/syncs are executed. Turning the screen on or plugging in the device brings
+the device out of Doze.</p>
+
+<p>When the device is stationary again, with screen off and on battery for a
+period of time, Doze applies the full CPU and network restrictions on {@link
+android.os.PowerManager.WakeLock}, {@link android.app.AlarmManager} alarms, and
+GPS/Wi-Fi scans.</p>
+
+<p>The best practices for adapting your app to Doze are the same whether the
+device is moving or not, so if you already updated your app to gracefully
+handle Doze, you're all set. If not, start <a
+href="{@docRoot}training/monitoring-device-state/doze-standby.html#assessing_your_app">adapting
+your app to Doze</a> now.</p>
+
+<h2 id="background_optimizations">Project Svelte: Background optimizations</h2>
+
+<p>Project Svelte is an ongoing effort to minimize RAM use by system and apps
+across the range of Android devices in the ecosystem. In Android N, Project
+Svelte is focused on optimizing the way apps run in the background. </p>
+
+<p>Background processing is an essential part of most apps. When handled right, it
+can make your user experience amazing — immediate, fast, and context-aware.
+When not handled right, background processing can needlessly consume RAM (and
+battery) and affect system performance for other apps. </p>
+
+<p>Since Android 5.0, {@link android.app.job.JobScheduler} has been the
+preferred way of performing background work in a way that's good
+for users. Apps can schedule jobs while letting the system optimize based on
+memory, power, and connectivity conditions. JobScheduler offers control and
+simplicity, and we want all apps to use it. </p>
+
+<p>
+ Another good option is <a href=
+ "https://developers.google.com/android/reference/com/google/android/gms/gcm/GcmNetworkManager">
+ <code>GCMNetworkManager</code></a>, part of Google Play Services, which
+ offers similar job scheduling with compatibility across legacy versions of
+ Android.
+</p>
+
+<p>We're continuing to extend <code>JobScheduler</code> and
+<code>GCMNetworkManager</code> to meet more of
+your use cases — for example, in Android N you can now schedule background
+work based on changes in Content Providers. At the same time we're starting to
+deprecate some of the older patterns that can reduce system performance,
+especially on low-memory devices.</p>
+
+<p>In Android N we're removing three commonly-used implicit broadcasts —
+ {@link android.net.ConnectivityManager#CONNECTIVITY_ACTION}, {@link
+ android.hardware.Camera#ACTION_NEW_PICTURE}, and {@link
+ android.hardware.Camera#ACTION_NEW_VIDEO} — since those can wake the
+background processes of multiple apps at once and strain memory and battery. If
+your app is receiving these, take advantage of the N Developer Preview to
+ migrate to <code>JobScheduler</code> and related APIs instead. </p>
+
+<p>
+ Take a look at the <a href=
+ "{@docRoot}preview/features/background-optimization.html">Background
+ Optimizations</a> documentation for details.
+</p>
+
+
+<h2 id="data_saver">Data Saver</h2>
+
+<div class="col-5of12" style="margin-right:1.5em;">
+<img src="{@docRoot}preview/images/datasaver.png" style="border:2px solid #ddd">
+
+<p class="img-caption" style="padding-right:2em;">
+ <strong>Figure 4.</strong> Data Saver in Settings.
+</p>
+ </div>
+
+<p>Over the life of a mobile device, the cost of a cellular data plan typically
+exceeds the cost of the device itself. For many users, cellular data is an
+expensive resource that they want to conserve. </p>
+
+<p>Android N introduces Data Saver mode, a new system service that helps reduce
+cellular data use by apps, whether roaming, near the end of the billing cycle,
+or on a small prepaid data pack. Data Saver gives users control over how apps
+use cellular data and lets developers provide more efficient service when Data
+Saver is on. </p>
+
+<p>When a user enables Data Saver in <strong>Settings</strong> and the device is
+on a metered network, the system blocks background data usage and signals apps
+to use less data in the foreground wherever possible — such as by limiting
+bit rate for streaming, reducing image quality, deferring optimistic precaching,
+and so on. Users can whitelist specific apps to allow background metered data
+usage even when Data Saver is turned on.</p>
+
+<p>Android N extends the {@link android.net.ConnectivityManager} to provide apps a
+way to <a href="{@docRoot}preview/features/data-saver.html#status">retrieve the
+user's Data Saver preferences</a> and <a
+href="{@docRoot}preview/features/data-saver.html#monitor-changes">monitor
+preference changes</a>. All apps should check whether the user has enabled Data
+Saver and make an effort to limit foreground and background data usage.</p>
+
+
+<h2 id="tile_api">Quick Settings Tile API</h2>
+
+
+<div style="float:right;max-width:320px">
+<img src="{@docRoot}preview/images/quicksettings.png" style="padding-left:1.5em;">
+
+<p class="img-caption" style="padding-left:2em;">
+ <strong>Figure 5.</strong> Quick Settings tiles in the notification shade.
+</p>
+
+
+ </div><p>Quick Settings is a popular and simple way to expose key settings and actions,
+directly from the notification shade. In Android N, we've expanded the scope of
+Quick Settings to make it even more useful and convenient. </p>
+
+<p>We've added more room for additional Quick Settings tiles, which users can
+access across a paginated display area by swiping left or right. We've also
+given users control over what Quick Settings tiles appear and where they are
+displayed — users can add or move tiles just by dragging and dropping them. </p>
+
+<p>For developers, Android N also adds a new API that lets you define your own
+ Quick Settings tiles to give users easy access to key controls and actions in your app.</p>
+
+<p>
+ Quick Settings tiles are reserved for controls or actions that are either
+ urgently required or frequently used, and should not be used as shortcuts to
+ launching an app.
+</p>
+
+<p>
+ Once you’ve defined your tiles, you can surface them to users, who can add
+ them to Quick Settings just by drag and drop.
+</p>
+
+<p>
+ For information about creating an app tile, see the
+ <code>android.service.quicksettings.Tile</code> in the downloadable <a href=
+ "{@docRoot}preview/setup-sdk.html#docs-dl">API Reference</a>.
+</p>
+
+
+
+<h2 id="number-blocking">Number-blocking</h2>
+
+<p>Android N now supports number-blocking in the platform and provides a
+framework API to let service providers maintain a blocked-number list. The
+default SMS app, the default phone app, and carrier apps can read from and
+write to the blocked-number list. The list is not accessible to other apps.</p>
+
+<p>By making number-blocking a standard feature of the platform, Android provides
+a consistent way for apps to support number-blocking across a wide range of
+devices. Among the other benefits that apps can take advantage of are:</p>
+
+<ul>
+ <li> Numbers blocked on calls are also blocked on texts
+ <li> Blocked numbers can persist across resets and devices through the Backup &
+Restore feature
+ <li> Multiple apps can use the same blocked numbers list
+</ul>
+
+<p>Additionally, carrier app integration through Android means that carriers can
+read the blocked numbers list on the device and perform service-side blocking
+for the user in order to stop unwanted calls and texts from reaching the user
+through any medium, such as a VOIP endpoint or forwarding phones.</p>
+
+<p>
+ For more information, see <code>android.provider.BlockedNumberContract</code>
+ in the downloadable <a href="{@docRoot}preview/setup-sdk.html#docs-dl">API
+ Reference</a>.
+</p>
+
+<h2 id="call_screening">Call screening</h2>
+
+<p>
+ Android N allows the default phone app to screen incoming calls. The phone
+ app does this by implementing the new <code>CallScreeningService</code>,
+ which allows the phone app to perform a number of actions based on an
+ incoming call's {@link android.telecom.Call.Details Call.Details}, such as:
+</p>
+
+<ul>
+ <li> Reject the incoming call
+ <li> Do not allow the call to the call log
+ <li> Do not show the user a notification for the call
+</ul>
+
+<p>
+ For more information, see <code>android.telecom.CallScreeningService</code>
+ in the downloadable <a href="{@docRoot}preview/setup-sdk.html#docs-dl">API
+ Reference</a>.
+</p>
+
+
+<h2 id="multi-locale_languages">Multi-locale support, more languages</h2>
+
+
+<p>Android N now lets users select <strong>multiple locales</strong> in Settings,
+to better support bilingual use-cases. Apps can use
+a new API to get the user's selected locales and then offer more sophisticated
+user experiences for multi-locale users — such as showing search results in
+multiple languages and not offering to translate webpages in a language the
+user already knows.</p>
+
+<p>Along with multi-locale support, Android N also expands the range of languages
+available to users. It offers more than 25 variants each for commonly used
+languages such as English, Spanish, French, and Arabic. It also adds partial
+support for more than 100 new languages.</p>
+
+<p>Apps can get the list of locales set by the user by calling <code>LocaleList.GetDefault()</code>. To support the expanded number of locales, Android N is changing the way
+that it resolves resources. Make sure that you test and verify that your apps
+working as expected with the new resource resolution logic.</p>
+
+<p>To learn about the new resource-resolution behavior and the best practices you
+should follow, see <a href="{@docRoot}preview/features/multilingual-support.html"
+>Multilingual Support</a>.</p>
+
+<h2 id="icu4">ICU4J APIs in Android</h2>
+
+<p>
+ Android N now offers a subset of <a href=
+ "http://site.icu-project.org/">ICU4J</a> APIs in the Android framework under
+ the <code>android.icu</code> package. Migration is easy, and mostly entails
+ simply changing from the <code>com.java.icu</code> namespace to
+ <code>android.icu</code>. If you are already using an ICU4J bundle in your
+ apps, switching to the <code>android.icu</code> APIs provided in the Android
+ framework can produce substantial savings in APK size.
+</p>
+
+<p>
+ To learn more about the Android ICU4J APIs, see <a href=
+ "{@docRoot}preview/features/icu4j-framework.html">ICU4J Support</a>.
+</p>
+
+
+
+<h2 id="gles_32">OpenGL™ ES 3.2 API</h2>
+
+<p>Android N adds framework interfaces and platform support for OpenGL ES 3.2, including:</p>
+
+<ul>
+ <li> All extensions from the <a class="external-link"
+href="https://www.khronos.org/registry/gles/extensions/ANDROID/ANDROID_extension_pack_es31a.txt">Android Extension Pack</a></a> (AEP) except for <code>EXT_texture_sRGB_decode</code>.
+ <li> Floating-point framebuffers for HDR and deferred shading.
+ <li> BaseVertex draw calls to enable better batching and streaming.
+ <li> Robust buffer access control to reduce WebGL overhead.
+</ul>
+
+<p>The framework API for OpenGL ES 3.2 on Android N is provided with the
+<code>GLES32</code> class. When using OpenGL ES 3.2, be sure to declare the
+requirement in your manifest file, using the <code><uses-feature></code> tag and
+the <code>android:glEsVersion</code> attribute. </p>
+
+<p>For information about using OpenGL ES, including how to check a device's
+supported OpenGL ES version at runtime, see the <a
+href="{@docRoot}guide/topics/graphics/opengl.html">OpenGL ES API guide</a>.</p>
+
+
+<h2 id="android_tv_recording">Android TV recording</h2>
+
+<p>Android N adds the ability to record and playback content from Android TV input
+services via new recording APIs. Building on top of existing time-shifting
+APIs, TV input services can control what channel data can be recorded, how
+recorded sessions are saved, and manage user interaction with recorded content. </p>
+
+<p>For more information, see <a
+href="{@docRoot}preview/features/tv-recording-api.html">Android TV Recording APIs</a>.</p>
+
+
+<h2 id="android_for_work">Android for Work</h2>
+
+<p>Android for Work adds many new features and APIs for devices running Android N.
+Some highlights are below — for a complete list of Android for Work updates
+related to Android N, please see Android for Work Changes.</p>
+
+<h3 id="work_profile_security_challenge">Work profile security challenge </h3>
+
+<p>
+ Profile owners can specify a separate security challenge for apps running in
+ the work profile. The work challenge is shown when a user attempts to open
+ any work apps. Successful completion of the security challenge unlocks the
+ work profile and decrypts it if necessary. For profile owners,
+ <code>ACTION_SET_NEW_PASSWORD</code> prompts the user to set a work
+ challenge, and <code>ACTION_SET_NEW_PARENT_PROFILE_PASSWORD</code> prompts
+ the user to set a device lock.
+</p>
+
+<p>
+ Profile owners can set distinct password policies for the work challenge
+ (such as how long the PIN needs to be, or whether a fingerprint can be used
+ to unlock the profile) using the <code>setPasswordQuality()</code>,
+ <code>setPasswordMinimumLength()</code> and related methods. The profile
+ owner can also set the device lock using the <code>DevicePolicyManager</code>
+ instance returned by the new <code>getParentProfileInstance()</code> method.
+ Additionally, profile owners can customize the credentials screen for the
+ work challenge using the new <code>setOrganizationColor()</code> and
+ <code>setOrganizationName()</code> methods.
+</p>
+<h3 id="turn_off_work">Turn off work </h3>
+
+<p>On a device with a work profile, users can toggle work mode. When work mode is
+off the managed user is temporarily shut down, which disables work profile
+apps, background sync, and notifications. This includes the profile owner
+application. When work mode is off, the system displays a persistent status
+icon to remind the user that they can't launch work apps. The launcher
+indicates that work apps and widgets are not accessible. </p>
+
+<h3 id="always_on_vpn">Always on VPN </h3>
+
+<p>Device owners and profile owners can ensure that work apps always connect
+through a specified VPN. The system automatically starts that VPN after the
+device boots.</p>
+
+<p>
+ New <code>DevicePolicyManager</code> methods are
+ <code>setAlwaysOnVpnPackage()</code> and
+ <code>getAlwaysOnVpnPackage()</code>.
+</p>
+
+<p>Because VPN services can be bound directly by the system without app
+interaction, VPN clients need to handle new entry points for Always on VPN. As
+before, services are indicated to the system by an intent filter matching
+action <code>android.net.VpnService</code>. </p>
+
+<p>
+ Users can also manually set Always on VPN clients that implement
+ <code>VPNService</code> methods in the primary user using
+ <strong>Settings>More>Vpn</strong>.
+</p>
+
+<h2 id="accessibility_enhancements">Accessibility enhancements</h2>
+
+<p>Android N now offers Vision Settings directly on the Welcome screen for new
+device setup. This makes it much easier for users to discover and configure
+accessibility features on their devices, including magnification gesture, font
+size, display size, and TalkBack. </p>
+
+<p>With these accessibility features getting more prominent placement, your users
+are more likely to try your app with them enabled. Make sure you test your apps
+early with these settings enabled. You can enable them from Settings >
+Accessibility.</p>
+
+<p>Also in Android N, accessibility services can now help users with motor
+impairments to touch the screen. The new API allows building services with
+features such as face-tracking, eye-tracking, point scanning, and so on, to
+meet the needs of those users.</p>
+
+<p>For more information, see <code>android.accessibilityservice.GestureDescription</code>
+ in the downloadable <a href="{@docRoot}preview/setup-sdk.html#docs-dl">API Reference</a>.</p>
+
+
+<h2 id="direct_boot">Direct boot</h2>
+
+<p>Direct boot improves device startup times and lets registered
+apps have limited functionality even after an unexpected reboot.
+For example, if an encrypted device reboots while the user is sleeping,
+registered alarms, messages and incoming calls can now continue notify
+the user as normal. This also means accessibility services can also be
+ available immediately after a restart.</p>
+
+<p>Direct boot takes advantage of file based encryption in Android N
+to enable fine grained encryption policies for both system and app data.
+The system uses a device-encrypted store for select system data and explicitly
+registered app data. By default a credential-encrypted store is used for all
+ other system data, user data, apps, and app data. </p>
+
+<p>At boot, the system starts in a restricted mode with access to
+device-encrypted data only, and without general access to apps or data.
+If you have components that you want to run in this mode, you can register
+them by setting a flag in the manifest. After restart, the system activates
+registered components by broadcasting the <code>LOCKED_BOOT_COMPLETED</code>
+intent. The system ensures registered device-encrypted app data is available
+before unlock. All other data is unavailable until the User confirms their lock
+ screen credentials to decrypt it. </p>
+
+For more information, see <a href="{@docRoot}preview/features/direct-boot.html">Direct Boot</a>.</p>
+</p>
+
+
+<h2 id="key_attestation">Key Attestation</h2>
+
+<p>Hardware-backed keystores provide a much safer method to create, store,
+and use cryptographic keys on Android devices. They protect keys from the
+Linux kernel, potential Android vulnerabilities, and extraction
+from rooted devices.</p>
+
+<p>To make it easier and more secure to use hardware-backed keystores,
+Android N introduces Key Attestation. Apps and off-devices can use Key
+Attestation to strongly determine whether an RSA or EC key pair is
+hardware-backed, what the properties of the key pair are, and what
+ constraints are applied to its usage and validity. </p>
+
+<p>Apps and off-device services can request information about a key pair
+through an X.509 attestation certificate which must be signed by a valid
+attestation key. The attestation key is an ECDSA signing key which is
+injected into the device’s hardware-backed keystore at the factory.
+Therefore, an attestation certificate signed by a valid attestation
+key confirms the existence of a hardware-backed keystore, along with
+ details of key pairs in that keystore.</p>
+
+<p>To ensure that the device is using a secure, official Android factory
+image, Key Attestation requires that the device <a
+class="external-link"
+href="https://source.android.com/security/verifiedboot/verified-boot.html#bootloader_requirements">bootloader</a>
+provide the following information to the <a class="external-link"
+href="https://source.android.com/security/trusty/index.html">Trusted
+Execution Environment (TEE)</a>:</p>
+
+<ul>
+<li>The OS version and patch level installed on the device</li>
+<li>The <a href="https://source.android.com/security/verifiedboot/index.html"
+class="external-link" >Verified Boot</a> public key and lock status</li>
+ </ul>
+
+<p>For more information about the hardware-backed keystore feature,
+see the guide for <a href="https://source.android.com/security/keystore/"
+class="external-link">Hardware-backed Keystore</a>.</p>
+
+<p>In addition to Key Attestation, Android N also introduces
+ fingerprint-bound keys that are not revoked on fingerprint enrollment.</p>
+
+<h2 id="network_security_config">Network Security Config</h2>
+
+<p>In Android N, apps can customize the behavior of their secure (HTTPS, TLS)
+connections safely, without any code modification, by using the declarative
+<em>Network Security Config</em> instead of using the conventional
+error-prone programmatic APIs (e.g. X509TrustManager).</p>
+
+ <p>Supported features:</p>
+<ul>
+<li><b>Custom trust anchors.</b> Lets an application customize which
+Certificate Authorities (CA) are trusted for its secure connections. For
+example, trusting particular self-signed certificates or a restricted set of public CAs.
+</li>
+<li><b>Debug-only overrides.</b> Lets an application developer safely debug
+secure connections of their application without added risk to the installed
+base.
+</li>
+<li><b>Cleartext traffic opt-out.</b> Lets an application protect itself from
+accidental usage of cleartext traffic.</li>
+<li><b>Certificate pinning.</b> An advanced feature that lets an application
+ limit which server keys are trusted for secure connections.</li>
+</ul>
+
+<p>For more information, see <a
+href="{@docRoot}preview/features/security-config.html">Network Security
+Config</a>.</p>
+
+<h2 id="default_trusted_ca">Default Trusted Certificate Authority</h2>
+
+<p>By default, apps that target Android N only trust system-provided certificates
+and no longer trust user-added Certificate Authorities (CA). Apps targeting Android
+N that wish to trust user-added CAs should use the
+<a href="{@docRoot}preview/features/security-config.html">Network Security Config</a> to
+specify how user CAs should be trusted.</p>
+
+<h2 id="apk_signature_v2">APK signature scheme v2</h2>
+
+<p>The PackageManager class now supports verifying apps using the APK
+signature scheme v2. The APK signature scheme v2 is a whole-file signature scheme
+that significantly improves verification speed and strengthens integrity
+ guarantees by detecting any unauthorized changes to APK files.</p>
+
+<p>To maintain backward-compatibility, an APK must be signed with the v1 signature
+scheme (JAR signature scheme) before being signed with the v2 signature scheme.
+With the v2 signature scheme, verification fails if you sign the APK with an
+ additional certificate after signing with the v2 scheme. </p>
+
+<p>APK signature scheme v2 support will be available later in the N Developer
+Preview.</p>
+
+<h2 id="scoped_directory_access">Scoped directory access</h2>
+
+<p>In Android N, apps can use new APIs to request access to specific <a
+href="{@docRoot}guide/topics/data/data-storage.html#filesExternal">external
+storage</a> directories, including directories on removable media such as SD
+cards. The new APIs greatly simplify how your application accesses standard
+external storage directories, such as the <code>Pictures</code> directory. Apps
+like photo apps can use these APIs instead of using
+<code>READ_EXTERNAL_STORAGE</code>, which grants access to all storage
+directories, or the Storage Access Framework, which makes the user navigate to
+the directory.</p>
+
+<p>Additionally, the new APIs simplify the steps a user takes to grant external
+storage access to your app. When you use the new APIs, the system uses a simple
+permissions UI that clearly details what directory the application is
+requesting access to.</p>
+
+<p>For more information, see the
+<a href="{@docRoot}preview/features/scoped-folder-access.html">Scoped
+Directory Access</a> developer documentation.</p>
+
+
+
+
+
+
diff --git a/docs/html/preview/behavior-changes.jd b/docs/html/preview/behavior-changes.jd
new file mode 100644
index 0000000..bc7dbc7
--- /dev/null
+++ b/docs/html/preview/behavior-changes.jd
@@ -0,0 +1,480 @@
+page.title=Behavior Changes
+page.keywords=preview,sdk,compatibility
+meta.tags="preview", "compatibility"
+page.tags="preview", "developer preview"
+page.image=images/cards/card-n-changes_2x.png
+@jd:body
+
+
+<div id="qv-wrapper">
+<div id="qv">
+
+<h2>In this document</h2>
+
+<ol>
+ <li><a href="#perf">Performance Improvements</a>
+ <ol>
+ <li><a href="#doze">Doze</a></li>
+ <li><a href="#bg-opt">Background Optimizations</a></li>
+ </ol>
+ </li>
+ <li><a href="#perm">Permissions Changes</a></li>
+ <li><a href="#accessibility">Accessibility Improvements</a>
+ <ol>
+ <li><a href="#screen-zoom">Screen Zoom</a></li>
+ <li><a href="#vision-settings">Vision Settings in Setup Wizard</a></li>
+ </ol>
+ </li>
+ <li><a href="#ndk">NDK Apps Linking to Platform Libraries</a></li>
+ <li><a href="#afw">Android for Work</a></li>
+</ol>
+
+<h2>See Also</h2>
+<ol>
+ <li><a href="{@docRoot}preview/api-overview.html">
+ Android N API Overview</a></li>
+</ol>
+
+</div>
+</div>
+
+
+<p>
+ Along with new features and capabilities, Android N
+ includes a variety of system 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>
+
+
+<h2 id="perf">Performance Improvements</h2>
+
+<p>
+ Android N contains system behavior changes aimed at improving the battery
+ life of devices, RAM usage, and app performance. These changes can impact the
+ availability of system resources and system notifications to your app. You
+ should review these changes and evaluate how your app may need to adjust to
+ them.
+</p>
+
+<h3 id="doze">Doze</h3>
+
+<p>
+ Introduced in Android 6.0 (API level 23), Doze improves battery life by
+ deferring CPU and network activities when a user leaves a device unplugged,
+ stationary, and with the screen turned off. Android N brings further
+ enhancements to Doze by applying a subset of CPU and network restrictions
+ while the device is unplugged with the screen turned off, but not necessarily
+ stationary, for example, when a handset is traveling in a user’s pocket.
+</p>
+
+
+<img src="{@docRoot}preview/images/doze-diagram-1.png"
+ alt="" height="251px" id="figure1" />
+<p class="img-caption">
+ <strong>Figure 1.</strong> Illustration of how Doze applies a first level of
+ system activity restrictions to improve battery life.
+</p>
+
+<p>
+ When a device is on battery power, and the screen has been off for a certain
+ time, the device enters Doze and applies the first subset of restrictions: It
+ shuts off app network access, and defers jobs and syncs. If the device is
+ stationary for a certain time after entering Doze, the system applies the
+ rest of the Doze restrictions to {@link android.os.PowerManager.WakeLock},
+ {@link android.app.AlarmManager} alarms, GPS, and Wi-Fi scans. Regardless of
+ whether some or all Doze restrictions are being applied, the system wakes the
+ device for brief maintenance windows, during which applications are allowed
+ network access and can execute any deferred jobs/syncs.
+</p>
+
+
+<img src="{@docRoot}preview/images/doze-diagram-2.png"
+ alt="" id="figure2" />
+<p class="img-caption">
+ <strong>Figure 2.</strong> Illustration of how Doze applies a second level of
+ system activity restrictions after the device is stationary for a certain time.
+</p>
+
+<p>
+ Note that activating the screen on or plugging in the device exits Doze and
+ removes these processing restrictions. The additional behavior does not
+ affect recommendations and best practices in adapting your app to the prior
+ version of Doze introduced in Android 6.0 (API level 23), as discussed in
+ <a href="{@docRoot}training/monitoring-device-state/doze-standby.html">
+ Optimizing for Doze and App Standby</a>. You should still
+ follow those recommendations, such as using Google Cloud Messaging (GCM) to
+ send and receive messages, and start planning updates to accomodate the
+ additional Doze behavior.
+</p>
+
+
+<h3 id="bg-opt">Project Svelte: Background Optimizations</h3>
+
+<p>
+ Android N removes three implicit broadcasts in order to help optimize both
+ memory use and power consumption. This change is necessary because implicit
+ broadcasts frequently start apps that have registered to listen for them in
+ the background. Removing these broadcasts can substantially benefit device
+ performance and user experience.
+</p>
+
+<p>
+ Mobile devices experience frequent connectivity changes, such as when moving
+ between Wi-Fi and mobile data. Currently, apps can monitor for changes in
+ connectivity by registering a receiver for the implicit {@link
+ android.net.ConnectivityManager#CONNECTIVITY_ACTION} broadcast in their
+ manifest. Since many apps register to receive this broadcast, a single
+ network switch can cause them all to wake up and process the broadcast at
+ once.
+</p>
+
+<p>
+ Similarly, apps can register to receive implicit {@link
+ android.hardware.Camera#ACTION_NEW_PICTURE} and {@link
+ android.hardware.Camera#ACTION_NEW_VIDEO} broadcasts from other apps, such as
+ Camera. When a user takes a picture with the Camera app, these apps wake up
+ to process the broadcast.
+</p>
+
+<p>
+ To alleviate these issues, Android N applies the following
+ optimizations:
+</p>
+
+<ul>
+ <li>Apps targeting Android N do not receive {@link
+ android.net.ConnectivityManager#CONNECTIVITY_ACTION} broadcasts, even if they
+ have manifest entries to request notification of these events. Apps running
+ in the foreground can still listen for {@code CONNECTIVITY_CHANGE} on their
+ main thread if they request notification with a {@link
+ android.content.BroadcastReceiver}.
+ </li>
+
+ <li>Apps cannot send or receive {@link
+ android.hardware.Camera#ACTION_NEW_PICTURE} or {@link
+ android.hardware.Camera#ACTION_NEW_VIDEO} broadcasts. This optimization
+ affects all apps, not only those targeting Android N.
+ </li>
+</ul>
+
+<p>If your app uses any of these intents, you should remove dependencies
+ on them as soon as possible so that you can target Android N devices properly.
+ The Android framework provides several solutions to mitigate the need for
+ these implicit broadcasts or background services. For example, the {@link
+ android.app.job.JobScheduler} API provides a robust mechanism to schedule
+ network operations when specified conditions, such as connection to an
+ unmetered network, are met. You can even use {@link
+ android.app.job.JobScheduler} to react to changes to content providers.
+</p>
+
+<p>
+ For more information about this behavior change and how to adapt your app,
+ see <a href=
+ "{@docRoot}preview/features/background-optimization.html">Background
+ Optimizations</a>.
+</p>
+
+
+<h2 id="perm">Permissions Changes</h2>
+
+<p>
+ Android N includes changes to permissions that may affect your app,
+ including user accounts permissions and a new permission for writing to
+ external storage. Here is a summary of the permissions that have changed in
+ the preview:
+</p>
+
+<ul>
+ <li>{@code GET_ACCOUNTS} (Deprecated)
+ <p>
+ The GET_ACCOUNTS permission is now deprecated. The system ignores this
+ permission for apps that target Android N.
+ </p>
+ </li>
+
+</ul>
+
+
+
+<h2 id="accessibility">Accessibility Improvements</h2>
+
+<p>
+ Android N includes changes intended to improve the usability of the
+ platform for users with low or impaired vision. These changes should
+ generally not require code changes in your app, however you should review
+ these feature and test them with your app to assess potential impacts to user
+ experience.
+</p>
+
+
+<h3 id="screen-zoom">Screen Zoom</h3>
+
+<p>
+ Android N enables users to set <strong>Display size</strong>which magnifies
+ or shrinks all elements on the screen, thereby improving device accessibility
+ for users with low vision. Users cannot zoom the screen past a minimum screen
+ width of <a href=
+ "http://developer.android.com/guide/topics/resources/providing-resources.html">
+ sw320dp</a>, which is the width of a Nexus 4, a common medium-sized phone.
+</p>
+
+<div class="cols">
+
+<div class="col-6">
+ <img src="{@docRoot}preview/images/screen-zoom-1.png" alt="" height="XXX" id="figure1" />
+</div>
+<div class="col-6">
+ <img src="{@docRoot}preview/images/screen-zoom-2.png" alt="" height="XXX" id="figure1" />
+</div>
+
+</div> <!-- end cols -->
+<p class="img-caption">
+ <strong>Figure 3.</strong> The screen on the right shows the effect of
+ increasing the Display size of a device running an Android N system image.
+</p>
+
+
+<p>
+ When the device density changes, the system notifies running apps in the
+ following ways:
+</p>
+
+<ul>
+ <li>If an app targets API level 23 or lower, the system automatically kills
+ all its background processes. This means that if a user switches away from
+ such an app to open the <em>Settings</em> screen and changes the
+ <strong>Display size</strong> setting, the system kills the app in the same
+ manner that it would in a low-memory situation. If the app has any foreground
+ processes, the system notifies those processes of the configuration change as
+ described in <a href="{@docRoot}guide/topics/resources/runtime-changes.html">Handling
+ Runtime Changes</a>, just as if the device's orientation had changed.
+ </li>
+
+ <li>If an app targets Android N, all of its processes
+ (foreground and background) are notified of the configuration change as
+ described in <a href=
+ "{@docRoot}guide/topics/resources/runtime-changes.html">Handling
+ Runtime Changes</a>.
+ </li>
+</ul>
+
+<p>
+ Most apps do not need to make any changes to support this feature, provided
+ the apps follow Android best practices. Specific things to check for:
+</p>
+
+<ul>
+ <li>Test your app on a device with screen width <code><a href=
+ "{@docRoot}guide/topics/resources/providing-resources.html">sw320dp</a></code>
+ and be sure it performs adequately.
+ </li>
+
+ <li>When the device configuration changes, update any density-dependent
+ cached information, such as cached bitmaps or resources loaded from the
+ network. Check for configuration changes when the app resumes from the paused
+ state.
+ <p class="note">
+ <strong>Note:</strong> If you cache configuration-dependent data, it's a
+ good idea to include relevant metadata such as the appropriate screen
+ size or pixel density for that data. Saving this metadata allows you to
+ decide whether you need to refresh the cached data after a configuration
+ change.
+ </p>
+ </li>
+
+ <li>Avoid specifying dimensions with px units, since they do not scale with
+ screen density. Instead, specify dimensions with <a href=
+ "{@docRoot}guide/practices/screens_support.html">density-independent
+ pixel</a> (<code>dp</code>) units.
+ </li>
+</ul>
+
+<h3 id="vision-settings">Vision Settings in Setup Wizard</h3>
+
+<p>
+ Android N includes Vision Settings on the Welcome screen, where users can
+ set up the following accessibility settings on a new device:
+ <strong>Magnification gesture</strong>, <strong>Font size</strong>,
+ <strong>Display size</strong> and <strong>TalkBack</strong>. This change
+ increases the visibility of bugs related to different screen settings. To
+ assess the impact of this feature, you should test your apps with these
+ settings enabled. You can find the settings under <strong>Settings >
+ Accessibility</strong>.
+</p>
+
+<h2 id="ndk">NDK Apps Linking to Platform Libraries</h2>
+
+<p>
+ Android N includes namespace changes to prevent loading of non-public APIs.
+ If you use the NDK, you should only be using public APIs from the Android
+ platform. Using non-public APIs in the next official release of Android
+ can cause your app to crash.
+</p>
+
+<p>
+ In order to alert you to use of non-public APIs, apps running on an Android N
+ device generate an error in logcat output when an app calls a non-public API.
+ This error is also displayed on the device screen as a message to help
+ raise awareness of this situation. You should review your app code to
+ remove use of non-public platform APIs and thoroughly test your apps using
+ a preview device or emulator.
+</p>
+
+<p>
+ If your app depends on platform libraries, see the NDK documentation for
+ typical fixes for replacing common private APIs with public API equivalents.
+ You may also be linking to platform libraries without realizing it,
+ especially if your app uses a library that is part of the platform (such as
+ <code>libpng</code>), but is not part of the NDK. In that case, ensure that
+ your APK contains all the .so files you intended to link against.
+</p>
+
+<p class="caution">
+ <strong>Caution:</strong> Some third-party libraries may link to non-public
+ APIs. If your app uses these libraries, your app may crash when running
+ on the next official release of Android.
+</p>
+
+<p>
+ Apps should not depend on or use native libraries that are not included in
+ the NDK, because they may change, or be removed from one Android release to
+ another. The switch from OpenSSL to BoringSSL is an example of such a change.
+ Also, different devices may offer different levels of compatibility, because
+ there are no compatibility requirements for platform libraries not included
+ in the NDK. If you must access non-NDK libraries on older devices, make the
+ loading dependent on the Android API level.
+</p>
+
+<p>
+ To help you diagnose these types problems here are some example Java and NDK
+ errors you might encounter when attempting to build your app with Android N:
+</p>
+
+<p>Example Java error:</p>
+<pre class="no-pretty-print">
+java.lang.UnsatisfiedLinkError: dlopen failed: library "/system/lib/libcutils.so"
+ is not accessible for the namespace "classloader-namespace"
+</pre>
+
+<p>Example NDK error:</p>
+<pre class="no-pretty-print">
+dlopen failed: cannot locate symbol "__system_property_get" referenced by ...
+</pre>
+
+
+<p>
+ Here are some typical fixes for apps encountering these types of errors:
+</p>
+
+<ul>
+ <li>Use of getJavaVM and getJNIEnv from libandroid_runtime.so can be replaced
+ with standard JNI functions:
+<pre class="no-pretty-print">
+AndroidRuntime::getJavaVM -> GetJavaVM from <jni.h>
+AndroidRuntime::getJNIEnv -> JavaVM::GetEnv or
+JavaVM::AttachCurrentThread from <jni.h>.
+</pre>
+ </li>
+
+ <li>Use of {@code property_get} symbol from {@code libcutils.so} can be
+ replaced with the public {@code alternative __system_property_get}.
+ To do this, use {@code __system_property_get} with the following include:
+<pre>
+#include <sys/system_properties.h>
+</pre>
+ </li>
+
+ <li>Use of {@code SSL_ctrl} symbol from {@code libcrypto.so} should be
+ replaced with an app local version. For example, you should statically link
+ {@code libcyrpto.a} in your {@code .so} file or include your own dynamically
+ {@code libcrypto.so} from BoringSSL or OpenSSL in your app.
+ </li>
+</ul>
+
+<h2 id="afw">Android for Work</h2>
+<p>
+ Android N contains changes for apps that target Android for Work, including
+ changes to certificate installation, password resetting, secondary user
+ management, and access to device identifiers. If you are building apps for
+ Android for Work environments, you should review these changes and modify
+ your app accordingly.
+</p>
+
+<ul>
+ <li>You must install a delegated certificate installer before the DPC can set
+ it. For both profile and device-owner apps targeting the N SDK, you should
+ install the delegated certificate installer before the device policy
+ controller (DPC) calls
+ <code>DevicePolicyManager.setCertInstallerPackage()</code>. If the installer
+ is not already installed, the system throws an
+ <code>IllegalArgumentException</code>.
+ </li>
+
+ <li>Reset password restrictions for device admins now apply to profile
+ owners. Device admins can no longer use
+ <code>DevicePolicyManager.resetPassword()</code> to clear passwords or change
+ ones that are already set. Device admins can still set a password, but only
+ when the device has no password, PIN, or pattern.
+ </li>
+
+ <li>Device and profile owners can manage accounts even if restrictions are
+ set. Device owners and profile owners can call the Account Management APIs
+ even if <code>DISALLOW_MODIFY_ACCOUNTS</code> user restrictions are in place.
+ </li>
+
+ <li>Device owners can manage secondary users more easily. When a device is
+ running in device owner mode, the <code>DISALLOW_ADD_USER</code> restriction
+ is automatically set. This prevents users from creating unmanaged secondary
+ users. In addition, the <code>CreateUser()</code> and
+ <code>createAndInitial()</code> methods are deprecated; the new
+ <code>DevicePolicyManager.createAndManageUser()</code> method replaces them.
+ </li>
+
+ <li>Device owners can access device identifiers. A Device owner can access the
+ Wi-Fi MAC address of a device, using
+ <code>DevicePolicyManagewr.getWifiMacAddress()</code>. If Wi-Fi has never
+ been enabled on the device, this method returns a value of {@code null}.
+ </li>
+</ul>
+
+<p>
+ For more information about changes to Android for Work in Android N, see
+ <a href="{@docRoot}preview/features/afw.html">Android for Work Updates</a>.
+</p>
+
+<h2 id="other">Other important points</h2>
+
+<ul>
+<li>When an app is running on Android N, but targets a lower API level,
+and the user changes display size, the app process is killed. The app
+must be able to gracefully handle this scenario. Otherwise, it crashes
+when the user restores it from Recents.
+
+<p>
+You should test your app to ensure
+that this behavior does not occur.
+You can do so by causing an identical crash
+when killing the app manually via DDMS.
+</p>
+
+<p>
+Apps targeting N and above are not automatically killed on density changes;
+however, they may still respond poorly to configuration changes.
+</p>
+</li>
+
+<li>
+Apps on Android N should be able to gracefully handle configuration changes,
+and should not crash on subsequent starts. You can verify app behavior
+by changing font size (<strong>Setting</strong> >
+<strong>Display</strong> > <strong>Font size</strong>), and then restoring
+the app from Recents.
+</li>
+</ul>
+
diff --git a/docs/html/preview/download-ota.jd b/docs/html/preview/download-ota.jd
new file mode 100644
index 0000000..9c20420
--- /dev/null
+++ b/docs/html/preview/download-ota.jd
@@ -0,0 +1,323 @@
+page.title=Applying a Device OTA Image
+
+@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 “Android-compatible” means any Android implemation that (i) complies with the Android Compatibility Definition document, which can be found at the Android compatibility website (http://source.android.com/compatibility) and which may be updated from time to time; and (ii) successfully passes the Android Compatibility Test Suite (CTS).
+
+1.4 "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 this License Agreement, Google grants you a limited, worldwide, royalty-free, non-assignable, non-exclusive, and non-sublicensable license to use the Preview solely to develop applications for compatible implementations of Android.
+
+3.2 You may not use this Preview to develop applications for other platforms (including non-compatible implementations of Android) or to develop another SDK. You are of course free to develop applications for other platforms, including non-compatible implementations of Android, provided that this Preview is not used for that purpose.
+
+3.3 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.4 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.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">
+
+<p>
+ This page provides links to over-the-air (OTA) device images and describes
+ how to manually apply an OTA update to a device. This procedure may be useful
+ in recovering devices that received OTA updates through the Android Beta
+ Program and do not start up after the update is installed.
+</p>
+
+<h2 id="install-ota">Installing OTA Images</h2>
+
+<p></p>
+
+<p>To install an OTA package to a device:</p>
+
+<ol>
+ <li>Download an OTA device image from the table below.</li>
+ <li>Reboot the device into Recovery mode. For more information on putting
+ Nexus devices in this mode, see
+ <a href="https://support.google.com/nexus/answer/4596836">Reset your Nexus
+ device to factory settings</a>.
+ </li>
+ <li>On the device, select <strong>ADB sideload</strong>.</li>
+ <li>Connect the device to a computer with the Android development environment
+ loaded and the Android Debug Bridge (adb) tool installed.</li>
+ <li>Run the following command:
+ <pre>adb sideload <em><ota-package></em></pre>
+ </li>
+</ol>
+
+
+
+<h2 id="ota-images">Device OTA Images</h2>
+
+<table>
+ <tr>
+ <th scope="col">Device</th>
+ <th scope="col">Download / Checksums</th>
+ </tr>
+
+ <tr id="bullhead">
+ <td>Nexus 5X <br>"bullhead"</td>
+ <td><a href="#top" onclick="onDownload(this)"
+ >bullhead-ota-2659757-4fab1a6f.zip</a><br>
+ MD5: 2a3263bb4935cdc7a326298f2cf13535<br>
+ SHA-1: 4fab1a6f1a68d94c02500d7acb15503192455f20
+ </td>
+ </tr>
+
+ <tr id="shamu">
+ <td>Nexus 6 <br>"shamu"</td>
+ <td><a href="#top" onclick="onDownload(this)"
+ >shamu-ota-2659757-073c33ae.zip</a><br>
+ MD5: c201a9ccdfa5afdd2f1a9967e462098f<br>
+ SHA-1: 073c33aef3ecc5961e0ba92c5611b98f7750fa94
+ </td>
+ </tr>
+
+ <tr id="angler">
+ <td>Nexus 6P <br>"angler"</td>
+ <td><a href="#top" onclick="onDownload(this)"
+ >angler-ota-2659757-938ecff3.zip</a><br>
+ MD5: 3363c343fafe03b118776738a37623a8<br>
+ SHA-1: 938ecff398f896c21c03615942727493aeae3556
+ </td>
+ </tr>
+
+ <tr id="volantis">
+ <td>Nexus 9 <br>"volantis"</td>
+ <td><a href="#top" onclick="onDownload(this)"
+ >volantis-ota-2659757-257cba86.zip</a><br>
+ MD5: d90a271b6c6edc49702df292abc66fed<br>
+ SHA-1: 257cba864cec7f486e0deba9e23e00b840f9a821
+ </td>
+ </tr>
+
+ <tr id="volantisg">
+ <td>Nexus 9G <br>"volantisg"</td>
+ <td><a href="#top" onclick="onDownload(this)"
+ >volantisg-ota-2659757-edd866f6.zip</a><br>
+ MD5: d2bc6f760a1725a36366bb8c3230dfc7<br>
+ SHA-1: edd866f643d87d56654326ba5dc4d802e0d5c2e6
+ </td>
+ </tr>
+
+ <tr id="fugu">
+ <td>Nexus Player <br>"fugu"</td>
+ <td><a href="#top" onclick="onDownload(this)"
+ >fugu-ota-2665432-f0f8fea4.zip</a><br>
+ MD5: 4403af764b57502d89111fd68ecb7da5<br>
+ SHA-1: f0f8fea49ea3874b751cf67462ecc5d8e039875e
+ </td>
+ </tr>
+
+ <tr id="ryu">
+ <td>Pixel C <br>"ryu"</td>
+ <td><a href="#top" onclick="onDownload(this)"
+ >ryu-ota-2659757-1e496acd.zip</a><br>
+ MD5: 1ebd7fddb52cba59b7f686a972e023db<br>
+ SHA-1: 1e496acd67b8fdbee7b5c6ef721746f8e98e704f
+ </td>
+ </tr>
+
+</table>
+
+
+ </div><!-- landing -->
+
+</div><!-- relative wrapper -->
+
+
+
+<script>
+ var urlRoot = "http://storage.googleapis.com/androiddevelopers/shareables/preview/ota/";
+ 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/download.jd b/docs/html/preview/download.jd
new file mode 100644
index 0000000..59b1cf7
--- /dev/null
+++ b/docs/html/preview/download.jd
@@ -0,0 +1,552 @@
+page.title=Test on a Device
+meta.tags="preview", "nexus","system image"
+page.tags="preview", "androidn"
+page.image=images/cards/card-n-downloads_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 “Android-compatible” means any Android implemation that (i) complies with the Android Compatibility Definition document, which can be found at the Android compatibility website (http://source.android.com/compatibility) and which may be updated from time to time; and (ii) successfully passes the Android Compatibility Test Suite (CTS).
+
+1.4 "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 this License Agreement, Google grants you a limited, worldwide, royalty-free, non-assignable, non-exclusive, and non-sublicensable license to use the Preview solely to develop applications for compatible implementations of Android.
+
+3.2 You may not use this Preview to develop applications for other platforms (including non-compatible implementations of Android) or to develop another SDK. You are of course free to develop applications for other platforms, including non-compatible implementations of Android, provided that this Preview is not used for that purpose.
+
+3.3 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.4 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.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="#device-preview">Set up a hardware device</a>
+ <ol>
+ <li><a href="#ota">Get over-the-air updates</a></li>
+ <li><a href="#flash">Manually flash a device</a></li>
+ <li><a href="#revertDevice">Uninstalling</a></li>
+ </ol>
+ </li>
+ <li><a href="#setupAVD">Set up an emulator</a></li>
+ </ol>
+ </div>
+</div>
+
+<p>
+ To run and test your app on the new platform you need to set up an Android N
+ runtime environment. You can do that in either of these ways:
+</p>
+
+<ul>
+ <li>Install Android N on a supported hardware device, or</li>
+ <li>Set up an Android emulator running Android N</li>
+</ul>
+
+<p>
+ If you want an environment for basic compatibility testing of your app on the
+ new platform, all you need is your current APK and a hardware device or
+ emulator. You don't necessarily need to update your full development
+ environment to do basic testing.
+</p>
+
+<p>
+ If you want to modify your app to target Android N or use new Android N APIs,
+ you need to set up a development environment that's updated to support
+ Android N. <a href="{@docRoot}preview/setup-sdk.html">Set Up to Develop for
+ Android N</a> has details.
+</p>
+
+
+<h2 id="device-preview">Set up a hardware device</h2>
+
+<p>
+ The N Developer Preview offers system updates for a range of hardware devices
+ that you can use for testing your app, from phones to tablets and TV.
+</p>
+
+<p>
+ If you have access to a supported device, you can update it to a Developer
+ Preview milestone build in one of these ways:
+</p>
+
+<ul>
+ <li><strong>Enroll the device in automatic OTA system updates</strong> through the
+ <a href="https://g.co/androidbeta">Android Beta Program</a>. Once enrolled, your device will receive regular
+ over-the-air (OTA) updates of all milestone builds in the N Developer Preview. This
+ approach is recommended because it lets you seamlessly transition from your current
+ environment through the various releases of the N Developer Preview.</li>
+ <li><strong>Download a Developer Preview system image and flash the device</strong>.
+ OTA updates are not provided automatically for devices that you flash manually, but
+ you can enroll those devices in Android Beta Program to get OTA updates. </li>
+</ul>
+
+<h3 id="ota">Enroll the device in automatic OTA updates</h3>
+
+<p>
+ If you have access to a supported device (see the list in the Downloads
+ table), you can receive over-the-air updates to preview versions of Android
+ by enrolling that device in the <a href="https://g.co/androidbeta">Android Beta Program</a>. These updates are
+ automatically downloaded and will update your device just like official
+ system updates.
+</p>
+
+<p>
+ You can un-enroll a device at any time. The device will receive an OTA update
+ to the most recent production version of Android available for that device
+ (for example, Android 6.0 Marshmallow). The update requires a full device
+ reset, so user data on the device will be removed. Make sure to <strong>back
+ up important data</strong> before un-enrolling a device.
+</p>
+
+<p>
+ For more information and to enroll your device, see
+ the <a href="https://g.co/androidbeta">Android Beta Program</a> web site.
+</p>
+
+<p class="note"><strong>Note:</strong>
+ Un-enrolling requires a full device reset. Back up
+ important data first.
+</p>
+
+<h3 id="flash">Flashing a device manually</h3>
+
+<p>
+ At any time you can download the latest Developer Preview system image and
+ manually flash it to your device. See the table below to download the system
+ image for your test device. Manually flashing a device is useful if you need
+ precise control over the test environment or need to reinstall frequently,
+ such as for automated testing.
+</p>
+
+<!-- You can flash by ota or system image --><p>
+ Installing a system image on a device <strong>removes all data from the
+ device</strong>, so you should back up your data first.
+</p>
+
+<p>
+ After you back up your device data and download the system image below that
+ matches your device, 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.
+</p>
+
+<p>
+ Manually flashed system images <strong>do not
+ automatically receive OTA updates</strong> to later Developer Preview
+ milestone builds. Make sure to keep your environment up-to-date and flash a
+ new system image at each Developer Preview milestone.
+</p>
+
+<p>
+ If you decide you want to get OTA updates after manually flashing a device,
+ all you need to do is enroll the device in the <a href="https://g.co/androidbeta">Android
+ Beta Program</a>. You can enroll the device at any time to receive the next Preview
+ update over the air.
+</p>
+
+<table>
+ <tr>
+ <th scope="col">Device</th>
+ <th scope="col">Download / Checksums</th>
+ </tr>
+
+ <tr id="bullhead">
+ <td>Nexus 5X <br>"bullhead"</td>
+ <td><a href="#top" onclick="onDownload(this)"
+ >bullhead-npc56w-preview-d86c7559.tgz</a><br>
+ MD5: d84b6c31a7754e505149594887b3481a<br>
+ SHA-1: d86c7559c93724cca6af91040b012c48529f2c94
+ </td>
+ </tr>
+
+ <tr id="shamu">
+ <td>Nexus 6 <br>"shamu"</td>
+ <td><a href="#top" onclick="onDownload(this)"
+ >shamu-npc56p-preview-54b13c67.tgz</a><br>
+ MD5: af183638cf34e0eb944a1957d7696f60<br>
+ SHA-1: 54b13c6703d369cc79a8fd8728fe4103c6343973
+ </td>
+ </tr>
+
+ <tr id="angler">
+ <td>Nexus 6P <br>"angler"</td>
+ <td><a href="#top" onclick="onDownload(this)"
+ >angler-npc56w-preview-2834ca3c.tgz</a><br>
+ MD5: fd5c74f256cf82262779513854869570<br>
+ SHA-1: 2834ca3c425d7a61f5dfabb9d8dd108aec1ab58b
+ </td>
+ </tr>
+
+ <tr id="volantis">
+ <td>Nexus 9 <br>"volantis"</td>
+ <td><a href="#top" onclick="onDownload(this)"
+ >volantis-npc56x-preview-5c323abd.tgz</a><br>
+ MD5: 474a13915e22d683cab5cf59ed868157<br>
+ SHA-1: 5c323abdec121b2f07fdabaa3d70d12106e450ad
+ </td>
+ </tr>
+
+ <tr id="volantisg">
+ <td>Nexus 9G <br>"volantisg"</td>
+ <td><a href="#top" onclick="onDownload(this)"
+ >volantisg-npc56x-preview-41ae398c.tgz</a><br>
+ MD5: 5a145a546a4a9f68c2b8e2624cf9832b<br>
+ SHA-1: 41ae398c30536a2d96b04d61b9ef97a043bf59cf
+ </td>
+ </tr>
+
+ <tr id="fugu">
+ <td>Nexus Player <br>"fugu"</td>
+ <td><a href="#top" onclick="onDownload(this)"
+ >fugu-npc56r-preview-7027d5b6.tgz</a><br>
+ MD5: f5d3d8f75836ccfe4c70e8162e498be4<br>
+ SHA-1: 7027d5b662bceda4c80a91a0a14ef0e5a7ba795b
+ </td>
+ </tr>
+
+ <tr id="ryu">
+ <td>Pixel C <br>"ryu"</td>
+ <td><a href="#top" onclick="onDownload(this)"
+ >ryu-npc56p-preview-335a86a4.tgz</a><br>
+ MD5: 4e21fb183bbbf467bee91598d587fd2e<br>
+ SHA-1: 335a86a435ee51f18464de343ad2e071c38f0e92
+ </td>
+ </tr>
+ <tr id="seed">
+ <td>General Mobile 4G (Android One) <br>"seed"</td>
+ <td><a href="#top" onclick="onDownload(this)"
+ >seed_l8150-npc56p-preview-82472ebc.tgz</a><br>
+ MD5: 983e083bc7cd0c4a2d39d6ebaa20202a<br>
+ SHA-1: 82472ebc9a6054a103f53cb400a1351913c95127
+ </td>
+ </tr>
+
+</table>
+
+<h3 id="revertDevice">Uninstalling the Preview from a device</h3>
+
+<p>
+ If you want to uninstall the preview from a device, you can do so in one of
+ these ways: </p>
+ <ul>
+ <li><strong>Obtain a factory spec system image</strong> and then manually
+ flash it to the device.
+ <ul>
+ <li>For <strong>Nexus devices and Pixel C devices</strong>, see
+ the <a href="http://developers.google.com/android/nexus/images">Factory Images
+ for Nexus Devices</a> page for downloads. </li>
+ <li>For <strong>other devices</strong>, please contact the device manufacturer
+ directly. Alternatively, if the device is supported
+ in the Android Beta Program, you can enroll the device in the
+ program and then un-enroll it (see below).</li>
+ </ul>
+ </li>
+ <li><strong>Un-enroll the device from Android Beta Program</strong>. If the
+ device is enrolled in the <a href="https://g.co/androidbeta">Android Beta
+ Program</a>, regardless of device, you can simply un-enroll it from the program.
+ <p>
+ The device will receive an OTA update to the most recent production version
+ of Android available for that device (for example, Android 6.0 Marshmallow).
+ The update requires a full device reset, so user data on the device will be
+ removed. Make sure to <strong>back up important data</strong> before
+ un-enrolling a device.
+ </p>
+ </li>
+</ul>
+
+<p class="note"><strong>Note:</strong>
+ Uninstalling a Developer Preview system image prior to
+ the end of the program requires a full device reset and removes all user data
+ on the device.
+</p>
+
+
+<h2 id="setupAVD">Set up an emulator</h2>
+
+<p>To use the Android Emulator to run the Android N Preview, you need to
+download the Android N Preview SDK and create a virtual device for the
+emulator.</p>
+
+<p>First, download the Android N Preview SDK as follows (if you
+already got it while <a href="{@docRoot}preview/setup-sdk.html">setting up
+to develop for Android N</a>, you can skip this part):
+
+<ol>
+ <li>In Android Studio, open the Settings dialog
+ (<strong>File > Settings</strong> on Windows/Linux, or
+ <strong>Android Studio > Preferences</strong> on Mac). In the left
+ panel, select <strong>Appearance & Behavior >
+ System Settings > Android SDK</strong>.
+
+ <li>Click the <strong>SDK Platforms</strong> tab, then select the
+ <strong>Android N Preview</strong> check box.</li>
+
+ <li>Click the <strong>SDK Tools</strong> tab, then select the
+ <strong>Android SDK Build Tools</strong>, <strong>Android SDK
+ Platform-Tools</strong>, and <strong>Android SDK Tools</strong> check
+ boxes.
+ </li>
+
+ <li>Click <strong>OK</strong> and accept the license
+ agreements for any packages to be installed.
+ </li>
+</ol>
+
+<p>You should now have <strong>Android SDK Built-Tools 24.0 0 rc1</strong>,
+<strong>Platform-Tools 24.0.0 rc1</strong>, and <strong>SDK Tools
+25.0.9</strong>. If you do not update the SDK Tools to 25.0.9, then you won't
+be able to run the x86_64 system images for Android N.</p>
+
+
+<p>Now create a virtual device with the Android N system image:</p>
+
+<ol>
+ <li>Open the AVD Manager by selecting <strong>Tools > Android >
+ AVD Manager</strong>.</li>
+ <li>Click <strong>Create Virtual Device</strong>.</li>
+ <li>Select a device such as Nexus 5X, Nexus 6P, Nexus 9, or Android TV,
+ then click <strong>Next</strong>.</li>
+ <li>Select the <strong>N</strong> system image (with the
+ <strong>x86</strong> ABI), then click <strong>Next</strong>.
+ (Only x86 system images are currently supported with the Android Emulator
+for the Android N Preview.)
+ <li>Complete the rest of the AVD configuration and click
+ <strong>Finish</strong>.</li>
+</ol>
+
+<p>You can now launch the Android Emulator with the Android N Preview AVD.</p>
+
+<p>
+For the best experience in the Android Emulator, install
+Android Studio 2.1 Preview, which supports the <a
+href="http://tools.android.com/tech-docs/emulator">Android Emulator 2.0 Beta</a>
+with much faster performance compared to the Emulator in
+Android Studio 1.5.</p>
+
+<p class="note"><strong>Note:</strong>
+ If you're currently using Android Studio 2.0 Beta, there's a known issue
+ that prevents you from creating AVDs with the N Preview system images, so
+ you currently need to use the Android Studio 2.1 preview to create AVDs.
+</p>
+
+<p>For more information about creating virtual devices, see <a href=
+ "{@docRoot}tools/devices/index.html">Managing Virtual Devices</a>.
+</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/afw.jd b/docs/html/preview/features/afw.jd
new file mode 100644
index 0000000..24f67ef
--- /dev/null
+++ b/docs/html/preview/features/afw.jd
@@ -0,0 +1,543 @@
+page.title=Android for Work Updates
+page.metaDescription=New Android for Work APIs and features in Android N.
+page.keywords="android for work", "android N", "enterprise", "QR code"
+
+@jd:body
+
+<div id="qv-wrapper">
+ <div id="qv">
+ <h2>In this document</h2>
+ <ol>
+ <li><a href="#qr">QR Code Provisioning
+ </a></li>
+
+ <li><a href="#sec-challenge">Work Profile Security Challenge
+ </a></li>
+
+ <li><a href="#suspend">Disable Access to Apps
+ </a></li>
+
+ <li><a href="#toggle-work">Toggle Work Mode
+ </a></li>
+
+ <li><a href="#always-on-vpn">Always-On VPN
+ </a></li>
+
+ <li><a href="#contacts">Contacts Integration with Work Profile
+ </a></li>
+
+ <li><a href="#remote-reboot">Remote Reboot
+ </a></li>
+
+ <li><a href="#disable-roaming">Disable Data Roaming
+ </a></li>
+
+ <li><a href="#process-logging">Enterprise Process Logging
+ </a></li>
+
+ <li><a href="#bug-reports">Remote Bug Reports
+ </a></li>
+
+ <li><a href="#remove-cert">Remove a Client Certificate
+ </a></li>
+
+ <li><a href="#grant-cert-on-install">Grant Access to Client Certificate
+ on Installation</a></li>
+
+ <li><a href="#ui-policy">System UI Policy Transparency
+ </a></li>
+
+ <li><a href="#restrictions-mgmt">App Restrictions Management Enhancements
+ </a></li>
+
+ <li><a href="#location-off">Location Off Switch
+ </a></li>
+
+ <li><a href="#custom-provisioning">Customized Provisioning
+ </a></li>
+
+ <li><a href="#multi-wifi-ca">Multiple Wi-Fi CA Certificates
+ </a></li>
+
+ <li><a href="#custom-lock">Customized Lockscreen Message
+ </a></li>
+
+ <li><a href="#work-connectionservice">Work Profile ConnectionService
+ </a></li>
+
+ <li><a href="#lock-wp">Lock Down Wallpaper
+ </a></li>
+
+ <li><a href="#lock-user-icon">Lock Down User Icon
+ </a></li>
+
+ <li><a href="#health-monitoring">Device Health Monitoring
+ </a></li>
+
+ </ol>
+
+ <h2>See Also</h2>
+ <ul>
+ <li><a href="{@docRoot}preview/setup-sdk.html#docs-dl">N Preview SDK
+ Reference</a></li>
+ </ul>
+ </div>
+</div>
+
+<p>This document describes the new Android for Work features provided in
+Android N.</p>
+
+<h2 id="qr">QR Code Provisioning</h2>
+
+<p>
+ Android for Work now supports using QR codes to provision corporate-liable
+ devices. The setup wizard now allows you to scan a QR code to provision
+ the device.
+</p>
+
+<h2 id="sec-challenge">Work Profile Security Challenge</h2>
+
+<p>
+ Profile owners can require users to specify a security challenge for apps
+ running in the work profile. The system shows the security challenge when the
+ user attempts to open any work apps. If the user successfully completes the
+ security challenge, the system unlocks the work profile and decrypts it if
+ necessary.
+</p>
+
+<p>
+ If a profile owner sends an {@link
+ android.app.admin.DevicePolicyManager#ACTION_SET_NEW_PASSWORD} intent, the
+ system prompts a user to set up a security challenge. The profile owner can
+ also send an <code>ACTION_SET_NEW_PARENT_PROFILE_PASSWORD</code> intent to
+ prompt the user to set a device lock.
+</p>
+
+<p>
+ Profile owners can choose to set the password policies for the work challenge
+ differently from the policies for other device passwords. For example, the
+ minimum length for the device challenge response can be different from the
+ length required for other passwords. Profile owners set the challenge
+ policies using the usual {@link android.app.admin.DevicePolicyManager}
+ methods, such as {@link
+ android.app.admin.DevicePolicyManager#setPasswordQuality
+ setPasswordQuality()} and {@link
+ android.app.admin.DevicePolicyManager#setPasswordMinimumLength
+ setPasswordMinimumLength()}. The profile owner can also set the device lock,
+ by using the {@link android.app.admin.DevicePolicyManager} instance returned
+ by the new <code>DevicePolicyManager.getParentProfileInstance()</code>
+ method. Additionally, profile owners can customize the credentials screen for
+ the work challenge by using the {@link android.app.admin.DevicePolicyManager}
+ class's new <code>setOrganizationColor()</code> and
+ <code>setOrganizationName()</code> methods.
+</p>
+
+<p>
+ For details on the new methods and constants, see the
+ <code>DevicePolicyManager</code> reference page in the <a
+ href="{@docRoot}preview/setup-sdk.html#docs-dl">N Preview SDK Reference</a>.
+</p>
+
+<h2 id="suspend">Disable Access to Apps</h2>
+
+<p>
+ Device owners and profile owners can temporarily suspend access to packages
+ by calling the new <code>DevicePolicyManager.getPackagesSuspended()</code>
+ method.Owners can use the same method to re-enable those packages.
+</p>
+
+<p>
+ While a package is suspended, it cannot start activities, and notifications
+ to the package are suppressed. Suspended packages do not show in the <a href=
+ "{@docRoot}guide/components/recents.html">overview screen</a>, and they
+ cannot show dialogs (including toasts and snackbars). They also cannot play
+ audio or vibrate the device.
+</p>
+
+<p>
+ Launchers should apply a distinctive UI to suspended apps to show that the
+ apps aren't currently available; for example, they might render the app icon
+ in gray. Launchers can find out which apps are suspended by calling the new
+ <code>DevicePolicyManager.getPackagesSuspended()</code> method.
+</p>
+
+<h2 id="toggle-work">Toggle Work Mode</h2>
+
+<p>On dual-profile devices, users can toggle work mode on and off. While work
+ mode is turned off, the managed profile is temporarily shut down. Work profile apps, background sync, and notifications are all disabled, including the profile
+ owner app. While the work profile is disabled, the system displays a persistent status icon to remind users that they can't launch work apps. The system launcher
+ indicates that work apps and widgets are not accessible.
+</p>
+
+
+<h2 id="always-on-vpn">Always-On VPN</h2>
+
+<p>
+ Device owners and profile owners can require that work apps always connect to
+ the network through a specified VPN. If owners set this requirement, the
+ device automatically starts that VPN at boot time.
+</p>
+
+<p>
+ Owners can require use of a VPN by calling the new
+ <code>DevicePolicyManager.setAlwaysOnVpnPackage()</code> method. To find out
+ if the owner has set a VPN requirement, call the new
+ <code>DevicePolicyManager.GetAlwaysOnVpnPackage()</code> method.
+</p>
+
+<p>
+ Because the system can directly bind VPN services without app interaction,
+ VPN clients need to handle new entry points for always-on VPN. As before, you
+ can find active services by using an intent filter that matches the action
+ {@link android.net.VpnService android.net.VpnService}.
+</p>
+
+<p>
+ Users can manually set an always-on VPN client that implement {@link
+ android.net.VpnService} by using the <strong>Settings > More >
+ VPN</strong> screen.
+</p>
+
+<h2 id="contacts">Contacts Integration with Work Profile</h2>
+
+<p>
+ Profile owners can allow local search and directory lookup of work contacts
+ from the primary user. For example, a user can access both personal and work
+ directory contacts from their personal dialer or contacts application (if
+ permitted by their profile administrator).
+</p>
+
+<p>
+ Developers that leverage the Contact Provider can use the Enterprise Contacts
+ API to access work profile directory entries from the primary user if allowed
+ by policy:
+</p>
+
+<ul>
+ <li><code>ContactsContract.Contacts.ENTERPRISE_CONTENT_FILTER_URI</code>
+ </li>
+
+ <li><code>ContactsContract.Phone.ENTERPRISE_CONTENT_FILTER_URI</code>
+ </li>
+
+ <li><code>ContactsContract.Email.ENTERPRISE_CONTENT_FILTER_URI</code>
+ </li>
+
+ <li><code>ContactsContract.Callable.ENTERPRISE_CONTENT_FILTER_URI</code>
+ </li>
+
+ <li><code>ContactsContract.Directory.ENTERPRISE_CONTENT_URI</code>
+ </li>
+
+ <li><code>ContactsContract.Directory.isEntepriseDirectoryId()</code>
+ </li>
+</ul>
+
+<p>
+ Profile owners can control the visibility of work contacts in the primary
+ user using the following new methods:
+</p>
+
+<ul>
+ <li>
+ <code>DevicePolicyManager.setCrossProfileContactsSearchDisabled()</code>
+ </li>
+
+ <li>
+ <code>DevicePolicyManager.getCrossProfileContactsSearchDisabled()</code>
+ </li>
+</ul>
+
+<h2 id="remote-reboot">Remote Reboot</h2>
+
+<p>
+ Device owners can remotely reboot devices. In some cases, devices deployed in
+ public places inside enclosures can prevent access to the power button. If a
+ device needs to be rebooted, administrators can do so using the new
+ <code>DevicePolicyManager.reboot()</code> method.
+</p>
+
+<h2 id="disable-roaming">Disable Data Roaming</h2>
+
+<p>
+ Device owners can disable data roaming using the new {@link
+ android.os.UserManager} user restriction <code>DISALLOW_DATA_ROAMING</code>.
+</p>
+
+<h2 id="process-logging">Enterprise Process Logging</h2>
+
+<p>
+ Device owners can identify suspicious activity by remotely tracking device
+ activity, including app launches, adb activity, and screen unlocks. Process
+ logs don’t require user consent. To retrieve logs, device owners enable
+ device logging using <code>setDeviceLoggingEnabled()</code>.
+</p>
+
+<p>
+ The new <code>android.auditing.SecurityLog</code> class includes these
+ methods:
+</p>
+
+<ul>
+ <li>
+ <code>void DevicePolicyManager.setDeviceLoggingEnabled()</code>
+ </li>
+
+ <li>
+ <code>boolean DevicePolicyManager.getDeviceLoggingEnabled()</code>
+ </li>
+
+ <li>
+ <code>List DevicePolicyManager.retrieveDeviceLogs()</code>
+ </li>
+
+ <li>
+ <code>List DevicePolicyManager.retrievePreviousDeviceLogs()</code>
+ </li>
+
+ <li>
+ <code>void DeviceAdminReceiver.onSecurityLogsAvailable()</code>
+ </li>
+</ul>
+
+<h2 id="bug-reports">Remote Bug Reports</h2>
+
+<p>
+ Device owners can remotely trigger and retrieve a bug report that contains a
+ device state dump file, which allows forensic investigation of a known
+ incident or compromised device. Due to the detailed nature of the bug report,
+ user consent is required.
+</p>
+
+<p>
+ Android N includes the following API additions to support this feature. For
+ details, see the <a href="{@docRoot}preview/setup-sdk.html#docs-dl">N Preview SDK
+ Reference</a>.
+</p>
+
+<ul>
+ <li>
+ <code>DevicePolicyManager.requestBugreport()</code>
+ </li>
+
+ <li>
+ <code>DeviceAdminReceiver.onBugreportFailed()</code>
+ </li>
+
+ <li>
+ <code>DeviceAdminReceiver.onBugreportShared()</code>
+ </li>
+
+ <li>
+ <code>DeviceAdminReceiver.onBugreportSharingDeclined()</code>
+ </li>
+
+ <li>
+ <code>DeviceAdminReceiver.BUGREPORT_FAILURE_FAILED_COMPLETING</code>
+ </li>
+
+ <li>
+ <code>DeviceAdminReceiver.BUGREPORT_FAILURE_FILE_NO_LONGER_AVAILABLE</code>
+ </li>
+</ul>
+
+<h2 id="remove-cert">Remove a Client Certificate</h2>
+
+<p>
+ Profile owners and device owners can now remove client certificates that were
+ installed through {@link android.app.admin.DevicePolicyManager#installKeyPair
+ installKeyPair()} by calling the new method
+ <code>DevicePolicyManager.removeKeyPair()</code>.
+</p>
+
+<h2 id="grant-cert-on-install">Grant Access to Client Certificate on
+ Installation</h2>
+
+<p>
+ If a profile owner or device owner grants a third-party app the ability to
+ manage certificates, the app can grant itself access to certificates it
+ installs without any intervention by the owner.
+</p>
+
+<p>
+ The existing API for managing certificates is extended to include:
+</p>
+
+<ul>
+ <li><code>DevicePolicyManager.installKeyPair()</code>
+ </li>
+</ul>
+
+<h2 id="ui-policy">System UI Policy Transparency</h2>
+
+<p>
+ Policies that affect the user experience or restrict user Settings are fully
+ disclosed to the user, and profile owners and device owners can attribute the
+ policy to their company’s IT department. In addition to a consistent “Action
+ not allowed” message in Settings, IT administrators can set an
+ organization-specific support message in device settings with the following
+ new {@link android.app.admin.DevicePolicyManager} methods:
+</p>
+
+<ul>
+ <li>
+ <code>DevicePolicyManager.setShortSupportMessage()</code>
+ </li>
+
+ <li>
+ <code>DevicePolicyManager.setLongSupportMessage()</code>
+ </li>
+</ul>
+
+<h2 id="restrictions-mgmt">App Restrictions Management Enhancements</h2>
+
+<p>
+ The device or profile owner can enable another application to manage app
+ restrictions via the new
+ <code>DevicePolicyManager.setApplicationRestrictionsManagingPackage()</code>
+ method. The nominated application can check whether this permission has been
+ granted by calling
+ <code>DevicePolicyManager.isCallerApplicationRestrictionsManagingPackage()</code>.
+</p>
+
+<p>
+ An application nominated to manage app restrictions can call {@link
+ android.app.admin.DevicePolicyManager#setApplicationRestrictions
+ setApplicationRestrictions()} and {@link
+ android.app.admin.DevicePolicyManager#getApplicationRestrictions
+ getApplicationRestrictions()} for any packages within that user or profile.
+</p>
+
+<h2 id="location-off">Location Off Switch</h2>
+
+<p>
+ Users can disable location permissions for work apps while continuing to
+ access location information in their personal apps. A separate location
+ access switch in Location Settings allows users to deny location updates or
+ last-location queries for apps running in the work profile.
+</p>
+
+<p>
+ The top level location off switch disables location access for both the
+ primary profile and the managed profile.
+</p>
+
+<h2 id="custom-provisioning">Customized Provisioning</h2>
+
+<p>
+ An application can customize the profile owner and device owner provisioning
+ flows with corporate colors and logos.
+</p>
+
+<dl>
+ <dt>
+ <code>DevicePolicyManager.EXTRA_PROVISIONING_MAIN_COLOR</code>
+ </dt>
+
+ <dd>
+ Customizes flow color.
+ </dd>
+
+ <dt>
+ <code>DevicePolicyManager.EXTRA_PROVISIONING_LOGO_URI</code>
+ </dt>
+
+ <dd>
+ Customizes the flow with a corporate logo.
+ </dd>
+</dl>
+
+<h2 id="multi-wifi-ca">Multiple Wi-Fi CA Certificates</h2>
+
+<p>
+ Profile owners and device owners can set multiple CA certificates for a given
+ Wi-Fi configuration. When corporate Wi-Fi networks have separate CAs for
+ separate access points with the same SSID, IT administrators can include all
+ relevant CAs in the Wi-Fi configuration using the new method
+ <code>setCaCertificates()</code>.
+</p>
+
+<p>
+ APIs added are:
+</p>
+
+<ul>
+ <li>
+ <code>WifiEnterpriseConfig.setCaCertificates()</code>
+ </li>
+
+ <li>
+ <code>WifiEnterpriseConfig.getCaCertificates()</code>
+ </li>
+</ul>
+
+<h2 id="custom-lock">Customized Lockscreen Message</h2>
+
+<p>
+ Device owners can provide owner information to be shownon the lockscreen.
+ This information takes precedence the user lock screen message (if one is
+ set). New {@link android.app.admin.DevicePolicyManager} methods are:
+</p>
+
+<ul>
+ <li>
+ <code>setDeviceOwnerLockScreenInfo()</code>
+ </li>
+
+ <li>
+ <code>getDeviceOwnerLockScreenInfo()</code>
+ </li>
+</ul>
+
+<h2 id="work-connectionservice">Work Profile ConnectionService</h2>
+
+<p>
+ Profile owners can specify a work dialer application that uses a
+ work-specific {@link android.telecom.ConnectionService} for the calling
+ backend (calling accounts). The work dialer maintains a work-only call log
+ and relies on work contacts only. Users have a consistent in-call UI
+ experience regardless of dialing application. Incoming work calls to the work
+ calling accounts are distinguished from personal incoming calls to the
+ personal calling accounts.
+</p>
+
+<p>
+ The dialer should check for the new flag
+ <code>android.telecom.Call.PROPERTY_WORK_CALL</code> to determine if a call
+ is a work call. If a call is a work call, the dialer should indicate this,
+ such as by adding a work badge.
+</p>
+
+<h2 id="lock-wp">Lock Down Wallpaper</h2>
+
+<p>
+ A new user restriction (<code>DISALLOW_SET_WALLPAPER</code>) prevents the
+ user from changing their wallpaper. The device owner or profile owner can
+ still change the wallpaper, but they can only change the wallpaper for the
+ user or profile they control. For example, a profile owner can’t change the
+ wallpaper of the parent user, but a profile owner in the primary profile or
+ device owner can. A profile owner or device owner that wants to change the
+ wallpaper should check whether the the user or profile they manage has a
+ wallpaper ({@link android.app.WallpaperManager#isWallpaperSupported
+ isWallpaperSupported()}) and whether they are allowed to change it (with the
+ new method <code>WallpaperManager.isWallpaperSettingAllowed()</code>)
+</p>
+
+<h2 id="lock-user-icon">Lock Down User Icon</h2>
+
+<p>
+ A new user restriction (<code>DISALLOW_SET_USER_ICON</code>) prevents the
+ user from changing their user icon. The user’s device owner or profile owner
+ can still change the icon. However, a profile owner can only change the user
+ icon for the profile it controls.
+</p>
+
+<h2 id="health-monitoring">Device Health Monitoring</h2>
+
+<p>
+ A device owner or profile owner can use the new
+ <code>HardwarePropertiesManager</code> interface to retrieve information
+ about device health, such as CPU or GPU temperatures and CPU usage. The new
+ monitoring interface is especially useful for monitoring unattended devices
+ running in a remote location.
+</p>
diff --git a/docs/html/preview/features/background-optimization.jd b/docs/html/preview/features/background-optimization.jd
new file mode 100644
index 0000000..e415bd3
--- /dev/null
+++ b/docs/html/preview/features/background-optimization.jd
@@ -0,0 +1,394 @@
+page.title=Background Optimizations
+page.metaDescription=New restrictions to implicit broadcasts.
+page.keywords="android N", "implicit broadcasts", "job scheduler"
+@jd:body
+
+<div id="qv-wrapper">
+ <div id="qv">
+ <h2>
+ In this document
+ </h2>
+
+ <ol>
+ <li>
+ <a href="#connectivity-action">Restrictions on CONNECTIVITY_ACTION</a>
+ </li>
+
+ <li>
+ <a href="#sched-jobs">Scheduling Network Jobs on Unmetered
+ Connections</a>
+ </li>
+
+ <li>
+ <a href="#monitor-conn">Monitoring Network Connectivity While the App
+ is Running</a>
+ </li>
+
+ <li>
+ <a href="#media-broadcasts">Restrictions on NEW_PICTURE and
+ NEW_VIDEO</a>
+ </li>
+
+ <li>
+ <a href="#new-jobinfo">New JobInfo methods</a>
+ </li>
+
+ <li>
+ <a href="#new-jobparam">New JobParameter Methods</a>
+ </li>
+
+ <li>
+ <a href="#further-optimization">Further Optimizing Your App</a>
+ </li>
+ </ol>
+ </div>
+</div>
+
+<p>
+ Background processes can be memory- and battery-intensive. For example, an
+ implicit broadcast may start many background processes that have registered
+ to listen for it, even if those processes may not do much work. This can have
+ a substantial impact on both device performance and user experience.
+</p>
+
+<p>
+ To alleviate this issue, Android N applies the following
+ restrictions:
+</p>
+
+<ul>
+ <li>Apps targeting the Preview do not receive {@link
+ android.net.ConnectivityManager#CONNECTIVITY_ACTION} broadcasts if they
+ register to receive them in their manifest. Apps running in the foreground
+ can still listen for {@code CONNECTIVITY_CHANGE} on their main thread by
+ registering a {@link android.content.BroadcastReceiver} with {@link
+ android.content.Context#registerReceiver Context.registerReceiver()}.
+ </li>
+
+ <li>Apps cannot send or receive {@link
+ android.hardware.Camera#ACTION_NEW_PICTURE} or {@link
+ android.hardware.Camera#ACTION_NEW_VIDEO} broadcasts. This optimization
+ affects all apps, not only those targeting the Preview.
+ </li>
+</ul>
+
+<p>
+ If your app uses any of these intents, you should remove dependencies on
+ them as soon as possible so that you can target Android N devices properly.
+ The Android framework provides several solutions to mitigate the need for
+ these implicit broadcasts. For example, {@link android.app.job.JobScheduler}
+ and <a href=
+ "https://developers.google.com/android/reference/com/google/android/gms/gcm/GcmNetworkManager">
+ {@code GcmNetworkManager}</a> provide robust mechanisms to schedule network
+ operations when specified conditions, such as a connection to an unmetered
+ network, are met. You can now also use {@link android.app.job.JobScheduler}
+ to react to changes to content providers. {@link android.app.job.JobInfo}
+ objects encapsulate the parameters that {@link android.app.job.JobScheduler}
+ uses to schedule your job. When the conditions of the job are met, the system
+ executes this job on your app's {@link android.app.job.JobService}.
+</p>
+
+<p>
+ In this document, we will learn how to use alternative methods, such as
+ {@link android.app.job.JobScheduler}, to adapt your app to these new
+ restrictions.
+</p>
+
+<h2 id="connectivity-action">
+ Restrictions on CONNECTIVITY_ACTION
+</h2>
+
+<p>
+ Apps targeting the Android N do not receive {@link
+ android.net.ConnectivityManager#CONNECTIVITY_ACTION} broadcasts if they
+ register to receive them in their manifest, and processes that depend on this
+ broadcast will not start. This could pose a problem for apps that want
+ to listen for network changes or perform bulk network activities when the
+ device connects to an unmetered network. Several solutions to get around this
+ restriction already exist in the Android framework, but choosing the right
+ one depends on what you want your app to accomplish.
+</p>
+
+<p class="note">
+ <strong>Note:</strong> A {@link android.content.BroadcastReceiver} registered with
+ {@link android.content.Context#registerReceiver Context.registerReceiver()}
+ continues to receive these broadcasts while the app is in the foreground.
+</p>
+
+<h3 id="sched-jobs">
+ Scheduling Network Jobs on Unmetered Connections
+</h3>
+
+<p>
+ When using the {@link android.app.job.JobInfo.Builder JobInfo.Builder} class
+ to build your {@link android.app.job.JobInfo} object, apply the {@link
+ android.app.job.JobInfo.Builder#setRequiredNetworkType
+ setRequiredNetworkType()} method and pass {@link android.app.job.JobInfo
+ JobInfo.NETWORK_TYPE_UNMETERED} as a job parameter. The following code sample
+ schedules a service to run when the device connects to an unmetered
+ network and is charging:
+</p>
+
+<pre>
+public static final int MY_BACKGROUND_JOB = 0;
+...
+public static void scheduleJob(Context context) {
+ JobScheduler js =
+ (JobScheduler) context.getSystemService(Context.JOB_SCHEDULER_SERVICE);
+ JobInfo job = new JobInfo.Builder(
+ MY_BACKGROUND_JOB,
+ new ComponentName(context, MyJobService.class))
+ .setRequiredNetworkType(JobInfo.NETWORK_TYPE_UNMETERED)
+ .setRequiresCharging(true)
+ .build();
+ js.schedule(job);
+}
+</pre>
+
+<p>
+ When the conditions for your job are met, your app receives a callback to run
+ the {@link android.app.job.JobService#onStartJob onStartJob()} method in the
+ specified {@code JobService.class}. To see more examples of {@link
+ android.app.job.JobScheduler} implementation, see the <a href=
+ "{@docRoot}samples/JobScheduler/index.html">JobScheduler sample app</a>.
+</p>
+
+<p>
+ Applications that use GMSCore services, and target Android 5.0 (API level 21)
+ or lower, can use <a href=
+ "https://developers.google.com/android/reference/com/google/android/gms/gcm/GcmNetworkManager">
+ {@code GcmNetworkManager}</a> and specify {@code Task.NETWORK_STATE_UNMETERED}.
+</p>
+
+<h3 id="monitor-conn">
+ Monitoring Network Connectivity While the App is Running
+</h3>
+
+<p>
+ Apps running in the foreground can still listen for {@code
+ CONNECTIVITY_CHANGE} with a registered {@link
+ android.content.BroadcastReceiver}. However, the {@link
+ android.net.ConnectivityManager} API provides a more robust method to request
+ a callback only when specified network conditions are met.
+</p>
+
+<p>
+ {@link android.net.NetworkRequest} objects define the parameters of the
+ network callback in terms of {@link android.net.NetworkCapabilities}. You
+ create {@link android.net.NetworkRequest} objects with the {@link
+ android.net.NetworkRequest.Builder NetworkRequest.Builder} class. {@link
+ android.net.ConnectivityManager#registerNetworkCallback(android.net.NetworkRequest,
+ android.net.ConnectivityManager.NetworkCallback) registerNetworkCallback()}
+ then passes the {@link android.net.NetworkRequest} object to the system. When
+ the network conditions are met, the app receives a callback to execute the
+ {@link android.net.ConnectivityManager.NetworkCallback#onAvailable
+ onAvailable()} method defined in its {@link
+ android.net.ConnectivityManager.NetworkCallback} class.
+</p>
+
+<p>
+ The app continues to receive callbacks until either the app exits or it calls
+ {@link android.net.ConnectivityManager#unregisterNetworkCallback
+ unregisterNetworkCallback()}.
+</p>
+
+<h2 id="media-broadcasts">
+ Restrictions on NEW_PICTURE and NEW_VIDEO
+</h2>
+
+<p>
+ In the Android N, apps are not able to send or receive {@link
+ android.hardware.Camera#ACTION_NEW_PICTURE} or {@link
+ android.hardware.Camera#ACTION_NEW_VIDEO} broadcasts. This restriction helps
+ alleviate the performance and user experience impacts when several apps must
+ wake up in order to process a new image or video. Android N
+ extends {@link android.app.job.JobInfo} and {@link
+ android.app.job.JobParameters} to provide an alternative solution.
+</p>
+
+<h3 id="new-jobinfo">
+ New JobInfo methods
+</h3>
+
+<p>
+ To trigger jobs on content URI changes, Android N extends
+ the {@link android.app.job.JobInfo} API with the following methods:
+</p>
+
+<dl>
+ <dt>
+ {@code JobInfo.TriggerContentUri()}
+ </dt>
+
+ <dd>
+ Encapsulates parameters required to trigger a job on content URI changes.
+ </dd>
+
+ <dt>
+ {@code JobInfo.Builder.addTriggerContentUri()}
+ </dt>
+
+ <dd>
+ Passes a {@code TriggerContentUri} object to {@link
+ android.app.job.JobInfo}. A {@link android.database.ContentObserver}
+ monitors the encapsulated content URI. If there are multiple {@code
+ TriggerContentUri} objects associated with a job, the system provides a
+ callback even if it reports a change in only one of the content URIs.
+ </dd>
+
+ <dd>
+ Add the {@code TriggerContentUri.FLAG_NOTIFY_FOR_DESCENDANTS} flag to
+ trigger the job if any descendants of the given URI change. This flag
+ corresponds to the {@code notifyForDescendants} parameter passed to {@link
+ android.content.ContentResolver#registerContentObserver
+ registerContentObserver()}.
+ </dd>
+</dl>
+
+<p class="note">
+ <strong>Note:</strong> {@code TriggerContentUri()} cannot be used in
+ combination with {@link android.app.job.JobInfo.Builder#setPeriodic
+ setPeriodic()} or {@link android.app.job.JobInfo.Builder#setPersisted
+ setPersisted()}. To continually monitor for content changes, schedule a new
+ {@link android.app.job.JobInfo} before the app’s {@link
+ android.app.job.JobService} finishes handling the most recent callback.
+</p>
+
+<p>
+ The following sample code schedules a job to trigger when the system reports
+ a change to the content URI, {@code MEDIA_URI}:
+</p>
+
+<pre>
+public static final int MY_BACKGROUND_JOB = 0;
+...
+public static void scheduleJob(Context context) {
+ JobScheduler js =
+ (JobScheduler) context.getSystemService(Context.JOB_SCHEDULER_SERVICE);
+ JobInfo.Builder builder = new JobInfo.Builder(
+ MY_BACKGROUND_JOB,
+ new ComponentName(context, MediaContentJob.class));
+ builder.addTriggerContentUri(
+ new JobInfo.TriggerContentUri(MEDIA_URI,
+ JobInfo.TriggerContentUri.FLAG_NOTIFY_FOR_DESCENDANTS));
+ js.schedule(builder.build());
+}
+</pre>
+<p>
+ When the system reports a change in the specified content URI(s), your app
+ receives a callback and a {@link android.app.job.JobParameters} object is
+ passed to the {@link android.app.job.JobService#onStartJob onStartJob()}
+ method in {@code MediaContentJob.class}.
+</p>
+
+<h3 id="new-jobparam">
+ New JobParameter Methods
+</h3>
+
+<p>
+ Android N also extends {@link android.app.job.JobParameters} to
+ allow your app to receive useful information about what content authorities
+ and URIs triggered the job:
+</p>
+
+<dl>
+ <dt>
+ {@code Uri[] getTriggeredContentUris()}
+ </dt>
+
+ <dd>
+ Returns an array of URIs that have triggered the job. This will be {@code
+ null} if either no URIs have triggered the job (for example, the job was
+ triggered due to a deadline or some other reason), or the number of changed
+ URIs is greater than 50.
+ </dd>
+
+ <dt>
+ {@code String[] getTriggeredContentAuthorities()}
+ </dt>
+
+ <dd>
+ Returns a string array of content authorities that have triggered the job.
+ If the returned array is not {@code null}, use {@code getTriggeredContentUris()}
+ to retrieve the details of which URIs have changed.
+ </dd>
+</dl>
+
+<p>
+ The following sample code overrides the {@link
+ android.app.job.JobService#onStartJob JobService.onStartJob()} method and
+ records the content authorities and URIs that have triggered the job:
+</p>
+
+<pre>
+@Override
+public boolean onStartJob(JobParameters params) {
+ StringBuilder sb = new StringBuilder();
+ sb.append("Media content has changed:\n");
+ if (params.getTriggeredContentAuthorities() != null) {
+ sb.append("Authorities: ");
+ boolean first = true;
+ for (String auth :
+ params.getTriggeredContentAuthorities()) {
+ if (first) {
+ first = false;
+ } else {
+ sb.append(", ");
+ }
+ sb.append(auth);
+ }
+ if (params.getTriggeredContentUris() != null) {
+ for (Uri uri : params.getTriggeredContentUris()) {
+ sb.append("\n");
+ sb.append(uri);
+ }
+ }
+ } else {
+ sb.append("(No content)");
+ }
+ Log.i(TAG, sb.toString());
+ return true;
+}
+</pre>
+
+<h2 id="further-optimization">
+ Further Optimizing Your App
+</h2>
+
+<p>
+ Optimizing your apps to run on low-memory devices, or in low-memory
+ conditions, can improve performance and user experience. Removing
+ dependencies on background services and statically-registered implicit
+ broadcast receivers can help your app run better on such devices. Although
+ Android N takes steps to reduce some of these issues, it is
+ recommended that you optimize your app to run without the use of these
+ background processes entirely.
+</p>
+
+<p>
+ Android N introduces some additional <a href=
+ "{@docRoot}tools/help/adb.html">Android Debug Bridge (ADB)</a> commands that
+ you can use to test app behavior with those background processes disabled:
+</p>
+
+<ul>
+ <li>To simulate conditions where implicit broadcasts and background services
+ are unavailable, enter the following command:
+ </li>
+
+ <li style="list-style: none; display: inline">
+<pre class="no-pretty-print">
+{@code $ adb shell cmd appops set RUN_IN_BACKGROUND ignore}
+</pre>
+ </li>
+
+ <li>To re-enable implicit broadcasts and background services, enter the
+ following command:
+ </li>
+
+ <li style="list-style: none; display: inline">
+<pre class="no-pretty-print">
+{@code $ adb shell cmd appops set RUN_IN_BACKGROUND allow}
+</pre>
+ </li>
+</ul>
\ No newline at end of file
diff --git a/docs/html/preview/features/data-saver.jd b/docs/html/preview/features/data-saver.jd
new file mode 100644
index 0000000..03f0df2
--- /dev/null
+++ b/docs/html/preview/features/data-saver.jd
@@ -0,0 +1,146 @@
+page.title=Data Saver
+metaDescription=User-enabled data usage optimization.
+page.keywords="android N", "data usage", "metered network"
+@jd:body
+
+<div id="qv-wrapper">
+ <div id="qv">
+ <h2>
+ In this document
+ </h2>
+
+ <ol>
+ <li>
+ <a href="#status">Checking Data Saver Preferences</a>
+ </li>
+
+ <li>
+ <a href="#monitor-changes">Monitoring Changes to Data Saver
+ Preferences</a>
+ </li>
+ </ol>
+ </div>
+</div>
+
+<p>
+ Over the life of a smartphone, the cost of a cellular data plan can easily
+ exceed the cost of the device itself. In the N Developer Preview, users can
+ enable Data Saver on a device-wide basis in order to use less data, whether
+ roaming, near the end of the billing cycle, or on a small prepaid data pack.
+</p>
+
+<p>
+ When a user enables Data Saver in <strong>Settings</strong> and the device is
+ on a metered network, the system blocks background data usage and signals
+ apps to use less data in the foreground wherever possible. Users can
+ whitelist specific apps to allow background metered data usage even when Data
+ Saver is turned on.
+</p>
+
+<p>
+ The N Developer Preview extends the {@link android.net.ConnectivityManager}
+ API to provide apps with a way to <a href="#status">retrieve the user’s Data
+ Saver preferences</a> and <a href="#monitor-changes">monitor preference
+ changes</a>. It is considered good practice for apps to check whether the
+ user has enabled Data Saver and make an effort to limit foreground and
+ background data usage.
+</p>
+
+<h2 id="status">
+ Checking Data Saver Preferences
+</h2>
+
+<p>
+ In the N Developer Preview, apps can use the {@link
+ android.net.ConnectivityManager} API to determine what data usage
+ restrictions are being applied. The {@code getRestrictBackgroundStatus()}
+ method returns one of the following values:
+</p>
+
+<dl>
+ <dt>
+ {@code RESTRICT_BACKGROUND_STATUS_DISABLED}
+ </dt>
+
+ <dd>
+ Data Saver is disabled.
+ </dd>
+
+ <dt>
+ {@code RESTRICT_BACKGROUND_STATUS_ENABLED}
+ </dt>
+
+ <dd>
+ The user has enabled Data Saver for this app. Apps should make an effort to limit data
+ usage in the foreground and gracefully handle restrictions to background
+ data usage.
+ </dd>
+
+ <dt>
+ {@code RESTRICT_BACKGROUND_STATUS_WHITELISTED}
+ </dt>
+
+ <dd>
+ The user has enabled Data Saver but the app is whitelisted. Apps should
+ still make an effort to limit foreground and background data usage.
+ </dd>
+</dl>
+
+<p>
+ It is considered good practice to limit data usage whenever the device is
+ connected to a metered network, even if Data Saver is disabled or the app
+ is whitelisted. The following sample code uses {@link
+ android.net.ConnectivityManager#isActiveNetworkMetered
+ ConnectivityManager.isActiveNetworkMetered()} and {@code
+ ConnectivityManager.getRestrictBackgroundStatus()} to determine how much data
+ the app should use:
+</p>
+
+<pre>
+ConnectivityManager connMgr = (ConnectivityManager)
+ getSystemService(Context.CONNECTIVITY_SERVICE);
+// Checks if the device is on a metered network
+if (connMgr.isActiveNetworkMetered()) {
+ // Checks user’s Data Saver settings.
+ switch (connMgr.getRestrictBackgroundStatus) {
+ case RESTRICT_BACKGROUND_STATUS_ENABLED:
+ // Background data usage is blocked for this app. Wherever possible,
+ // the app should also use less data in the foreground.
+
+ case RESTRICT_BACKGROUND_STATUS_WHITELISTED:
+ // The app is whitelisted. Wherever possible,
+ // the app should use less data in the foreground and background.
+
+ case RESTRICT_BACKGROUND_STATUS_DISABLED:
+ // Data Saver is disabled. Since the device is connected to a
+ // metered network, the app should use less data wherever possible.
+ }
+} else {
+ // The device is not on a metered network.
+ // Use data as required to perform syncs, downloads, and updates.
+}
+</pre>
+
+<h2 id="monitor-changes">
+ Monitoring Changes to Data Saver Preferences
+</h2>
+
+<p>
+ Apps can monitor changes to Data Saver preferences by creating a {@link
+ android.content.BroadcastReceiver} to listen for {@code
+ ConnectivityManager.ACTION_RESTRICT_BACKGROUND_CHANGED} ({@code
+ "android.net.conn.RESTRICT_BACKGROUND_CHANGED"}) and dynamically registering
+ the receiver with {@link android.content.Context#registerReceiver
+ Context.registerReceiver()}. When an app receives this broadcast, it should
+ <a href="#status">check if the new Data Saver preferences affect its
+ permissions</a> by calling {@code
+ ConnectivityManager.getRestrictBackgroundStatus()}.
+</p>
+
+<p class="note">
+ <strong>Note:</strong> The system only sends this broadcast to apps that
+ dynamically register for them with {@link
+ android.content.Context#registerReceiver Context.registerReceiver()}. Apps
+ that register to receive this broadcast in their manifest will not receive
+ them.
+</p>
diff --git a/docs/html/preview/features/direct-boot.jd b/docs/html/preview/features/direct-boot.jd
new file mode 100644
index 0000000..aefa4dc
--- /dev/null
+++ b/docs/html/preview/features/direct-boot.jd
@@ -0,0 +1,180 @@
+page.title=Direct Boot
+page.keywords=preview,sdk,direct boot
+page.tags=androidn
+
+@jd:body
+
+<div id="qv-wrapper">
+<div id="qv">
+ <h2>In this document</h2>
+ <ol>
+ <li><a href="#run">Requesting Access to Run During Direct Boot</a></li>
+ <li><a href="#access">Accessing Device Encrypted Storage</a></li>
+ <li><a href="#notification">Getting Notified of User Unlock</a></li>
+ <li><a href="#migrating">Migrating Existing Data</a></li>
+ <li><a href="#testing">Testing Your Encryption Aware App</a></li>
+ </ol>
+</div>
+</div>
+
+<p>Android N runs in a secure, <i>Direct Boot</i> mode
+when the device has been powered on but the user has not unlocked the
+device. To support this, the system provides two storage locations for data:</p>
+
+<ul>
+<li><i>Credential encrypted storage</i>, which is the default storage location
+and only available after the user has unlocked the device.</li>
+<li><i>Device encrypted storage</i>, which is a storage location available both
+during Direct Boot mode and after the user has unlocked the device.</li>
+</ul>
+
+<p>By default, apps do not run during Direct Boot mode.
+If your app needs to take action during Direct Boot mode, you can register
+app components that should be run during this mode. Some common use cases
+for apps needing to run during Direct Boot mode include:</p>
+
+<ul>
+<li>Apps that have scheduled notifications, such as alarm clock
+apps.</li>
+<li>Apps that provide important user notifications, like SMS apps.</li>
+<li>Apps that provide accessibility services, like Talkback.</li>
+</ul>
+
+<p>If your app needs to access data while running in Direct Boot mode, use
+device encrypted storage. Device encrypted storage contains data
+encrypted with a key that is only available after a device has performed a
+successful verified boot.</p>
+
+<p>For data that should be encrypted with a key associated with user
+credentials, such as a PIN or password, use credential encrypted storage.
+Credential encrypted storage is only available after the user has successfully
+unlocked the device, up until when the user restarts the device again. If the
+user enables the lock screen after unlocking the device, this doesn't lock
+credential encrypted storage.</p>
+
+<h2 id="run">Requesting Access to Run During Direct Boot</h2>
+
+<p>Apps must register their components with the system before they
+can run during Direct Boot mode or access device encrypted
+storage. Apps register with the system by marking components as
+<i>encryption aware</i>. To mark your component as encryption aware, set the
+<code>android:encryptionAware</code> attribute to true in your manifest.<p>
+
+<p>Encryption aware components can register to receive a
+<code>LOCKED_BOOT_COMPLETED</code> broadcast message from the
+system when the device has been restarted. At this point device encrypted
+storage is available, and your component can execute tasks that need to be
+run during Direct Boot mode, such as triggering a scheduled alarm.</p>
+
+<p>The following code snippet is an example of how to register a
+{@link android.content.BroadcastReceiver} as encryption aware, and add an
+intent filter for <code>LOCKED_BOOT_COMPLETED</code>, in the app manifest:</p>
+
+<pre>
+<receiever
+ android:encryptionAware="true" >
+ ...
+ <intent-filter>
+ <action android:name="android.intent.action.LOCKED_BOOT_COMPLETED" />
+ </intent-filter>
+</receiver>
+</pre>
+
+<p>Once the user has unlocked the device, all components can access both the
+device encrypted storage as well as credential encrypted storage.</p>
+
+<h2 id="access">Accessing Device Encrypted Storage</h2>
+
+<p>To access device encrypted storage, create a second
+{@link android.content.Context} instance by calling
+<code>Context.createDeviceEncryptedStorageContext()</code>. All storage API
+calls made using this context access the device encrypted storage. The
+following example accesses the device encrypted storage and opens an existing
+app data file:</p>
+
+<pre>
+Context directBootContext = Context.createDeviceEncryptedStorageContext();
+// Access appDataFilename that lives in device encrypted storage
+FileInputStream inStream = directBootContext.openFileInput(appDataFilename);
+// Use inStream to read content...
+</pre>
+
+<p>Use device encrypted storage only for
+information that must be accessible during Direct Boot mode.
+Don't use device encrypted storage as a general-purpose encrypted store.
+For private user information, or encrypted data that isn't needed during
+Direct Boot mode, use credential encrypted storage.</p>
+
+<h2 id="notification">Getting Notified of User Unlock</h2>
+
+<p>Once the user unlocks the device after restart, your app can switch to
+accessing credential encrypted storage and use regular system services that
+depend on user credentials.</p>
+
+<p>To get notified when the user unlocks the device after a reboot,
+register a {@link android.content.BroadcastReceiver} from a running component
+to listen for the <code>ACTION_USER_UNLOCKED</code> message. Or, you can
+receive the existing {@link android.content.Intent#ACTION_BOOT_COMPLETED
+ACTION_BOOT_COMPLETED} message, which now indicates the device has booted and
+the user has unlocked the device.</p>
+
+<p>You can directly query if the user has unlocked the device by calling
+<code>UserManager.isUserUnlocked()</code>.</p>
+
+<h2 id="migrating">Migrating Existing Data</h2>
+
+<p>If a user updates their device to use Direct Boot mode, you might have
+existing data that needs to get migrated to device encrypted storage. Use
+<code>Context.migrateSharedPreferencesFrom()</code> and
+<code>Context.migrateDatabaseFrom()</code> to migrate preference and database
+data between credential encrypted storage and device encrypted storage.</p>
+
+<p>Use your best judgment when deciding what data to migrate from credential
+encrypted storage to device encrypted storage. You should not migrate
+private user information, such as passwords or authorization tokens, to
+device encrypted storage. In some scenarios, you might need to manage
+separate sets of data in the two encrypted stores.</p>
+
+<h2 id="testing">Testing Your Encryption Aware App</h2>
+
+<p>Test your encryption aware app using the new Direct Boot mode. There are
+two ways to enable Direct Boot.</p>
+
+<p class="caution"><strong>Caution:</strong> Enabling Direct Boot
+wipes all user data on the device.</p>
+
+<p>On supported devices with Android N installed, enable
+Direct Boot by doing one of the following:</p>
+
+<ul>
+<li>On the device, enable <b>Developer options</b> if you haven't already by
+going to <b>Settings > About phone</b>, and tapping <b>Build number</b>
+seven times. Once the developer options screen is available, go to
+<b>Settings > Developer options</b> and select
+<b>Convert to file encryption</b>.</li>
+<li>Use the following adb shell commands to enable Direct Boot mode:
+<pre class="no-pretty-print">
+$ adb reboot-bootloader
+$ fastboot --wipe-and-use-fbe
+</pre>
+</li>
+</ul>
+
+<p>An emulated Direct Boot mode is also available, in case you need to switch
+modes on your test devices. Emulated mode should only be used during
+development and may cause data loss. To enable emulated Direct Boot mode,
+set a lock pattern on the device, choose "No thanks" if prompted for a
+secure start-up screen when setting a lock pattern, and then use the
+following adb shell command:</p>
+
+<pre class="no-pretty-print">
+$ adb shell sm set-emulate-fbe true
+</pre>
+
+<p>To turn off emulated Direct Boot mode, use the following command:</p>
+
+<pre class="no-pretty-print">
+$ adb shell sm set-emulate-fbe false
+</pre>
+
+<p>Using these commands causes the device to reboot.</p>
diff --git a/docs/html/preview/features/icu4j-framework.jd b/docs/html/preview/features/icu4j-framework.jd
new file mode 100644
index 0000000..6698194
--- /dev/null
+++ b/docs/html/preview/features/icu4j-framework.jd
@@ -0,0 +1,162 @@
+page.title=ICU4J Android Framework APIs
+
+@jd:body
+
+<div id="qv-wrapper">
+<div id="qv">
+<h2>In this document:</h2>
+<ol>
+ <li><a href="#relation">Relationship to ICU4J</a></li>
+ <li><a href="#migration">Migrating to android.icu APIs from ICU4J </a></li>
+ <li><a href="#licence">Licensing</a></li>
+</ol>
+
+<h2>See Also</h2>
+<ol>
+ <li>
+ <a class="external-link" href=
+ "http://userguide.icu-project.org">Documentation for ICU4J</a>
+ </li>
+
+ <li>
+ <a class="external-link" href=
+ "http://site.icu-project.org/#TOC-What-is-ICU-">Latest standards supported
+ by ICU4J</a>
+ </li>
+</ol>
+</div>
+</div>
+
+<p>
+ ICU4J is an open-source, widely used set of Java libraries providing Unicode
+ and globalization support for software applications. Android N
+ exposes a subset of the ICU4J APIs in the Android framework for app developers
+ to use under the {@code android.icu} package. These APIs use
+ localization data present on the device. As a result, you can reduce your APK
+ footprint by not compiling the ICU4J libraries into your APK; instead, you can
+ simply call out to them in the framework. (In this case, you may want to provide
+ <a href="{@docRoot}google/play/publishing/multiple-apks.html">multiple versions
+ of your APK</a>, so users running versions of Android lower than Android N
+ can download a version of the app that contains the ICU4J libraries.)
+</p>
+
+<p>
+ This document begins by providing some basic information on the minimum
+ Android API levels required to support these libraries. It then explains what
+ you need to know about the Android-specific implementation of ICU4J. Finally,
+ it tells you how to use the ICU4J APIs in the Android framework.
+</p>
+
+<h2 id="relation">Relationship to ICU4J</h2>
+
+<p>
+ Android N exposes a subset of the ICU4J APIs via the
+ <code>android.icu</code> package, rather than <code>com.ibm.icu</code>. The
+ Android framework may choose not to
+ expose ICU4J APIs for various reasons; for example, Android N does not expose
+ some deprecated APIs or those that the ICU team have not yet declared as
+ stable. As the ICU team deprecates APIs in the future, Android will also mark
+ them as deprecated but will continue to include them.
+</p>
+
+<p class="table-caption"><strong>Table 1.</strong> ICU and CLDR versions used
+ in Android N.</p>
+<table>
+<tr>
+<th>Android API level</th>
+<th>ICU version</th>
+<th>CLDR version</th>
+</tr>
+<tr>
+<td>Android N</td>
+<td>56</td>
+<td>28</td>
+</tr>
+</table>
+
+<p>Here are a few important things to note:</p>
+
+<ul>
+<li>The ICU4J Android framework APIs do not include all the ICU4J APIs.</li>
+<li>NDK developers should know that Android ICU4C is not supported.</li>
+<li>The APIs in the Android framework do not replace Android’s support for
+<a href="{@docRoot}guide/topics/resources/localization.html">localizing with
+resources</a>.</li>
+</ul>
+
+<h2 id="migration">Migrating to the android.icu package from com.ibm.icu</h2>
+
+<p>
+ If you are already using the ICU4J APIs in your app, and the
+ <code>android.icu</code> APIs meet your requirements, then migrating to
+ the framework APIs requires you to change your Java imports
+ from <code>com.ibm.icu</code> to <code>android.icu</code>. You may then
+ remove your own copy of ICU4J files from the APK.
+</p>
+
+<p class="note">
+ <b>Note</b>: The ICU4J framework APIs use the {@code android.icu}
+ namespace instead of {@code com.ibm.icu}. This is to avoid namespace
+ conflicts in APKs that contain their own {@code com.ibm.icu} libraries.
+</p>
+
+<h3 id="migrate-from-android">
+ Migrating to android.icu APIs from other Android SDK APIs
+</h3>
+
+<p>
+ Some classes in the <code>java</code> and<code>android</code> packages have
+ equivalents to those found in ICU4J. However, ICU4J often provides broader
+ support for standards and languages.
+</p>
+<p>Here are some examples to get you started:</p>
+<table>
+<tr>
+<th>Class</th>
+<th>Alternatives</th>
+</tr>
+<tr>
+<td><code>java.lang.Character</code> </td>
+<td><code>android.icu.lang.UCharacter</code> </td>
+</tr>
+<tr>
+<td><code>java.text.BreakIterator</code> </td>
+<td><code>android.icu.text.BreakIterator</code> </td>
+</tr>
+<tr>
+<td><code>java.text.DecimalFormat</code> </td>
+<td><code>android.icu.text.DecimalFormat</code> </td>
+</tr>
+<tr>
+<td><code>java.util.Calendar</code></td>
+<td>
+<code>android.icu.util.Calendar</code></td>
+</tr>
+<tr>
+<td><code>android.text.BidiFormatter</code>
+ </td>
+<td><code>android.icu.text.Bidi</code>
+ </td>
+</tr>
+<tr>
+<td><code>android.text.format.DateFormat</code>
+ </td>
+<td><code>android.icu.text.DateFormat</code>
+ </td>
+</tr>
+<tr>
+<td><code>android.text.format.DateUtils</code> </td>
+<td><code>android.icu.text.DateFormat</code>
+<code>android.icu.text.RelativeDateTimeFormatter</code>
+</td>
+</tr>
+</table>
+
+<h2 id="licence">Licensing</h2>
+
+<p>
+ ICU4J is released under the ICU license. For details, see the <a class=
+ "external-link" href=
+ "http://userguide.icu-project.org/icufaq#TOC-How-is-the-ICU-licensed-">ICU
+ User Guide.</a>
+</p>
diff --git a/docs/html/preview/features/multi-window.jd b/docs/html/preview/features/multi-window.jd
new file mode 100644
index 0000000..a12ab94
--- /dev/null
+++ b/docs/html/preview/features/multi-window.jd
@@ -0,0 +1,590 @@
+page.title=Multi-Window Support
+page.metaDescription=New support in Android N for showing more than one app at a time.
+page.keywords="multi-window", "android N", "split screen", "free-form"
+
+@jd:body
+
+<div id="qv-wrapper">
+ <div id="qv">
+ <h2>In this document</h2>
+ <ol>
+ <li><a href="#overview">Overview</a></li>
+ <li><a href="#lifecycle">Multi-Window Lifecycle</a></li>
+ <li><a href="#configuring">Configuring Your App for Multi-Window
+ Mode</a></li>
+ <li><a href="#running">Running Your App in Multi-Window Mode</a></li>
+ <li><a href="#testing">Testing Your App's Multi-Window Support</a></li>
+ </ol>
+ <h2>See Also</h2>
+ <ol>
+ <li><a class="external-link"
+ href="https://github.com/googlesamples/android-MultiWindowPlayground">Multi-Window
+ Playground sample app</a></li>
+ </ol>
+ </div>
+</div>
+
+<p>
+ Android N adds support for displaying more than one app at the
+ same time. On handheld devices, two apps can run side-by-side or
+ one-above-the-other in <em>split-screen</em> mode. On TV devices, apps can
+ use <em>picture-in-picture</em> mode to continue video playback while users
+ are interacting with another app.
+</p>
+
+<p>
+ If you build your app with the N Preview SDK, you can configure how your app
+ handles multi-window display. For example, you can specify your activity's
+ minimum allowable dimensions. You can also disable multi-window display for
+ your app, ensuring that the system only shows your app in full-screen
+ mode.
+</p>
+
+<h2 id="overview">Overview</h2>
+
+<p>
+ Android N allows several apps to share the screen at once. For
+ example, a user could split the screen, viewing a web page on the left side
+ while composing an email on the right side. The user experience depends on
+ the device:
+</p>
+
+<ul>
+ <li>Handheld devices running Android N offer split-screen
+ mode. In this mode, the system fills the screen with two apps, showing them
+ either side-by-side or one-above-the-other. The user can drag the dividing
+ line separating the two to make one app larger and the other smaller.
+ </li>
+
+ <li>On Nexus Player running Android N, apps can put themselves
+ in <a href="picture-in-picture.html">picture-in-picture mode</a>, allowing
+ them to continue showing content while the user browses or interacts with
+ other apps.
+ </li>
+
+ <li>Manufacturers of larger devices can choose to enable freeform
+ mode, in which the user can freely resize each activity. If the
+ manufacturer enables this feature, the device offers freeform mode in addition
+ to split-screen mode.
+ </li>
+</ul>
+
+<img src="{@docRoot}preview/images/mw-splitscreen.png" alt="" width="650"
+ srcset="{@docRoot}preview/images/mw-splitscreen.png 1x,
+ {@docRoot}preview/images/mw-splitscreen_2x.png 2x,"
+ id="img-split-screen" />
+<p class="img-caption">
+ <strong>Figure 1.</strong> Two apps running side-by-side in split-screen mode.
+</p>
+
+<p>
+ The user can switch into multi-window mode in the following ways:
+</p>
+
+<ul>
+ <li>If the user opens the <a href="{@docRoot}guide/components/recents.html">Overview
+ screen</a> and performs a long press on an
+ activity title, they can drag that activity to a highlighted portion of the
+ screen to put the activity in multi-window mode.
+ </li>
+
+ <li>If the user performs a long press on the Overview button, the device puts
+ the current activity in multi-window mode, and opens the Overview screen to
+ let the user choose another activity to share the screen.
+ </li>
+</ul>
+
+<p>
+ Users can <a href="{@docRoot}guide/topics/ui/drag-drop.html">drag and
+ drop</a> data from one activity to another while the activities are sharing
+ the screen. (Previously, users could only drag and drop data within a single
+ activity.)
+</p>
+
+<h2 id="lifecycle">Multi-Window Lifecycle</h2>
+
+<p>
+ Multi-window mode does not change the <a href=
+ "{@docRoot}training/basics/activity-lifecycle/index.html">activity
+ lifecycle</a>.
+</p>
+
+<p>
+ In multi-window mode, only the activity the user has most recently interacted
+ with is active at a given time. This activity is considered <em>topmost</em>.
+ All other activities are in the paused state, even if they are visible.
+ However, the system gives these paused-but-visible activities higher priority
+ than activities that are not visible. If the user interacts with one of the
+ paused activities, that activity is resumed, and the previously topmost
+ activity is paused.
+</p>
+
+<p class="note">
+ <strong>Note:</strong> In multi-window mode, an app can be in the paused
+ state and still be visible to the user. An app might need to continue its
+ activities even while paused. For example, a video-playing app that is in
+ paused mode but is visible should continue showing its video. For this
+ reason, we recommend that activities that play video <em>not</em> pause the
+ video in their {@link android.app.Activity#onPause onPause()} handlers.
+ Instead, they should pause video in {@link android.app.Activity#onStop
+ onStop()}, and resume playback in {@link android.app.Activity#onStart
+ onStart()}.
+</p>
+
+<p>
+ When the user puts an app into multi-window mode, the system notifies the
+ activity of a configuration change, as specified in <a href=
+ "{@docRoot}guide/topics/resources/runtime-changes.html">Handling Runtime
+ Changes</a>. Essentially, this change has the same activity-lifecycle
+ implications as when the system notifies the app that the device has switched
+ from portrait to landscape mode, except that the device dimensions are
+ changed instead of just being swapped. As discussed in <a href=
+ "{@docRoot}guide/topics/resources/runtime-changes.html">Handling Runtime
+ Changes</a>, your activity can handle the configuration change itself, or it
+ can allow the system to destroy the activity and recreate it with the new
+ dimensions.
+</p>
+
+<p>
+ If the user is resizing a window and makes it larger in either dimension, the
+ system resizes the activity to match the user action and issues <a href=
+ "{@docRoot}guide/topics/resources/runtime-changes.html">runtime changes</a>
+ as needed. If the app lags behind in drawing in newly-exposed areas, the
+ system temporarily fills those areas with the color specified by the {@link
+ android.R.attr#windowBackground windowBackground} attribute or by the default
+ <code>windowBackgroundFallback</code> style attribute.
+</p>
+
+<h2 id="configuring">Configuring Your App for Multi-Window Mode</h2>
+
+<p>
+ If your app targets Android N, you can configure how and
+ whether your app's activities support multi-window display. You can set
+ attributes in your manifest to control both size and layout.
+ A root activity's attribute settings apply to all activities
+ within its task stack.
+</p>
+
+<p class="note">
+ <strong>Note:</strong> If you build a multi-orientation app with a version of the
+ SDK lower than Android N, and the user uses the app in
+ multi-window mode, the system forcibly resizes the app. The system presents a
+ dialog box warning the user that the app may behave unexpectedly. The system
+ does <em>not</em> resize fixed-orientation apps; if
+ the user attempts to open a fixed-orientation app under multi-window mode,
+ the app takes over the whole screen.
+</p>
+
+<h4 id="resizeableActivity">android:resizeableActivity</h4>
+<p>
+ Set this attribute in your manifest's <code><activity></code> or
+ <code><application></code> node to enable or disable multi-window
+ display:
+</p>
+
+<pre>
+android:resizeableActivity=["true" | "false"]
+</pre>
+
+<p>
+ If this attribute is set to true, the activity can be launched in
+ split-screen and freeform modes. If the attribute is set to false, the
+ activity does not support multi-window mode. If this value is false, and the
+ user attempts to launch the activity in multi-window mode, the activity takes
+ over the full screen.
+</p>
+
+<p>
+ If your app targets Android N, but you do not specify a value
+ for this attribute, the attribute's value defaults to true.
+</p>
+
+<h4 id="supportsPictureInPicture">android:supportsPictureInPicture</h4>
+
+<p>
+ Set this attribute in your manifest's <code><activity></code> node to
+ indicate whether the activity supports picture-in-picture display. This
+ attribute is ignored if <code>android:resizeableActivity</code> is false.
+</p>
+
+<pre>
+android:supportsPictureInPicture=["true" | "false"]
+</pre>
+
+<h3 id="layout">Layout attributes</h3>
+
+<p>
+ With Android N, the <code><layout></code> manifest element
+ supports several attributes that affect how an activity behaves in
+ multi-window mode:
+</p>
+
+<dl>
+ <dt>
+ <code>android:defaultWidth</code>
+ </dt>
+
+ <dd>
+ Default width of the activity when launched in freeform mode.
+ </dd>
+
+ <dt>
+ <code>android:defaultHeight</code>
+ </dt>
+
+ <dd>
+ Default height of the activity when launched in freeform mode.
+ </dd>
+
+ <dt>
+ <code>android:gravity</code>
+ </dt>
+
+ <dd>
+ Initial placement of the activity when launched in freeform mode. See the
+ {@link android.view.Gravity} reference for suitable values.
+ </dd>
+
+ <dt>
+ <code>android:minimalSize</code>
+ </dt>
+
+ <dd>
+ Minimum height and minimum width for the activity in both split-screen
+ and freeform modes. If the user moves the divider in split-screen mode
+ to make an activity smaller than the specified minimum, the system crops
+ the activity to the size the user requests.
+ </dd>
+</dl>
+
+<p>
+ For example, the following code shows how to specify an activity's default
+ size and location, and its minimum size, when the activity is displayed in
+ freeform mode:
+</p>
+
+<pre>
+<activity android:name=".MyActivity">
+ <layout android:defaultHeight="500dp"
+ android:defaultWidth="600dp"
+ android:gravity="top|end"
+ android:minimalSize="450dp" />
+</activity>
+</pre>
+
+<h2 id="running">Running Your App in Multi-Window Mode</h2>
+
+<p>
+ Android N offers new functionality to support apps that can run
+ in multi-window mode.
+</p>
+
+<h3 id="disabled-features">Disabled features in multi-window mode</h3>
+
+<p>
+ Certain features are disabled or ignored when a device is in multi-window
+ mode, because they don’t make sense for an activity which may be sharing the
+ device screen with other activities or apps. Such features include:
+
+<ul>
+ <li>Some <a href="{@docRoot}training/system-ui/index.html">System UI</a>
+ customization options are disabled; for example, apps cannot hide the status
+ bar if they are not running in full-screen mode.
+ </li>
+
+ <li>The system ignores changes to the <code><a href=
+ "{@docRoot}guide/topics/manifest/activity-element.html#screen"
+ >android:screenOrientation</a></code> attribute.
+ </li>
+</ul>
+
+<h3 id="change-notification">Multi-window change notification and querying</h3>
+
+<p>
+ The following new methods have been added to the {@link android.app.Activity}
+ class to support multi-window display. For details on each method, see the
+ <a href="{@docRoot}preview/setup-sdk.html#docs-dl">N Preview SDK Reference</a>.
+</p>
+
+<dl>
+ <dt>
+ <code>Activity.inMultiWindow()</code>
+ </dt>
+
+ <dd>
+ Call to find out if the activity is in multi-window mode.
+ </dd>
+
+ <dt>
+ <code>Activity.inPictureInPicture()</code>
+ </dt>
+
+ <dd>
+ Call to find out if the activity is in picture-in-picture mode.
+
+ <p class="note">
+ <strong>Note:</strong> Picture-in-picture mode is a special case of
+ multi-window mode. If <code>myActivity.inPictureInPicture()</code>
+ returns true, then <code>myActivity.inMultiWindow()</code> also returns
+ true.
+ </p>
+ </dd>
+
+ <dt>
+ <code>Activity.onMultiWindowChanged()</code>
+ </dt>
+
+ <dd>
+ The system calls this method whenever the activity goes into or out of
+ multi-window mode. The system passes the method a value of true if the
+ activity is entering multi-window mode, and false if the activity is
+ leaving multi-window mode.
+ </dd>
+
+ <dt>
+ <code>Activity.onPictureInPictureChanged()</code>
+ </dt>
+
+ <dd>
+ The system calls this method whenever the activity goes into or out of
+ picture-in-picture mode. The system passes the method a value of true if
+ the activity is entering picture-in-picture mode, and false if the activity
+ is leaving picture-in-picture mode.
+ </dd>
+</dl>
+
+<p>
+ There are also {@link android.app.Fragment} versions of each of these
+ methods, for example <code>Fragment.inMultiWindow()</code>.
+</p>
+
+<h3 id="entering-pip">Entering picture-in-picture mode</h3>
+
+<p>
+ To put an activity in picture-in-picture mode, call the new method
+ <code>Activity.enterPictureInPicture()</code>. This method has no effect if
+ the device does not support picture-in-picture mode. For more information,
+ see the <a href="picture-in-picture.html">Picture-in-Picture</a> documentation.
+</p>
+
+<h3 id="launch">Launch New Activities in Multi-Window Mode</h3>
+
+<p>
+ When you launch a new activity, you can hint to the system that the new
+ activity should be displayed adjacent to the current one, if possible. To do
+ this, use the flag
+ <code>Intent.FLAG_ACTIVITY_LAUNCH_TO_ADJACENT</code>. Passing
+ this flag requests the following behavior:
+</p>
+
+<ul>
+ <li>If the device is in split-screen mode, the system attempts to create the
+ new activity next to the activity that launched it, so the two activities
+ share the screen. The system is not guaranteed to be able to do this, but it
+ makes the activities adjacent if possible.
+ </li>
+
+ <li>If the device is not in split-screen mode, this flag has no effect.
+ </li>
+</ul>
+
+<p>
+ If a device is in freeform mode and you are launching a new activity, you can
+ specify the new activity's dimensions and screen location by calling
+ <code>ActivityOptions.setLaunchBounds()</code>. This method has no effect if
+ the device is not in multi-window mode.
+</p>
+
+<p class="note">
+ <strong>Note:</strong> If you launch an activity within a task stack, the
+ activity replaces the activity on the screen, inheriting all of its
+ multi-window properties. If you want to launch the new activity as a separate
+ window in multi-window mode, you must launch it in a new task stack.
+</p>
+
+<h3 id="dnd">Supporting drag and drop</h3>
+
+<p>
+ Users can <a href="{@docRoot}guide/topics/ui/drag-drop.html">drag and
+ drop</a> data from one activity to another while the two activities are
+ sharing the screen. (Previously, users could only drag and drop data within a
+ single activity.) For this reason, you may want to add drag and drop
+ functionality to your app if your app does not currently support it.
+</p>
+
+<p>
+ The N Preview SDK extends the <a href=
+ "{@docRoot}reference/android/view/package-summary.html"><code>android.view</code></a>
+ package to support cross-app drag and drop. For details on the following
+ classes and methods, see the <a href="{@docRoot}preview/setup-sdk.html#docs-dl">N
+ Preview SDK Reference</a>.
+</p>
+
+<dl>
+ <dt>
+ <code>android.view.DropPermissions</code>
+ </dt>
+
+ <dd>
+ Token object responsible for specifying the permissions granted to the app
+ that receives a drop.
+ </dd>
+
+ <dt>
+ <code>View.startDragAndDrop()</code>
+ </dt>
+
+ <dd>
+ New alias for {@link android.view.View#startDrag View.startDrag()}. To
+ enable cross-activity drag and drop, pass the new flag
+ <code>View.DRAG_FLAG_GLOBAL</code>. If you need to give URI permissions to
+ the recipient activity, pass the new flags
+ <code>View.DRAG_FLAG_GLOBAL_URI_READ</code> or
+ <code>View.DRAG_FLAG_GLOBAL_URI_WRITE</code>, as appropriate.
+ </dd>
+
+ <dt>
+ <code>View.cancelDragAndDrop()</code>
+ </dt>
+
+ <dd>
+ Cancels a drag operation currently in progress. Can only be called by the
+ app that originated the drag operation.
+ </dd>
+
+ <dt>
+ <code>View.updateDragShadow()</code>
+ </dt>
+
+ <dd>
+ Replaces the drag shadow for a drag operation currently in progress. Can
+ only be called by the app that originated the drag operation.
+ </dd>
+
+ <dt>
+ <code>Activity.requestDropPermissions()</code>
+ </dt>
+
+ <dd>
+ Requests the permissions for the content URIs passed with the {@link
+ android.content.ClipData} contained in a {@link android.view.DragEvent}.
+ </dd>
+</dl>
+
+<h2 id="testing">Testing Your App's Multi-Window Support</h2>
+
+<p>
+ Whether or not you update your app for Android N, you should
+ verify how it behaves in multi-window mode in case a user tries to launch it
+ in multiwindow mode on a device running Android N.
+</p>
+
+<h3 id="configuring">Configuring a Test Device</h3>
+
+<p>
+ If you install Android N on a device, split-screen mode is
+ automatically supported.
+</p>
+
+<h3 id="test-non-n">If your app was not built with the N Preview SDK</h3>
+
+<p>
+ If you did not build your app with the N Preview SDK and the user attempts to use
+ the app in multi-window mode, the system forcibly resizes the app unless the app
+ declares a fixed orientation.
+</p>
+
+<p>
+ If your app does not declare a fixed orientation, you should launch your app
+ on a device running Android N and attempt to put the app in
+ split-screen mode. Verify that the user experience is
+ acceptable when the app is forcibly resized.
+</p>
+
+<p>
+ If the app declares a fixed orientation, you should attempt to put the app in
+ multi-window mode. Verify that when you do so, the app remains
+ in full-screen mode.
+</p>
+
+<h3 id="test-mw">If you support multi-window mode</h3>
+
+<p>
+ If you built your app with the N Preview SDK and have not disabled
+ multi-window support, verify the following behavior under both split-screen
+ and freeform modes.
+</p>
+
+<ul>
+ <li>Launch the app in full-screen mode, then switch to multi-window mode by
+ long-pressing the Overview button. Verify that the app switches properly.
+ </li>
+
+ <li>Launch the app directly in multi-window mode, and verify that the app
+ launches properly. You can launch an app in multi-window mode by pressing the
+ Overview button, then long-pressing the title bar of your app and dragging it
+ to one of the highlighted areas on the screen.
+ </li>
+
+ <li>Resize your app in split-screen mode by dragging the divider line.
+ Verify that the app resizes without crashing, and that necessary UI elements
+ are visible.
+ </li>
+
+ <li>If you have specified minimum dimensions for your app, attempt to resize
+ the app below those dimensions. Verify that you cannot resize the app to be
+ smaller than the specified minimum.
+ </li>
+
+ <li>Through all tests, verify that your app's performance is acceptable. For
+ example, verify that there is not too long a lag to update the UI after the
+ app is resized.
+ </li>
+</ul>
+
+<h4 id="test-checklist">Testing checklist</h4>
+
+<p>
+ To verify your app's performance in multi-window mode, try the following
+ operations. You should try these operations in both split-screen and
+ multi-window mode, except where otherwise noted.
+</p>
+
+<ul>
+ <li>Enter and leave multi-window mode.
+ </li>
+
+ <li>Switch from your app to another app, and verify that the app behaves
+ properly while it is visible but not active. For example, if your app is
+ playing video, verify that the video continues to play while the user is
+ interacting with another app.
+ </li>
+
+ <li>In split-screen mode, try moving the dividing bar to make your app both
+ larger and smaller. Try these operations in both side-by-side and
+ one-above-the-other configurations. Verify that the app does not crash,
+ essential functionality is visible, and the resize operation doesn't take too
+ long.
+ </li>
+
+ <li>Perform several resize operations in rapid succession. Verify that your
+ app doesn't crash or leak memory. For information about checking your app's
+ memory usage, see <a href="{@docRoot}tools/debugging/debugging-memory.html">
+ Investigating Your RAM Usage</a>.
+ </li>
+
+ <li>Use your app normally in a number of different window configurations, and
+ verify that the app behaves properly. Verify that text is readable, and that
+ UI elements aren't too small to interact with.
+ </li>
+</ul>
+
+<h3 id="test-disabled-mw">If you have disabled multi-window support</h3>
+
+<p>
+ If you disabled multi-window support by setting
+ <code>android:resizableActivity="false"</code>, you should launch your app on
+ a device running Android N and attempt to put the app in
+ freeform and split-screen modes. Verify that when you do so, the app remains
+ in full-screen mode.
+</p>
diff --git a/docs/html/preview/features/multilingual-support.jd b/docs/html/preview/features/multilingual-support.jd
new file mode 100644
index 0000000..ac96452
--- /dev/null
+++ b/docs/html/preview/features/multilingual-support.jd
@@ -0,0 +1,218 @@
+page.title=Language and Locale
+@jd:body
+
+<div id="qv-wrapper">
+<div id="qv">
+<h2>In this document:</h2>
+<ol>
+ <li><a href="#preN">Challenges in Resolving Language Resources</a></li>
+ <li><a href="#postN">Improvements to Resource-Resolution Strategy</a></li>
+ <li><a href="#design">Designing your App to Support Additional
+ Locales</a></li>
+
+</ol>
+
+</div>
+</div>
+
+<p>Android N provides enhanced support for multilingual users,
+allowing them to select multiple locales in settings. Android N
+provides this capability by greatly expanding the number of locales supported
+and changing the way the system resolves resources. The new method of resolving
+resources is more robust and designed to be compatible with existing APKs, but
+you should take extra care to spot any unexpected behavior. For example, you
+should test to make sure that your app defaults to the expected language. Also,
+if your app supports multiple languages, you should ensure that this support works as
+intended. Finally, you should try to ensure that your app gracefully handles
+languages that you didn't explicitly design it to support.</p>
+
+<p>This document starts by explaining the resource resolution strategy prior to
+Android N. Next, it describes Android N's improved
+resource-resolution strategy. Last, it explains how to take advantage of
+the expanded number of locales to support more multilingual users.</p>
+
+<h2 id="preN">Challenges in Resolving Language Resources</h2>
+
+<p>Prior to Android N, Android could not always successfully
+ match app and system locales.</p>
+
+ <p>For example, assume that you have the following situation:</p>
+ <ul>
+ <li>Your app's default language is {@code en_US} (US English), and it also has
+ Spanish strings localized in {@code es_ES}
+ resource files.</li>
+ <li> A device is set to {@code es_MX} </li>
+
+<p>When your Java code refers to strings, the system would load
+strings from the default ({@code en_US}) resource file, even if the app has
+Spanish resources localized under {@code es_ES}. This is because when the system
+ cannot find an exact match, it continues to look for resources by stripping the
+ country code off the locale. Finally, if no match is found, the system falls
+ back to the default, which is {@code en_US}. </p>
+
+
+<p>The system would also default to {@code en_US} if the user chose a language that
+the app didn't support at all, like French. For example:</p>
+
+<p class="table-caption" id="t-resource-res">
+<strong>Table 1.</strong> Resource resolution without an exact locale match.
+</p>
+<table>
+<tbody>
+<tr>
+<th>User Settings</th>
+<th>App Resources</th>
+<th>Resource Resolution</th>
+</tr>
+<tr>
+<td>fr_CH</td>
+<td>
+default (en)<br>
+de_DE<br>
+es_ES<br>
+fr_FR<br>
+it_IT<br>
+</td>
+ <td>
+Try fr_CH => Fail<br>
+Try fr => Fail<br>
+Use default (en)
+</td>
+ </tr>
+ </tbody>
+</table>
+
+
+<p>In this example, the system displays English strings without
+knowing whether the user can understand English. This behavior is pretty common
+today. Android N should substantially reduce the frequency
+of outcomes like this one.</p>
+
+<h2 id="postN">Improvements to Resource-Resolution Strategy</h2>
+<p>Android N brings more robust resource resolution, and
+finds better fallbacks automatically. However, to speed up resolution and improve
+ maintainability, you should store resources in the most common parent dialect.
+ For example, if you were storing Spanish resources in the {@code es-US} directory
+ before, move them into the {@code es-419} directory, which contains Latin American Spanish.
+ Similarly, if you have resource strings in a folder named {@code en-GB}, rename
+ the folder to {@code en-001} (international English), because the most common
+ parent for <code>en-GB</code> strings is {@code en-001}.
+ The following examples explain why these practices improve performance and
+reliability of resource resolution.</p>
+
+<h3>Resource resolution examples</h3>
+
+<p>With Android N, the case described in <strong>Table 1</strong> is resolved
+differently:</p>
+
+<p class="table-caption" id="t-improved-res">
+<strong>Table 2.</strong> An improved resolution strategy for when there is no
+exact locale match.</p>
+<table>
+<tr>
+<th>User Settings</th>
+<th>App Resources</th>
+<th>Resource Resolution</th>
+</tr>
+<tr>
+<td><ol>
+<li> fr_CH</li>
+</ol>
+</td>
+<td>
+default (en)<br>
+de_DE<br>
+es_ES<br>
+fr_FR<br>
+it_IT<br>
+</td>
+<td>
+Try fr_CH => Fail<br>
+Try fr => Fail<br>
+Try children of fr => fr_FR<br>
+Use fr_FR
+</td>
+</tr>
+
+</table>
+
+
+<p>Now the user gets French resources instead of English. This example also shows
+ why you should store French strings in {@code fr} rather than {@code fr_FR}
+ for Android N. Here the course of action is to match the closest parent dialect,
+ making resolution faster and more predictable.</p>
+
+<p>In addition to this improved resolution logic, Android now offers more
+ user languages to choose from. Let’s try the above example again with Italian
+ specified as an additional user language, but without app support for French. </p>
+
+<p class="table-caption" id="t-2d-choice">
+<strong>Table 3.</strong> Resource resolution when the app only matches the
+user's second-preferred locale setting.</p>
+<table>
+<tr>
+<th>User Settings</th>
+<th>App Resources</th>
+<th>Resource Resolution</th>
+
+</tr>
+<tr>
+<td><ol>
+<li> fr_CH</li>
+<li> it_CH</li>
+</ol>
+</td>
+<td>
+default (en)<br>
+de_DE<br>
+es_ES<br>
+it_IT<br>
+</td>
+<td>
+Try fr_CH => Fail<br>
+Try fr => Fail<br>
+Try children of fr => Fail<br>
+Try it_CH => Fail<br>
+Try it => Fail<br>
+Try children of it => it_IT<br>
+Use it_IT
+</td>
+
+</tr>
+
+</table>
+<p>The user still gets a language they understand, even though the app doesn’t
+support French.</p>
+
+
+<h2 id="design">Designing your App to Support Additional Locales</h2>
+<h3>LocaleList API</h3>
+
+<p>Android N adds a new API {@code LocaleList.GetDefault()}
+that lets apps directly query the list of languages a user has specified. This API
+allows you to create more sophisticated
+ app behavior and better-optimized display of content. For example, Search
+ can show results in multiple languages based on user’s settings. Browser apps
+ can avoid offering to translate pages in a language the user already knows,
+ and keyboard apps can auto-enable all appropriate layouts. </p>
+
+<h3>Formatters</h3>
+
+<p>Up through Android 6.0 (API level 23), Android supported only one or two locales
+ for many common languages
+(en, es, ar, fr, ru). Because there were only a few variants of each language,
+apps could get away with storing some numbers and dates as hard coded strings
+in resource files. However, with Android's broadened set of supported locales,
+there can be
+significant differences in formats for dates, times, currencies, and similar
+information even within a single locale. Hard-coding your formats can produce a
+confusing experience for end users. Therefore, when developing for Android N
+make sure to use formatters instead of hard coding numbers and date strings.</p>
+
+<p>A prime example is Arabic, whose support Android N expands from
+one {@code ar_EG} to 27 Arabic locales. These locales can share most resources,
+but some prefer ASCII digits, while others prefer native digits. For example,
+when you want to create a sentence with a digit variable, such as
+"Choose a 4 digit pin", use formatters as shown below:</p>
+
+<pre> format(locale, "Choose a %d-digit PIN", 4)</pre>
diff --git a/docs/html/preview/features/notification-updates.jd b/docs/html/preview/features/notification-updates.jd
new file mode 100644
index 0000000..d3042ad
--- /dev/null
+++ b/docs/html/preview/features/notification-updates.jd
@@ -0,0 +1,334 @@
+page.title=Notifications
+page.tags=notifications
+helpoutsWidget=true
+page.image=/preview/images/notifications-card.png
+
+trainingnavtop=true
+
+@jd:body
+
+<div id="qv-wrapper">
+<div id="qv">
+
+<!-- table of contents -->
+<h2>This document includes</h2>
+<ol>
+ <li><a href="#direct">Direct Reply</a></li>
+ <li><a href="#bundle">Bundled Notifications</a></li>
+ <li><a href="#custom">Custom Views</a></li>
+</ol>
+
+</div>
+</div>
+
+<p>Android N introduces several new APIs that allow apps to post
+notifications that are highly visible and interactive.</p>
+
+<p>Android N extends the existing {@link android.support.v4.app.RemoteInput}
+notification API to support inline replies on handsets. This feature allows users
+ to quickly respond from the notification shade without visiting your app.</p>
+
+<p>
+ Android N also allows you to bundle similar notifications to
+ appear as a single notification. To make this possible, Android N uses the existing {@link
+ android.support.v4.app.NotificationCompat.Builder#setGroup
+ NotificationCompat.Builder.setGroup()} method. Users can expand each of the
+ notifications, and perform actions such as reply and dismiss on each of the
+ notifications, individually from the notification shade.
+</p>
+
+<p>Last, Android N also adds new APIs that allow you to leverage system
+decorations in your app’s customized notification views. These APIs help
+ensure that the notification views share a consistent presentation with
+standard templates.</p>
+
+<p>This document highlights some of the key changes that you should take into
+ account when using the new notification features in your apps.</p>
+
+<h2 id="direct">Direct Reply</h2>
+
+<p>With the Direct Reply feature in Android N, users can quickly
+respond to text messages or update task lists directly within the notification
+interface. On a handheld, the inline reply action appears as an additional button
+ attached to the notification. When a user replies via keyboard, the system attaches
+ the text response to the intent
+ you had specified for the notification action and sends the intent to your
+ handheld app.
+
+
+<img id="fig-reply-button" src="{@docRoot}preview/images/inline-reply.png"
+ srcset="{@docRoot}preview/images/inline-reply.png 1x,
+ {@docRoot}preview/images/inline-reply_2x.png 2x"
+ width="400">
+<p class="img-caption">
+ <strong>Figure 1.</strong> Android N adds the <strong>Reply</strong>
+ action button.
+</p>
+
+<h3>Adding inline reply actions</h3>
+
+<p>To create a notification action that supports direct reply:
+</p>
+
+<ol>
+<li>Create an instance of {@link android.support.v4.app.RemoteInput.Builder}
+ that you can add to your notification
+action. This class's constructor accepts a string that the system uses as the key
+ for the text input. Later, your handheld app uses that key to retrieve the text
+ of the input.
+
+<pre>
+// Key for the string that's delivered in the action's intent
+private static final String KEY_TEXT_REPLY = "key_text_reply";
+String replyLabel = getResources().getString(R.string.reply_label);
+RemoteInput remoteInput = new RemoteInput.Builder(KEY_TEXT_REPLY)
+ .setLabel(replyLabel)
+ .build();
+</pre>
+</li>
+<li>Attach the {@link android.support.v4.app.RemoteInput}
+ object to an action using <code>addRemoteInput()</code>.
+
+<pre>
+// Create the reply action and add the remote input
+Notification.Action action =
+ new Notification.Action.Builder(R.drawable.ic_reply_icon,
+ getString(R.string.label), replyPendingIntent)
+ .addRemoteInput(remoteInput)
+ .build();
+</pre>
+</li>
+
+<li>Apply the action to a notification and issue the notification.
+
+<pre>
+// Build the notification and add the action
+Notification notification =
+ new Notification.Builder(mContext)
+ .setSmallIcon(R.drawable.ic_message)
+ .setContentTitle(getString(R.string.title))
+ .setContentText(getString(R.string.content))
+ .addAction(action))
+ .build();
+
+// Issue the notification
+NotificationManager notificationManager =
+ NotificationManager.from(mContext);
+notificationManager.notify(notificationId, notification);
+
+</pre>
+</li>
+
+</ol>
+
+
+<p> The system prompts the user to input a response when they trigger the
+notification action. </p>
+
+<img id="fig-user-input" src="{@docRoot}preview/images/inline-type-reply.png"
+ srcset="{@docRoot}preview/images/inline-type-reply.png 1x,
+ {@docRoot}preview/images/inline-type-reply_2x.png 2x"
+ width="300">
+<p class="img-caption">
+ <strong>Figure 2.</strong> The user inputs text from the notification shade.
+</p>
+
+<h3>Retrieving user input from the inline reply</h3>
+
+<p>To receive user input from the notification interface to the activity you
+declared in the reply action's intent:</p>
+<ol>
+<li> Call {@link android.support.v4.app.RemoteInput#getResultsFromIntent
+ getResultsFromIntent()} by passing the notification action’s intent as
+ the input parameter. This method returns a {@link android.os.Bundle} that
+ contains the text response.
+</li>
+
+<pre>
+Bundle remoteInput = RemoteInput.getResultsFromIntent(intent);
+</pre>
+
+<li>Query the bundle using the result key (provided to the {@link
+ android.support.v4.app.RemoteInput.Builder} constructor).
+</li>
+</ol>
+
+<p>The following code snippet illustrates how a method retrieves the input text
+from a bundle:</p>
+
+<pre>
+// Obtain the intent that started this activity by calling
+// Activity.getIntent() and pass it into this method to
+// get the associated string.
+
+private CharSequence getMessageText(Intent intent) {
+ Bundle remoteInput = RemoteInput.getResultsFromIntent(intent);
+ if (remoteInput != null) {
+ return remoteInput.getCharSequence(KEY_TEXT_REPLY);
+ }
+ return null;
+ }
+</pre>
+
+<p>Apps can apply logic to decide what actions to take on the retrieved
+text.
+For interactive apps (like chats), provide more context in the notification itself
+ (for example, multiple lines of chat history, including the user’s own messages)
+ so that the user can respond appropriately.
+When the user responds via {@link android.support.v4.app.RemoteInput},
+ include the text in the reply history with the {@code setRemoteInputHistory()}
+ method.</p>
+
+<h2 id="bundle">Bundled Notifications</h2>
+
+<p>Android N provides developers with a new way to represent
+ a queue of notifications: <i>bundled notifications</i>. This is similar to the
+ <a href="{@docRoot}training/wearables/notifications/stacks.html">Notification
+ Stacks</a> feature in Android Wear. For example, if your app creates notifications
+ for received messages, when more than one message is received, bundle the
+ notifications together as a single group. You can
+ use the existing {@link android.support.v4.app.NotificationCompat.Builder#setGroup
+Builder.setGroup()} method to bundle similar notifications.</p>
+
+<p>
+ A notification group imposes a hierarchy on the notifications comprising it.
+ At the top of that hierarchy is a parent notification that displays summary
+ information for the group. The user can progressively
+ expand the notification group, and the system shows more information as the
+ user drills deeper. When the user expands the bundle, the system reveals more
+ information for all its child notifications; when the user
+ expands one of those notifications, the system reveals its entire content.
+</p>
+
+<img id="fig-bundles" src="{@docRoot}preview/images/bundles.png"
+ srcset="{@docRoot}preview/images/bundles.png 1x,
+ {@docRoot}preview/images/bundles_2x.png 2x"
+ width="300">
+<p class="img-caption">
+ <strong>Figure 3.</strong> The user can progressively expand the notification
+ group.
+</p>
+
+<p>To learn how to add notifications to a group, see
+<a href="{@docRoot}training/wearables/notifications/stacks.html#AddGroup">Add
+Each Notification to a Group</a>.</p>
+
+
+<h3 id="best-practices">Best practices for bundled notifications</h3>
+<p>This section provides guidelines about when to use notification groups instead
+of the {@link android.app.Notification.InboxStyle InboxStyle}
+notifications that have been available in earlier versions of the
+Android platform.</p>
+
+<h3>When to use bundled notifications</h3>
+
+<p>You should use notification groups only if all of the following conditions are
+true for your use case:</p>
+
+<ul>
+ <li>The child notifications are complete notifications and can be displayed
+ individually without the need for a group summary.</li>
+ <li>There is a benefit to surfacing the child notifications individually. For
+ example:
+ </li>
+ <ul>
+ <li>They are actionable, with actions specific to each child.</li>
+ <li>There is more information to the child that the user wants to read.</li>
+ </ul>
+</ul>
+
+<p>Examples of good use cases for notification groups include: a messaging app
+displaying a list of incoming messages, or an email app displaying a list of
+received emails.</p>
+
+<p>
+Examples of cases where a single notification is preferable
+ include individual messages from a single person, or a list representation of
+ single-line text items. You can use
+({@link android.app.Notification.InboxStyle InboxStyle} or
+{@link android.app.Notification.BigTextStyle BigTextStyle}) to accomplish
+this.
+</p>
+
+<h3 id ="post">Displaying bundled notifications</h3>
+
+<p>
+ The app should always post a group summary, even if the group contains just a
+ single child. The system will suppress the summary and directly display the
+ child notification if it only contains a single notification. This ensures
+ that the system can provide a consistent experience when the user swipes away
+ children of a group.
+</p>
+
+<p class="note">
+ <strong>Note:</strong> This version of Android N does not yet
+ suppress the summary for notification groups containing a single child. This
+ functionality will be added in a later version of Android N.
+</p>
+
+<h3>Peeking notifications</h3>
+
+<p>While the system usually displays child notifications as a group, you can set
+ them to temporarily appear as
+ <a href="{@docRoot}guide/topics/ui/notifiers/notifications.html#Heads-up">
+ heads-up notifications</a>. This feature is especially useful because it allows
+ immediate access to the most recent child and the actions associated with it.
+</p>
+
+
+<h3>Backwards compatibility</h3>
+
+<p>
+ Both notification groups and remote input have been a part of the {@link
+ android.app.Notification} API since Android 5.0 (API level 21) to support
+ Android Wear devices. If you've already built notifications with these APIs,
+ the only action you must take is to verify that the app behavior corresponds
+ to the guidelines described above, and to consider implementing {@code
+ setRemoteInputHistory()}.
+</p>
+
+<p>
+ In order to support backward compatibility, the same APIs are available with
+ the support library's {@link android.support.v4.app.NotificationCompat}
+ class, allowing you to build notifications that works on earlier Android
+ versions. On handhelds and tablets, users only see the summary notification,
+ so an app should still have an inbox style or an equivalent notification
+ representative for the whole information content of the group. As Android
+ Wear devices allow users to see all child notifications even on older
+ platform levels, you should build child notifications regardless of API
+ level.
+</p>
+
+<h2 id="custom"> Custom Views</h2>
+<p>Starting from Android N, you can customize notification views and
+still obtain system decorations like notification headers, actions, and
+expandable layouts.</p>
+
+<p>To enable this capability, Android N adds the following APIs to style your
+ custom view:</p>
+
+<dl>
+<dt>
+{@code DecoratedCustomViewStyle()}</dt>
+<dd> Styles notifications other than media
+notifications.</dd>
+<dt>
+{@code DecoratedMediaCustomViewStyle()}</dt>
+<dd> Styles media notifications.</dd>
+</dl>
+
+<p>To use this new API, call the {@code setStyle()} method, passing to it
+the desired custom view style.</p>
+
+<p>This snippet shows how to construct a custom notification object with the
+{@code DecoratedCustomViewStyle()} method.</p>
+
+<pre>
+Notification noti = new Notification.Builder()
+ .setSmallIcon(R.drawable.ic_stat_player)
+ .setLargeIcon(albumArtBitmap))
+ .setCustomContentView(contentView);
+ .setStyle(new Notification.DecoratedCustomViewStyle())
+ .build();
+
+</pre>
diff --git a/docs/html/preview/features/picture-in-picture.jd b/docs/html/preview/features/picture-in-picture.jd
new file mode 100644
index 0000000..e0fb0bb
--- /dev/null
+++ b/docs/html/preview/features/picture-in-picture.jd
@@ -0,0 +1,186 @@
+page.title=Picture-in-picture
+page.keywords=preview,sdk,PIP,Picture-in-picture
+page.tags=androidn
+
+@jd:body
+
+<div id="qv-wrapper">
+<div id="qv">
+
+<h2>In this document</h2>
+<ol>
+ <li><a href="#declaring">Declaring Your Activity Supports
+Picture-in-picture</a></li>
+ <li><a href="#pip_button">Switching Your Activity to Picture-in-picture</a>
+</li>
+ <li><a href="#handling_ui">Handling UI During Picture-in-picture</a>
+</li>
+ <li><a href="#continuing_playback">Continuing Video Playback While in
+Picture-in-picture</a></li>
+ <li><a href="#best">Best Practices</a></li>
+</ol>
+
+<h2>See Also</h2>
+<ol>
+ <li><a href="{@docRoot}preview/features/multi-window.html">Multi-Window
+Support</a></li>
+</ol>
+
+</div>
+</div>
+
+<p>In Android N, Android TV users can now watch a video
+in a pinned window in a corner of the screen when navigating within
+apps. Picture-in-picture (PIP) mode lets apps run a video
+activity in the pinned window while another activity continues in the
+background. The PIP window lets users multitask while using your app, which
+helps users be more productive.</p>
+
+<p>Your app can decide when to trigger PIP mode. Here are some examples of
+when to enter PIP mode:</p>
+
+<ul>
+<li>Your app can move a video into PIP mode when the user navigates
+back from the video to browse other content.</li>
+<li>Your app can switch a video into PIP mode while a user watches the end
+of an episode of content. The main screen displays promotional or summary
+information about the next episode in the series.</li>
+<li>Your app can provide a way for users to queue up additional content while
+they watch a video. The video continues playing in PIP mode while the main
+screen displays a content selection activity.</li>
+</ul>
+
+<p>The PIP window is 240x135 dp and is shown at the top-most layer in one of
+the four corners of the screen, chosen by the system. The user can bring up a
+PIP menu that lets them toggle the PIP window to full-screen, or close the PIP
+window, by holding down the <b>Home</b> button on the remote. If another
+video starts playing on the main screen, the PIP window is automatically
+closed. Users can also close the PIP window through Recents.</p>
+
+<img src="{@docRoot}preview/images/pip-active.png" />
+<p class="img-caption"><strong>Figure 1.</strong> A Picture-in-picture
+video visible in a corner of the screen while the user browses content
+on the main screen.</p>
+
+<p>PIP leverages the multi-window APIs available in Android N to
+provide the pinned video overlay window. To add PIP to your app, you need to
+register your activities that support PIP, switch your activity to PIP mode as
+needed, and make sure UI elements are hidden and video playback continues when
+the activity is in PIP mode.</p>
+
+<h2 id="declaring">Declaring Your Activity Supports Picture-in-picture</h2>
+
+<p>By default, the system does not automatically support PIP for apps.
+If you want support PIP in your app, register your video
+activity in your manifest by setting
+<code>android:supportsPictureInPicture</code> and
+<code>android:resizeableActivity</code> to <code>true</code>. Also, specify
+that your activity handles layout configuration changes so that your activity
+doesn't relaunch when layout changes occur during PIP mode transitions.</p>
+
+<pre>
+<activity android:name="VideoActivity"
+ android:resizeableActivity="true"
+ android:supportsPictureInPicture="true"
+ android:configChanges=
+ "screenSize|smallestScreenSize|screenLayout|orientation"
+ ...
+</pre>
+
+<p>When registering your activity, keep in mind that in PIP mode, your
+activity is shown in a small overlay window on a TV screen. Video playback
+activities with minimal UI provide the best user experience. Activities that
+contain small UI elements might not provide a good user experience
+when switched to PIP mode, because users can't see details of the UI elements
+in the PIP window.</p>
+
+<h2 id="pip_button">Switching Your Activity to Picture-in-picture</h2>
+
+When you need to switch your activity into PIP mode, call
+<code>Activity.enterPictureInPicture()</code>. The following example switches
+to PIP mode when the user selects a dedicated PIP button on a media control
+bar:</p>
+
+<pre>
+@Override
+public void onActionClicked(Action action) {
+ if (action.getId() == R.id.lb_control_picture_in_picture) {
+ getActivity().enterPictureInPicture();
+ return;
+ }
+ ...
+</pre>
+
+<p>Adding a PIP button to your media control bar lets your user easily switch
+to PIP mode while controlling video playback.</p>
+
+<img src="{@docRoot}preview/images/pip-button.png" />
+<p class="img-caption"><strong>Figure 1.</strong> A Picture-in-picture
+button on a media control bar.</p>
+
+<p>Android N includes a new
+<code>PlaybackControlsRow.PictureInPictureAction</code> class which defines
+control bar PIP actions and uses the PIP icon.</p>
+
+<h2 id="handling_ui">Handling UI During Picture-in-picture</h2>
+
+<p>When your activity enters PIP mode, your activity should only show video
+playback. Remove UI elements before your activity enters PIP,
+and restore these elements when your activity becomes full-screen again.
+Override <code>Activity.onPictureInPictureChanged()</code> or
+<code>Fragment.onPictureInPictureChanged()</code> and enable or
+disable your UI elements as needed, for example:</p>
+
+<pre>
+@Override
+public void onPictureInPictureChanged(boolean inPictureInPicture) {
+ if (inPictureInPicture) {
+ // Hide the controls in picture-in-picture mode.
+ ...
+ } else {
+ // Restore the playback UI based on the playback status.
+ ...
+ }
+}
+</pre>
+
+<h2 id="continuing_playback">Continuing Video Playback While in
+Picture-in-picture</h2>
+
+<p>When your activity switches to PIP, the system considers the activity in a
+paused state, and calls your activity's <code>onPause()</code> method. Video
+playback should not be paused and should continue playing if the activity is
+paused due to PIP mode. Check for PIP in your activity's
+<code>onPause()</code> method and handle playback appropriately, for
+example:</p>
+
+<pre>
+@Override
+public void onPause() {
+ // If called due to PIP, do not pause playback
+ if (inPictureInPicture()) {
+ // Continue playback
+ ...
+ }
+ // If paused but not in PIP, pause playback if necessary
+ ...
+}
+</pre>
+
+<p>When your activity switches out of PIP mode back to full-screen mode, the
+system resumes your activity and calls your <code>onResume()</code> method.</p>
+
+<h2 id="best">Best Practices</h2>
+
+<p>PIP is intended for activities that play full-screen video. When switching
+your activity into PIP mode, avoid showing anything except video content.
+Track when your activity enters PIP mode and hide UI elements, as described
+in <a href="#handling_ui">Handling UI During Picture-in-picture</a>.</p>
+
+<p>Since the PIP window is shown as a floating window in the corner of the
+screen, you should avoid showing critical information in the main screen
+in any area that can be obscured by the PIP window.</p>
+
+<p>When an activity is in PIP mode, by default it doesn't get input focus. To
+receive input events while in PIP mode, use
+<code>MediaSession.setMediaButtonReceiver()</code>.</p>
diff --git a/docs/html/preview/features/scoped-folder-access.jd b/docs/html/preview/features/scoped-folder-access.jd
new file mode 100644
index 0000000..932d8a9
--- /dev/null
+++ b/docs/html/preview/features/scoped-folder-access.jd
@@ -0,0 +1,125 @@
+page.title=Scoped Directory Access
+page.keywords=preview,sdk,scoped directory access
+page.tags=androidn
+
+@jd:body
+
+<div id="qv-wrapper">
+<div id="qv">
+ <h2>In this document</h2>
+ <ol>
+ <li><a href="#accessing">Accessing an External Storage Directory</a></li>
+ <li><a href="#removable">Accessing a Directory on Removable Media</a></li>
+ <li><a href="#best">Best Practices</a></li>
+ </ol>
+</div>
+</div>
+
+<p>Apps such as photo apps usually just need access to specific directories in
+external storage, such as the <code>Pictures</code> directory. Existing
+approaches to accessing external storage aren't designed to easily provide
+targeted directory access for these types of apps. For example:</p>
+
+<ul>
+<li>Requesting {@link android.Manifest.permission#READ_EXTERNAL_STORAGE}
+or {@link android.Manifest.permission#WRITE_EXTERNAL_STORAGE} in your manifest
+allows access to all public directories on external storage, which might be
+more access than what your app needs.</li>
+<li>Using the
+<a href="{@docRoot}guide/topics/providers/document-provider.html">Storage
+Access Framework</a> usually makes your user pick directories
+via a system UI, which is unnecessary if your app always accesses the same
+external directory.</li>
+</ul>
+
+<p>Android N provides a new simplified API to access
+common external storage directories. </p>
+
+<h2 id="accessing">Accessing an External Storage Directory</h2>
+
+<p>Use the <code>StorageManager</code> class to get the appropriate
+<code>StorageVolume</code> instance. Then, create an intent by calling the
+<code>StorageVolume.createAccessIntent()</code> method of that instance.
+Use this intent to access external storage directories. To get a list of
+all available volumes, including removable media volumes, use
+<code>StorageManager.getVolumesList()</code>.</p>
+
+<p>The following code snippet is an example of how to open the
+<code>Pictures</code> directory in the primary shared storage:</p>
+
+<pre>
+StorageManager sm = (StorageManager)getSystemService(Context.STORAGE_SERVICE);
+StorageVolume volume = sm.getPrimaryVolume();
+Intent intent = volume.createAccessIntent(Environment.DIRECTORY_PICTURES);
+startActivityForResult(intent, request_code);
+</pre>
+
+<p>The system attempts to grant access to the external directory, and if
+necessary confirms access with the user using a simplified UI:</p>
+
+<img src="{@docRoot}preview/images/scoped-folder-access-framed.png"
+srcset="{@docRoot}preview/images/scoped-folder-access-framed.png 1x,
+{@docRoot}preview/images/scoped-folder-access-framed_2x.png 2x" />
+<p class="img-caption"><strong>Figure 1.</strong> An application requesting
+access to the Pictures directory.</p>
+
+<p>If the user grants access, the system calls your
+<code>onActivityResult()</code> override with a result code of
+<code>Activity.RESULT_OK</code>, and intent data that contains the URI. Use
+the provided URI to access directory information, similar to using URIs
+returned by the
+<a href="{@docRoot}guide/topics/providers/document-provider.html">Storage
+Access Framework</a>.</p>
+
+<p>If the user doesn't grant access, the system calls your
+<code>onActivityResult()</code> override with a result code of
+<code>Activity.RESULT_CANCELED</code>, and null intent data.</p>
+
+<p class="note"><b>Note</b>: Getting access to a specific external directory
+also gains access to subdirectories within that directory.</p>
+
+<h2 id="removable">Accessing a Directory on Removable Media</h2>
+
+<p>To use Scoped Directory Access to access directories on removable media,
+first add a {@link android.content.BroadcastReceiver} that listens for the
+{@link android.os.Environment#MEDIA_MOUNTED} notification, for example:</p>
+
+<pre>
+<receiver
+ android:name=".MediaMountedReceiver"
+ android:enabled="true"
+ android:exported="true" >
+ <intent-filter>
+ <action android:name="android.intent.action.MEDIA_MOUNTED" />
+ <data android:scheme="file" />
+ </intent-filter>
+</receiver>
+</pre>
+
+<p>When the user mounts removable media, like an SD card, the system sends a
+{@link android.os.Environment#MEDIA_MOUNTED} notification. This notification
+provides a <code>StorageVolume</code> object in the intent data that you can
+use to access directories on the removable media. The following example
+accesses the <code>Pictures</code> directory on removable media:</p>
+
+<pre>
+// BroadcastReceiver has already cached the MEDIA_MOUNTED
+// notification Intent in mediaMountedIntent
+StorageVolume volume = (StorageVolume)
+ mediaMountedIntent.getParcelableExtra(StorageVolume.EXTRA_STORAGE_VOLUME);
+volume.createAccessIntent(Environment.DIRECTORY_PICTURES);
+startActivityForResult(intent, request_code);
+</pre>
+
+<h2 id="best">Best Practices</h2>
+
+<p>Where possible, persist the external directory access URI so you don't have
+to repeatedly ask the user for access. Once the user has granted access, call
+<code>getContentResolver().takePersistableUriPermssion()</code> with the
+directory access URI. The system will persist the URI and subsequent access
+requests will return <code>RESULT_OK</code> and not show confirmation UI to the
+user.</p>
+
+<p>If the user denies access to an external directory, do not immediately
+request access again. Repeatedly insisting on access results in a poor user
+experience.</p>
diff --git a/docs/html/preview/features/security-config.jd b/docs/html/preview/features/security-config.jd
new file mode 100644
index 0000000..92d98b4
--- /dev/null
+++ b/docs/html/preview/features/security-config.jd
@@ -0,0 +1,748 @@
+page.title=Network Security Configuration
+page.keywords=preview,security,network
+
+@jd:body
+
+<div id="qv-wrapper">
+<div id="qv">
+
+<h2>In this document</h2>
+<ol>
+ <li><a href="#manifest">Adding a Security Configuration File</a></li>
+ <li><a href="#CustomTrust">Customizing Trusted CAs</a>
+ <ol>
+ <li><a href="#ConfigCustom">Configuring a Trusted Custom CA</a></li>
+ <li><a href="#LimitingCas">Limiting the Set of Trusted CAs</a></li>
+ <li><a href="#TrustingAdditionalCas">Trusting Additional CAs</a></li>
+ </ol>
+ </li>
+ <li><a href="#TrustingDebugCa">Debugging-only CAs</a></li>
+ <li><a href="#UsesCleartextTraffic">Opting Out of Cleartext Traffic</a></li>
+ <li><a href="#CertificatePinning">Pinning Certificates</a></li>
+ <li><a href="#ConfigInheritance">Configuration Inheritance Behavior</a></li>
+ <li><a href="#FileFormat">Configuration File Format</a></li>
+</ol>
+</div>
+</div>
+
+
+<p>
+ Android N includes a Network Security Configuration
+ feature that lets apps customize their network security settings in a safe,
+ declarative configuration file without modifying app code. These settings can
+ be configured for specific domains and for a specific app. The key
+ capabilities of this feature are as follows:
+</p>
+
+<ul>
+ <li>
+ <b>Custom trust anchors:</b> Customize which Certificate Authorities (CA)
+ are trusted for an app's secure connections. For
+ example, trusting particular self-signed certificates or restricting the
+ set of public CAs that the app trusts.
+ </li>
+
+ <li>
+ <b>Debug-only overrides:</b> Safely debug secure connections in an app
+ without added risk to the installed base.
+ </li>
+
+ <li>
+ <b>Cleartext traffic opt-out:</b> Protect apps from from
+ accidental usage of cleartext traffic.
+ </li>
+
+ <li>
+ <b>Certificate pinning:</b> Restrict an app's secure connection to
+ particular certificates.
+ </li>
+</ul>
+
+
+<h2 id="manifest">Adding a Security Configuration File</h2>
+
+<p>
+ The Network Security Configuration feature uses an XML file where you specify
+ the settings for your app. You must include an entry in the manifest of your
+ app to point to this file. The following code excerpt from a manifest
+ demonstrates how to create this entry:
+</p>
+
+<pre>
+<?xml version="1.0" encoding="utf-8"?>
+...
+<app ...>
+ <meta-data android:name="android.security.net.config"
+ android:resource="@xml/network_security_config" />
+ ...
+</app>
+</pre>
+
+<h2 id="CustomTrust">Customizing Trusted CAs</h2>
+
+<p>
+ An app may want to trust a custom set of CAs instead of the platform
+ default. The most common reasons of this are:
+</p>
+
+<ul>
+ <li>Connecting to a host with a custom certificate authority(self-signed,
+ issued by an internal corporate CA, etc).
+ </li>
+
+ <li>Limiting the set of CAs to only the CAs you trust instead of every
+ preinstalled CA.
+ </li>
+
+ <li>Trusting additional CAs not included in the system.
+ </li>
+</ul>
+
+<p>
+ By default secure (e.g. TLS, HTTPS) connections from all apps trust
+ the pre-installed system CAs, and apps targeting API level 23
+ (Android M) and below also trust the user-added CA store by default. An
+ app can customize its own connections using {@code base-config} (for
+ app-wide customization) or {@code domain-config} (for per-domain
+ customization).
+</p>
+
+
+<h3 id="ConfigCustom">Configuring a Custom CA</h3>
+
+<p>
+ Assume you want to connect to your host which uses a self-signed SSL
+ certificate or to a host whose SSL certificate is issued by a non-public CA
+ which you trust, such as your company's internal CA.
+</p>
+
+<p>
+ <code>res/xml/network_security_config.xml</code>:
+<pre>
+<?xml version="1.0" encoding="utf-8"?>
+<network-security-config>
+ <domain-config>
+ <domain includeSubdomains="true">example.com</domain>
+ <trust-anchors>
+ <certificates src="@raw/my_ca"/>
+ </trust-anchors>
+ </domain-config>
+</network-security-config>
+</pre>
+</p>
+
+<p>
+ Add the self-signed or non-public CA certificate, in PEM or DER format, to
+ {@code res/raw/my_ca}.
+</p>
+
+
+<h3 id="LimitingCas">Limiting the Set of Trusted CAs</h3>
+
+<p>
+ An app that does not want to trust all CAs trusted by system can
+ instead specify its own reduced set of CAs to trust. This protects the
+ app from fradulent certificates issued by any of the other CAs.
+</p>
+
+<p>
+ The config to limit the set of trusted CAs is similar to <a href=
+ "#TrustingACustomCa">trusting a custom CA</a> for a specific domain except
+ that multiple CAs are provided in the resource.
+</p>
+
+<p>
+<code>res/xml/network_security_config.xml</code>:
+<pre>
+<?xml version="1.0" encoding="utf-8"?>
+<network-security-config>
+ <domain-config>
+ <domain includeSubdomains="true">secure.example.com</domain>
+ <domain includeSubdomains="true">cdn.example.com</domain>
+ <trust-anchors>
+ <certificates src="@raw/trusted_roots"/>
+ </trust-anchors>
+ </domain-config>
+</network-security-config>
+</pre>
+</p>
+
+<p>
+ Add the trusted CAs, in PEM or DER format, to {@code res/raw/trusted_roots}.
+ Note that if using PEM format the file must contain <em>only</em> PEM data
+ and no extra text. You can also provide multiple
+ <a href="#certificates"><code><certificates></code></a>
+elements instead of one.
+</p>
+
+
+<h3 id="TrustingAdditionalCas">
+ Trusting Additional CAs
+</h3>
+
+<p>
+ An app may want to trust additional CAs not trusted by the system,
+ this could be due to the system not yet including the CA or a CA that does
+ not meet the requirements for inclusion into the Android system. An
+ app can do this by specifying multiple certificate sources for a
+ configuration.
+</p>
+<p>
+<code>res/xml/network_security_config.xml</code>:
+<pre>
+<?xml version="1.0" encoding="utf-8"?>
+<network-security-config>
+ <base-config>
+ <trust-anchors>
+ <certificates src="@raw/extracas"/>
+ <certificates src="system"/>
+ </trust-anchors>
+ </base-config>
+</network-security-config>
+</pre>
+</p>
+
+
+<h2 id="TrustingDebugCa">Configuring CAs for Debugging</h2>
+
+<p>
+ When debugging an app that connects over HTTPS you may want to
+ connect to a local development server, which does not have the SSL
+ certificate for your production server. In order to support this without any
+ modification to your app's code you can specify debug-only CAs that
+ are <i>only</i> trusted when <a href=
+ "{@docRoot}guide/topics/manifest/application-element.html#debug">
+android:debuggable</a>
+ is {@code true} by using {@code debug-overrides}. Normally IDEs and build
+ tools set this flag automatically for non-release builds.
+</p>
+
+<p>
+ This is safer than the usual conditional code because, as a security
+ precaution, app stores do not accept apps which are marked
+ debuggable.
+</p>
+
+<p>
+<code>res/xml/network_security_config.xml</code>:
+<pre>
+<?xml version="1.0" encoding="utf-8"?>
+<network-security-config>
+ <debug-overrides>
+ <trust-anchors>
+ <certificates src="@raw/debug_cas"/>
+ </trust-anchors>
+ </debug-overrides>
+</network-security-config>
+</pre>
+</p>
+
+
+<h2 id="UsesCleartextTraffic">Opting Out of Cleartext Traffic</h2>
+
+<p>
+ Applications intending to connect to destinations using only secure
+ connections can opt-out of supporting cleartext (using unencrypted HTTP
+ protocol instead of HTTPS) to those destinations. This option helps prevent
+ accidental regressions in apps due to changes in URLs provided by external
+ sources such as backend servers.
+ See {@link android.security.NetworkSecurityPolicy#isCleartextTrafficPermitted
+ NetworkSecurityPolicy.isCleartextTrafficPermitted()} for more details.
+</p>
+
+<p>
+ For example, an app may want to ensure that all connections to {@code
+ secure.example.com} are always done over HTTPS to protect sensitive traffic
+ from hostile networks.
+</p>
+
+<p>
+<code>res/xml/network_security_config.xml</code>:
+<pre>
+<?xml version="1.0" encoding="utf-8"?>
+<network-security-config>
+ <domain-config usesCleartextTraffic="false">
+ <domain includeSubdomains="true">secure.example.com</domain>
+ </domain-config>
+</network-security-config>
+</pre>
+</p>
+
+
+<h2 id="CertificatePinning">Pinning Certificates</h2>
+
+<p>
+ Normally an app trusts all preinstalled CAs. If any of these CAs were
+ to issue a fradulent certificate the app would be at risk from a MiTM
+ attack. Some apps choose to limit the set of certificates they accept
+ by either limiting the set of CAs they trust or by certificate pinning.
+</p>
+
+<p>
+ Certificate pinning is done by providing a set of certificates by hash of the
+ public key (SubjectPublicKeyInfo of the X.509 certificate). A certificate
+ chain is then only valid if the certificate chain contains at least one of
+ the pinned public keys.
+</p>
+
+<p>
+ Note that when using certificate pinning you should always include a backup
+ key so that if you are forced to switch to new keys, or change CAs (when
+ pinning to a CA certificate or an intermediate of that CA), your
+ app's connectivity is unaffected. Otherwise you must to push out
+ an update to the app to restore connectivity.
+</p>
+
+<p>
+ Additionally it is possible to set an expiration time for pins after which
+ pinning is not performed. This helps prevent connectivity issues in
+ apps which have not been updated. However, setting an expiration time
+ on pins may enable pinning bypass.
+</p>
+
+<p>
+<code>res/xml/network_security_config.xml</code>:
+<pre>
+<?xml version="1.0" encoding="utf-8"?>
+<network-security-config>
+ <domain-config>
+ <domain includeSubdomains="true">example.com</domain>
+ <pin-set expiration="2018-01-01">
+ <pin digest="SHA-256">7HIpactkIAq2Y49orFOOQKurWxmmSFZhBCoQYcRhJ3Y=</pin>
+ <!-- backup pin -->
+ <pin digest="SHA-256">fwza0LRMXouZHRC8Ei+4PyuldPDcf3UKgO/04cDM1oE=</pin>
+ </domain-config>
+</network-security-config>
+</pre>
+</p>
+
+
+<h2 id="ConfigInheritance">Configuration Inheritance Behavior</h2>
+
+<p>
+ Values not set in a specific config are inherited. This behavior allows more
+ complex configurations while keeping the configuration file readable.
+</p>
+
+<p>
+ If a value is not set in a specific entry then value from the next more
+ general entry is used. Values not set in a {@code domain-config} is
+ taken from the parent {@code domain-config}, if nested, or from the {@code
+ base-config} if not. Values not set in the {@code base-config} uses the
+ platform default values.
+</p>
+
+<p>
+ For example consider, where all connections to subdomains of {@code
+ example.com} must use a custom set of CAs. Additonally cleartext traffic to
+ these domains is permitted <em>except</em> when connecting to {@code
+ secure.example.com}. By nesting the configuration for {@code
+ secure.example.com} inside the configuration for {@code example.com} the
+ {@code trust-anchors} does not need to be duplicated.
+</p>
+
+<p>
+<code>res/xml/network_security_config.xml</code>:
+<pre>
+<?xml version="1.0" encoding="utf-8"?>
+<network-security-config>
+ <domain-config>
+ <domain includeSubdomains="true">example.com</domain>
+ <trust-anchors>
+ <certificates src="@raw/my_ca"/>
+ </trust-anchors>
+ <domain-config cleartextTrafficPermitted="false">
+ <domain includeSubdomains="true">secure.example.com</domain>
+ </domain-config>
+ </domain-config>
+</network-security-config>
+</pre>
+</p>
+
+
+<h2 id="FileFormat">Configuration File Format</h2>
+
+<p>
+ The Network Security Configuration feature uses an XML file format.
+ The overall structure of the file is shown in the following code sample:
+</p>
+
+<pre>
+<?xml version="1.0" encoding="utf-8"?>
+<network-security-config>
+ <base-config>
+ <trust-anchors>
+ <certificates src="..."/>
+ ...
+ </trust-anchors>
+ </base-config>
+
+ <domain-config>
+ <domain>android.com</domain>
+ ...
+ <trust-anchors>
+ <certificates src="..."/>
+ ...
+ </trust-anchors>
+ <pin-set>
+ <pin digest="...">...</pin>
+ ...
+ </pin-set>
+ </domain-config>
+ ...
+ <debug-overrides>
+ <trust-anchors>
+ <certificates src="..."/>
+ ...
+ </trust-anchors>
+ </debug-overrides>
+</network-security-config>
+</pre>
+
+<p>
+ The following sections describe the syntax and other details of the file
+ format.
+</p>
+
+<h3 id="network-security-config">
+ <network-security-config>
+</h3>
+
+<dl class="xml">
+ <dt>
+ can contain:
+ </dt>
+
+ <dd>
+ 0 or 1 of <code><a href="#base-config"><base-config></a></code><br>
+ Any number of <code><a href=
+ "#domain-config"><domain-config></a></code><br>
+ 0 or 1 of <code><a href="#debug-overrides"><debug-overrides></a></code>
+ </dd>
+</dl>
+
+<h3 id="base-config">
+ <base-config>
+</h3>
+
+<dl class="xml">
+ <dt>
+ syntax:
+ </dt>
+</dl>
+
+<pre class="stx">
+<base-config <a href=
+"#usesCleartextTraffic">usesCleartextTraffic</a>=["true" | "false"]>
+ ...
+</base-config>
+</pre>
+<dl class="xml">
+ <dt>
+ can contain:
+ </dt>
+
+ <dd>
+ <code><a href="#trust-anchors"><trust-anchors></a></code>
+ </dd>
+
+ <dt>
+ description:
+ </dt>
+
+ <dd>
+ The default configuration used by all connections whose destination is not
+ covered by a <a href="#domain-config"><code>domain-config</code></a>.
+
+<p>
+ Any values that are not set use the platform default values. The default
+ configuration for apps targeting above API level 24 and above:
+</p>
+
+<pre>
+<base-config usesCleartextTraffic="true">
+ <trust-anchors>
+ <certificates src="system" />
+ </trust-anchors>
+</base-config>
+</pre>
+The default configuration for apps targeting API level 23 and below is:
+<pre>
+<base-config usesCleartextTraffic="true">
+ <trust-anchors>
+ <certificates src="system" />
+ <certificates src="user" />
+ </trust-anchors>
+</base-config>
+</pre>
+
+ </dd>
+</dl>
+
+<h3 id="domain-config"><domain-config></h3>
+<dl class="xml">
+<dt>syntax:</dt>
+<dd>
+<pre class="stx"><domain-config <a href="#usesCleartextTraffic">usesCleartextTraffic</a>=["true" | "false"]>
+ ...
+</domain-config></pre>
+</dd>
+
+<dt>Can Contain:</dt>
+
+<dd>
+1 or more <code><a href="#domain"><domain></a></code>
+<br/>0 or 1 <code><a href="#trust-anchors"><trust-anchors></a></code>
+<br/>0 or 1 <code><a href="#pin-set"><pin-set></code></a>
+<br/>Any number of nested <code><domain-config></code></dd>
+
+<dt>Description</dt>
+<dd>Configuration used for connections to specific destinations as the defined by {@code domain} elements.
+
+<p>Note that if multiple {@code domain-config} elements cover a destination the config with the most specific (longest)
+matching domain rule is used.</p></dd>
+</dl>
+
+
+<h3 id="domain"><domain></h3>
+
+<dl class="xml">
+ <dt>
+ syntax:
+ </dt>
+
+ <dd>
+ <pre class="stx">
+<domain includeSubdomains=["true" | "false"]>example.com</domain>
+</pre>
+ </dd>
+
+ <dt>
+ Attributes:
+ </dt>
+
+ <dd>
+ <dl class="attr">
+ <dt>
+ {@code includeSubdomains}
+ </dt>
+
+ <dd>
+ If {@code "true"} then this domain rule matches the domain and all
+ subdomains, including subdomains of subdomains, otherwise the rule only
+ applies to exact matches.
+ </dd>
+ </dl>
+ </dd>
+
+ <dt>
+ Description:
+ </dt>
+</dl>
+
+<h3 id="debug-overrides"><debug-overrides></h3>
+
+<dl class="xml">
+ <dt>
+ syntax:
+ </dt>
+
+ <dd>
+ <pre class="stx">
+<debug-overrides>
+ ...
+</debug-overrides>
+</pre>
+ </dd>
+
+ <dt>
+ Can Contain:
+ </dt>
+
+ <dd>
+ 0 or 1 <code><a href="#trust-anchors"><trust-anchors></a></code>
+ </dd>
+
+ <dt>
+ Description:
+ </dt>
+
+ <dd>
+ Overrides to be applied when <a href=
+ "{@docRoot}guide/topics/manifest/application-element.html#debug">android:debuggable</a>
+ is {@code "true"} which is normally the case for non-release builds
+ generated by IDEs and build tools. Trust anchors specified in {@code
+ debug-overrides} are added to all other configurations and certificate
+ pinning is not performed when the server's certificate chain uses one of
+ these debug-only trust anchors. If <a href=
+ "{@docRoot}guide/topics/manifest/application-element.html#debug">android:debuggable</a>
+ is {@code "false"} then this section is completely ignored.
+ </dd>
+</dl>
+
+<h3 id="trust-anchors"><trust-anchors></h3>
+<dl class="xml">
+ <dt>
+ syntax:
+ </dt>
+
+ <dd>
+ <pre class="stx">
+<trust-anchors>
+...
+</trust-anchors>
+</pre>
+ </dd>
+
+ <dt>
+ Can Contain:
+ </dt>
+
+ <dd>
+ Any number of <code><a href="#certificates"><certificates></a></code>
+ </dd>
+
+ <dt>
+ Description:
+ </dt>
+
+ <dd>
+ Set of trust anchors for secure connections.
+ </dd>
+</dl>
+
+
+<h3 id="certificates"><certificates></h3>
+<dl class="xml">
+<dt>syntax:</dt>
+<dd><pre class="stx"><certificates src=["system" | "user" | "<i>raw resource</i>"]
+ overridePins=["true" | "false"] />
+</pre></dd>
+<dt>description:</dt>
+<dd>Set of X.509 certificates for {@code trust-anchors} elements.</dd>
+
+<dt>attributes:</dt>
+<dd><dl class="attr">
+<dt>{@code src}</dt>
+<dd>
+The source of CA certificates, can be one of
+<ul>
+ <li>a raw resource id pointing to a file containing X.509 certificates.
+ Certificates must be encoded in DER or PEM format. In the case of PEM
+ certificates the file <em>must not</em> contain extra non-PEM data such as
+ comments.
+ </li>
+
+ <li>{@code "system"} for the pre-installed system CA certificates
+ </li>
+
+ <li>{@code "user"} for user-added CA certificates
+ </li>
+</ul>
+</dd>
+
+<dt>{@code overridePins}</dt>
+<dd>
+ <p>
+ Specifies if the CAs from this source bypass certificate pinning. If {@code
+ "true"} then certificate chains which chain through one of the CAs from this
+ source then pinning is not be performed. This can be useful for debug CAs
+ or to support letting the user MiTM your app's secure traffic.
+ </p>
+
+ <p>
+ Default is {@code "false"} unless specified in a {@code debug-overrides}
+ element, in which case the default is {@code "true"}.
+ </p>
+</dd>
+</dl>
+</dd>
+
+
+<h3 id="pin-set"><pin-set></h3>
+
+<dl class="xml">
+ <dt>
+ syntax:
+ </dt>
+
+ <dd>
+<pre class="stx">
+<pin-set expiration="date">
+...
+</pin-set>
+</pre>
+ </dd>
+
+ <dt>
+ Can Contain:
+ </dt>
+
+ <dd>
+ Any number of <code><a href="#pin"><pin></a></code>
+ </dd>
+
+ <dt>
+ Description:
+ </dt>
+
+ <dd>
+ A set of public key pins. For a secure connection to be trusted, one of the
+ public keys in the chain of trust must be in the set of pins. See
+ <code><a href="#pin"><pin></a></code> for the format of pins.
+ </dd>
+
+ <dt>
+ Attributes:
+ </dt>
+
+ <dd>
+ <dl class="attr">
+ <dt>
+ {@code expiration}
+ </dt>
+
+ <dd>
+ The date, in {@code yyyy-MM-dd} format, at and after which the pins
+ expire, thus disabling pinning. If the attribute is not set then the
+ pins do not expire.
+ <p>
+ Expiration helps prevent connectivity issues in apps which do
+ not get updates to their pin set, for example because the user
+ disabled app updates.
+ </p>
+ </dd>
+ </dl>
+ </dd>
+</dl>
+
+<h3 id="pin"><pin></h3>
+<dl class="xml">
+ <dt>
+ syntax:
+ </dt>
+
+ <dd>
+<pre class="stx">
+<pin digest=["SHA-256"]>base64 encoded digest of X.509
+ SubjectPublicKeyInfo (SPKI)</pin>
+</pre>
+ </dd>
+
+ <dt>
+ Attributes:
+ </dt>
+
+ <dd>
+ <dl class="attr">
+ <dt>
+ {@code digest}
+ </dt>
+
+ <dd>
+ The digest algorithm used to generate the pin. Currently only
+ {@code "SHA-256"} is supported.
+ </dd>
+ </dl>
+ </dd>
+</dl>
diff --git a/docs/html/preview/features/tv-recording-api.jd b/docs/html/preview/features/tv-recording-api.jd
new file mode 100644
index 0000000..ee37bff
--- /dev/null
+++ b/docs/html/preview/features/tv-recording-api.jd
@@ -0,0 +1,120 @@
+page.title=TV Recording
+page.keywords=preview,sdk,tv,recording
+page.tags=androidn
+
+@jd:body
+
+<div id="qv-wrapper">
+<div id="qv">
+ <h2>In this document</h2>
+ <ol>
+ <li><a href="#supporting">Indicating Support for Recording</a></li>
+ <li><a href="#recording">Recording a Session</a></li>
+ <li><a href="#errors">Handling Recording Errors</a></li>
+ <li><a href="#sessions">Managing Recorded Sessions</a></li>
+ <li><a href="#best">Best Practices</a></li>
+ </ol>
+</div>
+</div>
+
+<p>TV input services let the user pause and resume channel playback via
+time-shifting APIs. Android N expands on time-shifting
+by letting the user save multiple recorded sessions.</p>
+
+<p>Users can schedule recordings in advance, or start a recording as they watch
+a program. Once the system has saved a recording, the user can browse, manage,
+and play back the recording using the system TV app.</p>
+
+<p>If you want to provide recording functionality for your TV input service,
+you must indicate to the system that your app supports recording, implement
+the ability to record programs, handle and communicate any errors that occur
+during recording, and manage your recorded sessions.</p>
+
+<h2 id="supporting">Indicating Support for Recording</h2>
+
+<p>To tell the system that your TV input service supports recording, follow
+these steps:</p>
+
+<ol>
+<li>In your <code>TvInputService.onCreate()</code> method, create a new
+<code>TvInputInfo</code> object using the <code>TvInputInfo.Builder</code>
+class.</li>
+<li>When creating the new <code>TvInputInfo</code> object, call
+<code>setCanRecord(true)</code> before calling <code>build()</code> to
+indicate your service supports recording.</li>
+<li>Register your <code>TvInputInfo</code> object with the system by calling
+<code>TvInputService.updateTvInputInfo()</code>.</li>
+</ol>
+
+<h2 id="recording">Recording a Session</h2>
+
+<p>After your TV input service registers that it supports recording
+functionality, the system calls your
+<code>TvInputService.onCreateRecordingSession()</code> when it needs to access
+your app's recording implementation. Implement your own
+<code>TvInputService.RecordingSession</code> subclass and return it
+when the <code>onCreateRecordingSession()</code> callback
+fires. This subclass is responsible for switching to the correct channel data,
+recording the requested data, and communicating recording status and errors to
+the system.</p>
+
+<p>When the system calls <code>RecordingSession.onTune()</code>, passing in a
+channel URI, tune to the channel that the URI specifies. Notify the system that
+your app has tuned to the desired channel by calling <code>notifyTuned()</code>,
+or, if your app could not tune to the proper channel, call
+<code>notifyError()</code>.</p>
+
+<p>The system next invokes the <code>RecordingSession.onStartRecording()</code>
+callback. Your app must start recording immediately. When the system invokes
+this callback, it may provide a URI that contains information about the program
+that is about to be recorded. When the recording is done, you need to copy this
+data to the <code>RecordedPrograms</code> data table.</p>
+
+<p>Finally, the system calls <code>RecordingSession.onStopRecording()</code>.
+At this point, your app must stop recording immediately. You also need to
+create an entry in the <code>RecordedPrograms</code> table. This entry should
+include the recorded session data URI in the
+<code>RecordedPrograms.COLUMN_RECORDING_DATA_URI</code> column, and any program
+information that the system provided in the initial call to
+<code>onStartRecording()</code>.</p>
+
+<p>For more details on how to access the <code>RecordedPrograms</code> table
+see <a href="#sessions">Managing Recorded Sessions</a>.</p>
+
+<h2 id="errors">Handling Recording Errors</h2>
+
+<p>If an error occurs during recording, rendering the recorded data unusable,
+notify the system by calling <code>RecordingSession.notifyError()</code>.
+Similarly, you can call <code>notifyError()</code> after a recording session is
+created to let the system know that your app can no longer record sessions.</p>
+
+<p>If an error occurs during recording, but you'd like to provide a usable
+partial recording to users for playback, call
+<code>RecordingSession.notifyRecordingStopped()</code> to enable the system to
+use the partial session.</p>
+
+<h2 id="sessions">Managing Recorded Sessions</h2>
+
+<p>The system maintains information for all recorded sessions from all
+recording-capable channel apps in the <code>TvContract.RecordedPrograms</code>
+content provider table. This information is accessible via the
+<code>RecordedPrograms.Uri</code> content URI. Use content provider APIs to
+read, add, and delete entries from this table.</p>
+
+<p>For more information on working with content provider data see
+<a href="{@docRoot}guide/topics/providers/content-provider-basics.html">
+Content Provider Basics</a> .</p>
+
+<h2 id="best">Best Practices</h2>
+
+<p>TV devices may have limited storage, so use your best judgment when
+allocating storage to save recorded sessions. Use
+<code>RecordingCallback.onError(RECORDING_ERROR_INSUFFICIENT_SPACE)</code> when
+there isn't enough space to save a recorded session.</p>
+
+<p>When the user initiates recording, you should start recording data as soon
+as possible. To facilitate this, complete any up-front time-consuming tasks,
+like accessing and allocating storage space, when the system invokes the
+<code>onCreateRecordingSession()</code> callback. Doing so lets you start
+recording immediately when the <code>onStartRecording()</code> callback
+fires.</p>
diff --git a/docs/html/preview/guide.jd b/docs/html/preview/guide.jd
new file mode 100644
index 0000000..28c0fe9
--- /dev/null
+++ b/docs/html/preview/guide.jd
@@ -0,0 +1,190 @@
+page.title=Testing Guide
+page.image=images/cards/card-n-guide_2x.png
+meta.tags="preview", "testing"
+page.tags="preview", "developer preview"
+
+@jd:body
+
+<div id="qv-wrapper">
+ <div id="qv">
+ <h2>In this document</h2>
+ <ol>
+ <li><a href="#runtime-permissions">Testing Permissions</a></li>
+ <li><a href="#doze-standby">Testing Doze and App Standby</a></li>
+ <li><a href="#ids">Auto Backup and Device Identifiers</a></li>
+ </ol>
+ </div>
+</div>
+
+<p>
+ Android N gives you an opportunity to ensure your apps work with the next
+ version of the platform. This preview includes a number of APIs and behavior changes that can
+ impact your app, as described in the <a href="{@docRoot}preview/api-overview.html">API
+ Overview</a> and <a href="{@docRoot}preview/behavior-changes.html">Behavior Changes</a>. In testing
+ your app with the preview, there are some specific system changes that you should focus on to
+ ensure that users have a good experience.
+</p>
+
+<p>
+ This guide describes the what and how to test preview features with your app. You should
+ prioritize testing of these specific preview features, due to their high potential impact on your
+ app's behavior:
+</p>
+
+<ul>
+ <li><a href="#runtime-permissions">Permissions</a>
+ </li>
+ <li><a href="#doze-standby">Doze and App Standby</a>
+ </li>
+ <li><a href="#ids">Auto Backup and Device Identifiers</a></li>
+</ul>
+
+<p>
+ For more information about how to set up devices or virtual devices with a preview system image
+ for testing, see <a href="{@docRoot}preview/setup-sdk.html">Set up
+the Android N SDK</a>.
+</p>
+
+
+<h2 id="runtime-permissions">Testing Permissions</h2>
+
+<p>
+ The new <a href="{@docRoot}preview/features/runtime-permissions.html">Permissions</a> model
+ changes the way that permissions are allocated to your app by the user. Instead of granting all
+ permissions during the install procedure, your app must ask the user for individual permissions
+ at runtime. For users this behavior provides more granular control over each app’s activities, as
+ well as better context for understanding why the app is requesting a specific permission. Users
+ can grant or revoke the permissions granted to an app individually at any time. This feature of
+ the preview is most likely to have an impact on your app's behavior and may prevent some of your
+ app features from working, or they may work in a degraded state.
+</p>
+
+<p class="caution">
+ This change affects all apps running on the new platform, even those not targeting the new
+ platform version. The platform provides a limited compatibility behavior for legacy apps, but you
+ should begin planning your app’s migration to the new permissions model now, with a goal of
+ publishing an updated version of your app at the official platform launch.
+</p>
+
+
+<h3 id="permission-test-tips">Test tips</h3>
+
+<p>
+ Use the following test tips to help you plan and execute testing of your app with the new
+ permissions behavior.
+</p>
+
+<ul>
+ <li>Identify your app’s current permissions and the related code paths.</li>
+ <li>Test user flows across permission-protected services and data.</li>
+ <li>Test with various combinations of granted/revoked permission.</li>
+ <li>Use the {@code adb} tool to manage permssions from the command line:
+ <ul>
+ <li>List permissions and status by group:
+ <pre>adb shell pm list permissions -d -g</pre>
+ </li>
+ <li>Grant or revoke one or more permissions using the following syntax:<br>
+ <pre>adb shell pm [grant|revoke] <permission.name> ...</pre>
+ </li>
+ </ul>
+ </li>
+ <li>Analyze your app for services that use permissions.</li>
+</ul>
+
+<h3 id="permission-test-strategy">Test strategy</h3>
+
+<p>
+ The permissions change affects the structure and design of your app, as well as
+ the user experience and flows you provide to users. You should assess your app’s current
+ permissions use and start planning for the new flows you want to offer. The official release of
+ the platform provides compatibility behavior, but you should plan on updating your app and not
+ rely on these behaviors.
+</p>
+
+<p>
+ Identify the permissions that your app actually needs and uses, and then find the various code
+ paths that use the permission-protected services. You can do this through a combination of
+ testing on the new platform and code analysis. In testing, you should focus on opting in to
+ runtime permissions by changing the app’s {@code targetSdkVersion} to the preview version. For
+ more information, see <a href="{@docRoot}preview/setup-sdk.html#">Set up
+the Android N SDK</a>.
+</p>
+
+<p>
+ Test with various combinations of permissions revoked and added, to highlight the user flows that
+ depend on permissions. Where a dependency is not obvious or logical you should consider
+ refactoring or compartmentalizing that flow to eliminate the dependency or make it clear why the
+ permission is needed.
+</p>
+
+<p>
+ For more information on the behavior of runtime permissions, testing, and best practices, see the
+ <a href="{@docRoot}preview/features/runtime-permissions.html">Permissions</a> developer
+ preview page.
+</p>
+
+
+<h2 id="doze-standby">Testing Doze and App Standby</h2>
+
+<p>
+ The power saving features of Doze and App Standby limit the amount of background processing that
+ your app can perform when a device is in an idle state or while your app is not in focus. The
+ restrictions the system may impose on apps include limited or no network access,
+ suspended background tasks, suspended Notifications, ignored wake requests, and alarms. To ensure
+ that your app behaves properly with these power saving optimizations, you should test your app by
+ simulating these low power states.
+</p>
+
+<h4 id="doze">Testing your app with Doze</h4>
+
+<p>To test Doze with your app:</p>
+
+<ol>
+<li>Configure a hardware device or virtual device with an Android N system image.</li>
+<li>Connect the device to your development machine and install your app.</li>
+<li>Run your app and leave it active.</li>
+<li>Simulate the device going into Doze mode by running the following commands:
+
+<pre>
+$ adb shell dumpsys battery unplug
+$ adb shell dumpsys deviceidle step
+$ adb shell dumpsys deviceidle -h
+</pre>
+
+ </li>
+ <li>Observe the behavior of your app when the device is re-activated. Make sure it
+ recovers gracefully when the device exits Doze.</li>
+</ol>
+
+
+<h4 id="standby">Testing apps with App Standby</h4>
+
+<p>To test the App Standby mode with your app:</p>
+
+<ol>
+ <li>Configure a hardware device or virtual device with an Android N system image.</li>
+ <li>Connect the device to your development machine and install your app.</li>
+ <li>Run your app and leave it active.</li>
+ <li>Simulate the app going into standby mode by running the following commands:
+
+<pre>
+$ adb shell am broadcast -a android.os.action.DISCHARGING
+$ adb shell am set-idle <packageName> true
+</pre>
+
+ </li>
+ <li>Simulate waking your app using the following command:
+ <pre>$ adb shell am set-idle <packageName> false</pre>
+ </li>
+ <li>Observe the behavior of your app when it is woken. Make sure it recovers gracefully
+ from standby mode. In particular, you should check if your app's Notifications and background
+ jobs continue to function as expected.</li>
+</ol>
+
+<h2 id="ids">Auto Backup for Apps and Device-Specific Identifiers</h2>
+
+<p>If your app is persisting any device-specific identifiers, such as Google
+Cloud Messaging registration ID, in internal storage,
+make sure to follow best practices to exclude the storage
+location from auto-backup, as described in <a href="{@docRoot}preview/backup/index.html">Auto
+Backup for Apps</a>. </p>
diff --git a/docs/html/preview/images/bundles.png b/docs/html/preview/images/bundles.png
new file mode 100644
index 0000000..8b022b1
--- /dev/null
+++ b/docs/html/preview/images/bundles.png
Binary files differ
diff --git a/docs/html/preview/images/bundles_2x.png b/docs/html/preview/images/bundles_2x.png
new file mode 100644
index 0000000..4669096
--- /dev/null
+++ b/docs/html/preview/images/bundles_2x.png
Binary files differ
diff --git a/docs/html/preview/images/datasaver.png b/docs/html/preview/images/datasaver.png
new file mode 100644
index 0000000..c5a58fb
--- /dev/null
+++ b/docs/html/preview/images/datasaver.png
Binary files differ
diff --git a/docs/html/preview/images/doze-diagram-1.png b/docs/html/preview/images/doze-diagram-1.png
new file mode 100644
index 0000000..0814447
--- /dev/null
+++ b/docs/html/preview/images/doze-diagram-1.png
Binary files differ
diff --git a/docs/html/preview/images/doze-diagram-2.png b/docs/html/preview/images/doze-diagram-2.png
new file mode 100644
index 0000000..c20c6cb
--- /dev/null
+++ b/docs/html/preview/images/doze-diagram-2.png
Binary files differ
diff --git a/docs/html/preview/images/inline-reply.png b/docs/html/preview/images/inline-reply.png
new file mode 100644
index 0000000..79a1a72
--- /dev/null
+++ b/docs/html/preview/images/inline-reply.png
Binary files differ
diff --git a/docs/html/preview/images/inline-reply_2x.png b/docs/html/preview/images/inline-reply_2x.png
new file mode 100644
index 0000000..13c6e35
--- /dev/null
+++ b/docs/html/preview/images/inline-reply_2x.png
Binary files differ
diff --git a/docs/html/preview/images/inline-type-reply.png b/docs/html/preview/images/inline-type-reply.png
new file mode 100644
index 0000000..b22aacd
--- /dev/null
+++ b/docs/html/preview/images/inline-type-reply.png
Binary files differ
diff --git a/docs/html/preview/images/inline-type-reply_2x.png b/docs/html/preview/images/inline-type-reply_2x.png
new file mode 100644
index 0000000..6e52a80
--- /dev/null
+++ b/docs/html/preview/images/inline-type-reply_2x.png
Binary files differ
diff --git a/docs/html/preview/images/m-preview-timeline-crop.png b/docs/html/preview/images/m-preview-timeline-crop.png
new file mode 100644
index 0000000..724a6af
--- /dev/null
+++ b/docs/html/preview/images/m-preview-timeline-crop.png
Binary files differ
diff --git a/docs/html/preview/images/m-preview-timeline.png b/docs/html/preview/images/m-preview-timeline.png
new file mode 100644
index 0000000..e9a339e
--- /dev/null
+++ b/docs/html/preview/images/m-preview-timeline.png
Binary files differ
diff --git a/docs/html/preview/images/mw-portrait.png b/docs/html/preview/images/mw-portrait.png
new file mode 100644
index 0000000..e752387
--- /dev/null
+++ b/docs/html/preview/images/mw-portrait.png
Binary files differ
diff --git a/docs/html/preview/images/mw-splitscreen.png b/docs/html/preview/images/mw-splitscreen.png
new file mode 100644
index 0000000..bf71999
--- /dev/null
+++ b/docs/html/preview/images/mw-splitscreen.png
Binary files differ
diff --git a/docs/html/preview/images/mw-splitscreen_2x.png b/docs/html/preview/images/mw-splitscreen_2x.png
new file mode 100644
index 0000000..38114db
--- /dev/null
+++ b/docs/html/preview/images/mw-splitscreen_2x.png
Binary files differ
diff --git a/docs/html/preview/images/n-preview-setup.png b/docs/html/preview/images/n-preview-setup.png
new file mode 100644
index 0000000..612e031
--- /dev/null
+++ b/docs/html/preview/images/n-preview-setup.png
Binary files differ
diff --git a/docs/html/preview/images/notifications-1.png b/docs/html/preview/images/notifications-1.png
new file mode 100644
index 0000000..5712002
--- /dev/null
+++ b/docs/html/preview/images/notifications-1.png
Binary files differ
diff --git a/docs/html/preview/images/notifications-2.png b/docs/html/preview/images/notifications-2.png
new file mode 100644
index 0000000..0d07948
--- /dev/null
+++ b/docs/html/preview/images/notifications-2.png
Binary files differ
diff --git a/docs/html/preview/images/notifications-3.png b/docs/html/preview/images/notifications-3.png
new file mode 100644
index 0000000..261d010
--- /dev/null
+++ b/docs/html/preview/images/notifications-3.png
Binary files differ
diff --git a/docs/html/preview/images/notifications-card.png b/docs/html/preview/images/notifications-card.png
new file mode 100644
index 0000000..d9d0590
--- /dev/null
+++ b/docs/html/preview/images/notifications-card.png
Binary files differ
diff --git a/docs/html/preview/images/pip-active.png b/docs/html/preview/images/pip-active.png
new file mode 100644
index 0000000..a24cb03
--- /dev/null
+++ b/docs/html/preview/images/pip-active.png
Binary files differ
diff --git a/docs/html/preview/images/pip-button.png b/docs/html/preview/images/pip-button.png
new file mode 100644
index 0000000..b876b12
--- /dev/null
+++ b/docs/html/preview/images/pip-button.png
Binary files differ
diff --git a/docs/html/preview/images/quicksettings.png b/docs/html/preview/images/quicksettings.png
new file mode 100644
index 0000000..68e1f74
--- /dev/null
+++ b/docs/html/preview/images/quicksettings.png
Binary files differ
diff --git a/docs/html/preview/images/sample-activenotifications.png b/docs/html/preview/images/sample-activenotifications.png
new file mode 100644
index 0000000..8817469
--- /dev/null
+++ b/docs/html/preview/images/sample-activenotifications.png
Binary files differ
diff --git a/docs/html/preview/images/sample-directboot.png b/docs/html/preview/images/sample-directboot.png
new file mode 100644
index 0000000..cc409d3
--- /dev/null
+++ b/docs/html/preview/images/sample-directboot.png
Binary files differ
diff --git a/docs/html/preview/images/sample-messagingservice.png b/docs/html/preview/images/sample-messagingservice.png
new file mode 100644
index 0000000..0d8fb3e
--- /dev/null
+++ b/docs/html/preview/images/sample-messagingservice.png
Binary files differ
diff --git a/docs/html/preview/images/sample-multiwindow.png b/docs/html/preview/images/sample-multiwindow.png
new file mode 100644
index 0000000..979bf61
--- /dev/null
+++ b/docs/html/preview/images/sample-multiwindow.png
Binary files differ
diff --git a/docs/html/preview/images/sample-scopeddirectoryaccess.png b/docs/html/preview/images/sample-scopeddirectoryaccess.png
new file mode 100644
index 0000000..58515dc
--- /dev/null
+++ b/docs/html/preview/images/sample-scopeddirectoryaccess.png
Binary files differ
diff --git a/docs/html/preview/images/scoped-folder-access-framed.png b/docs/html/preview/images/scoped-folder-access-framed.png
new file mode 100644
index 0000000..0169e41
--- /dev/null
+++ b/docs/html/preview/images/scoped-folder-access-framed.png
Binary files differ
diff --git a/docs/html/preview/images/scoped-folder-access-framed_2x.png b/docs/html/preview/images/scoped-folder-access-framed_2x.png
new file mode 100644
index 0000000..fd59ef1
--- /dev/null
+++ b/docs/html/preview/images/scoped-folder-access-framed_2x.png
Binary files differ
diff --git a/docs/html/preview/images/screen-zoom-1.png b/docs/html/preview/images/screen-zoom-1.png
new file mode 100644
index 0000000..f62d04e
--- /dev/null
+++ b/docs/html/preview/images/screen-zoom-1.png
Binary files differ
diff --git a/docs/html/preview/images/screen-zoom-2.png b/docs/html/preview/images/screen-zoom-2.png
new file mode 100644
index 0000000..172b5b3
--- /dev/null
+++ b/docs/html/preview/images/screen-zoom-2.png
Binary files differ
diff --git a/docs/html/preview/images/studio-jdk-location.jpg b/docs/html/preview/images/studio-jdk-location.jpg
new file mode 100644
index 0000000..1b1ba23
--- /dev/null
+++ b/docs/html/preview/images/studio-jdk-location.jpg
Binary files differ
diff --git a/docs/html/preview/index.jd b/docs/html/preview/index.jd
new file mode 100644
index 0000000..bce5dec
--- /dev/null
+++ b/docs/html/preview/index.jd
@@ -0,0 +1,121 @@
+page.title=Android N Developer Preview
+page.tags="preview","developer"
+meta.tags="preview", "android"
+fullpage=true
+forcelocalnav=true
+header.hide=1
+footer.hide=1
+@jd:body
+
+<script>
+ $(document).ready(function() {
+ if (useUpdatedTemplates) {
+ $("#useUpdatedTemplates").css("display","block");
+ } else {
+ $("#useOldTemplates").css("display","block");
+ }
+ })
+</script>
+
+<section class="dac-expand dac-hero dac-light" style="background-color:#B2DFDB">
+ <div class="wrap" style="max-width:1100px;margin-top:0">
+ <div class="cols dac-hero-content" style="padding-bottom:1em;">
+
+ <div class="col-7of16 col-push-9of16" style="padding-left:2em">
+ <h1 class="dac-hero-title">Android N Developer Preview</h1>
+ <p class="dac-hero-description">
+ Get ready for Android N!
+ <strong>Test your apps</strong> on Nexus and other devices. Support new system
+ behaviors to <strong>save power and memory</strong>.
+ Extend your apps with <strong>multi-window UI</strong>,
+ <strong>direct reply notifications</strong> and more.
+ </p>
+
+ <a class="dac-hero-cta" href="{@docRoot}preview/overview.html">
+ <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 Android N (final SDK)
+ </a><br>-->
+ </div>
+ <div class="col-9of16 col-pull-7of16 dac-hero-figure" style="margin-top:1.5em;padding-right:1.5em;">
+ <img class="dac-hero-image" src="{@docRoot}images/home/n-preview-hero.png"
+ srcset="{@docRoot}images/home/n-preview-hero.png 1x,
+ {@docRoot}images/home/n-preview-hero_2x.png 2x">
+ </div>
+ </div>
+ <div class="dac-section dac-small">
+ <div class="resource-widget resource-flow-layout col-16"
+ data-query="collection:preview/landing/resources"
+ data-cardSizes="6x2"
+ data-maxResults="6"></div>
+ </div>
+ </div>
+</section>
+
+<div id="useUpdatedTemplates" style="display:none" class="dac-section dac-slim dac-gray dac-expand">
+ <div class="wrap dac-offset-parent">
+ <a class="dac-fab dac-scroll-button" data-scroll-button href="#build-apps">
+ <i class="dac-sprite dac-arrow-down-gray"></i>
+ </a>
+ <ul class="dac-actions">
+ <li class="dac-action">
+ <a class="dac-action-link" href="https://developer.android.com/preview/bug">
+ <i class="dac-action-sprite dac-sprite dac-auto-chevron-large"></i>
+ Report an issue
+ </a>
+ </li>
+ <li class="dac-action">
+ <a class="dac-action-link" href="{@docRoot}preview/support.html">
+ <i class="dac-action-sprite dac-sprite dac-auto-chevron-large"></i>
+ See release notes
+ </a>
+ </li>
+ <li class="dac-action">
+ <a class="dac-action-link" href="{@docRoot}preview/dev-community">
+ <i class="dac-action-sprite dac-sprite dac-auto-chevron-large"></i>
+ Join dev community
+ </a>
+ </li>
+ </ul>
+ </div><!-- end .wrap -->
+</div><!-- end .dac-actions -->
+
+<div id="useOldTemplates" style="display:none;color:black" class="actions-bar dac-expand dac-invert">
+ <div class="wrap dac-offset-parent">
+
+ <div class="actions">
+ <div><a href="https://developer.android.com/preview/bug">
+ <span class="dac-sprite dac-auto-chevron-large"></span>
+ Report an issue
+ </a></div>
+ <div><a href="{@docRoot}preview/support.html">
+ <span class="dac-sprite dac-auto-chevron-large"></span>
+ See release notes
+ </a></div>
+ <div><a href="{@docRoot}preview/dev-community">
+ <span class="dac-sprite dac-auto-chevron-large"></span>
+ Join dev community
+ </a></div>
+ </div><!-- end .actions -->
+ </div><!-- end .wrap -->
+</div>
+
+<section class="dac-section dac-light"><div class="wrap">
+ <h1 class="dac-section-title">Resources</h1>
+ <div class="dac-section-subtitle">
+ Essential information to help you get your apps ready for Android N.
+ </div>
+
+ <div class="resource-widget resource-flow-layout col-16"
+ data-query="collection:preview/landing/more"
+ data-cardSizes="6x6"
+ data-items-per-page="6"
+ data-maxResults="15"
+ data-initial-results="6"></div>
+
+ </div>
+</section>
+
diff --git a/docs/html/preview/j8-jack.jd b/docs/html/preview/j8-jack.jd
new file mode 100644
index 0000000..1f24530
--- /dev/null
+++ b/docs/html/preview/j8-jack.jd
@@ -0,0 +1,189 @@
+page.title=Java 8 Language Features
+page.keywords="android N", "Java 8", "Jack"
+@jd:body
+
+<div id="qv-wrapper">
+ <div id="qv">
+ <ol>
+ <li>
+ <a href="#supported-features">Supported Java 8 Language Features and APIs</a>
+ </li>
+ <li>
+ <a href="#configuration">Enabling Java 8 Features and the Jack Toolchain</a>
+ </li>
+ </ol>
+ </div>
+</div>
+
+<p>Android N introduces support for Java 8 language features
+ that you can use when developing apps that target Android N.
+ This page describes the new language features supported in the Android N
+ Preview, how to properly set up your project to use them, and any known
+ issues you may encounter.
+</p>
+
+<p>To start using these features, you need to download and set up Android
+Studio 2.1 (preview) and the Android N Preview SDK, which includes the required
+Jack toolchain and updated Android Plugin for Gradle. If you haven't yet
+installed the Android N Preview SDK, see <a href=
+"{@docRoot}preview/setup-sdk.html">Set Up to Develop for Android N</a>.</p>
+
+
+
+<p class="note">
+ <strong>Note:</strong> Using the new Java 8 language features is not a
+ requirement for developing apps that target the Android N platform. If you
+ don't want to write code with Java 8 language features, you can keep your
+ project's source and target compatibility values set to Java 7, but you still
+ must compile with JDK 8 to build against the Android N platform.
+</p>
+
+<h2 id="supported-features">
+ Supported Java 8 Language Features and APIs
+</h2>
+
+<p>
+ Android does not currently support all Java 8 language features. However, the
+ following features are now available when developing apps targeting the
+ Android N Preview:
+</p>
+
+<ul>
+ <li>
+ <a class="external-link" href=
+ "https://docs.oracle.com/javase/tutorial/java/IandI/defaultmethods.html">Default
+ and static interface methods</a>
+ </li>
+
+ <li>
+ <a class="external-link" href=
+ "https://docs.oracle.com/javase/tutorial/java/javaOO/lambdaexpressions.html">
+ Lambda expressions</a>
+ </li>
+
+ <li>
+ <a class="external-link" href=
+ "https://docs.oracle.com/javase/tutorial/java/annotations/repeating.html">Repeatable
+ annotations</a>
+ </li>
+</ul>
+
+
+<p>
+ Additionally, the following Java 8 language feature APIs are now available:
+</p>
+
+<ul>
+ <li>Reflection and language-related APIs:
+ </li>
+
+ <li style="list-style: none; display: inline">
+ <ul>
+ <li>{@code java.lang.FunctionalInterface}
+ </li>
+
+ <li>{@code java.lang.annotation.Repeatable}
+ </li>
+
+ <li>{@code java.lang.reflect.Method.isDefault()}
+ </li>
+
+ <li>and Reflection APIs associated with repeatable annotations, such as
+ {@code AnnotatedElement.getAnnotationsByType(Class)}
+ </li>
+ </ul>
+ </li>
+ <li>Utility APIs:
+ </li>
+
+ <li style="list-style: none; display: inline">
+ <ul>
+ <li>{@code java.util.function}
+ </li>
+ </ul>
+ </li>
+</ul>
+
+<p class="note">
+ <strong>Note:</strong> The Android N bases its implementation of
+ lambda expressions on anonymous classes. This approach allows them to be
+ backwards compatible and executable on earlier versions of Android. To test
+ lambda expressions on earlier versions, remember to go to your {@code
+ build.gradle} file, and set {@code compileSdkVersion} and {@code
+ targetSdkVersion} to 23 or lower.
+</p>
+
+<h2 id="configuration">
+ Enabling Java 8 Features and the Jack Toolchain
+</h2>
+
+<p>
+ In order to use the new Java 8 language features, you need to also use the
+ new <a class="external-link" href=
+ "https://source.android.com/source/jack.html">Jack toolchain</a>. This new
+ Android toolchain compiles Java language source into Android-readable dex
+ bytecode, has its own {@code .jack} library format, and provides most toolchain
+ features as part of a single tool: repackaging, shrinking, obfuscation and
+ multidex.
+</p>
+
+<p>Here is a comparison the two toolchains used to build Android DEX files:</p>
+<ul>
+ <li>Legacy javac toolchain:<br>
+ <b>javac</b> ({@code .java} --> {@code .class}) --> <b>dx</b> ({@code
+ .class} --> {@code .dex})
+ </li>
+
+ <li>New Jack toolchain:<br>
+ <b>Jack</b> ({@code .java} --> {@code .jack} --> {@code .dex})
+ </li>
+</ul>
+
+<h3>
+ Configuring Gradle
+</h3>
+
+<p>
+ To enable the Java 8 language features and Jack for your project, enter the
+ following in your module-specific {@code build.gradle} file:
+</p>
+
+<pre>
+android {
+ ...
+ defaultConfig {
+ ...
+ jackOptions {
+ enabled true
+ }
+ }
+ compileOptions {
+ sourceCompatibility JavaVersion.VERSION_1_8
+ targetCompatibility JavaVersion.VERSION_1_8
+ }
+}
+</pre>
+
+<h3>
+ Known Issues
+</h3>
+
+<p>
+ Instant Run, introduced in Android Studio 2.0 (Beta), does not currently work
+ with Jack and will be disabled while using the new toolchain.
+</p>
+
+<p>Because Jack does not generate intermediate class files when compiling an
+app, tools that depend on these files do not currently work with Jack. Some
+examples of these tools are:</p>
+
+<ul>
+ <li>Lint detectors that operate on class files
+ </li>
+
+ <li>Tools and libraries that require the app’s class files (such as JaCoCo
+ and Mockito)</li>
+</ul>
+
+<p>If you find other problems while using Jack, <a href=
+"http://tools.android.com/filing-bugs">please report bugs</a>.</p>
\ No newline at end of file
diff --git a/docs/html/preview/license.jd b/docs/html/preview/license.jd
new file mode 100644
index 0000000..ae02aae
--- /dev/null
+++ b/docs/html/preview/license.jd
@@ -0,0 +1,145 @@
+page.title=License Agreement
+
+@jd:body
+
+<p>
+To get started with the Android SDK Preview, you must agree to the following terms and conditions.
+As described below, please note that this is a preview version of the Android SDK, subject to change, that you use at your own risk. The Android SDK Preview is not a stable release, and may contain errors and defects that can result in serious damage to your computer systems, devices and data.
+</p>
+
+<p>
+This is the Android SDK Preview License Agreement (the “License Agreement”).
+</p>
+<div class="sdk-terms" style="height:auto;border:0;padding:0;width:700px">
+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 “Android-compatible” means any Android implemation that (i) complies with the Android Compatibility Definition document, which can be found at the Android compatibility website (http://source.android.com/compatibility) and which may be updated from time to time; and (ii) successfully passes the Android Compatibility Test Suite (CTS).
+
+1.4 "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 this License Agreement, Google grants you a limited, worldwide, royalty-free, non-assignable, non-exclusive, and non-sublicensable license to use the Preview solely to develop applications for compatible implementations of Android.
+
+3.2 You may not use this Preview to develop applications for other platforms (including non-compatible implementations of Android) or to develop another SDK. You are of course free to develop applications for other platforms, including non-compatible implementations of Android, provided that this Preview is not used for that purpose.
+
+3.3 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.4 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.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>
\ No newline at end of file
diff --git a/docs/html/preview/overview.jd b/docs/html/preview/overview.jd
new file mode 100644
index 0000000..c542e18
--- /dev/null
+++ b/docs/html/preview/overview.jd
@@ -0,0 +1,446 @@
+page.title=Program Overview
+page.metaDescription=Get your apps ready for the next version of Android.
+page.image=images/cards/card-n-overview_2x.png
+meta.tags="preview", "developer", "android"
+page.tags="preview", "developer", "android"
+
+@jd:body
+<!--
+<div class="cols" style=
+"background-color:#f2daf5; padding: 5px 0;margin-bottom:1em; text-align:center;">
+<h3>
+ Developer Preview 3 is now available
+ </h3>
+ <p>Includes final SDK and near-final system images</p>
+ <div style="margin:auto 1em">
+ <ul class="dac-section-links">
+ <li class="dac-section-link">
+ <a href="{@docRoot}preview/support.html#preview3-notes">
+ <span class="dac-sprite dac-auto-chevron"></span>
+ Read the Notes</a>
+ </li>
+
+ <li class="dac-section-link">
+ <a href="{@docRoot}preview/support.html#preview3-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>
+</div>
+-->
+
+<p>
+ Welcome to the <strong>Android N Developer Preview</strong>, a program that
+ gives you everything you need to test and optimize your apps for the next
+ version of Android. It's free, and you can get started right away just by
+ downloading the N Developer Preview tools.
+</p>
+
+
+
+
+
+
+
+<div style="background-color:#eceff1;padding:1em;">
+<div class="wrap">
+ <div class="cols">
+ <div class="col-4of12">
+ <h5>
+ Hardware and emulator images
+ </h5>
+
+ <p>
+ Run and test your apps on a range of devices or on an emulator.
+
+ </p>
+ </div>
+
+ <div class="col-4of12">
+ <h5>
+ Latest platform code
+ </h5>
+
+ <p>
+ We’ll provide monthly updates during the Preview, so you’ll be testing against the latest platform changes.
+ </p>
+ </div>
+
+ <div class="col-4of12">
+ <h5>
+ Priority for developer issues
+ </h5>
+
+ <p>
+ During the first several weeks we’ll give priority to developer-reported
+ issues, so test and give feedback as soon as possible.
+ </p>
+ </div>
+
+ </div>
+
+ <div class="cols">
+
+
+ <div class="col-4of12">
+ <h5>
+ New behaviors and capabilities
+ </h5>
+
+ <p>
+ Start work early to support new platform behaviors and develop with new features.
+ </p>
+ </div>
+
+ <div class="col-4of12">
+ <h5>
+ Updates delivered by OTA
+ </h5>
+
+ <p>
+ Seamless over-the-air updates for any supported device through the
+ Android Beta Program. No flashing is needed.
+ </p>
+ </div>
+
+ <div class="col-4of12">
+ <h5>
+ Feedback and support
+ </h5>
+
+ <p>
+ Report issues and give us feedback using our
+ <a href="{@docRoot}preview/bug">issue tracker</a>. Connect with other
+ developers in the
+ <a href="{@docRoot}preview/dev-community">N Developer Community</a>.
+ </p>
+ </div>
+ </div>
+</div>
+</div>
+
+<!--
+<p>New in the Android N Developer Preview: </p>
+
+<ul>
+ <li> Accompanying Android Beta Program for consumers, starting later in the preview</li>
+ <li> More supported devices, including devices from OEM partners</li>
+ <li> Seamless OTAs for your devices, from initial release to final N release without flashing</li>
+</ul>
+-->
+
+<h2 id="timeline">Timeline and updates</h2>
+<img src="{@docRoot}images/n-preview-updates_2x.png">
+
+<p>
+ The N Developer Preview runs from 9 March 2016 until the final Android N
+ public release to AOSP and OEMs, planned for Q3 2016.
+</p>
+
+<p>
+ At key development milestones, we’ll deliver updates for your development and
+ testing environment. In general you can expect an update each month (4 to 6
+ week interval). The milestones are listed below.
+</p>
+
+<ul>
+ <li><strong><a href="{@docRoot}preview/support.html">Preview 1</a></strong> (initial release, alpha)</li>
+ <li><strong>Preview 2</strong> (incremental update, beta)</li>
+ <li><strong>Preview 3</strong> (incremental update, beta)</li>
+ <li><strong>Preview 4</strong> (final APIs and official SDK, Play publishing)</li>
+ <li><strong>Preview 5</strong> (near-final system images for final testing)</li>
+ <li><strong>Final release</strong> to AOSP and ecosystem</li>
+</ul>
+
+<p>
+ Each update includes SDK tools, preview system images, emulators, reference
+ documentation, and API diffs.
+</p>
+
+<p>
+ The <strong>first three preview milestones</strong> provide an <strong>early
+ test and development environment</strong> that help you identify
+ compatibility issues in your current apps and plan migration or feature work
+ needed to target the new platform. This is the priority period in which to
+ give us your feedback on features and APIs and file compatibility issues
+ — for all of these, please use the <a href="{@docRoot}preview/bug">issue
+ tracker</a>. You can expect some API changes across these updates.
+</p>
+
+<p>
+ At <strong>previews 4 and 5</strong> you’ll have access to the <strong>final
+ N APIs and SDK</strong> to develop with, as well as near-final system images
+ to test system behaviors and features. Android N will provide a standard API
+ level at this time. You can begin final compatibility testing of your legacy
+ apps and refine any new code that is using the N APIs or features.
+</p>
+
+<p>
+ Also starting in preview 4, you’ll be able to <strong>publish apps to
+ devices</strong> running Android N at the official API level, such as
+ consumer devices that have opted into the Android Beta program. You can
+ publish into the Google Play alpha and beta channels first, so you can test
+ your apps with Android Beta consumers before distributing broadly on the
+ store.
+</p>
+
+<p>
+ As you test and develop on Android N, we strongly recommend <strong>keeping
+ your development environment up-to-date</strong> as preview updates are
+ released. To make the process easier, you can enroll your test devices in the
+ Android Beta program and get <strong>updates over-the-air (OTA)</strong> at
+ each milestone. Alternatively, updated preview images are available that you
+ download and flash manually.
+</p>
+
+<p>
+ We’ll notify you when preview updates are available via the <a href=
+ "http://android-developers.blogspot.com/">Android Developers Blog</a>, as
+ well as this site and the <a href="{@docRoot}preview/dev-community">Android
+ N Developer Community</a>.
+</p>
+
+
+<h2 id="preview_tools">What's in the N Developer Preview?</h2>
+
+<p>
+ The N Developer Preview includes everything you need to test your existing
+ apps on a variety of screen sizes, network technologies, CPU/GPU chipsets,
+ and hardware architectures.
+</p>
+
+<h3 id="sdk_tools">SDK tools</h3>
+
+<p>You can download these components through the SDK Manager in <a href="{@docRoot}sdk/installing/adding-packages.html">Android Studio</a>:</p>
+
+<ul>
+ <li> N Developer Preview <strong>SDK and tools</strong>
+ <li> N Developer Preview <strong>emulator system image</strong> (32-bit & 64-bit)
+ <li> N Developer Preview <strong>emulator system Image for Android TV</strong> (32-bit)
+ <li> N Developer Preview support libraries (for new app templates)
+</ul>
+
+<p>
+ We’ll provide updates to these development tools at each milestone as needed.
+</p>
+
+<h3 id="hardware_system_images">Hardware system images</h3>
+
+<p>
+ The N Developer Preview includes Nexus and other hardware system images that you can use when
+ testing and developing on physical devices. See the <a href=
+ "{@docRoot}preview/download.html">Device Images</a> page for the full list
+ of hardware images.
+</p>
+
+<p>
+ We’ll deliver updated system images for these devices at each milestone. You
+ can download and flash the updated system images to your test devices
+ manually, as frequently as you need. This is especially useful for automated
+ testing environments where you might need to reflash your device multiple
+ times.
+</p>
+
+<p class="note"><strong>Note</strong>:
+ <strong>Devices flashed manually will not get OTA updates</strong> like in
+ last year’s preview. This year, you can get OTAs by enrolling devices in the
+ Android Beta Program — see details in the next section.
+</p>
+
+<h3 id="android_beta">OTA Updates through Android Beta Program</h3>
+
+<p>
+ New for Android N is an Over-the-Air (OTA) update program that automatically
+ delivers the latest preview updates of Android N directly to devices enrolled
+ in the program. The program is free, and it’s open to anyone who has a
+ supported device that’s registered to their Google account.
+</p>
+
+<p>
+ To enroll in the program visit the <a href="https://g.co/androidbeta">Android
+ Beta Program</a> site. You’ll
+ see all of the devices registered to your account that are eligible to enroll
+ in Android Beta.
+</p>
+
+<ol>
+ <li> Choose the devices you want to receive the Android N updates
+ <li> Click Enroll, read and agree to the terms of service, and then click OK
+</ol>
+
+<p>
+ Once you’ve enrolled, your device will soon receive an update. In most cases,
+ you will not need to do a full reset of your data to move to Android N, but
+ it’s recommended that you back up any data you don’t want to lose before
+ enrolling the device.
+</p>
+
+<p>
+ As updates are delivered to your device, we recommend downloading and
+ installing them as soon as possible. You’ll want to stay current with the
+ latest changes in system UI, behavior, APIs, and features.
+</p>
+
+<p>
+ At the conclusion of the Developer Preview, your enrolled devices will
+ receive an update to the official Android N release.
+</p>
+
+<p>
+ You can un-enroll your devices from the Android Beta program at any time from
+ the Android Beta site. Before un-enrolling, make sure to back-up your data on
+ the device.
+</p>
+
+ <p class="note"><strong>Note</strong>:
+ When you un-enroll, <strong>your device will be factory reset</strong>
+ to the latest version
+ of Android 6.0 Marshmallow (not necessarily the version that you had
+ installed prior to enrolling the device). To ensure a clean installation,
+ your data will be erased from the device, including contacts, messages,
+ photos, and so on.
+</p>
+
+<h3 id="documentation_and_sample_code">Documentation and sample code</h3>
+
+<p>
+ These documentation resources are available on the Developer Preview site to
+ help you learn about the Android N:
+</p>
+
+<ul>
+ <li> <a href="{@docRoot}preview/setup-sdk.html">Set Up to Develop for
+Android N</a> has
+ step-by-step instructions for getting started.</li>
+ <li> <a href="{@docRoot}preview/behavior-changes.html">Behavior
+ Changes</a> points you to key areas to test.</li>
+ <li> Documentation of new APIs, including an <a
+ href="{@docRoot}preview/api-overview.html">API Overview</a>, downloadable
+ <a href="{@docRoot}preview/setup-sdk.html#docs-dl">API
+ Reference</a>, and detailed developer guides on key features such as add
+ here, and others.
+ <li> <a href="{@docRoot}preview/samples.html">Sample code</a> that
+ demonstrates how to support permissions and other new features.
+ <li> <a href="{@docRoot}preview/support.html#release-notes">Release notes</a>
+ for the current version of the N Developer Preview, including change notes and
+ diff reports.
+</ul>
+
+<h4 id="reference">Downloadable API Reference</h4>
+
+<p>
+ During the early preview updates, you can download the latest
+ <a href="{@docRoot}preview/setup-sdk.html#docs-dl">API Reference
+ for the Android N platform</a> as a separate zip archive. The reference
+ download also includes a diff report that helps you identify API changes from
+ API 23 and the previous update.
+</p>
+
+<p>
+ When the Android N APIs are final and an official API level is assigned,
+ we’ll provide the API reference to you online at <a href=
+ "https://developer.android.com">https://developer.android.com</a>.
+</p>
+
+<h3 id="support_resources">
+ Support resources
+</h3>
+
+<p>
+ As you test and develop on the N Developer Preview, please use these channels
+ to report issues and give feedback.
+</p>
+
+<ul>
+ <li> <a href="https://code.google.com/p/android-developer-preview/">N Developer Preview Issue
+ Tracker</a> is your <strong>primary feedback channel.</strong> You can report bugs, performance
+ issues, and general feedback through the issue tracker. You can also check for
+<a href="{@docRoot}preview/bug">known issues</a> and
+ find workaround steps. We’ll keep you updated on your issue as it’s triaged and sent to
+ the Android engineering team for review. </li>
+ <li> The <a href="{@docRoot}preview/dev-community">Android N Developer Community</a> is
+ a Google+ community where you can <strong>connect with other developers</strong>working with
+ Android N. You can share observations or ideas or find answers to
+ questions about Android N. We’ll moderate the community and provide answers and
+ guidance as needed.</li>
+</ul>
+
+<h3 id="targeting">Targeting, preview APIs, and publishing</h3>
+
+<p>
+ The N Developer Preview provides a development-only system and Android
+ library that <strong>does not have a standard API level</strong>. If you want
+ to opt out of compatibility behaviors to test your app (which is strongly
+ recommended), you can target the preview version of Android N by setting your
+ app's <code><a href=
+ "{@docRoot}preview/setup-sdk.html#create-update">targetSdkVersion</a></code>
+ to <code>“N”</code>.
+</p>
+
+<p>
+ The Android N Developer Preview delivers <strong>preview APIs</strong>
+ — the APIs will not be official until the final SDK is released,
+ currently planned for the third quarter of 2016. This means that you can
+ <strong>expect minor API changes</strong> over time, especially during
+ initial weeks of the program. We’ll provide a summary of changes to you with
+ each update of the Android N Developer Preview.
+</p>
+
+<p class="note">
+ <strong>Note</strong>: Although preview APIs may change, underlying
+ system behaviors are stable and ready for testing against
+ right away.
+</p>
+
+<p>
+ Google Play <strong>prevents publishing of apps targeting the N Developer
+ Preview</strong>. When the Android N final SDK is available, you’ll be able
+ to target the official Android N API level and publish your app to Google
+ Play via the alpha and beta release channels. Meanwhile, if you want to
+ distribute an app targeting Android N to testers, you can do so via email or
+ by direct download from your site.
+</p>
+
+<p>
+ At the full release of Android N to AOSP and OEMs, planned for Q3 2016,
+ you’ll be able to publish your apps targeting Android N to the public release
+ channel in Google Play.
+</p>
+
+
+<h2 id="how_to_get_started">How to get started</h2>
+
+<p>
+ To get started testing your app with Android N:
+</p>
+
+<ol>
+ <li> Review the <a href="{@docRoot}preview/api-overview.html">API Overview</a>
+ and <a href="{@docRoot}preview/behavior-changes.html">Behavior Changes</a> to
+ get an idea of what's new and how it affects your apps. In particular,
+ learn about the new <a href="{@docRoot}preview/features/notification-updates.html"
+ >notifications</a> features and
+ <a href="{@docRoot}preview/features/multi-window.html">multi-window support</a>.</li>
+ <li> Set up your environment by following the instructions for <a
+ href="{@docRoot}preview/setup-sdk.html">Setting up the Preview SDK</a>
+ and configuring test devices.</li>
+ <li> Follow the <a href="https://developers.google.com/android/nexus/images">flashing
+ instructions</a> to flash the latest Android N system image for your device. </li>
+ <li> Review the <a href="{@docRoot}preview/setup-sdk.html#docs-dl">API Reference</a>
+ and <a href="{@docRoot}preview/samples.html">Android N samples</a> to gain more
+ insight into new API features and how to use them in your app.
+ <li> Join the <a href="{@docRoot}preview/dev-community">Android N
+ Developer Community</a> to get the latest news and connect with other
+ developers working with the new platform.</li>
+</ol>
+
+<p>
+ Thank you for your participation in the Android N Developer Preview program!
+</p>
diff --git a/docs/html/preview/preview_toc.cs b/docs/html/preview/preview_toc.cs
new file mode 100644
index 0000000..f96bf1f
--- /dev/null
+++ b/docs/html/preview/preview_toc.cs
@@ -0,0 +1,132 @@
+<ul id="nav">
+
+ <li class="nav-section">
+ <div class="nav-section-header empty"><a href="<?cs var:toroot ?>preview/overview.html"
+ es-lang="Información general del programa"
+ ja-lang="プログラム概要"
+ ko-lang="프로그램 개요"
+ pt-br-lang="Visão geral do programa"
+ ru-lang="Обзор программы"
+ zh-cn-lang="计划概览"
+ zh-tw-lang="程式總覽">
+ Program Overview</a></div>
+ </li>
+
+
+ <li class="nav-section">
+ <div class="nav-section-header empty"><a href="<?cs var:toroot ?>preview/support.html">
+ Support and Release Notes</a></div>
+ </li>
+
+ <li class="nav-section">
+ <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 to Develop</a></div>
+ </li>
+ <li class="nav-section">
+ <div class="nav-section-header empty"><a href="<?cs var:toroot ?>preview/download.html">
+ Test on a Device</a></div>
+ </li>
+
+
+ <li class="nav-section">
+ <div class="nav-section-header"><a href="<?cs var:toroot ?>preview/behavior-changes.html"
+ es-lang="Cambios en los comportamientos"
+ ja-lang="動作の変更点"
+ ko-lang="동작 변경"
+ pt-br-lang="Mudanças de comportamento"
+ ru-lang="Изменения в работе"
+ zh-cn-lang="行为变更"
+ zh-tw-lang="行為變更">Behavior Changes
+ </a></div>
+ <ul>
+ <li><a href="<?cs var:toroot ?>preview/features/background-optimization.html"
+ >Background Optimizations</a></li>
+ <li><a href="<?cs var:toroot ?>preview/features/multilingual-support.html"
+ >Language and Locale</a></li>
+ </ul>
+ </li>
+
+ <li class="nav-section">
+ <div class="nav-section-header"><a href="<?cs var:toroot ?>preview/api-overview.html"
+ es-lang="Información general de la API"
+ ja-lang="API の概要"
+ ko-lang="API 개요"
+ pt-br-lang="Visão geral da API"
+ ru-lang="Обзор API-интерфейсов"
+ zh-cn-lang="API 概览"
+ zh-tw-lang="API 總覽">Android N for Developers
+ </a></div>
+ <ul>
+
+ <li><a href="<?cs var:toroot ?>preview/features/multi-window.html"
+ >Multi-Window Support</a></li>
+
+ <li><a href="<?cs var:toroot ?>preview/features/notification-updates.html"
+ >Notifications</a></li>
+
+ <li><a href="<?cs var:toroot ?>preview/features/data-saver.html"
+ >Data Saver</a></li>
+
+ <li><a href="<?cs var:toroot ?>preview/features/tv-recording-api.html"
+ >TV Recording</a></li>
+
+ <li><a href="<?cs var:toroot ?>preview/features/security-config.html"
+ >Network Security Configuration</a></li>
+
+ <li><a href="<?cs var:toroot ?>preview/features/icu4j-framework.html"
+ >ICU4J Support</a></li>
+
+ <li><a href="<?cs var:toroot ?>preview/j8-jack.html"
+ >Java 8 Language Features</a></li>
+
+ <li><a href="<?cs var:toroot ?>preview/features/afw.html"
+ >Android for Work Updates</a></li>
+ </ul>
+ </li>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ <li class="nav-section">
+ <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/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>
+
+</ul>
diff --git a/docs/html/preview/samples.jd b/docs/html/preview/samples.jd
new file mode 100644
index 0000000..1544d9c
--- /dev/null
+++ b/docs/html/preview/samples.jd
@@ -0,0 +1,85 @@
+page.title=Samples
+page.tags="preview", "samples", "android"
+page.image=images/cards/card-n-samples_2x.png
+@jd:body
+
+<p>
+ The following code samples are provided for Android N. To
+ download the samples in Android Studio, select the <b>File > Import
+ Samples</b> menu option.
+</p>
+
+<p class="note">
+ <strong>Note:</strong> These downloadable projects are designed
+ for use with Gradle and Android Studio.
+</p>
+
+
+<h3 id="mw">Multi-Window Playground</h3>
+<img src="{@docRoot}preview/images/sample-multiwindow.png" style="float: left; padding-right: 0.5em" height="250" width="156"/>
+<p>
+ This sample demonstrates how to take advantage of multiple window
+ user interfaces with your app.
+</p>
+<p>
+ <a href="https://github.com/googlesamples/android-MultiWindowPlayground">
+ Get it on GitHub</a>
+</p>
+
+<div style="clear: both;"></div>
+<h3 id="an">Active Notifications</h3>
+<img src="{@docRoot}preview/images/sample-activenotifications.png" style="float: left; padding-right: 0.5em" height="250" width="141" />
+<p>
+ This is a pre-existing sample which shows a simple service that sends
+ notifications using NotificationCompat. Each unread conversation from a user
+ is sent as a distinct notification.
+</p>
+<p>
+ This sample has been updated to take advantage of new notification features
+ available in Android N.
+</p>
+<p>
+ <a href="https://github.com/googlesamples/android-ActiveNotifications">
+ Get it on GitHub</a>
+</p>
+
+<div style="clear: both;"></div>
+<h3 id="ms">Messaging Service</h3>
+<img src="{@docRoot}preview/images/sample-messagingservice.png" style="float: left; padding-right: 0.5em" height="250" width="150" />
+<p>
+ This is a pre-existing sample which demonstrates how to use
+ NotificationManager to tell how many notifications an application is currently
+ showing.
+</p>
+<p>
+ This sample has been updated to take advantage of new notification features
+ available in Android N.
+</p>
+<p>
+ <a href="https://github.com/googlesamples/android-MessagingService">
+ Get it on GitHub</a>
+</p>
+
+<div style="clear: both;"></div>
+<h3 id="fbe">Direct Boot</h3>
+<img src="{@docRoot}preview/images/sample-directboot.png" style="float: left; padding-right: 0.5em" height="250" width="141" />
+<p>
+ This sample demonstrates how to store and access data in a device encrypted
+ storage which is always available while the device is booted.
+</p>
+<p>
+ <a href="https://github.com/googlesamples/android-DirectBoot">
+ Get it on GitHub</a>
+</p>
+
+<div style="clear: both;"></div>
+<h3 id="sda">Scoped Directory Access</h3>
+<img src="{@docRoot}preview/images/sample-scopeddirectoryaccess.png" style="float: left; padding-right: 0.5em" height="250" width="141" />
+<p>
+ This sample demonstrates how to read and write data from specific
+ directories, while requiring fewer permissions.
+</p>
+<p>
+ <a href="https://github.com/googlesamples/android-ScopedDirectoryAccess">
+ Get it on GitHub</a>
+</p>
\ No newline at end of file
diff --git a/docs/html/preview/setup-sdk.jd b/docs/html/preview/setup-sdk.jd
new file mode 100644
index 0000000..bc40ebd
--- /dev/null
+++ b/docs/html/preview/setup-sdk.jd
@@ -0,0 +1,232 @@
+page.title=Set Up the Preview
+meta.keywords="preview", "android"
+page.tags="preview", "developer preview"
+page.image=images/cards/card-n-sdk_2x.png
+
+@jd:body
+
+
+<div id="qv-wrapper">
+ <div id="qv">
+<ol>
+ <li><a href="#get-as13">Get Android Studio 2.1</a></li>
+ <li><a href="#get-sdk">Get the Android N SDK</a>
+ <ol>
+ <li><a href="#docs-dl">Reference documentation</a>
+ </ol>
+ </li>
+ <li><a href="#java8">Get the Java 8 JDK and JRE</a></li>
+ <li><a href="#create-update">Update or Create a Project</a></li>
+ <li><a href="#next">Next Steps</a></li>
+</ol>
+ </div>
+</div>
+
+<p>To develop apps for the Android N Preview, you need to make some updates
+to your developer environment, as described on this page.</p>
+
+<p>To simply test your app's compatibility on the
+Android N system image, follow the guide to <a
+href="{@docRoot}preview/download.html">Test on an Android N Device</a>.</p>
+
+<img src="{@docRoot}preview/images/n-preview-setup.png" width="700" alt="" />
+
+
+<h2 id="get-as13">Get Android Studio 2.1 (preview)</h2>
+
+<p>The Android N platform adds support for <a
+href="{@docRoot}preview/j8-jack.html">Java 8 language features</a>,
+which require a new compiler called Jack. The latest version of Jack
+is currently supported only in Android Studio 2.1. So if you want to
+use Java 8 language features, you need to use Android Studio 2.1 to
+build your app. Otherwise, you don't need to use the Jack compiler, but you
+still need to update to JDK 8 to compile against the Android N platform,
+as described below.
+</p>
+
+<iframe width="400" height="225" src="//www.youtube.com/embed/SBbWGxXCMqQ?autohide=1&showinfo=0" frameborder="0" allowfullscreen="" style="float: right; margin: 0 0 20px 20px;"></iframe>
+
+<p>Android Studio 2.1 is currently available as a preview in the canary
+release channel. If you already
+have Android Studio and don't want to update to the canary channel, you can
+download Android Studio 2.1 as a separate installation and use it
+for development with Android N, leaving your primary Android Studio
+environment unaffected.</p>
+
+<p>To download Android Studio 2.1 as a separate installation, follow these
+steps (or if you want to receive Android Studio 2.1 as an update to your
+existing installation, skip to step 4):</p>
+
+<ol>
+ <li>Edit the name of your
+ existing Android Studio installation and append the version number. This way,
+ when you install the new version, it will not override the existing one.</li>
+ <li>Download the appropriate ZIP file for your operating system from the
+ <a href="http://tools.android.com/download/studio/canary/latest"
+ >canary channel download page</a>.
+ </li>
+ <li>Unzip the package and move the Android Studio 2.1 contents to the
+ appropriate location for applications on your system, then launch it.</li>
+ <li>Open the Settings dialog
+ (<strong>File > Settings</strong> on Windows/Linux, or
+ <strong>Android Studio > Preferences</strong> on Mac). In the left
+ panel, select <strong>Appearance & Behavior > System Settings >
+ Updates</strong>.
+ </li>
+ <li>On the Updates panel, select the <strong>Automatically
+ check updates for</strong> check box and select
+ <strong>Canary Channel</strong> from the drop-down list.
+ </li>
+</ol>
+
+<p>Keep this settings window open for the next step.</p>
+
+
+<h2 id="get-sdk">Get the N Preview SDK</h2>
+
+<p>To start developing with Android N APIs, you need to install the
+Android N Preview SDK in Android Studio as follows:</p>
+
+<ol>
+ <li>While still viewing the Updates panel (step 4 from above),
+ select the <strong>Automatically
+ check updates for Android SDK</strong> check box and select
+ <strong>Preview Channel</strong> from the drop-down list.
+ </li>
+ <li>Click <strong>Check Now</strong>.</li>
+
+ <li>In the left panel, select <strong>Appearance & Behavior >
+ System Settings > Android SDK</strong>.
+
+ <li>Click the <strong>SDK Platforms</strong> tab, then select the
+ <strong>Android N Preview</strong> check box.</li>
+
+ <li>Click the <strong>SDK Tools</strong> tab, then select the
+ <strong>Android SDK Build Tools</strong>, <strong>Android SDK
+ Platform-Tools</strong>, and <strong>Android SDK Tools</strong> check
+ boxes.
+ </li>
+
+ <li>Click <strong>OK</strong>, then accept the licensing
+ agreements for any packages that need to be installed.
+ </li>
+</ol>
+
+<h3 id="docs-dl">Get the N Preview reference documentation</h3>
+
+<p>
+ Detailed information about the Android N APIs is available in the N Preview
+ reference documentation, which you can download from the following table.
+ This package contains an abridged, offline version of the Android developer
+ web site, and includes an updated API reference for the Android N APIs and an
+ API difference report.
+</p>
+
+<table>
+ <tr>
+ <th scope="col">Documentation</th>
+ <th scope="col">Checksums</th>
+ </tr>
+ <tr>
+ <td style="white-space: nowrap">
+ <a href="{@docRoot}shareables/preview/n-preview-1-docs.zip"
+ >n-preview-1-docs.zip</a></td>
+ <td width="100%">
+ MD5: 4ab33ccbe698f46f125cc5b807cf9c2f<br>
+ SHA-1: 6a3880b3ccd19614daae5a4d0698ea6ae11c20a5
+ </td>
+ </tr>
+<table>
+
+
+
+<h2 id="java8">Get the Java 8 JDK and JRE</h2>
+
+<p>To compile your app against the Android N platform, you need to use
+the Java 8 Developer Kit (JDK 8), and in order to use some tools with Android
+Studio 2.1, you need to install the Java 8 Runtime Environment (JRE 8). So, if
+you don't have the latest version of each already, download JDK 8 and JRE 8
+now.</p>
+
+<p>Then set the JDK version in Android Studio as follows:</p>
+
+<ol>
+ <li>Open an Android project in Android Studio, then open the
+ Project Structure dialog by selecting <strong>File >
+ Project Structure</strong>. (Alternatively, you can set the default
+ for all projects by selecting <strong>File > Other Settings >
+ Default Project Structure</strong>.)
+ </li>
+ <li>In the left panel of the dialog, click <strong>SDK Location</strong>.
+ </li>
+ <li>In the <strong>JDK Location</strong> field, enter the location of the
+ Java 8 JDK (click the button on the right
+ to browse your files), then click <strong>OK</strong>.
+ </li>
+</ol>
+
+<img src="{@docRoot}preview/images/studio-jdk-location.jpg" width="700"
+ alt="" />
+
+
+<h2 id="create-update">Update or Create a Project</h2>
+
+<p>
+ To use the Android N APIs, your project must be configured appropriately.
+</p>
+
+<p>If you plan to use Java 8 language features, you should also read
+<a href="{@docRoot}preview/j8-jack.html">Java 8 Language Features</a>
+for information about the supported Java 8 features and
+how to configure your project with the Jack compiler.</p>
+
+
+<h3 id="update">Update an existing project</h3>
+
+<p>Open the
+ <code>build.gradle</code> file for your module and update the values as
+ follows:
+</p>
+
+<pre>
+android {
+ compileSdkVersion <strong>'android-N'</strong>
+ buildToolsVersion <strong>'24.0.0-rc1'</strong>
+ ...
+
+ defaultConfig {
+ minSdkVersion <strong>'N'</strong>
+ targetSdkVersion <strong>'N'</strong>
+ ...
+ }
+ ...
+}</pre>
+
+
+<h3 id="create">Create a new project</h3>
+
+
+<p>To create a new project for development with the Android N Preview SDK:</p>
+
+<ol>
+ <li>Click <strong>File > New Project</strong>. and follow the steps until
+ you reach the Target Android Devices page.
+ </li>
+ <li>On this page, select <strong>Phone and Tablet</strong> option.</li>
+ <li>Under <strong>Phone and Tablet</strong> option, in the <strong>Minimum
+ SDK</strong> option list, select
+ <strong>N: Android API 23, N Preview (Preview)</strong>.</li>
+</ol>
+
+
+<h2 id="next">Next Steps</h2>
+
+<ul>
+ <li>Follow the guide to <a
+href="{@docRoot}preview/download.html">Test on an Android N Device</a>.</li>
+ <li>Learn more about the Android N platform with
+<a href="{@docRoot}preview/behavior-changes.html">Behavior Changes</a>
+and <a href="{@docRoot}preview/api-overview.html">Android N APIs
+and Features</a>.</li>
+</ul>
+
diff --git a/docs/html/preview/support.jd b/docs/html/preview/support.jd
new file mode 100644
index 0000000..3945ecd
--- /dev/null
+++ b/docs/html/preview/support.jd
@@ -0,0 +1,382 @@
+page.title=Support and Release Notes
+meta.keywords="preview", "android"
+page.tags="preview", "developer preview"
+page.image=images/cards/card-n-support_2x.png
+
+@jd:body
+
+<p>
+ Two primary support channels are available to you when developing and testing
+ with the Android N Developer Preview: Please file bugs at <a href=
+ "https://developer.android.com/preview/bug">https://developer.android.com/preview/bug</a> for
+ device-specific, system, and Google App bugs. For issues in other apps,
+ please contact the developer directly.
+</p>
+
+<p>To discuss issues or ideas with other developers working with Android N, join the
+<a href="{@docRoot}preview/dev-community">Developer Preview Google+ community</a>.</p>
+
+
+<h2 id="dp1">Developer Preview 1</h2>
+
+<div class="wrap">
+ <div class="cols">
+ <div class="col-6of12">
+ <p>
+ <em>Date: March 2016<br>
+ Builds: NPC56P, NPC56R, updated: NPC56W, NPC56X<br>
+ Emulator support: x86 & ARM (32/64-bit)<br>
+ Google Play services: 8.4</em>
+ </p>
+ </div>
+ </div>
+</div>
+
+<h3 id="general">General advisories</h3>
+
+<p>
+ This Developer Preview release is for app developers only and is designed for
+ use in compatibility testing and early development only. Please be aware of
+ these general notes about the release:
+</p>
+<ul>
+ <li>This release has various stability and performance issues on all devices
+ that make it <em>not suitable for daily use on phone or tablet</em>,
+ especially for non-developers.
+ </li>
+
+ <li>System and app performance is known to be <strong>periodically slow /
+ janky</strong>, and device may become occasionally unresponsive. These
+ problems may become more acute with prolonged use.
+ </li>
+
+ <li>Battery life may be regressed in this release for screen-on and
+ screen-off use cases.
+ </li>
+
+ <li>Some apps may not function normally on Developer Preview 1. This includes
+ Google’s apps as well as other apps.
+ </li>
+
+ <li>This early build is not Compatibility Test Suite (CTS) approved. Apps
+ that depend on CTS approved builds (Android Pay for example) won’t work.
+ </li>
+
+ <li>This preview release supports the following devices: Nexus 5X, Nexus 6,
+ Nexus 6P, Nexus 9, Nexus Player, and Pixel C, as well as General Mobile 4G
+ (Android One).
+ </li>
+</ul>
+
+<h3 id="platform">Platform Issues</h3>
+
+<h4 id="performance">Performance and battery</h4>
+
+<ul>
+ <li>System and app performance is known to be <strong>periodically slow /
+ janky</strong>, and device may become occasionally unresponsive. These
+ problems may become more acute with prolonged use.
+ </li>
+
+ <li>Battery life may be regressed in this release for screen-on and
+ screen-off use cases.
+ </li>
+</ul>
+<h4 id="dialer">Dialer</h4>
+
+<ul>
+ <li>Dialer app does not support Direct boot. This will be addressed later in
+ N Developer Preview.
+ </li>
+
+ <li>Voicemail playback does not work.
+ </li>
+</ul>
+
+<h4 id="microphone">Microphone</h4>
+
+<ul>
+ <li>The system may incorrect persists the microphone mute state across apps and reboots. If you mute the microphone in an app and the state is persisted, open any app that has microphone mute controls and unmute the microphone.</li>
+</ul>
+
+<h4 id="ui">System UI</h4>
+
+<ul>
+ <li>Some new or modified strings in the system UI are not translated to all
+ languages.
+ </li>
+
+ <li>Overview UI is still in development, and subject to change. For example,
+ we intend to remove the timer that appears when the user switches between
+ apps.
+ </li>
+
+ <li>Settings controls and toggles may be slow or appear to be unresponsive.
+ </li>
+
+ <li>Visual design of notifications is subject to change.
+ </li>
+
+ <li>In the Gmail app, direct archiving of emails included in a notification
+ bundle does not work properly.
+ </li>
+</ul>
+
+<h4 id="afw">Android for Work</h4>
+
+<ul>
+ <li>Work Security Challenge
+ <ul>
+ <li>After migration to N, or after the user creates work profiles, work
+ profiles can't create keys in the keystore until the user changes their
+ pattern, PIN, or password, or sets up a Work Challenge.
+ </li>
+
+ <li>In Direct boot mode, applying the passcode restrictions to the device
+ causes the work profile to be unlocked, even though the device is locked.
+ This makes the work profile accessible even though it should be protected
+ by the device lock screen.
+ </li>
+
+ <li>When the user enters a wrong password and pin, the system does not
+ display any informational message; instead, it only clears the input
+ field. This issue does not affect pattern or fingerprint input.
+ </li>
+
+ <li>On a tablet, the background displayed with the work challenge is
+ disproportionately small.
+ </li>
+
+ <li>The version of <a href=
+ "https://play.google.com/store/apps/details?id=com.google.android.apps.enterprise.dmagent">
+ Google Apps Device Policy</a> that is bundled with N Developer Preview
+ does not yet support the Work Profile Security Challenge feature.
+ Developers should instead use <a href=
+ "https://play.google.com/store/apps/details?id=com.afwsamples.testdpc">TestDPC</a>
+ to test this feature.
+ </li>
+ </ul>
+ </li>
+
+ <li>Always On VPN
+ <ul>
+ <li>If Always On VPN mode is turned on, but VPN is not available, apps
+ not specified as exceptions to the Always On policy connect over the
+ ordinary network. Unless specified as exceptions to Always On VPN policy,
+ apps should be offline if they have no VPN connection available.
+ <ul>
+ <li>When Always On mode is on, a VPN connection is not established
+ after a device reboots into Direct boot mode, even after the user
+ unlocks the secure lock screen.
+ </li>
+ </ul>
+ </li>
+ </ul>
+ </li>
+
+ <li>Improved Contacts
+ <ul>
+ <li>Bluetooth PBAP/MAP devices do not display Caller ID for work
+ contacts. The next release of Preview resolves this issue.
+ </li>
+ </ul>
+ </li>
+
+ <li>Work Mode
+ <ul>
+ <li>The Google Now Launcher does not display whether Work Mode is on or
+ off. The Launcher also does not show app suspension state.
+ </li>
+
+ <li>After the user turns Work Mode off and on, the system no longer shows
+ Work profile app widgets, such as Calendar.
+ </li>
+ </ul>
+ </li>
+
+ <li>Suspend Packages
+ </li>
+
+ <li>Device admins can suspend critical system packages, which may lead to
+ unexpected behavior, such as placing calls despite the Telephone disabled
+ dialog’s being displayed.
+ </li>
+
+ <li>Other
+ <ul>
+ <li>The Settings app crashes on launch if {@link
+ android.os.UserManager#DISALLOW_MOUNT_PHYSICAL_MEDIA} is set to true when
+ the user inserts physical media such as an SD card.
+ </li>
+
+ <li>The {@code DPM.setPackagesSuspended} state does not persist when the
+ user uninstalls and then reinstalls an app. Either the app should remain
+ suspended after uninstall/reinstall, or suspended apps should not be
+ uninstallable
+ </li>
+
+ <li>The first check-in in a Work Profile takes several minutes to
+ complete. This may cause the device to take longer than normal to be
+ visible in the Play EMM API.
+ </li>
+
+ <li>Notifications from Work Profile apps are not visible to notification
+ listeners installed in the personal profile. As a result, the system does
+ not display Notifications as expected.
+ </li>
+
+ <li>The version of Google Apps Device Policy that is bundled with N
+ Developer Preview does not yet support the Work Profile Security
+ Challenge feature. Developers should instead use TestDPC to test this
+ feature.
+ </li>
+ </ul>
+ </li>
+</ul>
+
+<h4 id="keyboard">Keyboard</h4>
+
+<ul>
+<li>Bluetooth pairing between keyboards and Android devices may be unstable. </li>
+</ul>
+
+<h4 id="video">Video</h4>
+
+<ul>
+<li>Video playback may lag and show interruptions.</li>
+</ul>
+
+<h4 id="wifi">Wi-Fi</h4>
+
+<ul>
+ <li>Wi-Fi has undergone some refactoring which may change API corner case
+ behavior. Specifically, applications which attempt to connect to specific
+ networks, or attempt to reconnect to networks should retest.
+ </li>
+
+ <li>The legacy DHCP client has been removed from the platform. The only DHCP
+ client that the platform supports is the DHCP client introduced in M.
+ </li>
+</ul>
+
+<h4 id="direct">Direct boot</h4>
+
+<ul>
+ <li>NFC doesn't function until first unlock.
+ <ul>
+ <li>When a phone with Bluetooth enabled is restarted, Bluetooth does not
+ turn on automatically. You must manually re-enable Bluetooth.
+ </li>
+
+ <li>Under some circumstances, the default ringtone may not sound for
+ phone calls and messages. This behavior is fixed in the next N Preview
+ release, with one exception (and workaround):
+ </li>
+
+ <li>On a device that is not freshly wiped--one that has been booted at
+ least once since being set to direct boot mode--the default notification
+ ringtone does not sound. The user can work around this issue by manually
+ selecting a ringtone from Settings.
+ </li>
+
+ <li>Direct boot is not enabled by default on devices running an N
+ Developer Preview build. To enable direct boot for testing and
+ development, go to Developer Options and tap Convert to File Encryption.
+ In this dev preview, this requires a factory reset to repartition and
+ reformat your device for File-based Encryption.
+ </li>
+ </ul>
+ </li>
+</ul>
+
+<h4 id="pip">Picture-in-picture for Android TV</h4>
+
+<ul>
+ <li>The PIP integration in the Recents UI is not finalized, and is subject to
+ change.
+ <ul>
+ <li>The animation of the PIP window is not smooth. Future releases of the
+ Preview will improve this.
+ </li>
+ </ul>
+ </li>
+
+ <li style="list-style: none">Future releases of the Preview will improve upon
+ the visual design and layout alignment of PIP.
+ </li>
+</ul>
+
+<h4 id="bugs">Bug reports</h4>
+
+<ul>
+ <li>Bug reports do not always complete successfully (as a workaround,
+ sometimes they can still be accessed through the bug report document provider
+ in internal storage).
+ </li>
+</ul>
+
+<h4 id="split">Split-screen Multi-window</h4>
+
+<ul>
+ <li>Apps may experience crashes and unexpected UI behavior when put into
+ split-screen mode. These are app issues that must be fixed by the app
+ developer.
+ </li>
+
+ <li>When an app targets a version of the Android platform earlier than N, the
+ App may not work with split-screen toast may appear multiple times.
+ </li>
+
+ <li>Long-pressing the Overview button while using an app with a fixed
+ orientation may produce unexpected app behavior.
+ </li>
+
+ <li>Apps may flicker while resizing.
+ </li>
+
+ <li>Animations are not yet final.
+ </li>
+</ul>
+
+<h4 id="ime">Input method</h4>
+
+<ul>
+ <li>Google Keyboard unexpectedly falls back to the generic Google keyboard
+ when <b>Use system language</b>, but Google Keyboard doesn’t support any of
+ the languages selected in the system-language preferences. It should fall
+ back to American English.
+ <p>
+ You can work around this problem by adding at least one language that
+ Google Keyboard supports.
+ </p>
+ </li>
+</ul>
+
+
+<h4 id="accessibility">Accessibility</h4>
+
+<ul>
+ <li>TalkBack exhibits issues with features including Notifications, Quick Settings Tiles and Multi-window display that may cause system crashing or lack of spoken feedback from TalkBack. Future releases of the preview will address these issues.</li>
+</ul>
+
+<h3 id="device-sp">Device-Specific Notes and Issues</h3>
+
+<h4 id="player">Nexus Player</h4>
+<ul>
+<li>Video playback, app compatibility and stability issues are expected on Nexus Player in this release of the Preview.</li>
+</ul>
+
+<h4 id="pixelc">Pixel C</h4>
+<ul>
+<li>Multi-window resizing may cause crashing.</li>
+</ul>
+
+<h4 id="n9">Nexus 9</h4>
+<ul>
+<li>Nexus 9 devices may not start after receiving an over-the-air (OTA) update
+ via the Android Beta Program. To recover from this issue, you can try
+ to manually install the OTA image. For more information, see
+ <a href="{@docRoot}preview/download-ota.html">Applying a Device OTA Image</a>.
+</li>
+</ul>
+
diff --git a/docs/html/sdk/sdk_vars.cs b/docs/html/sdk/sdk_vars.cs
index c911f5a..7e17801 100644
--- a/docs/html/sdk/sdk_vars.cs
+++ b/docs/html/sdk/sdk_vars.cs
@@ -39,21 +39,18 @@
set:sdk.win_installer_checksum='f9b59d72413649d31e633207e31f456443e7ea0b' ?><?cs
-set:ndk.mac64_download='android-ndk-r10e-darwin-x86_64.bin' ?><?cs
-set:ndk.mac64_bytes='388937326' ?><?cs
-set:ndk.mac64_checksum='2cb8893a5701603519d38a7e04c50e81' ?><?cs
+set:ndk.mac64_download='android-ndk-r11-darwin-x86_64.zip' ?><?cs
+set:ndk.mac64_bytes='772314112' ?><?cs
+set:ndk.mac64_checksum='a3764714eff7d187c80d989a9bf1ff8ebf5a0dfa' ?><?cs
-set:ndk.linux64_download='android-ndk-r10e-linux-x86_64.bin' ?><?cs
-set:ndk.linux64_bytes='401522849' ?><?cs
-set:ndk.linux64_checksum='19af543b068bdb7f27787c2bc69aba7f' ?><?cs
-set:ndk.linux32_download='android-ndk-r10e-linux-x86.bin' ?><?cs
-set:ndk.linux32_bytes='394281908' ?><?cs
-set:ndk.linux32_checksum='c3edd3273029da1cbd2f62c48249e978' ?><?cs
+set:ndk.linux64_download='android-ndk-r11-linux-x86_64.zip' ?><?cs
+set:ndk.linux64_bytes='794012672' ?><?cs
+set:ndk.linux64_checksum='7b4e0d13f6bbf48dd87475be9d052273dc766fb6' ?><?cs
-set:ndk.win64_download='android-ndk-r10e-windows-x86_64.exe' ?><?cs
-set:ndk.win64_bytes='419616132' ?><?cs
-set:ndk.win64_checksum='8412bb4991a95e08fda50b5a44d95df7' ?><?cs
-set:ndk.win32_download='android-ndk-r10e-windows-x86.exe' ?><?cs
-set:ndk.win32_bytes='396563176' ?><?cs
-set:ndk.win32_checksum='1a82445baaf62aec3a46386ab1e5772c'
-?>
\ No newline at end of file
+set:ndk.win64_download='android-ndk-r11-windows-x86_64.zip' ?><?cs
+set:ndk.win64_bytes='771291648' ?><?cs
+set:ndk.win64_checksum='49fcdae88724c74bb52b332b648edba9700b9529' ?><?cs
+set:ndk.win32_download='android-ndk-r11-windows-x86.zip' ?><?cs
+set:ndk.win32_bytes='728773632' ?><?cs
+set:ndk.win32_checksum='0c9e895e400ab539c2005759410ef3e33d048291'
+?>
diff --git a/docs/html/tools/debugging/systrace.jd b/docs/html/tools/debugging/systrace.jd
index 5d2cd89..bdeff12 100644
--- a/docs/html/tools/debugging/systrace.jd
+++ b/docs/html/tools/debugging/systrace.jd
@@ -43,7 +43,7 @@
systems on an Android device. It puts together system and application thread execution on a common
timeline. In order to analyze your app with Systrace, you first collect a trace log of your app, and
the system activity. The generated trace allows you to view highly detailed, interactive reports
-showing everything happening the system for the traced duration.</p>
+showing everything happening in the system for the traced duration.</p>
<img src="{@docRoot}images/systrace/overview.png" alt="Systrace example overview" id="figure1" />
<p class="img-caption">
diff --git a/docs/html/tools/support-library/features.jd b/docs/html/tools/support-library/features.jd
index d0c0965..fa5a8b4 100755
--- a/docs/html/tools/support-library/features.jd
+++ b/docs/html/tools/support-library/features.jd
@@ -153,7 +153,7 @@
<p>The Gradle build script dependency identifier for this library is as follows:</p>
<pre>
-com.android.support:support-v4:23.1.0
+com.android.support:support-v4:23.2.1
</pre>
@@ -237,7 +237,7 @@
<p>The Gradle build script dependency identifier for this library is as follows:</p>
<pre>
-com.android.support:appcompat-v7:23.1.0
+com.android.support:appcompat-v7:23.2.1
</pre>
@@ -258,7 +258,7 @@
<p>The Gradle build script dependency identifier for this library is as follows:</p>
<pre>
-com.android.support:cardview-v7:23.1.0
+com.android.support:cardview-v7:23.2.1
</pre>
@@ -280,7 +280,7 @@
<p>The Gradle build script dependency identifier for this library is as follows:</p>
<pre>
-com.android.support:gridlayout-v7:23.1.0
+com.android.support:gridlayout-v7:23.2.1
</pre>
@@ -314,7 +314,7 @@
where "<revision>" is the minimum revision at which the library is available. For example:</p>
<pre>
-com.android.support:mediarouter-v7:23.1.0
+com.android.support:mediarouter-v7:23.2.1
</pre>
<p class="caution">The v7 mediarouter library APIs introduced in Support Library
@@ -340,7 +340,7 @@
<p>The Gradle build script dependency identifier for this library is as follows:</p>
<pre>
-com.android.support:palette-v7:23.1.0
+com.android.support:palette-v7:23.2.1
</pre>
@@ -362,7 +362,7 @@
<p>The Gradle build script dependency identifier for this library is as follows:</p>
<pre>
-com.android.support:recyclerview-v7:23.1.0
+com.android.support:recyclerview-v7:23.2.1
</pre>
@@ -391,7 +391,7 @@
<p>The Gradle build script dependency identifier for this library is as follows:</p>
<pre>
-com.android.support:preference-v7:23.1.0
+com.android.support:preference-v7:23.2.1
</pre>
@@ -455,7 +455,7 @@
<p>The Gradle build script dependency identifier for this library is as follows:</p>
<pre>
-com.android.support:support-v13:23.1.0
+com.android.support:support-v13:23.2.1
</pre>
@@ -487,7 +487,7 @@
<p>The Gradle build script dependency identifier for this library is as follows:</p>
<pre>
-com.android.support:preference-v14:23.1.0
+com.android.support:preference-v14:23.2.1
</pre>
@@ -516,7 +516,7 @@
<p>The Gradle build script dependency identifier for this library is as follows:</p>
<pre>
-com.android.support:preference-leanback-v17:23.1.0
+com.android.support:preference-leanback-v17:23.2.1
</pre>
@@ -558,7 +558,7 @@
<p>The Gradle build script dependency identifier for this library is as follows:</p>
<pre>
-com.android.support:leanback-v17:23.1.0
+com.android.support:leanback-v17:23.2.1
</pre>
@@ -579,7 +579,7 @@
<p>The Gradle build script dependency identifier for this library is as follows:</p>
<pre>
-com.android.support:support-annotations:23.1.0
+com.android.support:support-annotations:23.2.1
</pre>
@@ -604,7 +604,7 @@
<p>The Gradle build script dependency identifier for this library is as follows:</p>
<pre>
-com.android.support:design:23.1.0
+com.android.support:design:23.2.1
</pre>
@@ -632,7 +632,7 @@
<p>The Gradle build script dependency identifier for this library is as follows:</p>
<pre>
-com.android.support:customtabs:23.1.0
+com.android.support:customtabs:23.2.1
</pre>
@@ -663,7 +663,7 @@
<p>The Gradle build script dependency identifier for this library is as follows:</p>
<pre>
-com.android.support:percent:23.1.0
+com.android.support:percent:23.2.1
</pre>
@@ -693,5 +693,5 @@
<p>The Gradle build script dependency identifier for this library is as follows:</p>
<pre>
-com.android.support:recommendation:23.1.0
+com.android.support:recommendation:23.2.1
</pre>
diff --git a/docs/html/tools/support-library/index.jd b/docs/html/tools/support-library/index.jd
index df9dcf9..2a673f9 100644
--- a/docs/html/tools/support-library/index.jd
+++ b/docs/html/tools/support-library/index.jd
@@ -59,9 +59,314 @@
<p>This section provides details about the Support Library package releases.</p>
<div class="toggle-content opened">
- <p id="rev23-2-0">
+ <p id="rev23-2-1">
<a href="#" onclick="return toggleContent(this)"><img src=
"{@docRoot}assets/images/triangle-opened.png" class="toggle-content-img"
+ alt="">Android Support Library, revision 23.2.1</a> <em>(March
+ 2016)</em>
+ </p>
+
+ <div class="toggle-content-toggleme">
+ <dl>
+ <dt>
+ Changes for <a href=
+ "{@docRoot}tools/support-library/features.html#v4">v4 Support
+ Library</a>:
+ </dt>
+
+ <dd>
+ <ul>
+ <li>Fixed an exception in {@link
+ android.support.v4.graphics.drawable.DrawableCompat#wrap
+ DrawableCompat.wrap()} and {@link android.graphics.drawable.LayerDrawable} on
+ API levels 17 to 19. (<a class="external-link" href=
+ "https://code.google.com/p/android/issues/detail?id=201817">Issue 201817</a>)
+ </li>
+
+ <li>Fixed an {@code ArrayIndexOutOfBoundsException} in {@link
+ android.support.v4.widget.ViewDragHelper#shouldInterceptTouchEvent
+ ViewDragHelper.shouldInterceptTouchEvent()}. (<a class="external-link"
+ href="https://code.google.com/p/android/issues/detail?id=182262">Issue
+ 182262</a>)
+ </li>
+
+ <li>Fixed a bug in {@link android.support.v4.view.ViewPager} related to
+ scroll calculation for size changes.
+ </li>
+
+ <li>Fixed a {@code NullPointerException} when {@code
+ DrawerLayout.removeDrawerListener()} is called without a set {@link
+ android.support.v4.widget.DrawerLayout.DrawerListener
+ DrawerLayout.DrawerListener}. (<a class="external-link" href=
+ "https://code.google.com/p/android/issues/detail?id=202478">Issue 202478</a>)
+ </li>
+
+ <li>Fixed a bug where {@link android.support.v4.view.ViewPager} does not set
+ {@link android.view.accessibility.AccessibilityEvent} parameters properly
+ when scrolling.
+ </li>
+
+ <li>Fixed an issue that caused lag during device rotation when using
+ {@link android.support.v4.graphics.drawable.DrawableCompat#wrap
+ Drawable.wrap()}. (<a class="external-link" href=
+ "https://code.google.com/p/android/issues/detail?id=201924">Issue 201924</a>)
+ </li>
+ </ul>
+ </dd>
+
+ <dt>
+ Changes for <a href=
+ "{@docRoot}tools/support-library/features.html#v7-appcompat">v7
+ appcompat library</a>:
+ </dt>
+
+ <dd>
+ <ul>
+ <li>Reverted dependency on vector assets so that developers using the
+ <a href="{@docRoot}tools/support-library/features.html#v7-appcompat">appcompat
+ library</a> are not forced to use {@link
+ android.graphics.drawable.VectorDrawable} and its associated build flags.
+ </li>
+
+ <li>Fixed a compatibility issue with Night Mode and API level 23.
+ (<a class="external-link" href=
+ "https://code.google.com/p/android/issues/detail?id=201910">Issue
+ 201910</a>)
+ </li>
+
+ <li>Fixed a compatibility issue with {@link
+ android.support.v7.widget.SwitchCompat} and API level 7. (<a class=
+ "external-link" href=
+ "https://code.google.com/p/android/issues/detail?id=201942">Issue 201942</a>)
+ </li>
+
+ <li>Fixed an issue with propagating configuration values in Resources objects
+ <a class="external-link" href=
+ "https://code.google.com/p/android/issues/detail?id=201928">Issue 201928</a>
+ </li>
+
+ <li>Fixed a compatibility issue where the {@link
+ android.support.v7.app.NotificationCompat.MediaStyle
+ NotificationCompat.MediaStyle} cancel button becomes invisible on API level
+ 21 and below. (<a class="external-link" href=
+ "https://code.google.com/p/android/issues/detail?id=202156">Issue 202156</a>)
+ </li>
+
+ <li>Fixed a compatibility crash with {@link
+ android.support.v7.widget.AppCompatSpinner} on API level 21 and below.
+ (<a class="external-link" href=
+ "https://code.google.com/p/android/issues/detail?id=202246">Issue 202246</a>)
+ </li>
+
+ <li>Fixed an issue where the {@code app:textAllCaps = "false"} style did not
+ work. (<a class="external-link" href=
+ "https://code.google.com/p/android/issues/detail?id=202117">Issue 202117</a>)
+ </li>
+
+ <li>Fixed a crash when restoring {@link android.widget.SearchView}.
+ (<a class="external-link" href=
+ "https://code.google.com/p/android/issues/detail?id=201836">Issue
+ 201836</a>)
+ </li>
+
+ <li>Fixed a memory leak that occurs when tinting drawable resources using
+ AppCompat. (<a class="external-link" href=
+ "https://code.google.com/p/android/issues/detail?id=202379">Issue 202379</a>)
+ </li>
+
+ <li>Fixed an issue with {@link android.view.KeyEvent} on API level 11 and
+ lower. (<a class="external-link" href=
+ "https://code.google.com/p/android/issues/detail?id=202939">Issue 202939</a>)
+ </li>
+ </ul>
+ </dd>
+
+ <dt>
+ Changes for <a href=
+ "{@docRoot}tools/support-library/features.html#v7-cardview">v7 cardview
+ library</a>:
+ </dt>
+
+ <dd>
+ <ul>
+ <li>Added Night Mode support for {@link
+ android.support.v7.widget.CardView}. (<a class="external-link"
+ href="https://code.google.com/p/android/issues/detail?id=194497">Issue
+ 194497</a>)
+ </li>
+ </ul>
+ </dd>
+
+ <dt>
+ Changes for <a href=
+ "{@docRoot}tools/support-library/features.html#v7-recyclerview">v7
+ recyclerview library</a>:
+ </dt>
+
+ <dd>
+ <ul>
+ <li>Fixed bugs related to various measure-spec methods. (<a class=
+ "external-link" href=
+ "https://code.google.com/p/android/issues/detail?id=201856">Issue
+ 201856</a>)
+ </li>
+
+ <li>Reduced the lockdown period in which {@link
+ android.support.v7.widget.RecyclerView} does not allow adapter
+ changes while calculating a layout or scroll. (<a class=
+ "external-link" href=
+ "https://code.google.com/p/android/issues/detail?id=202046">Issue
+ 202046</a>)
+ </li>
+
+ <li>Fixed a crash when calling {@link
+ android.support.v7.widget.RecyclerView.Adapter#notifyItemChanged
+ notifyItemChanged()} on an item that is out of view. (<a class=
+ "external-link" href=
+ "https://code.google.com/p/android/issues/detail?id=202136">Issue
+ 202136</a>)
+ </li>
+
+ <li>Fixed a crash that occurs when {@link
+ android.support.v7.widget.RecyclerView.LayoutManager
+ RecyclerView.LayoutManager} adds and removes a view in the same
+ measurement pass. (<a class="external-link" href=
+ "https://code.google.com/p/android/issues/detail?id=193958">Issue
+ 193958</a>)
+ </li>
+ </ul>
+ </dd>
+
+ <dt>
+ Changes for <a href=
+ "{@docRoot}tools/support-library/features.html#v7-mediarouter">v7
+ mediarouter library</a>:
+ </dt>
+
+ <dd>
+ <ul>
+ <li>Fixed a crash that occurs when calling {@link
+ android.support.v7.media.MediaRouter#getInstance
+ MediaRouter.getInstance()} on API level 17. (<a class="external-link"
+ href=
+ "https://code.google.com/p/android/issues/detail?id=180654">Issue
+ 180654</a>)
+ </li>
+ </ul>
+ </dd>
+
+ <dt>
+ Changes for <a href=
+ "{@docRoot}tools/support-library/features.html#v17-leanback">v17
+ Leanback Library</a>:
+ </dt>
+
+ <dd>
+ <ul>
+ <li>Fixed an issue with {@code GridLayout.onAddFocusables()} that
+ caused the wrong item to be selected.
+ </li>
+
+ <li>Fixed issue with {@link
+ android.support.v17.leanback.app.GuidedStepFragment} actions
+ disappearing after an action was collapsed.
+ </li>
+ </ul>
+ </dd>
+
+ <dt>
+ Changes for <a href=
+ "{@docRoot}tools/support-library/features.html#design">Design Support
+ Library</a>:
+ </dt>
+
+ <dd>
+ <ul>
+ <li>Fixed a {@link android.support.design.widget.TabLayout} crash
+ caused by tab-pooling. (<a class="external-link" href=
+ "https://code.google.com/p/android/issues/detail?id=201827">Issue
+ 201827</a>)
+ </li>
+
+ <li>Fixed a bug in {@link
+ android.support.design.widget.NavigationView} that caused the wrong
+ color to be selected. (<a class="external-link" href=
+ "https://code.google.com/p/android/issues/detail?id=201951">Issue
+ 201951</a>)
+ </li>
+
+ <li>Fixed a bug where {@link
+ android.support.design.widget.FloatingActionButton#setBackgroundTintList
+ setBackgroundTintList()} was no longer able to change the background
+ color. (<a class="external-link" href=
+ "https://code.google.com/p/android/issues/detail?id=201873">Issue
+ 201873</a>)
+ </li>
+
+ <li>Fixed an issue where {@link
+ android.support.design.widget.AppBarLayout} did not completely scroll
+ out of view when used with {@code android:fitsSystemWindows = “true”}.
+ (<a class="external-link" href=
+ "https://code.google.com/p/android/issues/detail?id=201822">Issue
+ 201822</a>)
+ </li>
+
+ <li>Fixed an issue where {@code BottomSheetDialog} did not display
+ short content views correctly. (<a class="external-link" href=
+ "https://code.google.com/p/android/issues/detail?id=201793">Issue
+ 201793</a>)
+ </li>
+
+ <li>Fixed an issue where {@code BottomSheetDialogFragment} moved
+ sporadically when content inside was changed. (<a class=
+ "external-link" href=
+ "https://code.google.com/p/android/issues/detail?id=202125">Issue
+ 202125</a>)
+ </li>
+
+ <li>Fixed a crash in TextInputLayout counter <a class="external-link"
+ href=
+ "https://code.google.com/p/android/issues/detail?id=202051">link</a>
+ </li>
+
+ <li>Fixed a crash that occured when {@link
+ android.support.design.widget.TextInputLayout#getCounterMaxLength
+ TextInputLayout.getCounterMaxLength()} restored a saved state.
+ (<a class="external-link" href=
+ "https://code.google.com/p/android/issues/detail?id=202375">Issue
+ 202375</a>)
+ </li>
+
+ <li>Fixed a {@code ClassCastException} that occurred when restoring a
+ {@link android.support.design.widget.CoordinatorLayout} using the
+ saved state of a view that was not a {@link
+ android.support.design.widget.CoordinatorLayout}.
+ </li>
+ </ul>
+ </dd>
+
+ <dt>
+ Changes for VectorDrawableCompat:
+ </dt>
+
+ <dd>
+ <ul>
+ <li>Fixed a bug where the wrong variable was read for {@code
+ android:tintMode}. (<a class="external-link" href=
+ "https://code.google.com/p/android/issues/detail?id=201907">Issue
+ 201907</a>)
+ </li>
+ </ul>
+ </dd>
+ </dl>
+ </div>
+</div>
+<!-- end of collapsible section -->
+
+<div class="toggle-content closed">
+ <p id="rev23-2-0">
+ <a href="#" onclick="return toggleContent(this)"><img src=
+ "{@docRoot}assets/images/triangle-closed.png" class="toggle-content-img"
alt="">Android Support Library, revision 23.2.0</a> <em>(February
2016)</em>
</p>
diff --git a/docs/image_sources/preview/features/bundles-orig.png b/docs/image_sources/preview/features/bundles-orig.png
new file mode 100644
index 0000000..298d1c0
--- /dev/null
+++ b/docs/image_sources/preview/features/bundles-orig.png
Binary files differ
diff --git a/docs/image_sources/preview/features/inline-reply_orig.png b/docs/image_sources/preview/features/inline-reply_orig.png
new file mode 100644
index 0000000..ae7cd30
--- /dev/null
+++ b/docs/image_sources/preview/features/inline-reply_orig.png
Binary files differ
diff --git a/docs/image_sources/preview/features/inline-type-reply-orig.png b/docs/image_sources/preview/features/inline-type-reply-orig.png
new file mode 100644
index 0000000..bb176f8
--- /dev/null
+++ b/docs/image_sources/preview/features/inline-type-reply-orig.png
Binary files differ
diff --git a/docs/image_sources/preview/features/mw-splitscreen-orig.png b/docs/image_sources/preview/features/mw-splitscreen-orig.png
new file mode 100644
index 0000000..658c7f9
--- /dev/null
+++ b/docs/image_sources/preview/features/mw-splitscreen-orig.png
Binary files differ