Merge "Fix minimized dock stack for translucent activity over home task" into nyc-dev
diff --git a/Android.mk b/Android.mk
index b590761..76e9b33 100644
--- a/Android.mk
+++ b/Android.mk
@@ -1156,6 +1156,7 @@
 		$(sample_groups) \
 		-useUpdatedTemplates \
 		-hdf android.hasSamples true \
+		-yaml _book.yaml \
 		-samplesdir $(samples_dir)
 
 LOCAL_DROIDDOC_CUSTOM_TEMPLATE_DIR:=build/tools/droiddoc/templates-sdk-dev
diff --git a/api/current.txt b/api/current.txt
index b7b65f1..233fbd7 100644
--- a/api/current.txt
+++ b/api/current.txt
@@ -20642,6 +20642,7 @@
     field public static final int DolbyVisionProfileDvavPer = 1; // 0x1
     field public static final int DolbyVisionProfileDvheDen = 8; // 0x8
     field public static final int DolbyVisionProfileDvheDer = 4; // 0x4
+    field public static final int DolbyVisionProfileDvheDtb = 128; // 0x80
     field public static final int DolbyVisionProfileDvheDth = 64; // 0x40
     field public static final int DolbyVisionProfileDvheDtr = 16; // 0x10
     field public static final int DolbyVisionProfileDvheStn = 32; // 0x20
diff --git a/api/system-current.txt b/api/system-current.txt
index 6b5f1e9..10d7159 100644
--- a/api/system-current.txt
+++ b/api/system-current.txt
@@ -22162,6 +22162,7 @@
     field public static final int DolbyVisionProfileDvavPer = 1; // 0x1
     field public static final int DolbyVisionProfileDvheDen = 8; // 0x8
     field public static final int DolbyVisionProfileDvheDer = 4; // 0x4
+    field public static final int DolbyVisionProfileDvheDtb = 128; // 0x80
     field public static final int DolbyVisionProfileDvheDth = 64; // 0x40
     field public static final int DolbyVisionProfileDvheDtr = 16; // 0x10
     field public static final int DolbyVisionProfileDvheStn = 32; // 0x20
diff --git a/api/test-current.txt b/api/test-current.txt
index ae58f36..d66b5c7 100644
--- a/api/test-current.txt
+++ b/api/test-current.txt
@@ -20710,6 +20710,7 @@
     field public static final int DolbyVisionProfileDvavPer = 1; // 0x1
     field public static final int DolbyVisionProfileDvheDen = 8; // 0x8
     field public static final int DolbyVisionProfileDvheDer = 4; // 0x4
+    field public static final int DolbyVisionProfileDvheDtb = 128; // 0x80
     field public static final int DolbyVisionProfileDvheDth = 64; // 0x40
     field public static final int DolbyVisionProfileDvheDtr = 16; // 0x10
     field public static final int DolbyVisionProfileDvheStn = 32; // 0x20
diff --git a/core/java/android/app/ActivityManagerNative.java b/core/java/android/app/ActivityManagerNative.java
index a3f3b2b3..1a7c746 100644
--- a/core/java/android/app/ActivityManagerNative.java
+++ b/core/java/android/app/ActivityManagerNative.java
@@ -794,7 +794,9 @@
             if (hasBounds) {
                 bounds = Rect.CREATOR.createFromParcel(data);
             }
-            boolean res = moveTaskToDockedStack(taskId, createMode, toTop, animate, bounds);
+            final boolean moveHomeStackFront = data.readInt() != 0;
+            final boolean res = moveTaskToDockedStack(
+                    taskId, createMode, toTop, animate, bounds, moveHomeStackFront);
             reply.writeNoException();
             reply.writeInt(res ? 1 : 0);
             return true;
@@ -3865,7 +3867,7 @@
     }
     @Override
     public boolean moveTaskToDockedStack(int taskId, int createMode, boolean toTop, boolean animate,
-            Rect initialBounds) throws RemoteException
+            Rect initialBounds, boolean moveHomeStackFront) throws RemoteException
     {
         Parcel data = Parcel.obtain();
         Parcel reply = Parcel.obtain();
@@ -3880,6 +3882,7 @@
         } else {
             data.writeInt(0);
         }
+        data.writeInt(moveHomeStackFront ? 1 : 0);
         mRemote.transact(MOVE_TASK_TO_DOCKED_STACK_TRANSACTION, data, reply, 0);
         reply.readException();
         boolean res = reply.readInt() > 0;
diff --git a/core/java/android/app/IActivityManager.java b/core/java/android/app/IActivityManager.java
index 66b4fcf..55ce6c2 100644
--- a/core/java/android/app/IActivityManager.java
+++ b/core/java/android/app/IActivityManager.java
@@ -147,7 +147,7 @@
     public void moveTaskBackwards(int task) throws RemoteException;
     public void moveTaskToStack(int taskId, int stackId, boolean toTop) throws RemoteException;
     public boolean moveTaskToDockedStack(int taskId, int createMode, boolean toTop, boolean animate,
-            Rect initialBounds) throws RemoteException;
+            Rect initialBounds, boolean moveHomeStackFront) throws RemoteException;
     public boolean moveTopActivityToPinnedStack(int stackId, Rect bounds) throws RemoteException;
 
     /**
diff --git a/core/java/android/os/RecoverySystem.java b/core/java/android/os/RecoverySystem.java
index b25b33d..403e06c 100644
--- a/core/java/android/os/RecoverySystem.java
+++ b/core/java/android/os/RecoverySystem.java
@@ -434,6 +434,9 @@
             String filename = packageFile.getCanonicalPath();
             Log.w(TAG, "!!! REBOOTING TO INSTALL " + filename + " !!!");
 
+            // If the package name ends with "_s.zip", it's a security update.
+            boolean securityUpdate = filename.endsWith("_s.zip");
+
             // If the package is on the /data partition, the package needs to
             // be processed (i.e. uncrypt'd). The caller specifies if that has
             // been done in 'processed' parameter.
@@ -468,7 +471,12 @@
 
             final String filenameArg = "--update_package=" + filename + "\n";
             final String localeArg = "--locale=" + Locale.getDefault().toString() + "\n";
-            final String command = filenameArg + localeArg;
+            final String securityArg = "--security\n";
+
+            String command = filenameArg + localeArg;
+            if (securityUpdate) {
+                command += securityArg;
+            }
 
             RecoverySystem rs = (RecoverySystem) context.getSystemService(
                     Context.RECOVERY_SERVICE);
@@ -501,6 +509,7 @@
     public static void scheduleUpdateOnBoot(Context context, File packageFile)
             throws IOException {
         String filename = packageFile.getCanonicalPath();
+        boolean securityUpdate = filename.endsWith("_s.zip");
 
         // If the package is on the /data partition, use the block map file as
         // the package name instead.
@@ -510,7 +519,12 @@
 
         final String filenameArg = "--update_package=" + filename + "\n";
         final String localeArg = "--locale=" + Locale.getDefault().toString() + "\n";
-        final String command = filenameArg + localeArg;
+        final String securityArg = "--security\n";
+
+        String command = filenameArg + localeArg;
+        if (securityUpdate) {
+            command += securityArg;
+        }
 
         RecoverySystem rs = (RecoverySystem) context.getSystemService(Context.RECOVERY_SERVICE);
         if (!rs.setupBcb(command)) {
diff --git a/core/jni/android_hardware_Camera.cpp b/core/jni/android_hardware_Camera.cpp
index 91f003d..9459257 100644
--- a/core/jni/android_hardware_Camera.cpp
+++ b/core/jni/android_hardware_Camera.cpp
@@ -77,6 +77,7 @@
     virtual void postData(int32_t msgType, const sp<IMemory>& dataPtr,
                           camera_frame_metadata_t *metadata);
     virtual void postDataTimestamp(nsecs_t timestamp, int32_t msgType, const sp<IMemory>& dataPtr);
+    virtual void postRecordingFrameHandleTimestamp(nsecs_t timestamp, native_handle_t* handle);
     void postMetadata(JNIEnv *env, int32_t msgType, camera_frame_metadata_t *metadata);
     void addCallbackBuffer(JNIEnv *env, jbyteArray cbb, int msgType);
     void setCallbackMode(JNIEnv *env, bool installed, bool manualMode);
@@ -349,6 +350,11 @@
     postData(msgType, dataPtr, NULL);
 }
 
+void JNICameraContext::postRecordingFrameHandleTimestamp(nsecs_t, native_handle_t*) {
+    // This is not needed at app layer. This should not be called because JNICameraContext cannot
+    // start video recording.
+}
+
 void JNICameraContext::postMetadata(JNIEnv *env, int32_t msgType, camera_frame_metadata_t *metadata)
 {
     jobjectArray obj = NULL;
diff --git a/docs/html/about/dashboards/index.jd b/docs/html/about/dashboards/index.jd
index f0e1a3c..f5e21e3 100644
--- a/docs/html/about/dashboards/index.jd
+++ b/docs/html/about/dashboards/index.jd
@@ -1,5 +1,5 @@
 page.title=Dashboards
-page.metaDescription=page.metaDescription=An overview of device characteristics and platform versions that are active in the Android ecosystem.
+page.metaDescription=An overview of device characteristics and platform versions that are active in the Android ecosystem.
 page.tags="android, dashboard, platforms, versions"
 meta.tags="ecosystem, versions, whatsnew, dashboards"
 page.image=https://chart.googleapis.com/chart?chl=GL%202.0%7CGL%203.0%7CGL%203.1&chf=bg%2Cs%2C00000000&chd=t%3A51.6%2C40.7%2C7.7&chco=c4df9b%2C6fad0c&cht=p&chs=400x250
diff --git a/docs/html/jd_collections.js b/docs/html/jd_collections.js
index ecd374b..f155521 100644
--- a/docs/html/jd_collections.js
+++ b/docs/html/jd_collections.js
@@ -1,3 +1,11 @@
+/*
+ * THIS FILE IS DEPRECATED.
+ *
+ * Please add and edit resource collections in jd_extras_<lang>.js
+ * where lang matches the language code appropriate for the resource.
+ * Last sync'd with jd_extras_<lang>.js on 29 Apr 2016.
+ *
+ */
 var RESOURCE_COLLECTIONS = {
   "index/carousel": {
     "title": "",
diff --git a/docs/html/jd_extras.js b/docs/html/jd_extras.js
index 9663fd0b..d176883 100644
--- a/docs/html/jd_extras.js
+++ b/docs/html/jd_extras.js
@@ -1,18 +1,11 @@
-/* Metadata represendations of resources that are outside of the autogenerated
-   local resource lists, or that override local resource representations.
-
-   Resources listed here are referenced from sitemap sections and collections,
-   matched by url string if there is no resource existing in ALL_RESOURCES.
-
-   Currently, these articles can override only the generated resources
-   in DISTRIBUTE_RESOURCES. A representation defined here will not be applied
-   when a collection or section specifies a url that's not in DISTRIBUTE_RESOURCEs.
-   Also
-   So if a section url refers to a static doc that's
-   not in a distribute section, you need to create an item for
-   it in this file. Fix is to compare across
-   ALL_RESOURCES_BY_URL.  */
-
+/*
+ * THIS FILE IS DEPRECATED.
+ *
+ * Please add and edit resource collections in jd_extras_<lang>.js
+ * where lang matches the language code appropriate for the resource.
+ * Last sync'd with jd_extras_<lang>.js on 29 Apr 2016.
+ *
+ */
 DISTRIBUTE_RESOURCES = DISTRIBUTE_RESOURCES.concat([
  /* TODO Remove standard resources from here, such as below
  */
diff --git a/docs/html/jd_extras_en.js b/docs/html/jd_extras_en.js
index b1d7efc..f11da20 100644
--- a/docs/html/jd_extras_en.js
+++ b/docs/html/jd_extras_en.js
@@ -1,22 +1,55 @@
-/* Metadata represendations of resources that are outside of the autogenerated
-   local resource lists, or that override local resource representations.
+/* Metadata extensions for the specified language
+   as well as resource collection definitions.
 
-   Resources listed here are referenced from queries and collections,
-   matched by url string.
+   'Extras' defined in this file are metadata represendations of
+   resources that are outside the autogenerated local resource lists,
+   or representations that override the default representations. 
+   (Overriding the default is not recommended)
 
-   Currently, these articles can override only the generated resources
-   in DISTRIBUTE_RESOURCES. A representation defined here will not be applied
-   when a collection or section specifies a url that's not in DISTRIBUTE_RESOURCEs.
-   Also
-   So if a section url refers to a static doc that's
-   not in a distribute section, you need to create an item for
-   it in this file. Fix is to compare across
-   ALL_RESOURCES_BY_URL.  */
+   'Collections' are a predefined set of resources that pages can
+   display by referencing the collection name in a data query. Urls
+   listed in a collection must map exactly to urls in local metadata
+   resources (either default or extras).
+
+   'Carousel overrides' are extras that override a default resource
+   for the purpose of customizing the text and display in carousels/heros.
+   Urls referenced must map exactly to urls in local metadata
+   resources (either default or extras).
+
+   'Static search results' are metadata objects that are returned in
+   the search results page when the user enters the object's keyword.
+
+   The extras, collections, carousel overrides, and static search results
+   listed here are referenced from dynamic content queries, matched by
+   url string.
+  */
 
 METADATA['en'].extras = METADATA['en'].extras.concat([
  /* TODO Remove standard resources from here, such as below
  */
   {
+    "title":"Writing More Code by Writing Less Code with Android Studio Live Templates",
+    "category":"",
+    "summary":"Unless you’re getting paid by the keystroke, no one wants to write repetitive boilerplate code.",
+    "url":"https://medium.com/google-developers/writing-more-code-by-writing-less-code-with-android-studio-live-templates-244f648d17c7#.hczcm02du",
+    "group":"",
+    "keywords": [],
+    "tags": ['studio'],
+    "image":"https://cdn-images-1.medium.com/max/800/1*JkrYXGs1AxZAbK0sCLrJAQ.gif",
+    "type":"medium"
+  },
+  {
+    "title":"How Often Should You Update Android Studio?",
+    "category":"",
+    "summary":"One of the beauties of Android Studio is how quickly is evolves and improves.",
+    "url":"https://medium.com/google-developers/how-often-should-you-update-android-studio-db25785c488e#.8blbql35x",
+    "group":"",
+    "keywords": [],
+    "tags": ['studio'],
+    "image":"https://cdn-images-1.medium.com/max/2000/1*chMiA9mGa_FBUOoesHHk3Q.png",
+    "type":"medium"
+  },
+  {
     "title":"Measure your app’s user acquisition channels",
     "category":"google",
     "summary":"Get details on how to use the Developer Console User Acquisitions reports to discover where your users come from.",
@@ -642,7 +675,18 @@
     "keywords": [],
     "tags": [],
     "image":"distribute/images/gp-edu-apps-image.jpg",
-    "type":"distribute"
+    "type":"google"
+  },
+  {
+    "title":"Keeping Your App Responsive",
+    "category":"performance",
+    "summary":"This document describes how the Android system determines whether an application is not responding and provides guidelines for ensuring that your application stays responsive.",
+    "url":"training/articles/perf-anr.html",
+    "group":"",
+    "keywords": [],
+    "tags": [],
+    "image":"",
+    "type":"google"
   },
   {
     "title":"Google Play Game Services",
@@ -770,7 +814,7 @@
     "type": "distribute",
     "category": "google play"
   },
-{
+  {
     "lang": "en",
     "group": "",
     "tags": [],
@@ -1266,7 +1310,7 @@
     "lang": "en",
     "group": "",
     "tags": [
-      "#gcm",
+      "gcm",
     ],
     "url": "https://developer.chrome.com/apps/cloudMessagingV2",
     "timestamp": 1383243492000,
@@ -1277,12 +1321,11 @@
     "type": "distribute",
     "category": "google"
   },
-
   {
     "lang": "en",
     "group": "",
     "tags": [
-      "#sdkupdates"
+      ""
     ],
     "url": "https://android-developers.blogspot.com/2013/07/making-beautiful-android-app-icons.html",
     "timestamp": 1194884220000,
@@ -1293,11 +1336,11 @@
     "type": "blog",
     "category": ""
   },
-     {
+  {
     "lang": "en",
     "group": "",
     "tags": [
-      "#sdkupdates"
+      ""
     ],
     "url": "https://android-developers.blogspot.com/2012/12/localize-your-promotional-graphics-on.html",
     "timestamp": 1194884220000,
@@ -1308,11 +1351,11 @@
     "type": "blog",
     "category": ""
   },
-   {
+  {
     "lang": "en",
     "group": "",
     "tags": [
-      "#sdkupdates"
+      ""
     ],
     "url": "https://android-developers.blogspot.com/2013/10/making-your-app-content-more-accessible.html",
     "timestamp": 1194884220000,
@@ -2901,6 +2944,18 @@
     "type":"distribute"
   },
   {
+    "title":"What’s New in Android N Developer Preview",
+    "category":"preview",
+    "summary":"Learn all about the new features in the Android N Preview.",
+    "url":"https://www.youtube.com/watch?v=CsulIu3UaUM",
+    "group":"",
+    "keywords": ["androidn"],
+    "tags": [],
+    "image":"https://i1.ytimg.com/vi/CsulIu3UaUM/maxresdefault.jpg",
+    "lang":"en",
+    "type":"youtube"
+  },
+  {
     "title":"Developing for Android 6.0 (Marshmallow)",
     "category":"",
     "summary":"This video covers how to get started with the preview, important APIs to test and how to provide feedback on the preview.",
@@ -3120,6 +3175,19 @@
     "summary": "Learn how to get new users, using Universal app campaigns directly within the Google Play Developer Console to increase your installs from ads, and find out how your acquisition channels perform.",
   },
   {
+    "lang": "en",
+    "group": "",
+    "tags": ["play,protips"],
+    "url": "shareables/distribute/secrets_play/v2/web/secrets_to_app_success_v2_en.pdf",
+    "timestamp": 1447437450,
+    "image": "images/distribute/secrets_v2_banner.jpg",
+    "title": "The Secrets to App Success on Google Play",
+    "summary": "Get the updated guide full of useful features, tips, and best practices that will help you grow a successful app or game business on Google Play.",
+    "keywords": ["secrets, success, play, google"],
+    "type": "Book",
+    "category": "distribute"
+  },
+  {
     "url":"panel1",
     "image": "",
     "title": "",
@@ -3198,28 +3266,28 @@
     "title": "Android 5.0 Lollipop",
     "summary": "The Android 5.0 update adds a variety of new features for your apps, such as notifications on the lock screen, an all-new camera API, OpenGL ES 3.1, the new naterial design interface, and much more.",
   },
-  "http://www.youtube.com/watch?v=Pms0pcyPbAM": {
+  "https://www.youtube.com/watch?v=Pms0pcyPbAM": {
     "url":"https://www.youtube.com/watch?v=Pms0pcyPbAM&list=PLWz5rJ2EKKc9ofd2f-_-xmUi07wIGZa1c]",
     "image": "images/distribute/hero-carousel-giftedmom.jpg",
     "title": "Gifted Mom reaches more mothers across Africa with Android",
     "type":"youtube",
     "summary": "Gifted Mom is an app developed in Cameroon which provides users with critical information about pregnancy, breastfeeding and child vaccinations. Hear the creators explain how they built their business and launched on Google Play.",
   },
-  "http://www.youtube.com/watch?v=9m6MoBM-sFI": {
+  "https://www.youtube.com/watch?v=9m6MoBM-sFI": {
     "url":"https://www.youtube.com/watch?v=9m6MoBM-sFI&list=PLWz5rJ2EKKc9ofd2f-_-xmUi07wIGZa1c&index=3",
     "image": "images/distribute/hero-carousel-sgn.jpg",
     "title": "SGN increases installs with Store Listing Experiments",
     "type" : "youtube",
     "summary": "Watch mobile game developer SGN talk about how using Store Listing Experiments to test multiple variants across their portfolio of games helped improve their ROI, conversion rates and gamer retention.",
   },
-  "http://www.youtube.com/watch?v=e7t3svG9PTk": {
+  "https://www.youtube.com/watch?v=e7t3svG9PTk": {
     "url":"https://www.youtube.com/watch?v=e7t3svG9PTk&index=2&list=PLWz5rJ2EKKc9ofd2f-_-xmUi07wIGZa1c",
     "image": "images/distribute/hero-carousel-djit.jpg",
     "title": "DJiT builds higher quality experiences on Android",
     "type" : "youtube",
     "summary": "Learn how Music app developer DJiT create higher quality apps with improved latency on Android Marshmallow, as well as other Android and Google Play features.",
   },
-  "http://www.youtube.com/watch?v=J3IvOfvH1ys": {
+  "https://www.youtube.com/watch?v=J3IvOfvH1ys": {
     "url":"https://www.youtube.com/watch?v=J3IvOfvH1ys&list=PLWz5rJ2EKKc9ofd2f-_-xmUi07wIGZa1c&index=1",
     "image": "images/distribute/hero-carousel-wego.jpg",
     "title": "Wego increases user retention with material design",
@@ -3275,10 +3343,10 @@
   "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=e7t3svG9PTk",
-      "http://www.youtube.com/watch?v=J3IvOfvH1ys"
+      "https://www.youtube.com/watch?v=9m6MoBM-sFI",
+      "https://www.youtube.com/watch?v=Pms0pcyPbAM",
+      "https://www.youtube.com/watch?v=e7t3svG9PTk",
+      "https://www.youtube.com/watch?v=J3IvOfvH1ys"
     ]
   },
   "index/multiscreen": {
@@ -3379,7 +3447,6 @@
     "title": "",
     "resources": [
       "https://www.youtube.com/watch?v=K2dodTXARqc&list=PLWz5rJ2EKKc8I9gHTMh5yKkwRRGE8BjbQ",
-      "https://www.youtube.com/watch?v=3PIc-DuEU2s&list=PLWz5rJ2EKKc9e0d55YHgJFHXNZbGHEXJX",
       "https://www.youtube.com/watch?v=cD7NPxuuXYY&list=PLWz5rJ2EKKc8I9gHTMh5yKkwRRGE8BjbQ",
       "https://www.youtube.com/watch?v=JLLnhwtDoHw&list=PLWz5rJ2EKKc8I9gHTMh5yKkwRRGE8BjbQ",
       "https://www.youtube.com/watch?v=2I6fuD20qlY&list=PLWz5rJ2EKKc8I9gHTMh5yKkwRRGE8BjbQ",
@@ -4622,10 +4689,11 @@
     "resources": [
       "training/enterprise/app-compatibility.html",
       "training/enterprise/app-restrictions.html",
+      "training/enterprise/cosu.html",
       "https://www.youtube.com/watch?v=39NkpWkaH8M&index=2&list=PLOU2XLYxmsIKAK2Bhv19H2THwF-22O5WX",
       "samples/AppRestrictionSchema/index.html",
-      "samples/AppRestrictionEnforcer/index.html",
-      "https://www.youtube.com/watch?v=dH41OutAMNM"
+      "https://www.youtube.com/watch?v=dH41OutAMNM",
+      "samples/AppRestrictionEnforcer/index.html"
     ]
   },
   "training/work/admin": {
@@ -4636,6 +4704,37 @@
       "https://www.youtube.com/watch?v=j3QC6hcpy90"
     ]
   },
+"tools/help/log": {
+    "title": "",
+    "resources": [
+       "tools/help/am-logcat.html"
+    ]
+  },
+"tools/help/monitor": {
+    "title": "",
+    "resources": [
+       "tools/help/am-memory.html",
+       "tools/help/am-cpu.html",
+       "tools/help/am-gpu.html",
+       "tools/help/am-network.html"
+    ]
+  },
+ "tools/help/data": {
+    "title": "",
+    "resources": [
+       "tools/help/am-hprof.html",
+       "tools/help/am-allocation.html",
+       "tools/help/am-methodtrace.html",
+       "tools/help/am-sysinfo.html"
+    ]
+  },
+  "tools/help/shot": {
+    "title": "",
+    "resources": [
+       "tools/help/am-screenshot.html",
+       "tools/help/am-video.html"
+    ]
+  },
   "tools/performance/rendering": {
     "title": "",
     "resources": [
@@ -4738,6 +4837,7 @@
   "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",
@@ -4754,6 +4854,9 @@
 
 /**
  * Static search results.
+
+   Metadata objects returned in search results page when the user enters
+   each object's keyword.
  */
 METADATA['en'].searchHeroCollections = {
   "material": {
diff --git a/docs/html/sdk/index.jd b/docs/html/sdk/index.jd
deleted file mode 100644
index 1e7761b..0000000
--- a/docs/html/sdk/index.jd
+++ /dev/null
@@ -1,536 +0,0 @@
-page.title=Download Android Studio and SDK Tools
-page.tags=sdk, android studio
-page.template=sdk
-section.landing=true
-header.hide=1
-nonavpage=true
-fullpage=true
-page.image=images/cards/android-studio_2x.png
-page.metaDescription=Download the official Android IDE and developer tools to build apps for Android phones, tablets, wearables, TVs, and more.
-
-@jd:body
-
-<style>
-.download-bundle-button {line-height:18px;}
-.download-bundle-button .small {font-size: 12px; opacity: 0.7;}
-</style>
-
- <section class="dac-expand dac-hero dac-light">
-  <div class="wrap">
-    <div class="cols dac-hero-content">
-      <div class="col-1of2 col-push-1of2 dac-hero-figure">
-        <img class="dac-hero-image" src="/images/develop/hero_image_studio5_2x.png" srcset="/images/develop/hero_image_studio5.png 1x, /images/develop/hero_image_studio5_2x.png 2x">
-      </div>
-      <div class="col-1of2 col-pull-1of2" style="margin-bottom:40px">
-<h1 class="dac-hero-title">Android Studio<br>
-<span style="font-size: 65%;">The Official IDE for Android</span></h1>
-
-<p class="dac-hero-description">Android Studio provides the fastest tools for
-building apps on every type of Android device.</p>
-
-<p class="dac-hero-description">World-class code editing, debugging,
-performance tooling, a flexible build system, and an instant build/deploy
-system all allow you to focus on building unique and high quality apps.</p>
-
-<p style="margin-top:24px">
-  <a class="landing-button green download-bundle-button"
-    data-modal-toggle="studio_tos">Download Android Studio 2.1<br>
-  <span class="small"></span></a>
-</p>
-
-<p style="margin:24px 0 0">
-  <a class="dac-hero-cta" href="{@docRoot}tools/studio/index.html">
-  <span class="dac-sprite dac-auto-chevron"></span>
-  Read the docs</a>
-  <a class="dac-hero-cta" href="{@docRoot}tools/revisions/studio.html">
-  <span class="dac-sprite dac-auto-chevron"></span>
-  See the release notes</a>
-</p>
-      </div>
-    </div>
-  </div>
-</section>
-
-
-
-
-<!-- start studio download modal -->
-<div data-modal="studio_tos" class="dac-modal" id="studio_tos">
-  <div class="dac-modal-container">
-    <div class="dac-modal-window">
-      <header class="dac-modal-header">
-        <div class="dac-modal-header-actions">
-          <button class="dac-modal-header-close" data-modal-toggle></button>
-        </div>
-        <section class="dac-swap-section dac-active dac-down">
-          <h2 class="norule dac-modal-header-title" id="tos-header">Download Android Studio</h2>
-        </section>
-      </header>
-      <section class="dac-swap-section dac-active dac-left">
-          <section class="dac-modal-content">
-            <fieldset class="dac-form-fieldset">
-              <div class="cols">
-                <div class="col-2of2 tos-leftCol">
-                  <p class="sdk-terms-intro">Before downloading,
-                  you must agree to the following terms
-                  and conditions.</p>
-                </div>
-
-<div class="sdk-terms" onfocus="this.blur()">
-<h2 class="norule">Terms and Conditions</h2>
-This is the Android Software Development Kit License Agreement
-
-<h3>1. Introduction</h3>
-1.1 The Android Software Development Kit (referred to in the License Agreement as the "SDK" and specifically including the Android system files, packaged APIs, and Google APIs add-ons) 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 SDK.
-
-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 A "compatible implementation" means any Android device 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.
-
-
-<h3>2. Accepting this License Agreement</h3>
-2.1 In order to use the SDK, you must first agree to the License Agreement. You may not use the SDK if you do not accept the License Agreement.
-
-2.2 By clicking to accept, you hereby agree to the terms of the License Agreement.
-
-2.3 You may not use the SDK and may not accept the License Agreement if you are a person barred from receiving the SDK under the laws of the United States or other countries, including the country in which you are resident or from which you use the SDK.
-
-2.4 If you are agreeing to be bound by the License Agreement on behalf of your employer or other entity, 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 SDK on behalf of your employer or other entity.
-
-
-<h3>3. SDK License from Google</h3>
-3.1 Subject to the terms of the License Agreement, Google grants you a limited, worldwide, royalty-free, non-assignable, non-exclusive, and non-sublicensable license to use the SDK solely to develop applications for compatible implementations of Android.
-
-3.2 You may not use this SDK 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 SDK is not used for that purpose.
-
-3.3 You agree that Google or third parties own all legal right, title and interest in and to the SDK, including any Intellectual Property Rights that subsist in the SDK. "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 SDK 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 SDK or any part of the SDK; or (b) load any part of the SDK onto a mobile handset or any other hardware device except a personal computer, combine any part of the SDK with other software, or distribute any software or device incorporating a part of the SDK.
-
-3.5 Use, reproduction and distribution of components of the SDK licensed under an open source software license are governed solely by the terms of that open source software license and not the License Agreement.
-
-3.6 You agree that the form and nature of the SDK that Google provides may change without prior notice to you and that future versions of the SDK may be incompatible with applications developed on previous versions of the SDK. You agree that Google may stop (permanently or temporarily) providing the SDK (or any features within the SDK) 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 SDK.
-
-
-<h3>4. Use of the SDK by You</h3>
-4.1 Google agrees that it obtains no right, title or interest from you (or your licensors) under the License Agreement in or to any software applications that you develop using the SDK, including any intellectual property rights that subsist in those applications.
-
-4.2 You agree to use the SDK 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 SDK to develop applications for general public users, you will protect the privacy and legal rights of those users. If the 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 the user provides your application 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, the user has given you permission to do so.
-
-4.4 You agree that you will not engage in any activity with the SDK, 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 any third party including, but not limited to, Google or any mobile communications carrier.
-
-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.
-
-
-<h3>5. Your Developer Credentials</h3>
-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.
-
-
-<h3>6. Privacy and Information</h3>
-6.1 In order to continually innovate and improve the SDK, 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 SDK are being used and how they are being used. Before any of this information is collected, the SDK 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 SDK and is maintained in accordance with Google's Privacy Policy.
-
-
-<h3>7. Third Party Applications</h3>
-7.1 If you use the SDK 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. In that case, the License Agreement does not affect your legal relationship with these third parties.
-
-
-<h3>8. Using Android APIs</h3>
-8.1 Google Data 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.
-
-
-<h3>9. Terminating this License Agreement</h3>
-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 SDK and any relevant developer credentials.
-
-9.3 Google may at any time, terminate the License Agreement with you if:
-(A) you have breached any provision of the License Agreement; or
-(B) Google is required to do so by law; or
-(C) the partner with whom Google offered certain parts of SDK (such as APIs) to you has terminated its relationship with Google or ceased to offer certain parts of the SDK to you; or
-(D) Google decides to no longer provide the SDK or certain parts of the SDK to users in the country in which you are resident or from which you use the service, or the provision of the SDK or certain SDK services to you by Google is, in Google's sole discretion, no longer commercially viable.
-
-9.4 When the License Agreement comes to an end, all of the legal rights, obligations and liabilities that you and Google have benefited from, been subject to (or which have accrued over time whilst the License Agreement has been in force) or which are expressed to continue indefinitely, shall be unaffected by this cessation, and the provisions of paragraph 14.7 shall continue to apply to such rights, obligations and liabilities indefinitely.
-
-
-<h3>10. DISCLAIMER OF WARRANTIES</h3>
-10.1 YOU EXPRESSLY UNDERSTAND AND AGREE THAT YOUR USE OF THE SDK IS AT YOUR SOLE RISK AND THAT THE SDK IS PROVIDED "AS IS" AND "AS AVAILABLE" WITHOUT WARRANTY OF ANY KIND FROM GOOGLE.
-
-10.2 YOUR USE OF THE SDK AND ANY MATERIAL DOWNLOADED OR OTHERWISE OBTAINED THROUGH THE USE OF THE SDK 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.
-
-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.
-
-
-<h3>11. LIMITATION OF LIABILITY</h3>
-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.
-
-
-<h3>12. Indemnification</h3>
-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 SDK, (b) any application you develop on the SDK that infringes any copyright, trademark, trade secret, trade dress, patent or other intellectual property right of any person or defames any person or violates their rights of publicity or privacy, and (c) any non-compliance by you with the License Agreement.
-
-
-<h3>13. Changes to the License Agreement</h3>
-13.1 Google may make changes to the License Agreement as it distributes new versions of the SDK. When these changes are made, Google will make a new version of the License Agreement available on the website where the SDK is made available.
-
-
-<h3>14. General Legal Terms</h3>
-14.1 The License Agreement constitutes the whole legal agreement between you and Google and governs your use of the SDK (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 SDK.
-
-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 SDK 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 SDK. THESE LAWS INCLUDE RESTRICTIONS ON DESTINATIONS, END USERS AND END USE.
-
-14.6 The rights granted in the License Agreement may not be assigned or transferred by either you or Google without the prior written approval of the other party. Neither you nor Google shall be permitted to delegate their responsibilities or obligations under the License Agreement without the prior written approval of the other party.
-
-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.
-
-<em>November 20, 2015</em>
-</div><!-- close sdk-terms -->
-
-
-
-<div id="next-steps" style="display:none;position:absolute;width:inherit">
-  <p>You're just a few steps away from building apps for Android!</p>
-  <p>In a moment, you'll be redirected to
-  <a id="next-link" href="{@docRoot}sdk/installing/index.html">Installing the Android SDK</a>.</p>
-</div><!-- end next-steps -->
-
-<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="dac-button dac-raised dac-primary disabled ndk" id="downloadForRealz" onclick="return onDownloadForRealz(this);"></a></p>
-</div><!-- end sdk-terms-form -->
-
-
-</div><!-- end cols -->
-
-            </fieldset>
-          </section>
-      </section>
-    </div><!-- end dac-modal-window -->
-  </div><!-- end dac-modal-container -->
-</div><!-- end #langform, .dac-modal -->
-<!-- end studio_tos modal -->
-
-<div id="useOldTemplates" class="actions-bar dac-expand dac-invert">
-  <div class="wrap dac-offset-parent">
-    <a class="dac-fab dac-scroll-button" data-scroll-button="" href="#features">
-      <i class="dac-sprite dac-arrow-down-gray"></i>
-    </a>
-    <div class="actions">
-      <div><a href="#features">
-        <span class="dac-sprite dac-auto-chevron-large"></span>
-        Features
-      </a></div>
-      <div><a href="#latest">
-        <span class="dac-sprite dac-auto-chevron-large"></span>
-        Latest
-      </a></div>
-      <div><a href="#resources">
-        <span class="dac-sprite dac-auto-chevron-large"></span>
-        Resources
-      </a></div>
-      <div><a href="#videos">
-        <span class="dac-sprite dac-auto-chevron-large"></span>
-        Videos
-      </a></div>
-      <div><a href="#downloads">
-        <span class="dac-sprite dac-auto-chevron-large"></span>
-        Download Options
-      </a></div>
-    </div><!-- end .actions -->
-  </div><!-- end .wrap -->
-</div>
-
-
-<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="#features">
-      <i class="dac-sprite dac-arrow-down-gray"></i>
-    </a>
-    <ul class="dac-actions">
-      <li class="dac-action">
-        <a class="dac-action-link" href="#features">
-          <i class="dac-action-sprite dac-sprite dac-auto-chevron-large"></i>
-          Features
-        </a>
-      </li>
-      <li class="dac-action">
-        <a class="dac-action-link" href="#latest">
-          <i class="dac-action-sprite dac-sprite dac-auto-chevron-large"></i>
-          Latest
-        </a>
-      </li>
-      <li class="dac-action">
-        <a class="dac-action-link" href="#resources">
-          <i class="dac-action-sprite dac-sprite dac-auto-chevron-large"></i>
-          Resources
-        </a>
-      </li>
-      <li class="dac-action">
-        <a class="dac-action-link" href="#videos">
-          <i class="dac-action-sprite dac-sprite dac-auto-chevron-large"></i>
-          Videos
-        </a>
-      </li>
-      <li class="dac-action">
-        <a class="dac-action-link" href="#downloads">
-          <i class="dac-action-sprite dac-sprite dac-auto-chevron-large"></i>
-          Download Options
-        </a>
-      </li>
-    </ul>
-  </div><!-- end .wrap -->
-</div><!-- end new templates -->
-
-
-
-<section id="features" class="dac-section dac-small">
-<div class="dac-toggle">
-
-<div class="wrap feature">
-  <div class="cols dac-hero-content">
-    <div class="col-1of2 col-push-1of2 dac-hero-figure">
-      <img src="/images/tools/studio/studio-feature-instant-run_2x.png">
-    </div>
-    <div class="col-1of2 col-pull-1of2">
-      <div class="dac-hero-tag"></div>
-      <h1 class="dac-hero-title">Instant Run</h1>
-<p class="dac-hero-description">Push code and resource
-changes to your app running on a device or emulator and see the
-changes instantly come to life.</p>
-<p class="dac-hero-description">Instant Run dramatically speeds up your edit,
-build, and run cycles, keeping you "in the flow."</p>
-      <a class="dac-hero-cta"
-        href="/tools/building/building-studio.html#instant-run">
-        <span class="dac-sprite dac-auto-chevron"></span>
-        Learn more</a>
-    </div>
-  </div>
-</div>
-
-<div class="wrap feature">
-  <div class="cols dac-hero-content">
-    <div class="col-1of2 dac-hero-figure">
-      <img src="/images/tools/codeeditor-low.gif" >
-    </div>
-    <div class="col-1of2">
-      <div class="dac-hero-tag"></div>
-      <h1 class="dac-hero-title">Intelligent code editor</h1>
-<p class="dac-hero-description">Write better code, work faster, and be more productive with an intelligent code editor that helps you each step of the way.</p>
-<p class="dac-hero-description">Android Studio is built on IntelliJ and is capable of advanced code completion, refactoring, and code analysis.</p>
-    </div>
-  </div>
-</div>
-
-<div class="wrap feature">
-  <div class="cols dac-hero-content">
-    <div class="col-1of2 col-push-1of2 dac-hero-figure">
-      <img src="/images/tools/studio/studio-feature-emulator_2x.jpg">
-    </div>
-    <div class="col-1of2 col-pull-1of2">
-      <div class="dac-hero-tag"></div>
-      <h1 class="dac-hero-title">Fast and feature-rich emulator</h1>
-<p class="dac-hero-description">Install and run your apps faster than with a physical device and test your app on virtually any Android device configuration: Android phones, Android tablets, Android Wear, and Android TV devices.</p>
-<p class="dac-hero-description">The new Android Emulator 2.0 is faster than ever and allows you to dynamically resize the emulator and access a suite of sensor controls.</p>
-      <a class="dac-hero-cta"
-        href="/tools/devices/emulator.html">
-        <span class="dac-sprite dac-auto-chevron"></span>
-        Learn more</a>
-    </div>
-  </div>
-</div>
-
-<div class="wrap feature">
-  <div class="cols dac-hero-content">
-    <div class="col-1of2 dac-hero-figure">
-      <img src="/images/tools/studio/studio-feature-gradle_2x.png">
-    </div>
-    <div class="col-1of2">
-      <div class="dac-hero-tag"></div>
-      <h1 class="dac-hero-title">Robust and flexible build system</h1>
-<p class="dac-hero-description">Easily configure your project to include code libraries and generate multiple build variants from a single project.</p>
-<p class="dac-hero-description">With Gradle, Android Studio offers high-performance build automation, robust dependency management, and customizable build configurations.</p>
-      <a class="dac-hero-cta"
-        href="/tools/building/plugin-for-gradle.html">
-        <span class="dac-sprite dac-auto-chevron"></span>
-        Learn more</a>
-    </div>
-  </div>
-</div>
-
-<div class="dac-toggle-content clearfix">
-
-<div class="wrap feature">
-  <div class="cols dac-hero-content">
-    <div class="col-1of2 col-push-1of2 dac-hero-figure">
-      <img src="/images/tools/studio/studio-feature-devices_2x.png">
-    </div>
-    <div class="col-1of2 col-pull-1of2">
-      <div class="dac-hero-tag"></div>
-      <h1 class="dac-hero-title">Develop for all&nbsp;<wbr>Android&nbsp;devices</h1>
-<p class="dac-hero-description">Target multiple form factors with a single
-project to easily share code among your different versions of your app.</p>
-<p class="dac-hero-description">Android Studio provides a unified environment
-to develop apps for Android phones, tablets, Android Wear, Android TV, and
-Android Auto.</p>
-
-      <a class="dac-hero-cta"
-        href="/tools/building/configuring-gradle.html#workBuildVariants">
-        <span class="dac-sprite dac-auto-chevron"></span>
-        Learn more</a>
-    </div>
-  </div>
-</div>
-
-<div class="wrap feature">
-  <div class="cols dac-hero-content">
-    <div class="col-1of2 dac-hero-figure">
-      <img src="/images/tools/studio/studio-feature-github_2x.png">
-    </div>
-    <div class="col-1of2">
-      <div class="dac-hero-tag"></div>
-      <h1 class="dac-hero-title">Code templates and GitHub integration</h1>
-      <p class="dac-hero-description">Start projects with code templates for patterns such as navigation drawer and view pagers, or import Google code samples from GitHub.</p>
-      <p class="dac-hero-description">Android Studio's project wizards make it easier than ever to add code in a new project.</p>
-    </div>
-  </div>
-</div>
-
-</div><!-- end dac-toggle-content -->
-
-<div class="dac-section-links dac-text-center feature-more">
-  <div class="dac-section-link" data-toggle="section">
-    <span class="dac-toggle-expand">More
-      <i class="dac-sprite dac-auto-unfold-more"></i>
-    </span>
-    <span class="dac-toggle-collapse">Less
-      <i class="dac-sprite dac-auto-unfold-less"></i>
-    </span>
-  </div>
-</div>
-
-</div>
-</section><!-- end features -->
-
-
-
-<section id="latest" class="dac-section dac-light dac-small"><div class="wrap">
-  <h1 class="dac-section-title">Latest News</h1>
-  <div class="resource-widget resource-flow-layout col-16"
-       data-query="collection:tools/landing/latest"
-       data-cardSizes="6x6"
-       data-items-per-page="3"
-       data-initial-results="3"
-       data-maxResults="3"></div>
-  </div>
-</section>
-
-<section id="resources" class="dac-section dac-small"><div class="wrap">
-  <h1 class="dac-section-title">Resources</h1>
-  <div class="resource-widget resource-flow-layout col-16"
-       data-query="collection:tools/landing/resources"
-       data-cardSizes="6x6"
-       data-initial-results="3"
-       data-items-per-page="3"
-       data-maxResults="3"></div>
-  </div>
-</section>
-
-<section class="dac-section dac-light dac-small dac-gray" id="videos"><div class="wrap">
-  <h1 class="dac-section-title">Videos</h1>
-  <div class="resource-widget resource-flow-layout col-16"
-       data-query="collection:develop/landing/tools"
-       data-sortOrder="-timestamp"
-       data-cardSizes="6x6"
-       data-maxResults="3"></div>
-  </div>
-</section>
-
-
-
-<section id="Requirements" class="dac-section dac-light dac-small">
-<div class="wrap">
-
-<h2 class="norule">System Requirements</h2>
-
-<div class="cols">
-
-<div class="col-2of6">
-<h4>Windows</h4>
-<ul>
-<li>Microsoft&reg;  Windows&reg;  7/8/10 (32- or 64-bit)</li>
-<li>2 GB RAM minimum, 8 GB RAM recommended</li>
-<li>2 GB of available disk space minimum,<br>4 GB Recommended
-(500 MB for IDE + 1.5 GB for
-Android SDK and emulator system image)</li>
-<li>1280 x 800  minimum screen resolution</li>
-<li>Java Development Kit (JDK) 8</li>
-<li>For accelerated emulator: 64-bit operating system and
-Intel® processor with support for Intel®
-VT-x, Intel® EM64T (Intel® 64), and Execute Disable (XD) Bit functionality</li>
-</ul>
-</div>
-
-<div class="col-2of6">
-<h4>Mac</h4>
-<ul>
-<li>Mac&reg;  OS X&reg;  10.8.5 or higher, up to 10.11.4 (El Capitan)</li>
-<li>2 GB RAM minimum, 8 GB RAM recommended</li>
-<li>2 GB of available disk space minimum,<br>4 GB Recommended
-(500 MB for IDE + 1.5 GB for
-Android SDK and emulator system image)</li>
-<li>1280 x 800 minimum screen resolution</li>
-<li>Java Development Kit (JDK) 6</li>
-</ul>
-</div>
-
-<div class="col-2of6">
-<h4>Linux</h4>
-<ul>
-<li>GNOME or KDE desktop
-<p><i>Tested on Ubuntu®  12.04, Precise Pangolin (64-bit distribution
-capable of running 32-bit applications)</i></li>
-<li>64-bit distribution capable of running 32-bit applications</li>
-<li>GNU C Library (glibc) 2.11 or later</li>
-<li>2 GB RAM minimum, 8 GB RAM recommended</li>
-<li>2 GB of available disk space minimum,<br>4 GB Recommended
-(500 MB for IDE + 1.5 GB for
-Android SDK and emulator system image)</li>
-<li>1280 x 800 minimum screen resolution</li>
-<li>Java Development Kit (JDK) 8</li>
-<li>For accelerated emulator: Intel® processor with support for Intel®
-VT-x, Intel® EM64T (Intel® 64), and Execute Disable (XD) Bit functionality,
-or AMD processor with support for AMD Virtualization™ (AMD-V™)</li>
-</ul>
-</div>
-
-</div>
-</div>
-
-</section>
diff --git a/docs/html/sdk/installing/bundle.jd b/docs/html/sdk/installing/bundle.jd
deleted file mode 100644
index 22bdd11..0000000
--- a/docs/html/sdk/installing/bundle.jd
+++ /dev/null
@@ -1,3 +0,0 @@
-page.title=Setting Up the ADT Bundle
-
-@jd:body
diff --git a/docs/html/sdk/installing/create-project.jd b/docs/html/sdk/installing/create-project.jd
deleted file mode 100644
index a4de85c..0000000
--- a/docs/html/sdk/installing/create-project.jd
+++ /dev/null
@@ -1,377 +0,0 @@
-page.title=Managing Projects with Android Studio
-
-@jd:body
-
- <div id="qv-wrapper">
-    <div id="qv">
-      <h2>In this document</h2>
-
-      <ol>
-        <li><a href="#CreatingAProject">Creating an Android Project</a></li>
-
-        <li><a href="#CreatingAModule">Creating an Android Module</a></li>
-
-        <li><a href="#SettingUpLibraryModule">Setting up a Library Module</a></li>
-
-        <li><a href="#ReferencingLibraryModule">Referencing a Library Module</a></li>
-
-        <li><a href="#ReferencingAppEngModule">Setting up an App Eng Module</a></li>
-
-        <li><a href="#ProjectView">Using the Android Project View</a></li>
-
-      </ol>
-
-    </div>
-  </div>
-
-
-<p>Android Studio provides graphical tools for creating and managing Android projects, which
-contain everything that define your Android apps, from app source code to build configurations and
-test code. Each project contains one or more different types of modules, such as
-  application modules, library modules, and test modules.</p>
-
-<p>This guide explains how to create Android projects and different modules using
-<a href="{@docRoot}tools/studio/index.html">Android Studio</a>.
-For more information about the Android project structure and module types, read <a href=
-"{@docRoot}tools/projects/index.html">Managing Projects Overview</a>.</p>
-
-
-
-<h2 id="CreatingAProject">Creating an Android Project</h2>
-
-<p>Android Studio makes it easy to create Android apps for several form factors, such as phone,
-tablet, TV, Wear, and Google Glass. The <em>New Project</em> wizard lets you choose the form factors
-for your app and populates the project structure with everything you need to get started.</p>
-
-<p>Follow the steps in this section to create a project in Android Studio.</p>
-
-<h3 id="Step1CreatingAProject">Step 1: Create a New Project</h2>
-
-<p>If you didn't have a project opened, Android Studio shows the Welcome screen.
-To create a new project, click <strong>New Project</strong>.</p>
-
-<p>If you had a project opened, Android Studio shows the development environment.
-To create a new project, click <strong>File</strong> > <strong>New Project</strong>.</p>
-
-<p>The next window lets you configure the name of your app, the package name, and the location
-of your project.</p>
-
-<img src="{@docRoot}images/tools/wizard2.png" alt="" width="500" height="381">
-<p class="img-caption"><strong>Figure 1.</strong> Choose a name for your project.</p>
-
-<p>Enter the values for your project then click <strong>Next</strong>.</p>
-
-<h3 id="Step2SelectFormFactor">Step 2: Select Form Factors and API Level</h2>
-
-<p>The next window lets you select the form factors supported by your app, such as phone, tablet,
-TV, Wear, and Google Glass. The selected form factors become the application modules within the
-project. For each form factor, you can also select the API Level for that app. To get more information,
-click <strong>Help me choose</strong>.</p>
-
-<img src="{@docRoot}images/tools/wizard4.png" alt="" width="750" height="510">
-<p class="img-caption"><strong>Figure 2.</strong> Select the API Level.</p>
-
-<p>The API Level window shows the distribution of mobile devices running each version of Android,
-as shown in figure 3. Click on an API level to see a list of features introduced in the corresponding
-version of Android. This helps you choose the minimum API Level that has all the features that
-your apps needs, so you can reach as many devices as possible. Then click <strong>OK</strong>.</p>
-
-<img src="{@docRoot}images/tools/wizard3.png" alt="" width="500" height="480">
-<p class="img-caption"><strong>Figure 3.</strong> Choose form factors for your app.</p>
-
-<p>Then, on the Form Factors Window, click <strong>Next</strong>.</p>
-
-
-<h3 id="Step3AddActivity">Step 3: Add an Activity</h2>
-
-<p>The next screen lets you select an activity type to add to your app, as shown in figure 4.
-This screen displays a different set of activities for each of the form factors you selected earlier.</p>
-
-<img src="{@docRoot}images/tools/wizard5.png" alt="" width="720" height="504">
-<p class="img-caption"><strong>Figure 4.</strong> Add an activity to your app.</p>
-
-<p>Choose an activity type then click <strong>Next</strong>.</p>
-
- <p class="note"><strong>Note:</strong> If you choose "Add No Activity", click <strong>Finish</strong>
- to create the project.</p>
-
-
-<h3 id="Step4ConfigureActivity">Step 4: Configure Your Activity</h2>
-
-<p>The next screen lets you configure the activity to add to your app, as shown in figure 5.</p>
-
-<img src="{@docRoot}images/tools/wizard6.png" alt="" width="450" height="385">
-<p class="img-caption"><strong>Figure 5.</strong> Choose a name for your activity.</p>
-
-<p>Enter the activity name, the layout name, and the activity title. Then click
-<strong>Finish</strong>.</p>
-
-
-<h3 id="Step5DevelopYourApp">Step 5: Develop Your App</h2>
-
-<p>Android Studio creates the default structure for your project and opens the development
-environment. If your app supports more than one form factor, Android Studio creates a module folder
-with complete source files for each of them as shown in figure 6.</p>
-
-<img src="{@docRoot}images/tools/wizard7.png" alt="" width="750" height="509">
-<p class="img-caption"><strong>Figure 6.</strong> The default project structure for a mobile app.</p>
-
-<p>Now you are ready to develop your app. For more information, see the following links:</p>
-
-<ul>
-<li><a href="{@docRoot}training/">Training Lessons</a></li>
-<li><a href="{@docRoot}training/building-wearables.html">Building Apps for Wearables</a></li>
-<li><a href="{@docRoot}tv/">Android TV</a></li>
-<li><a href="https://developers.google.com/glass/">Google Glass</a></li>
-</ul>
-
-
-  <h2 id="CreatingAModule">Creating an Android Module</h2>
-
-  <p>Android application modules contain the <code>src/main/</code>, <code>AndroidManifest.xml</code>,
-  <code>build.gradle</code>, build output and other files you need to generate your app's APK files.
-  Android Studio provides a <em>New Module Wizard</em> that you can use to quickly create a new
-  Android module (or a module from existing code) based on selected application settings, such as
-  minimum SDK level and activity template.</p>
-
-  <p>To create a new module, select <strong>File</strong> &gt; <strong>New</strong> &gt;
-  <strong>Module</strong>. Select the desire module type then click Next to enter the basic module
-  settings:</p>
-
-      <ul>
-        <li>Enter an <strong>Application Name</strong>. This name is used as the title of your
-        application launcher icon when it is installed on a device.</li>
-
-        <li>Enter a <strong>Module Name</strong>. This text is used as the name of the folder where
-        your Java-based activity files are stored.</li>
-
-        <li>Enter a <strong>Package Name</strong> and <strong>Package Location</strong>. This class
-        package namespace creates the initial
-        package structure for your applications code files and is added as the
-        <a href="{@docRoot}guide/topics/manifest/manifest-element.html#package">{@code package}</a>
-        attribute in your application's
-        <a href="{@docRoot}guide/topics/manifest/manifest-intro.html">Android manifest file</a>.
-        This manifest value serves as the unique identifier for your application app when you
-        distribute it to users. The package name must follow the same rules as packages in the Java
-        programming language.</li>
-
-        <li>Select the <strong>Minimum required SDK</strong>.
-        This setting indicates the lowest version of the Android platform that your application
-        supports for the selected form factor. This value sets the
-        <code>minSdkVersion</code> attribute in the build.gradle file.</li>
-
-          <p class="note"><strong>Note:</strong> You can manually change the minimum and target SDK
-          for your module at any time: Double-click the module's build.gradle in the Project Explorer,
-          set the <strong>targetSdkVersion</strong> and  <em>targetSdkVersion</em> in the
-          <em>defaultConfig</em> section.</p>
-
-
-        <li>Select a <strong>Target SDK</strong>. This setting indicates the highest version of
-        Android with which you have tested with your application and sets the
-        <a href="{@docRoot}guide/topics/manifest/uses-sdk-element.html#target">{@code
-        targetSdkVersion}</a> attribute in your application's' build.gradle file.
-
-
-        <li>Select a <strong>Compile With</strong> API version. This setting specifies what version
-        of the SDK to compile your project against. We strongly recommend using the most recent
-        version of the API.</li>
-
-        <li>Select a <strong>Language Level</strong> API version. This setting specifies what version
-        of the SDK to compile your project against. We strongly recommend using the most recent
-        version of the API.</li>
-
-        <li>Select a <strong>Theme</strong>. This setting specifies which standard Android
-        <a href="{@docRoot}design/style/themes.html">visual style</a> is applied to your
-        application. Select activity template. For more information about Android code templates, see
-        <a href="{@docRoot}tools/projects/templates.html">Using Code Templates</a>. Leave the
-        <strong>Create activity</strong> option checked so you can start your
-        application with some essential components. </li>
-
-        <li>Click the check box for the required Support Libraries then click <strong>Next</strong>.</li>
-
-        <li>In the <strong>Configure Launcher Icon</strong> page, create an icon and options, then click
-        <strong>Next</strong>.</li>
-
-        <li>In the <strong>Create Activity</strong> page, select activity template then click
-        <strong>Next</strong>. For more information about Android code templates, see
-        <a href="{@docRoot}tools/projects/templates.html">Using Code Templates</a>.
-        </li>
-
-        <li>Review the new module settings then click <strong>Finish</strong>.</li>
-
-     </ul>
-
-    <p>The wizard creates a new Android application module according to the options you have chosen.</p>
-
-
-
-  <h2 id="SettingUpLibraryModule">Setting up a Library Module</h2>
-
-  <p>A library module is a standard Android module, so you can create a new one in the same way
-  as you would a new application module, using the New Module wizard and selecting <em>Android
-  Library</em> as the module type. The created library module will appear in your project view
-  along with the other modules. </p>
-
-  <p> You can easily change an existing application module to a library module by changing the
-  plugin assignment in the <strong>build.gradle</strong> file to <em>com.android.library</em>.</p>
-
-<pre>
-apply plugin: 'com.android.application'
-
-android {...}
-</pre>
-
-<pre>
-apply plugin: 'com.android.library'
-
-android {...}
-</pre>
-
-
-  <h3>Adding a dependency on a library module</h3>
-
-  <p>The library dependency can be declared in the module's manifest file or in the
-  <strong<build.gradle</strong> file. </p>
-
-  <p>A library modules's manifest file must declare all of the shared components that it includes,
-  just as would a standard Android application. For more information, see the documentation for
-  <a href="{@docRoot}guide/topics/manifest/manifest-intro.html">AndroidManifest.xml</a>.</p>
-
-  <p>For example, the <a href=
-  "{@docRoot}resources/samples/TicTacToeLib/AndroidManifest.html">TicTacToeLib</a> example library
-  project declares the activity <code>GameActivity</code>:</p>
-  <pre>
-&lt;manifest&gt;
-  ...
-  &lt;application&gt;
-    ...
-    &lt;activity android:name="GameActivity" /&gt;
-    ...
-  &lt;/application&gt;
-&lt;/manifest&gt;
-</pre>
-
-
-<p>To add the dependency declaration to the build file, edit the build file for the <code>app</code>
-module (<code>app/build.gradle</code>) and add a dependency on the <code>lib</code> module:</p>
-
-<pre>
-...
-dependencies {
-    ...
-    compile project(":lib")
-}
-</pre>
-
-<p>In this example, the <code>lib</code> module can still be built and tested independently, and
-the build system creates an AAR package for it that you could reuse in other projects.</p>
-
-<p class="note"><strong>Note:</strong> The library settings in the <code>app/build.gradle</code>
-file will override any shared library resources declared in the manifest file.</p>
-
-
-  <h2 id="ReferencingLibraryModule">Referencing a library module</h2>
-
-  <p>If you are developing an application and want to include the shared code or resources from a
-  library module, you can also do so easily by adding a reference to the library module in the
-  module's dependency page.</p>
-
-  <p>To add a reference to a library module, follow these steps:</p>
-
-  <ol>
-    <li>Make sure that both the module library and the application module that depends on it are
-      in your project. If one of the modules is missing, import it into your project.</li>
-
-    <li>In the project view, right-click the dependent module and select
-    <strong>Open</strong> > <strong>Module Settings</strong>.</li>
-
-    <li>Right-click the plus icon to add a new dependencies.
-    <p>If you are adding references to multiple libraries, you can set their relative
-    priority (and merge order) by selecting a library and using the <strong>Up</strong> and
-    <strong>Down</strong> controls. The tools merge the referenced libraries with your application
-    starting from lowest priority (bottom of the list) to highest (top of the list). If more than one
-    library defines the same resource ID, the tools select the resource from the library with higher
-    priority. The application itself has highest priority and its resources are always used in
-    preference to identical resource IDs defined in libraries.</p>
-    </li>
-
-    <li>Use the <strong>Scope</strong> drop-down to select how the dependency will be applied.</li>
-
-    <li>Click <strong>Apply</strong> to create the dependency and <strong>OK</strong> to close the
-    <strong>Project Structure</strong> window.</li>
-  </ol>
-
-  <p>Android Studio rebuilds the module, including the contents of the library module the next time
-  the project or module is built.</p>
-
-
-
-  <h3>Declaring library components in the manifest file</h3>
-
-  <p>In the manifest file of the application module, you must add declarations of all components
-  that the application will use that are imported from a library module. For example, you must
-  declare any <code>&lt;activity&gt;</code>, <code>&lt;service&gt;</code>,
-  <code>&lt;receiver&gt;</code>, <code>&lt;provider&gt;</code>, and so on, as well as
-  <code>&lt;permission&gt;</code>, <code>&lt;uses-library&gt;</code>, and similar elements.</p>
-
-  <p>Declarations should reference the library components by their fully-qualified package names,
-  where appropriate.</p>
-
-  <p>For example, the <a href=
-  "{@docRoot}resources/samples/TicTacToeMain/AndroidManifest.html">TicTacToeMain</a> example
-  application declares the library activity <code>GameActivity</code> like this:</p>
-  <pre>
-&lt;manifest&gt;
-  ...
-  &lt;application&gt;
-    ...
-    &lt;activity android:name="com.example.android.tictactoe.library.GameActivity" /&gt;
-    ...
-  &lt;/application&gt;
-&lt;/manifest&gt;
-</pre>
-
-  <p>For more information about the manifest file, see the documentation for <a href=
-  "{@docRoot}guide/topics/manifest/manifest-intro.html">AndroidManifest.xml</a>.</p>
-
-
- <h2 id="ProjectView">Using the Android Project View</h2>
-
-
-<p>The Android project view in Android Studio shows a flattened version of your project's structure
-that provides quick access to the key source files of Android projects and helps you work with
-the new <a href="{@docRoot}sdk/installing/studio-build.html">Gradle-based build system</a>. The
-Android project view:</p>
-
-<ul>
-<li>Groups the build files for all modules at the top level of the project hierarchy.</li>
-<li>Shows the most important source directories at the top level of the module hierarchy.</li>
-<li>Groups all the manifest files for each module.</li>
-<li>Shows resource files from all Gradle source sets.</li>
-<li>Groups resource files for different locales, orientations, and screen types in a single group
-per resource type.</li>
-</ul>
-
-<p>The <em>Android</em> project view is enabled by default and shows all the build files at
-the top level of the project hierarchy under <strong>Gradle Scripts</strong>. The project module
-appears as a folder at the top level of the project hierarchy and contains these three elements
-at the top level:</p>
-
-<ul>
-<li><code>manifests/</code> - Manifest files for the module.</li>
-<li><code>java/</code> - Source files for the module.</li>
-<li><code>res/</code> - Resource files for the module.</li>
-</ul>
-
-<p>Notice how the Android project view groups all instances of the
-<code>ic_launcher.png</code> resource for different screen densities under the same element.</p>
-
-<p class="note"><strong>Note:</strong> The Android project view shows a hierarchy that helps you
-work with Android projects by providing a flattened structure that highlights the most commonly
-used files while developing Android applications. However, the project structure on disk differs
-from this representation and maintains the traditional project structure.</p>
-
-<img src="{@docRoot}images/tools/projectview-p1.png" alt="" style="width:240px" "/>
-&nbsp;&nbsp;&nbsp;
-<img src="{@docRoot}images/tools/projectview-p2.png" alt="" style="width:240px" " />
-<p class="img-caption"><strong>Figure 10:</strong> Android and Traditional project view </p>
diff --git a/docs/html/sdk/installing/index.jd b/docs/html/sdk/installing/index.jd
deleted file mode 100644
index e4d860b..0000000
--- a/docs/html/sdk/installing/index.jd
+++ /dev/null
@@ -1,218 +0,0 @@
-page.title=Install Android Studio
-excludeFromSuggestions=true
-
-page.tags=sdk tools
-
-@jd:body
-
-<style>
-.instruction-select {
-  float:right;
-  background: #f7f7f7;
-  padding: 15px;
-  margin: -15px 0 20px 40px;
-}
-</style>
-
-<div class="instruction-select">
-<p><strong>Instructions for</strong></p>
-<select id="instructions-option" onchange="showInstructions(this.value)" style="padding:4px">
-  <option value="windows">Windows</option>
-  <option value="mac">Mac</option>
-  <option value="linux">Linux</option>
-</select>
-</div>
-
-<p>Setting up Android Studio takes just a few clicks.</p>
-
-<p>While the <a href="{@docRoot}sdk/index.html">Android Studio download</a>
-completes, verify which version of the JDK you have:
-open a command line and type <code>javac -version</code>. If the JDK
-is not available or the version is lower than 1.8, download the <a href=
-"http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html"
-class="external-link">Java SE Development Kit 8</a>.</p>
-
-
-<div id="system-windows" style="display:none">
-
-<p>To install Android Studio on Windows, proceed as follows:</p>
-<ol>
-  <li>Launch the <code>.exe</code> file you downloaded.</li>
-  <li>Follow the setup wizard to install Android Studio and any necessary SDK tools.
-
-  <p>On some Windows systems, the launcher script does not find where the JDK is installed.
-    If you encounter this problem,
-    you need to set an environment variable indicating the correct location.</p>
-    <p>Select <strong>Start menu > Computer > System Properties >
-    Advanced System Properties</strong>. Then open <strong>Advanced tab > Environment
-    Variables</strong> and add a new system variable <code>JAVA_HOME</code> that points to
-    your JDK folder, for example <code>C:\Program Files\Java\jdk1.8.0_77</code>.</p>
-  </p>
-  </li>
-</ol>
-
-<p>That's it!
-The following video shows each step of the recommended setup procedure.</p>
-
-<video controls style="margin:20px 0" onclick="this.play()">
-  <source src="https://storage.googleapis.com/androiddevelopers/videos/studio-install-windows.mp4" type="video/mp4">
-</video>
-
-<p>As new tools and other APIs become available, Android Studio tells you
-with a pop-up, or you can check for updates by clicking <strong>Help &gt;
-Check for Update</strong>.</p>
-
-
-</div>
-<!-- end windows -->
-
-
-
-<!-- #### MAC INSTRUCTIONS #### -->
-
-<div id="system-mac" style="display:none">
-
-<p>There are, however, known stability issues in Android Studio on Mac
-when using JDK 1.8. Until these issues are resolved, you can improve stability
-by downgrading your JDK to an older version (but no lower than JDK 1.6).</p>
-
-<p>To install Android Studio on your Mac, proceed as follows:</p>
-
-<ol>
-  <li>Launch the Android Studio DMG file.</li>
-  <li>Drag and drop Android Studio into the Applications folder, then launch
-    Android Studio.</li>
-  <li>Select whether you want to import previous Android Studio settings,
-    then click <strong>OK</strong>.</li>
-  <li>The Android Studio Setup Wizard guides you though the rest of the
-    setup, which includes downloading Android SDK components
-    that are required for development.</li>
-</ol>
-
-<p>That's it!
-The following video shows each step of the recommended setup procedure.</p>
-
-<video controls style="margin:20px 0" onclick="this.play()">
-  <source src="https://storage.googleapis.com/androiddevelopers/videos/studio-install-mac.mp4" type="video/mp4">
-</video>
-
-<p>
-As new tools and other APIs become available, Android Studio tells you
-with a pop-up, or you can check for updates by clicking <strong>Android Studio
-&gt; Check for Updates</strong>.</p>
-
-</div>
-<!-- end mac -->
-
-
-
-<!-- #### LINUX INSTRUCTIONS #### -->
-
-<div id="system-linux" style="display:none">
-
-
-<p>To install Android Studio on Linux, proceed as follows:</p>
-
-<ol>
-  <li>Unpack the <code>.zip</code> file you downloaded to an
-      appropriate location for your applications, such as within
-      <code>/usr/local/</code> for your user profile, or <code>/opt/</code>
-      for shared users.
-  <li>To launch Android Studio, open a terminal,
-    navigate to the <code>android-studio/bin/</code> directory,
-   and execute <code>studio.sh</code>.
-    <p><strong>Tip:</strong>
-    Add <code>android-studio/bin/</code> to your <code>PATH</code> environment
-    variable so you can start Android Studio from any directory.</p>
-  </li>
-  <li>Select whether you want to import previous Android Studio settings
-    or not, then click <strong>OK</strong>.</li>
-  <li>The Android Studio Setup Wizard guides you though the rest of the
-    setup, which includes downloading Android SDK components
-    that are required for development.</li>
-  </li>
-</ol>
-
-<div class="note">
-<p><strong>Note:</strong>
-If you are running a 64-bit version of Ubuntu, you need to install some 32-bit
-libraries with the following command:</p>
-<pre>sudo apt-get install lib32z1 lib32ncurses5 lib32bz2-1.0 lib32stdc++6</pre>
-<p>If you are running 64-bit Fedora, the command is:</p>
-<pre>sudo yum install zlib.i686 ncurses-libs.i686 bzip2-libs.i686</pre>
-</div>
-
-<p>That's it!
-The following video shows each step of the recommended setup procedure.</p>
-
-<video controls style="margin:20px 0" onclick="this.play()">
-  <source src="https://storage.googleapis.com/androiddevelopers/videos/studio-install-linux.mp4" type="video/mp4">
-</video>
-
-<p>As new tools and other APIs become available, Android Studio tells you
-with a pop-up, or you can check for updates by clicking <strong>Help &gt;
-Check for Update</strong>.</p>
-
-</div><!-- end linux -->
-
-<p class="note"><strong>Note:</strong>
-If you want to develop apps with the N Preview SDK, you must use
-the preview version of Android Studio 2.1. For more information, see the
-<a href="{@docRoot}preview/setup-sdk.html">N Preview setup guide</a>.</p>
-
-
-
-<h2>Start building apps</h2>
-
-<div class="cols" style="padding:10px 0">
-<div class="col-2of6">
-<img src="{@docRoot}images/tools/studio/ic_devices_grey.png"
-  style="width:100%;background:#eee;margin:0" />
-<h3>Build your first app</h3>
-<p>Get started quickly and learn the basics of Android by following
-the guide to <strong><a href="{@docRoot}training/basics/firstapp/index.html"
->Building Your First App</a></strong>.</p>
-
-</div>
-<div class="col-2of6">
-<img src="{@docRoot}images/tools/studio/ic_school_grey.png"
-  style="width:100%;background:#eee;margin:0" />
-<h3>Learn with Udacity</h3>
-<p>Ramp up on Android with interactive video training in the
-<strong><a href="https://www.udacity.com/course/developing-android-apps--ud853">Android Fundamentals Udacity course</a></strong>.</p>
-
-</div>
-<div class="col-2of6">
-<img src="{@docRoot}images/tools/studio/ic_explore_grey.png"
-  style="width:100%;background:#eee;margin:0" />
-<h3>Explore Studio</h3>
-<p>Discover powerful Android Studio features and developer strategies in the
-<strong><a href="{@docRoot}tools/studio/index.html">Android Studio Introduction</a></strong>.</p>
-
-</div>
-</div><!-- end cols -->
-
-
-<script>
-/** Show the appropriate instructions for user **/
-function showInstructions(system) {
-  $("[id^=system-]").hide(); // hide all of them first
-  if (system == "linux") {
-    $("#system-linux").show();
-  } else if (system == "mac") {
-    $("#system-mac").show();
-  } else {
-    $("#system-windows").show();
-  }
-  $("select#instructions-option").val(system);
-}
-
-// Get operating system based on the user agent, default windows
-var os = "windows";
-if (navigator.appVersion.indexOf("Linux")!=-1) {
-  os = "linux";
-} else if (navigator.appVersion.indexOf("Mac")!=-1) {
-  os = "mac";
-}
-showInstructions(os);
-</script>
diff --git a/docs/html/sdk/installing/migrate.jd b/docs/html/sdk/installing/migrate.jd
deleted file mode 100644
index 61e6798..0000000
--- a/docs/html/sdk/installing/migrate.jd
+++ /dev/null
@@ -1,267 +0,0 @@
-page.title=Migrating from Eclipse ADT
-
-@jd:body
-
-<div id="qv-wrapper">
-<div id="qv">
-
-
-<h2>In this document</h2>
-<ol>
-  <li><a href="#overview">Migration Overview</a></li>
-  <li><a href="#prerequisites">Migration Prerequisites</a></li>
-  <li><a href="#migrate">Importing Projects to Android Studio</a></li>
-  <li><a href="#post-migration">Validating imported projects</a></li>
-</ol>
-
-
-<h2>See also</h2>
-<ul>
-  <li><a href="{@docRoot}tools/studio/eclipse-transition-guide.html">
-    Transition Guide for Eclipse ADT</a></li>
-  <li><a href="http://confluence.jetbrains.com/display/IntelliJIDEA/FAQ+on+Migrating+to+IntelliJ+IDEA"
-    class="external-link">IntelliJ FAQ on migrating to IntelliJ IDEA</a></li>
-  <li><a href="http://confluence.jetbrains.com/display/IntelliJIDEA/IntelliJ+IDEA+for+Eclipse+Users"
-    class="external-link">IntelliJ IDEA for Eclipse users</a></li>
-  <li><a href="{@docRoot}tools/studio/index.html">Android Studio Overview</a></li>
-</ul>
-</div>
-</div>
-
-
-<p>Migrating from Eclipse ADT to Android Studio requires adapting to a new project structure,
-build system, and IDE functionality. To simplify the migration process, Android Studio provides an
-import tool so you can quickly transition your Eclipse ADT workspaces and Ant build scripts to
-Android Studio projects and <a href="http://www.gradle.org">Gradle</a>-based build files.</p>
-
-<p>This document provides an overview of the migration process and walks you
-through a sample import procedure. For more information about Android Studio features and the
-Gradle-based build system, see <a href="{@docRoot}tools/studio/index.html">Android Studio Overview</a>
-and <a href="{@docRoot}tools/building/configuring-gradle.html">Configuring Gradle Builds</a>.</p>
-
-
-
-<h2 id="overview">Migration Overview </h2>
-<p>Migrating from Eclipse to Android Studio requires that you change the structure of your
-development projects, move to a new build system, and use a new user interface. Here are some of
-the key changes you should be aware of as you prepare to migrate to Android Studio:</p>
-<ul>
-  <li><strong>Project files</strong>
-    <p>Android Studio uses a different project structure. Each Eclipse ADT
-    project is called a module in Android Studio. Each instance of Android
-    Studio contains a project with one or more app modules. For more information see,
-    <a href="{@docRoot}tools/studio/eclipse-transition-guide.html#project-structure">Project
-    Structure</a>.</p></li>
-
-  <li><strong>Manifest settings</strong>
-    <p>Several elements in the <code>AndroidManifest.xml</code> file are now properties in the
-    <code>defaultConfig</code> and <code>productFlavors</code> blocks in the
-    <code>build.gradle</code> file. These elements are still valid manifest entries and may
-    appear in manifests from older projects, imported projects, dependencies, and libraries. For
-    more information see,
-    <a href="{@docRoot}tools/studio/eclipse-transition-guide.html#manifest-settings">Manifest
-    Settings</a>.</p></li>
-
-  <li><strong>Dependencies</strong>
-    <p>Library dependencies are handled differently in Android Studio, using Gradle dependency
-    declarations and Maven dependencies for well-known local source and binary libraries with
-    Maven coordinates.  For more information see,
-    <a href="{@docRoot}tools/studio/eclipse-transition-guide.html#dependencies">Dependencies</a></p>
-    </li>
-
-  <li><strong>Test code</strong>
-    <p>With Eclipse ADT, test code is written in separate projects and integrated through the
-    <code>&lt;instrumentation&gt;</code> element in your manifest file. Android Studio provides a
-    <code>AndroidTest</code> folder within your project so you can easily add and maintain your test
-    code within the same project view. JUnit tests can also be configured to run locally to reduce
-    testing cycles.</p></li>
-
-  <li><strong>Gradle-based build system</strong>
-    <p>In place of XML-based Ant build files, Android Studio supports Gradle build files, which
-    use the Gradle Domain Specific Language (DSL) for ease of extensibility and customization.
-    The Android Studio build system also supports
-    <a href="{@docRoot}tools/building/configuring-gradle.html#workBuildVariants"> build variants</a>,
-    which are combinations of <code>productFlavor</code> and <code>buildTypes</code>, to customize
-    your build outputs.</p></li>
-
-  <li><strong>User interface</strong>
-    <p>Android Studio provides an intuitive interface and menu options based on the
-    <a class="external-link" href="https://www.jetbrains.com/idea/" target="_blank">IntelliJ IDEA</a>
-    IDE. To become familiar with the IDE basics, such as navigation, code completion, and keyboard
-    shortcuts, see
-    <a class="external-link" href="https://www.jetbrains.com/idea/help/intellij-idea-quick-start-guide.html"
-    target="_blank">IntelliJ IDEA Quick Start Guide</a>.</p></li>
-
-  <li><strong>Developer tools versioning</strong>
-    <p>Android Studio updates independently of the Gradle-based build system so different build
-    settings can be applied across different versions of command line, Android Studio, and
-    continuous integration builds. For more information, see
-    <a href="{@docRoot}tools/building/configuring-gradle.html">Configuring Gradle Builds</a>.</p>
-    </li>
-</ul>
-
-
-
-
-<h2 id="prerequisites">Migration Prerequisites</h2>
-<p>Before migrating your Eclipse ADT app to Android Studio, review the following steps to make
-sure your project is ready for conversion, and verify you have the tool configuration you need in
-Android Studio:</p>
-
-<ul>
- <li>In Eclipse ADT:
-   <ul>
-     <li>Make sure the Eclipse ADT root directory contains the <code>AndroidManifest.xml</code>
-       file. Also, the root directory must contain either the <code>.project</code> and
-       <code>.classpath</code> files from Eclipse or the <code>res/</code> and <code>src/</code>
-       directories.</li>
-     <li>Build your project to ensure your latest workspace and project updates are saved and
-       included in the import.</li>
-     <li>Comment out any references to Eclipse ADT workspace library files in the
-       <code>project.properties</code> or <code>.classpath</code> files for import. You can
-       add these references in the <code>build.gradle</code> file after the import. For more
-       information, see
-       <a href="{@docRoot}tools/building/configuring-gradle.html">Configuring Gradle Builds</a>.</li>
-     <li>It may be useful to record your workspace directory, path variables, and any actual path
-       maps that could be used to specify any unresolved relative paths, path variables, and
-       linked resource references. Android Studio allows you to manually specify any unresolved
-       paths during the import process.</li>
-   </ul>
- </li>
- <li>In Android Studio:
-   <ul>
-    <li>Make a note of any third-party Eclipse ADT plugins in use and check for equivalent features
-      in Android Studio or search for a compatible plugin in the
-      <a href="https://plugins.jetbrains.com/?androidstudio" class="external-link">IntelliJ Android
-      Studio Plugins</a> repository. Use the <strong>File &gt; Settings &gt; Plugins</strong> menu
-      option to manage plugins in Android Studio. Android Studio does not migrate any third-party
-      Eclipse ADT plugins.</li>
-    <li>If you plan to run Android Studio behind a firewall, be sure to set the proxy settings for
-      Android Studio and the SDK Manager. Android Studio requires an internet connection for
-      Setup Wizard synchronization, 3rd-party library access, access to remote repositories,
-      <a href="http://www.gradle.org" class="external-link">Gradle</a>
-      initialization and synchronization, and Android Studio version updates. For more information,
-      see <a href="{@docRoot}tools/studio/index.html#proxy">Proxy Settings</a>.</li>
-    <li>Use the <strong>File &gt; Settings &gt; System Settings</strong> menu option to verify the
-      current version and, if necessary, update Android Studio to the latest version from the
-      stable channel. To install Android Studio, please visit the
-      <a href="{@docRoot}sdk/index.html">Android Studio download page</a>.</li>
-    </ul>
-  </li>
- </ul>
-
-
-
-<h2 id="migrate">Importing Projects to Android Studio</h2>
-<p>Android Studio provides a function for importing Eclipse ADT projects, which creates a new
-Android Studio project and app modules based on your current
-Eclipse ADT workspace and projects. No changes are made to your Eclipse project files. The Eclipse
-ADT workspace becomes a new Android Studio project, and each Eclipse ADT project within the workspace
-becomes a new Android Studio module. Each instance of Android Studio contains a project with one or
-more app modules.</p>
-
-<p>After selecting an Eclipse ADT project to import, Android Studio creates the Android
-Studio project structure and app modules, generates the new Gradle-based build files and settings,
-and configures the required dependencies. The import options also allow you to enter your workspace
-directory and any actual path maps to handle any unresolved relative paths, path variables, and
-linked resource references.</p>
-
-<p>Depending on the structure of your Eclipse ADT development project, you should select specific
-files for importing:</p>
-<ul>
-<li>For workspaces with multiple projects, select the project folder for each Eclipse ADT
-  project individually to import the projects into the same Android Studio project. Android
-  Studio combines the Eclipse ADT projects into a single Android Studio project with different app
-  modules for each imported project.</li>
-
-<li>For Eclipse ADT projects with separate test projects, select the test project folder for
-  import. Android Studio imports the test project and then follows the dependency chain to import
-  the source project and any project dependencies.</li>
-
- <li>If Eclipse ADT projects share dependencies within the same workspace, import each
-   project individually into Android Studio. Android Studio maintains the shared dependencies
-   across the newly created modules as part of the import process.</li>
-</ul>
-
-<p>To import a project to Android Studio:</p>
-
-<ol>
- <li>Start Android Studio and close any open Android Studio projects.</li>
- <li>From the Android Studio menu select <strong>File &gt; New &gt; Import Project</strong>.
-  <p>Alternatively, from the <em>Welcome</em> screen, select <strong>Import project
-  (Eclipse ADT, Gradle, etc.)</strong>.</p></li>
- <li>Select the Eclipse ADT project folder with the <code>AndroidManifest.xml</code> file
-   and click <strong>Ok</strong>.
-   <p> <img src="{@docRoot}images/tools/studio-select-project-forimport.png" alt="" /></p>
- </li>
- <li>Select the destination folder and click <strong>Next</strong>.
-   <p> <img src="{@docRoot}images/tools/studio-import-destination-dir.png" alt="" /></p></li>
- <li>Select the import options and click <strong>Finish</strong>.
-   <p>The import process prompts to migrate any library and project dependencies to Android Studio,
-   and add the dependency declarations to the <code>build.gradle</code> file. The import process
-   also replaces any well-known source libraries, binary libraries, and JAR files that have known
-   Maven coordinates with Maven dependencies, so you no longer need to maintain these dependencies
-   manually. The import options also allow you to enter your workspace directory and any actual
-   path maps to handle any unresolved relative paths, path variables, and linked resource
-   references.</p>
-   <p> <img src="{@docRoot}images/tools/studio-import-options.png" alt="" /></p></li>
-
- <li>Android Studio imports the app and displays the project import summary. Review the summary
-   for details about the project restructuring and the import process.
-    <p> <img src="{@docRoot}images/tools/studio-import-summary.png"/></p>
- </li>
-</ol>
-
-<p>After importing the project from Eclipse ADT to the new Android Studio project and module
-structure, each app module folder in Android Studio contains the complete source set for that
-module, including the {@code src/main} and {@code src/androidTest} directories, resources, build
-file, and Android manifest. Before starting app development, you should resolve any issues shown in
-the project import summary to make sure the project re-structuring and import process completed
-properly.</p>
-
-
-
-<h3 id="post-migration">Validating imported projects</h3>
-<p>After completing the import process, use the Android Studio <strong>Build</strong> and
-<strong>Run</strong> menu options to build your project and verify the output. If your project
-is not building properly, check the following settings:</p>
-
-<ul>
-<ul>
-  <li>Use the <strong>Android SDK</strong> button in Android Studio to launch the <a href=
-  "{@docRoot}tools/help/sdk-manager.html">SDK Manager</a> and verify the installed versions of SDK
-  tools, build tools, and platform match the settings for your Eclipse ADT project. Android Studio
-  inherits the SDK Manager and JDK settings from your imported Eclipse project.
-  </li>
-  <li>Use the <strong>File &gt; Project Structure</strong> menu option to verify additional
-    Android Studio settings:
-   <ul>
-     <li>Under <em>SDK Location</em> verify Android Studio has access to the correct SDK and
-       JDK locations and versions. </li>
-     <li>Under <em>Project</em> verify the Gradle version, Android Plugin version, and related
-       repositories.</li>
-     <li>Under <em>Modules</em> verify the app and module settings, such as signing configuration
-       and library dependencies. </li>
-   </ul>
- </li>
- <li>If your project depends on another project, make sure that dependency is defined properly in
-  the <code>build.gradle</code> file in the app module folder.</li>
-</ul>
-
-
-<p>If there still are unexpected issues when building and running your project in Android
-Studio after you have checked these settings, consider modifying the Eclipse ADT project and
-re-starting the import process. Importing an Eclipse ADT project to Android Studio creates a new
-Android Studio project and does not impact the existing Eclipse ADT project. </p>
-
-
-
-<p>To get started using Android Studio, review the
-<a href="{@docRoot}tools/studio/index.html">Android Studio</a> features and
-<a href="http://www.gradle.org">Gradle</a>-based build system to become familiar with the new
-project and module structure, flexible build settings, and other advanced Android development
-capabilities. For a comparison of Eclipse ADT and Android Studio features and usage, see
-<a href="{@docRoot}tools/studio/eclipse-transition-guide.html">Transitioning to Android Studio from
-Eclipse</a>. For specific Android Studio how-to documentation, see the pages in the
-<a href="{@docRoot}tools/workflow/index.html">Workflow</a> section.
-</p>
diff --git a/docs/html/sdk/installing/studio-androidview.jd b/docs/html/sdk/installing/studio-androidview.jd
deleted file mode 100644
index 09aeaba..0000000
--- a/docs/html/sdk/installing/studio-androidview.jd
+++ /dev/null
@@ -1,55 +0,0 @@
-page.title=Using the Android Project View
-
-@jd:body
-
-
-<p>The Android project view in Android Studio shows a flattened version of your project's structure
-that provides quick access to the key source files of Android projects and helps you work with
-the new <a href="{@docRoot}sdk/installing/studio-build.html">Gradle-based build system</a>. The
-Android project view:</p>
-
-<ul>
-<li>Groups the build files for all modules at the top level of the project hierarchy.</li>
-<li>Shows the most important source directories at the top level of the module hierarchy.</li>
-<li>Groups all the manifest files for each module.</li>
-<li>Shows resource files from all Gradle source sets.</li>
-<li>Groups resource files for different locales, orientations, and screen types in a single group
-per resource type.</li>
-</ul>
-
-<div style="float:right;margin-left:30px;width:240px">
-<img src="{@docRoot}images/tools/projectview01.png" alt="" width="220" height="264"/>
-<p class="img-caption"><strong>Figure 1:</strong> Show the Android project view.</p>
-</div>
-
-
-<h2 id="enable-view">Enable the Android Project View</h2>
-
-<p>The Android project view is not yet enabled by default. To show the Android project view,
-click <strong>Project</strong> and select <strong>Android</strong>, as shown in Figure 1.</p>
-
-
-<h2 id="project-view">Use the Android Project View</h2>
-
-<p>The Android project view shows all the build files at the top level of the project hierarchy
-under <strong>Gradle Scripts</strong>. Each project module appears as a folder at the top
-level of the project hierarchy and contains these three elements at the top level:</p>
-
-<ul>
-<li><code>java/</code> - Source files for the module.</li>
-<li><code>manifests/</code> - Manifest files for the module.</li>
-<li><code>res/</code> - Resource files for the module.</li>
-</ul>
-
-<p>Figure 2 shows how the Android project view groups all the instances of the
-<code>ic_launcher.png</code> resource for different screen densities under the same element.</p>
-
-<p class="note"><strong>Note:</strong> The Android project view shows a hierarchy that helps you
-work with Android projects by providing a flattened structure that highlights the most commonly
-used files while developing Android applications. However, the project structure on disk differs
-from this representation.</p>
-
-<img src="{@docRoot}images/tools/projectview03.png" alt=""
-     style="margin-top:10px" width="650" height="508"/>
-<p class="img-caption"><strong>Figure 2:</strong> The traditional project view (left) and the
-Android project view (right).</p>
\ No newline at end of file
diff --git a/docs/html/sdk/installing/studio-build.jd b/docs/html/sdk/installing/studio-build.jd
deleted file mode 100755
index 6464b28..0000000
--- a/docs/html/sdk/installing/studio-build.jd
+++ /dev/null
@@ -1,104 +0,0 @@
-page.title=Build System Overview
-
-@jd:body
-
-<div id="qv-wrapper">
-<div id="qv">
-<h2>In this document</h2>
-<ol>
-     <li><a href="#detailed-build">A Detailed Look at the Build Process</a> </li>
-</ol>
-<h2>See also</h2>
-<ul>
-   <li><a href="{@docRoot}sdk/installing/studio.html">
-   Getting Started with Android Studio</a></li>
-   <li><a href="{@docRoot}tools/studio/index.html">Android Studio Basics</a></li>
-</div>
-</div>
-
-<a class="notice-developers-video" href="https://www.youtube.com/watch?v=LCJAgPkpmR0#t=504">
-<div>
-    <h3>Video</h3>
-    <p>The New Android SDK Build System</p>
-</div>
-</a>
-
-<p>The Android build system is the toolkit you use to build, test, run and package
-your apps. The build system can run as an integrated tool from the Android Studio menu and
-independently from the command line. You can use the features of the build system to:</p>
-
-<ul>
-    <li>Customize, configure, and extend the build process.</li>
-    <li>Create multiple APKs for your app with different features using the same project and
-    modules.</li>
-    <li>Reuse code and resources across source sets.</li>
-</ul>
-
-<p>The flexibility of the Android build system enables you to achieve all of this without
-modifying your app's core source files. To build an Android Studio project, see
-<a href="{@docRoot}tools/building/building-studio.html">Building and Running from Android Studio</a>.
-To configure custom build settings in an Android Studio project, see
-<a href="{@docRoot}tools/building/configuring-gradle.html">Configuring Gradle Builds</a>.</p>
-
-
-<h2 id="detailed-build">A Detailed Look at the Build Process</h2>
-
-<p>The build process involves many tools and processes that generate intermediate files on the
-way to producing an <code>.apk</code>. If you are developing in Android Studio, the complete build
-process is done every time you run the Gradle build task for your project or modules. The build
-process is very flexible so it's useful, however, to understand what is happening under the hood
-since much of the build process is configurable and extensible. The following diagram depicts the
-different tools and processes that are involved in a build:</p>
-
-  <img src="{@docRoot}images/build.png" />
-
-<p>The general process for a typical build is outlined below. The build system merges all the
-resources from the configured product flavors, build types, and dependencies. If different
-folders contain resources with the same name or setting, the following override priority order is:
-dependencies override build types, which override product flavors, which override the main source
-directory.</p>
-
-  <ul>
-
-    <li>The Android Asset Packaging Tool (aapt) takes your application resource files, such as the
-    <code>AndroidManifest.xml</code> file and the XML files for your Activities, and compiles them.
-    An <code>R.java</code> is also produced so you can reference your resources from your Java code.</li>
-
-    <li>The aidl tool converts any <code>.aidl</code> interfaces that you have into Java interfaces.</li>
-
-    <li>All of your Java code, including the <code>R.java</code> and <code>.aidl</code> files, are
-    compiled by the Java compiler and .class files are output.</li>
-
-    <li>The dex tool converts the .class files to Dalvik byte code. Any 3rd party libraries and
-    .class files that you have included in your module build are also converted into <code>.dex</code>
-    files so that they can be packaged into the final <code>.apk</code> file.</li>
-
-    <li>All non-compiled resources (such as images), compiled resources, and the .dex files are
-    sent to the apkbuilder tool to be packaged into an <code>.apk</code> file.</li>
-
-    <li>Once the <code>.apk</code> is built, it must be signed with either a debug or release key
-    before it can be installed to a device.</li>
-
-    <li>Finally, if the application is being signed in release mode, you must align the
-    <code>.apk</code> with the zipalign tool. Aligning the final <code>.apk</code> decreases memory
-    usage when the application is -running on a device.</li>
-  </ul>
-
-<p class="note"><b>Note:</b> Apps are limited to a 64K method reference limit. If your app reaches
-this limit, the build process outputs the following error message:
-
-<pre>Unable to execute dex: method ID not in [0, 0xffff]: 65536.</pre>
-
-To avoid this error, see
-<a href="{@docRoot}tools/building/multidex.html">Building Apps with Over 64K Methods</a>.
-</p>
-
-
-<h3>Build output</h3>
-
-<p>The build generates an APK for each build variant in the <code>app/build</code> folder:
-the <code>app/build/outputs/apk/</code> directory contains packages named
-<code>app-&lt;flavor>-&lt;buildtype>.apk</code>; for example, <code>app-full-release.apk</code> and
-<code>app-demo-debug.apk</code>.</p>
-
-
diff --git a/docs/html/sdk/installing/studio-layout.jd b/docs/html/sdk/installing/studio-layout.jd
deleted file mode 100644
index 60cbcb3..0000000
--- a/docs/html/sdk/installing/studio-layout.jd
+++ /dev/null
@@ -1,157 +0,0 @@
-page.title=Using the Layout Editor
-
-@jd:body
-
-<div id="qv-wrapper">
-<div id="qv">
-<h2>See also</h2>
-<ul>
-<li><a href="{@docRoot}sdk/installing/studio.html">
-Getting Started with Android Studio</a></li>
-<li><a href="{@docRoot}sdk/installing/studio-tips.html">
-Android Studio Tips and Tricks</a></li>
-<li><a href="{@docRoot}sdk/installing/migrate.html">
-Migrating from Eclipse</a></li>
-</div>
-</div>
-
-<a class="notice-developers-video"
-href="https://developers.google.com/events/io/sessions/324603352">
-<div>
-    <h3>Video</h3>
-    <p>What's New in Android Developer Tools</p>
-</div>
-</a>
-
-<p>Android Studio offers an advanced layout editor that allows you to drag-and-drop widgets
-into your layout and preview your layout while editing the XML.</p>
-
-<p>Within the layout editor, you can switch between the <strong>Text</strong> view, where
-you edit the XML file as text, and the <strong>Design</strong> view. Just click the
-appropriate tab at the bottom of the window to display the desired editor.</p>
-
-<h2>Editing in the Text View</h2>
-
-<p>You can use the <strong>Text</strong> view to edit your layout file. This section describes
-some of the features that are available in the <strong>Text</strong> view.</p>
-
-<h3>Preview</h3>
-
-<p>While editing in the <strong>Text</strong> view, you can preview the layout on devices
-by opening the <strong>Preview</strong> pane available on the right side of the window.
-Within the <strong>Preview</strong> pane, you can modify the preview by changing various
-options at the top of the pane, including the preview device, layout theme, platform
-version and more. To see a preview of how your app would look with a particular device
-skin, click the preview icon
-<img src="{@docRoot}images/tools/as-preview-icon.png" style="vertical-align:bottom;margin:0;height:19px" />
-and choose the desired device, such as Nexus 4:</p>
-
-<img src="{@docRoot}images/tools/as-preview-chrome.png" alt="" />
-<p class="img-caption"><strong>Figure 1.</strong> Previewing your app.</p>
-
-<p>To preview the layout on multiple devices simultaneously, select <strong>Preview All
-Screen Sizes</strong> from the device drop-down. </p>
-
-<p>When you click in the preview image, the layout editor highlights the corresponding
-section in the XML, and vice-versa.</p>
-
-<h3>Interactive error detection and recovery</h3>
-
-<p>As you edit the <strong>Text</strong> view of your layout XML file, Android Studio flags
-typos and offers assistance.</p>
-
-<p>For example, suppose you are adding a button, and you misspell it as &quot;Buttonn&quot;.
-Android Studio helps you to correct it by displaying an error such as the following,
-where you can click on &quot;Change to Button&quot; to fix the error in the XML file:</p>
-
-<img src="{@docRoot}images/tools/as-error.png" alt="" />
-
-<p class="img-caption"><strong>Figure 2.</strong> Flagging errors.</p>
-
-<p>Android Studio also prompts you to supply missing information. For example, suppose you
-start adding a fragment to your layout XML file. First of all, Android Studio displays
-auto-complete suggestions as you type. Once it becomes clear that you are adding a fragment,
-Android Studio displays an error panel with links that you can click to supply the missing
-attributes. Clicking &quot;Automatically add all missing attributes&quot; in this case
-does just that&mdash;it completes the fragment definition in your layout XML file:</p>
-
-<img src="{@docRoot}images/tools/as-frag-ex.png" alt="" />
-
-<p class="img-caption"><strong>Figure 3.</strong> Supplying missing information</p>
-
-<h3>Picking a theme</h3>
-
-<p>To pick a theme for your app, click the Theme icon
-<img src="{@docRoot}images/tools/as-theme-icon.png" style="vertical-align:bottom;margin:0;height:19px" />.
-</p>
-
-<p>This displays the <strong>Select Theme</strong> dialog, where you can search for a
-particular theme and/or select one from the list on the right hand side. The theme you
-choose will be reflected in the previewed image.</p>
-
-<img src="{@docRoot}images/tools/as-theme-db.png" alt="" />
-
-<p class="img-caption"><strong>Figure 4.</strong> Specifying a theme.</p>
-
-<h3>Localization</h3>
-
-<p>Android Studio provides built-in localization support. When you click the
-localization icon
-<img src="{@docRoot}images/tools/as-i18n-icon.png" style="vertical-align:bottom;margin:0;height:19px" />,
-you can select a particular locale, add and edit translations, preview the locales your
-app supports (all locales or just a single locale), and preview right-to-left layout for
-languages that are RTL.</p>
-
-<p>See <a href="{@docRoot}training/basics/supporting-devices/languages.html">Supporting
-Different Languages</a> for a description of how to support different locales in your app.</p>
-<p>For example, here is a preview of a &quot;Hello World&quot; app for the
-<img src="{@docRoot}images/tools/as-fr-icon.png" style="vertical-align:bottom;margin:0;height:19px" />
-locale:</p>
-
-<img src="{@docRoot}images/tools/as-fr-device.png" alt="" />
-<p class="img-caption"><strong>Figure 5.</strong> Previewing locales.</p>
-
-<h2>Editing in the Design View</h2>
-
-<p>You can switch to the graphical editor by clicking <strong>Design</strong> at the
-bottom of the window. While editing in the <strong>Design</strong> view, you can show and
-hide the widgets available to drag-and-drop by clicking <strong>Palette</strong> on the
-left side of the window. Clicking <strong>Designer</strong> on the right side of the
-window reveals a panel with a layout hierarchy and a list of properties for each view in
-the layout.</p>
-
-<p>When you drag a widget into the graphical layout for your app, the display changes to
-help you place the widget. What you see depends on the type of layout. For example, if
-you're dragging a widget into a {@link android.widget.FrameLayout}, it displays a grid to
-help you place the widget, as shown in figure 6:</p>
-
-<img src="{@docRoot}images/tools/as-grid-layout.png" alt="" />
-
-<p class="img-caption"><strong>Figure 6.</strong> Using the grid layout to place a widget.</p>
-
-<p>Within the graphical editor, you can rearrange your app's UI by dragging widgets to
-the desired location.</p>
-
-<h3>Multi-API Version Rendering</h3>
-
-<p>Android Studio supports multi-API version rendering. When you click the Android version icon <img src="{@docRoot}images/tools/as-api-level-preview.png" style="vertical-align:bottom;margin:0;height:19px" /> in the <b>Design</b> view,
-Android Studio allows you to preview your Android layouts across multiple Android API levels.
-</p>
-
-<p><img src="{@docRoot}images/tools/studio-api-version-rendering.png" /></p>
-    <p class="img-caption"><strong>Figure 7.</strong> Multi-API version rendering.</p>
-
-<h3>Taking a snapshot</h3>
-
-<p>When you run your app on a connected device, you can take a snapshot of it by clicking
-the camera icon
-<img src="{@docRoot}images/tools/as-camera-icon.png" style="vertical-align:bottom;margin:0;height:19px" />
-to the left of the logging
-panel (at the bottom of the window by default). This takes a snapshot of your running app
-(or whatever is currently displayed on your device) and displays it in a window. Check
-<strong>Frame Screenshot</strong> to show your screenshot within the device skin of your
-choice. You can also specify whether you want the image to have screen glare and/or a drop
-shadow. Once you have the desired effect, you can save the image.</p>
-
-<p>You can use the same process to create a snapshot of your app's preview. Just click the
-camera icon in the preview area and follow the steps for adding a device skin.</p>
diff --git a/docs/html/sdk/installing/studio-tips.jd b/docs/html/sdk/installing/studio-tips.jd
deleted file mode 100644
index 4cd6f8c..0000000
--- a/docs/html/sdk/installing/studio-tips.jd
+++ /dev/null
@@ -1,342 +0,0 @@
-page.title=Android Studio Tips and Tricks
-page.image=images/tools/studio-previewall.png
-page.metaDescription=Tips to help you get started with Android Studio's most common tasks and productivity enhancements.
-page.tags=studio,tips
-meta.tags="studio", "tools"
-@jd:body
-
-<div id="qv-wrapper">
-<div id="qv">
-
-    <h2>In this document</h2>
-    <ol>
-      <li><a href="#productivity-features">Productivity Shortcuts</a></li>
-      <li><a href="#intellij">Working with IntelliJ</a></li>
-      <li><a href="#key-commands">Key Commands</a></li>
-    </ol>
-
-  <h2>See also</h2>
-  <ol>
-    <li><a href="{@docRoot}sdk/index.html">Download Android Studio</a></li>
-    <li><a href="http://wiki.jetbrains.net/intellij/Android">IntelliJ IDEA Android Tutorials</a></li>
-    <li><a href="http://confluence.jetbrains.com/display/IntelliJIDEA/FAQ+on+Migrating+to+IntelliJ+IDEA">IntelliJ FAQ on migrating to IntelliJ IDEA</a></li>
-  </ol>
-
-</div>
-</div>
-
-<p>If you're unfamiliar with using Android Studio and the IntelliJ IDEA interface, this page
-provides some tips to help you get started with some of the most common tasks and productivity
-enhancements. </p>
-
-
-<h2 id="productivity-features">Productivity Shortcuts</h2>
-
-<p>Android Studio includes a number of features to help you be more productive in your coding.
-This section notes a few of the key features to help you work quickly and efficiently.
-</p>
-
-
-<h3>Smart Rendering</h3>
-<p>With smart rendering, Android Studio displays links for quick fixes to rendering errors.
-For example, if you add a button to the layout without specifying the <em>width</em> and
-<em>height</em> attributes, Android Studio displays the rendering message <em>Automatically
-add all missing attributes</em>. Clicking the message adds the missing attributes to the layout.</p>
-
-
-<h3> Bitmap rendering in the debugger</h3>
-<p>While debugging, you can now right-click on bitmap variables in your app and invoke
-<em>View Bitmap</em>. This fetches the associated data from the debugged process and renders
-the bitmap in the debugger. </p>
-<p><img src="{@docRoot}images/tools/studio-bitmap-rendering.png" style="width:350px"/></p>
-<p class="img-caption"><strong>Figure 1.</strong> Bitmap Rendering</p>
-
-
-<h3>Creating new files</h3>
-<p>You can quickly add new code and resource files by clicking the appropriate directory in the
-<strong>Project</strong> pane and pressing <code>ALT + INSERT</code> on Windows and Linux or
-<code>COMMAND + N</code> on Mac. Based on the type of directory selected, Android Studio
-offers to create the appropriate file type.</p>
-
-<p>For example, if you select a layout directory, press <code>ALT + INSERT</code> on Windows,
-and select <strong>Layout resource file</strong>, a dialog opens so you can name the file
-(you can exclude the {@code .xml} suffix) and choose a root view element. The editor then
-switches to the layout design editor so you can begin designing your layout.</p>
-
-
-<h3>Output window message filtering</h3>
-<p>When checking build results, you can filter messages by <em>message type</em> to quickly
-locate messages of interest.</p>
-<img src="{@docRoot}images/tools/studio-outputwindowmsgfiltering.png" style="width:200px"style="width:200px" />
-<p class="img-caption"><strong>Figure 2.</strong> Filter Build Messages</p>
-
-
-<h3>Hierarchical parent setting</h3>
-<p>The activity parent can now be set in the Activity Wizard when creating a new
-activity. Setting a <em>hierarchal parent</em> sets the {@code Up} button to automatically
-appear in the app's Action bar when viewing a child activity, so the {@code Up}
-button no longer needs to be manually specified in the <em>menu.xml</em> file.</p>
-
-
-<h3>Creating layouts</h3>
-<p>Android Studio offers an advanced layout editor that allows you to drag-and-drop widgets
-into your layout and preview your layout while editing the XML.</p>
-
-<p>While editing in the <strong>Text</strong> view, you can preview the layout on devices by
-opening the <strong>Preview</strong> pane available on the right side of the window. Within the
-Preview pane, you can modify the preview by changing various options at the top of the pane,
-including the preview device, layout theme, platform version and more. To preview the layout on
-multiple devices simultaneously, select <strong>Preview All Screen Sizes</strong> from the
-device drop-down.</p>
-<p><img src="{@docRoot}images/tools/studio-previewall.png" style="width:350px"/></p>
-<p class="img-caption"><strong>Figure 3.</strong> Preview All Screens</p>
-
-<p>You can switch to the graphical editor by clicking <strong>Design</strong> at the
-bottom of the window. While editing in the Design view, you can show and hide the
-widgets available to drag-and-drop by clicking <strong>Palette</strong> on the left side of the
-window. Clicking <strong>Designer</strong> on the right side of the window reveals a panel
-with a layout hierarchy and a list of properties for each view in the layout.</p>
-
-
-<h3>Annotations</h3>
-<p>Android Studio provides coding assistance for using annotations from the
-{@link android.support.annotation Support-Annotations} library, part of the
-Support Repository.
-
-Adding a dependency for this library enables you to decorate your code with annotations to help
-catch bugs, such as null pointer exceptions and resource type conflicts. You can also create
-enumerated annotations to, for example, check that a passed parameter value matches a value from
-a defined set of constants. For more information, see
-<a href="{@docRoot}tools/debugging/annotations.html#annotations">Improving Code Inspection with
-Annotations</a>.
-</p>
-
-
-<h3>Java class decompiling</h3>
-<p>Android Studio allows you to look at what’s inside Java libraries when you don’t have access
-to the source code. </p>
-
-<p>The decompiler is built into Android Studio for easy access. To use this feature, right-click
-a class, method, or field from a library for which you do not have source file access and select
-<strong>decompile</strong>.</p> The decompiled source code appears. </p>
-
-<p>To adjust the Java decompiler settings, select
-<strong>File > Settings > Other Settings > Java Decompiler</strong>. </p>
-
-
-<h3>Debugging and performance enhancements</h3>
-<p>Android Studio offers debugging and performance enhancements such as:</p>
-<ul>
-  <li>Custom keymaps. To modify the current keymap, choose
-   <strong>File &gt; Settings &gt; Keymap</strong>.  </li>
-  <li>Support for high density (Retina) displays on Windows and Linux.  </li>
-  <li>Scratch files for quick prototyping without creating any project files.
-   <p>Choose <strong>Tools &gt; New Scratch File</strong> to open a scratch file to quickly
-   build and run code prototypes. Together with Android Studio coding assistance, scratch
-   files allow you to quickly run and debug code updates with the support of all file operations.
-   By embedding code created with scripting languages, you can run your code from within the
-   scratch file.</p>
-  </li>
-</ul>
-
-
-<h3 id="live-template">Live templates</h3>
-<p>Live templates allow you to enter code snippets for fast insertion and completion of small chunks
-of code. To insert a live template, type the template abbreviations and press the
-Tab key. Android Studio inserts the code snippet associated with the template into
-your code. </p>
-
-<p>For example, entering the <code>newInstance</code> abbreviation followed by the
-Tab key inserts the code for a new fragment instance with argument placeholders. </p>
-
-<pre>
-public static $fragment$ newInstance($args$) {
-    $nullChecks$
-    Bundle args = new Bundle();
-    $addArgs$
-    $fragment$ fragment = new $fragment$();
-    fragment.setArguments(args);
-    return fragment;
-}
-</pre>
-
-<p>Similarly, the <code>fbc</code> abbreviation inserts a <code>findViewById</code> call along
-with cast and resource id syntax. </p>
-
-<pre>
-() findViewById(R.id.); 
-</pre>
-
-<p>Use the <strong>File &gt; Settings &gt; Editor &gt; Live Templates</strong> menu option to
-display the full list of supported live templates and customize the inserted code.  </p>
-
-
-
-<h2 id="intellij">Working with IntelliJ-based Coding Practices</h3>
-
-<p>This section list just a few of the code editing
-practices you should consider using when creating Android Studio apps. </p>
-
-<p>For complete user documentation for the IntelliJ IDEA interface (upon which Android Studio
-is based), refer to the
-<a href="http://www.jetbrains.com/idea/documentation/index.jsp">IntelliJ IDEA documentation</a>.</p>
-
-
-<h3><em>Alt + Enter</em> key binding</h3>
-<p>For quick fixes to coding errors, the IntelliJ powered IDE implements the <em>Alt + Enter</em>
-key binding to fix errors (missing imports, variable assignments, missing references, etc) when
-possible, and if not, suggest the most probable solution. </p>
-
-
-<h3><em>Ctrl + D</em> key binding</h3>
-<p>The <em>Ctrl + D</em> key binding is great for quickly duplicating code lines or fragments.
-Simply select the desired line or fragment and enter this key binding. </p>
-
-
-<h3>Navigate menu</h3>
-<p>In case you're not familiar with an API class, file or symbol, the <em>Navigate</em> menu lets
-you jump directly to the class of a method or field name without having to search through
-individual classes. </p>
-
-
-<h3>Inspection scopes</h3>
-<p>Scopes set the color of code segments for easy code identification and location. For example,
-you can set a scope to identify all code related to a specific action bar.   </p>
-
-
-<h3>Injecting languages</h3>
-<p>With language injection, the Android Studio IDE allows you to work with islands of different
-languages embedded in the source code. This extends the syntax, error highlighting and coding
-assistance to the embedded language. This can be especially useful for checking regular expression
-values inline and validating XML.</p>
-
-
-<h3>Code folding</h3>
-<p>This allows you to selectively hide and display sections of the code for readability. For
-example, resource expressions or code for a nested class can be folded or hidden in to one line
-to make the outer class structure easier to read. The inner class can be later expanded for
-updates. </p>
-
-
-<h3>Image and color preview</h3>
-<p>When referencing images and icons in your code, a preview of the image or icon appears
-(in actual size at different densities) in the code margin to help you verify the image or icon
-reference. Pressing {@code F1} with the preview image or icon selected displays resource asset
-details, such as the <em>dp</em> settings.   </p>
-
-
-<h3>Quick F1 documentation</h3>
-<p>You can now inspect theme attributes using <strong>View > Quick Documentation</strong>
-(<strong>F1</strong>),
-see the theme inheritance hierarchy, and resolve values for the various attributes.</p>
-
-<p>If you invoke <strong> View > Quick Documentation</strong> (usually bound to F1) on the theme
-attribute <em>?android:textAppearanceLarge</em>, you will see the theme inheritance hierarchy and
-resolved values for the various attributes that are pulled in.</p>
-
-
-
-<h3 id="key-commands">Keyboard Commands</h3>
-
-<p>The following tables list keyboard shortcuts for common operations.</p>
-
-<p class="note"><strong>Note:</strong> This section lists Android Studio keyboard shortcuts
-for the default keymap. To change the default keymap on Windows and Linux, go to
-<strong>File</strong> &gt; <strong>Settings</strong> &gt; <strong>Keymap</strong>. If you're
-using Mac OS X, update your keymap to use the Mac OS X 10.5+ version keymaps under
-<strong>Android Studio > Preferences > Keymap</strong>.</p>
-
-
-<p class="table-caption"><strong>Table 1.</strong> Programming key commands</p>
-<table>
-<tr><th>Action</th><th>Android Studio Key Command</th></tr>
-
-<tr>
-  <td>Command look-up (autocomplete command name)</td>
-  <td>CTRL + SHIFT + A</td>
-</tr>
-
-<tr>
-  <td>Project quick fix</td>
-  <td>ALT + ENTER</td>
-</tr>
-
-<tr>
-  <td>Reformat code</td>
-  <td>CTRL + ALT + L (Win)<br>
-      OPTION + CMD + L (Mac)</td>
-</tr>
-
-<tr>
-  <td>Show docs for selected API</td>
-  <td>CTRL + Q (Win)<br>
-      F1 (Mac)</td>
-</tr>
-
-<tr>
-  <td>Show parameters for selected method</td>
-  <td>CTRL + P</td>
-</tr>
-
-<tr>
-  <td>Generate method</td>
-  <td>ALT + Insert (Win)<br>
-      CMD + N (Mac)</td>
-</tr>
-
-<tr>
-  <td>Jump to source</td>
-  <td>F4 (Win)<br>
-      CMD + down-arrow (Mac)</td>
-</tr>
-
-<tr>
-  <td>Delete line</td>
-  <td>CTRL + Y (Win)<br>
-      CMD + Backspace (Mac)</td>
-</tr>
-
-<tr>
-  <td>Search by symbol name</td>
-  <td>CTRL + ALT + SHIFT + N (Win)<br>
-      OPTION + CMD + O (Mac)</td>
-</tr>
-
-</table>
-
-
-
-
-<p class="table-caption"><strong>Table 2.</strong> Project and editor key commands</p>
-<table>
-<tr><th>Action</th><th>Android Studio Key Command</th></tr>
-
-<tr>
-  <td>Build</td>
-  <td>CTRL + F9 (Win)<br>
-      CMD + F9 (Mac)</td>
-</tr>
-
-<tr>
-  <td>Build and run</td>
-  <td>SHIFT + F10 (Win)<br>
-      CTRL + R (Mac)</td>
-</tr>
-
-<tr>
-  <td>Toggle project visibility</td>
-  <td>ALT + 1 (Win)<br>
-      CMD + 1 (Mac)</td>
-</tr>
-
-<tr>
-  <td>Navigate open tabs</td>
-  <td>ALT + left-arrow; ALT + right-arrow (Win)<br>
-      CTRL + left-arrow; CTRL + right-arrow (Mac)</td>
-</tr>
-
-</table>
-
-<p>For a complete keymap reference guide, see the
-<a href="http://www.jetbrains.com/idea/documentation/index.jsp">IntelliJ IDEA</a>
-documentation.</p>
diff --git a/docs/html/sdk/sdk_vars.cs b/docs/html/sdk/sdk_vars.cs
deleted file mode 100644
index 6e58ddd..0000000
--- a/docs/html/sdk/sdk_vars.cs
+++ /dev/null
@@ -1,64 +0,0 @@
-<?cs
-set:studio.version='2.1.0.9' ?><?cs
-set:studio.release.date='April 26, 2016' ?><?cs
-
-
-set:studio.linux_bundle_download='android-studio-ide-143.2790544-linux.zip' ?><?cs
-set:studio.linux_bundle_bytes='298122012' ?><?cs
-set:studio.linux_bundle_checksum='45dad9b76ad0506c354483aaa67ea0e2468d03a5' ?><?cs
-
-set:studio.mac_bundle_download='android-studio-ide-143.2790544-mac.dmg' ?><?cs
-set:studio.mac_bundle_bytes='298589307' ?><?cs
-set:studio.mac_bundle_checksum='d667d93ae2e4e0f3fc1b95743329a46222dbf11d' ?><?cs
-
-set:studio.win_bundle_download='android-studio-ide-143.2790544-windows.zip' ?><?cs
-set:studio.win_bundle_bytes='300627540' ?><?cs
-set:studio.win_bundle_checksum='9689ba415e5f09e2dcf5263ea302e7b1d98a8fc6' ?><?cs
-
-set:studio.win_bundle_exe_download='android-studio-bundle-143.2790544-windows.exe' ?><?cs
-set:studio.win_bundle_exe_bytes='1238568304' ?><?cs
-set:studio.win_bundle_exe_checksum='c6abe7980dbb7d1d9887f7341a2942c9e506f891' ?><?cs
-
-set:studio.win_notools_exe_download='android-studio-ide-143.2790544-windows.exe' ?><?cs
-set:studio.win_notools_exe_bytes='283804056' ?><?cs
-set:studio.win_notools_exe_checksum='a2065ba737ddcfb96f4921fee6a038278f46d2a7' ?><?cs
-
-
-
-set:sdk.linux_download='android-sdk_r24.4.1-linux.tgz' ?><?cs
-set:sdk.linux_bytes='326412652' ?><?cs
-set:sdk.linux_checksum='725bb360f0f7d04eaccff5a2d57abdd49061326d' ?><?cs
-
-set:sdk.mac_download='android-sdk_r24.4.1-macosx.zip' ?><?cs
-set:sdk.mac_bytes='102781947' ?><?cs
-set:sdk.mac_checksum='85a9cccb0b1f9e6f1f616335c5f07107553840cd' ?><?cs
-
-set:sdk.win_download='android-sdk_r24.4.1-windows.zip' ?><?cs
-set:sdk.win_bytes='199701062' ?><?cs
-set:sdk.win_checksum='66b6a6433053c152b22bf8cab19c0f3fef4eba49' ?><?cs
-set:sdk.win_installer='installer_r24.4.1-windows.exe' ?><?cs
-set:sdk.win_installer_bytes='151659917' ?><?cs
-set:sdk.win_installer_checksum='f9b59d72413649d31e633207e31f456443e7ea0b' ?><?cs
-
-
-
-set:ndk.mac64_download='android-ndk-r11c-darwin-x86_64.zip' ?><?cs
-set:ndk.mac64_bytes='772428792' ?><?cs
-set:ndk.mac64_checksum='4ce8e7ed8dfe08c5fe58aedf7f46be2a97564696' ?><?cs
-
-set:ndk.linux64_download='android-ndk-r11c-linux-x86_64.zip' ?><?cs
-set:ndk.linux64_bytes='794135138' ?><?cs
-set:ndk.linux64_checksum='de5ce9bddeee16fb6af2b9117e9566352aa7e279' ?><?cs
-
-set:ndk.win64_download='android-ndk-r11c-windows-x86_64.zip' ?><?cs
-set:ndk.win64_bytes='771407642' ?><?cs
-set:ndk.win64_checksum='3d89deb97b3191c7e5555f1313ad35059479f071' ?><?cs
-set:ndk.win32_download='android-ndk-r11c-windows-x86.zip' ?><?cs
-set:ndk.win32_bytes='728899082' ?><?cs
-set:ndk.win32_checksum='ff939bde6cd374eecbd2c3b2ad218697f9a5038c'
-?>
-<?cs
-def:size_in_mb(bytes)
-  ?><?cs set:mb = bytes / 1024 / 1024
-  ?><?cs var:mb ?><?cs
-/def ?>
diff --git a/docs/html/sdk/terms.jd b/docs/html/sdk/terms.jd
deleted file mode 100644
index 149c243..0000000
--- a/docs/html/sdk/terms.jd
+++ /dev/null
@@ -1,144 +0,0 @@
-page.title=Terms and Conditions
-hide_license_footer=true
-fullpage=1
-@jd:body
-
-<div class="wrap" style="width:940px;">
-
-<div class="sdk-terms fullsize" onfocus="this.blur()">
-<h1>Terms and Conditions</h1>
-
-This is the Android Software Development Kit License Agreement
-
-<h3>1. Introduction</h3>
-1.1 The Android Software Development Kit (referred to in the License Agreement as the "SDK" and specifically including the Android system files, packaged APIs, and Google APIs add-ons) 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 SDK.
-
-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 A "compatible implementation" means any Android device 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.
-
-
-<h3>2. Accepting this License Agreement</h3>
-2.1 In order to use the SDK, you must first agree to the License Agreement. You may not use the SDK if you do not accept the License Agreement.
-
-2.2 By clicking to accept, you hereby agree to the terms of the License Agreement.
-
-2.3 You may not use the SDK and may not accept the License Agreement if you are a person barred from receiving the SDK under the laws of the United States or other countries, including the country in which you are resident or from which you use the SDK.
-
-2.4 If you are agreeing to be bound by the License Agreement on behalf of your employer or other entity, 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 SDK on behalf of your employer or other entity.
-
-
-<h3>3. SDK License from Google</h3>
-3.1 Subject to the terms of the License Agreement, Google grants you a limited, worldwide, royalty-free, non-assignable, non-exclusive, and non-sublicensable license to use the SDK solely to develop applications for compatible implementations of Android.
-
-3.2 You may not use this SDK 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 SDK is not used for that purpose.
-
-3.3 You agree that Google or third parties own all legal right, title and interest in and to the SDK, including any Intellectual Property Rights that subsist in the SDK. "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 SDK 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 SDK or any part of the SDK; or (b) load any part of the SDK onto a mobile handset or any other hardware device except a personal computer, combine any part of the SDK with other software, or distribute any software or device incorporating a part of the SDK.
-
-3.5 Use, reproduction and distribution of components of the SDK licensed under an open source software license are governed solely by the terms of that open source software license and not the License Agreement.
-
-3.6 You agree that the form and nature of the SDK that Google provides may change without prior notice to you and that future versions of the SDK may be incompatible with applications developed on previous versions of the SDK. You agree that Google may stop (permanently or temporarily) providing the SDK (or any features within the SDK) 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 SDK.
-
-
-<h3>4. Use of the SDK by You</h3>
-4.1 Google agrees that it obtains no right, title or interest from you (or your licensors) under the License Agreement in or to any software applications that you develop using the SDK, including any intellectual property rights that subsist in those applications.
-
-4.2 You agree to use the SDK 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 SDK to develop applications for general public users, you will protect the privacy and legal rights of those users. If the 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 the user provides your application 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, the user has given you permission to do so.
-
-4.4 You agree that you will not engage in any activity with the SDK, 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 any third party including, but not limited to, Google or any mobile communications carrier.
-
-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.
-
-
-<h3>5. Your Developer Credentials</h3>
-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.
-
-
-<h3>6. Privacy and Information</h3>
-6.1 In order to continually innovate and improve the SDK, 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 SDK are being used and how they are being used. Before any of this information is collected, the SDK 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 SDK and is maintained in accordance with Google's Privacy Policy.
-
-
-<h3>7. Third Party Applications</h3>
-7.1 If you use the SDK 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. In that case, the License Agreement does not affect your legal relationship with these third parties.
-
-
-<h3>8. Using Android APIs</h3>
-8.1 Google Data 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.
-
-
-<h3>9. Terminating this License Agreement</h3>
-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 SDK and any relevant developer credentials.
-
-9.3 Google may at any time, terminate the License Agreement with you if:
-(A) you have breached any provision of the License Agreement; or
-(B) Google is required to do so by law; or
-(C) the partner with whom Google offered certain parts of SDK (such as APIs) to you has terminated its relationship with Google or ceased to offer certain parts of the SDK to you; or
-(D) Google decides to no longer provide the SDK or certain parts of the SDK to users in the country in which you are resident or from which you use the service, or the provision of the SDK or certain SDK services to you by Google is, in Google's sole discretion, no longer commercially viable.
-
-9.4 When the License Agreement comes to an end, all of the legal rights, obligations and liabilities that you and Google have benefited from, been subject to (or which have accrued over time whilst the License Agreement has been in force) or which are expressed to continue indefinitely, shall be unaffected by this cessation, and the provisions of paragraph 14.7 shall continue to apply to such rights, obligations and liabilities indefinitely.
-
-
-<h3>10. DISCLAIMER OF WARRANTIES</h3>
-10.1 YOU EXPRESSLY UNDERSTAND AND AGREE THAT YOUR USE OF THE SDK IS AT YOUR SOLE RISK AND THAT THE SDK IS PROVIDED "AS IS" AND "AS AVAILABLE" WITHOUT WARRANTY OF ANY KIND FROM GOOGLE.
-
-10.2 YOUR USE OF THE SDK AND ANY MATERIAL DOWNLOADED OR OTHERWISE OBTAINED THROUGH THE USE OF THE SDK 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.
-
-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.
-
-
-<h3>11. LIMITATION OF LIABILITY</h3>
-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.
-
-
-<h3>12. Indemnification</h3>
-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 SDK, (b) any application you develop on the SDK that infringes any copyright, trademark, trade secret, trade dress, patent or other intellectual property right of any person or defames any person or violates their rights of publicity or privacy, and (c) any non-compliance by you with the License Agreement.
-
-
-<h3>13. Changes to the License Agreement</h3>
-13.1 Google may make changes to the License Agreement as it distributes new versions of the SDK. When these changes are made, Google will make a new version of the License Agreement available on the website where the SDK is made available.
-
-
-<h3>14. General Legal Terms</h3>
-14.1 The License Agreement constitutes the whole legal agreement between you and Google and governs your use of the SDK (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 SDK.
-
-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 SDK 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 SDK. THESE LAWS INCLUDE RESTRICTIONS ON DESTINATIONS, END USERS AND END USE.
-
-14.6 The rights granted in the License Agreement may not be assigned or transferred by either you or Google without the prior written approval of the other party. Neither you nor Google shall be permitted to delegate their responsibilities or obligations under the License Agreement without the prior written approval of the other party.
-
-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.
-
-
-<em>November 20, 2015</em>
-</div>
-
-</div>
\ No newline at end of file
diff --git a/docs/html/sdk/win-usb.jd b/docs/html/sdk/win-usb.jd
deleted file mode 100644
index d4948eb..0000000
--- a/docs/html/sdk/win-usb.jd
+++ /dev/null
@@ -1,308 +0,0 @@
-page.title=Google USB Driver
-@jd:body
-
-
-
-<div style="position:relative;height:660px;">
-
-
-<div class="wrap" id="tos" style="position:absolute;display:none;width:inherit;">
-
-<div class="col-13" style="margin:0;">&nbsp;</div><!-- provides top margin for content -->
-
-
-<p class="sdk-terms-intro">Before downloading the Google USB Driver,
-you must agree to the following terms and conditions.</p>
-
-<div class="sdk-terms" onfocus="this.blur()">
-<h2 class="norule">Terms and Conditions</h2>
-This is the Android Software Development Kit License Agreement
-
-<h3>1. Introduction</h3>
-1.1 The Android Software Development Kit (referred to in the License Agreement as the "SDK" and specifically including the Android system files, packaged APIs, and Google APIs add-ons) 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 SDK.
-
-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 A "compatible implementation" means any Android device 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.
-
-
-<h3>2. Accepting this License Agreement</h3>
-2.1 In order to use the SDK, you must first agree to the License Agreement. You may not use the SDK if you do not accept the License Agreement.
-
-2.2 By clicking to accept, you hereby agree to the terms of the License Agreement.
-
-2.3 You may not use the SDK and may not accept the License Agreement if you are a person barred from receiving the SDK under the laws of the United States or other countries, including the country in which you are resident or from which you use the SDK.
-
-2.4 If you are agreeing to be bound by the License Agreement on behalf of your employer or other entity, 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 SDK on behalf of your employer or other entity.
-
-
-<h3>3. SDK License from Google</h3>
-3.1 Subject to the terms of the License Agreement, Google grants you a limited, worldwide, royalty-free, non-assignable, non-exclusive, and non-sublicensable license to use the SDK solely to develop applications for compatible implementations of Android.
-
-3.2 You may not use this SDK 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 SDK is not used for that purpose.
-
-3.3 You agree that Google or third parties own all legal right, title and interest in and to the SDK, including any Intellectual Property Rights that subsist in the SDK. "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 SDK 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 SDK or any part of the SDK; or (b) load any part of the SDK onto a mobile handset or any other hardware device except a personal computer, combine any part of the SDK with other software, or distribute any software or device incorporating a part of the SDK.
-
-3.5 Use, reproduction and distribution of components of the SDK licensed under an open source software license are governed solely by the terms of that open source software license and not the License Agreement.
-
-3.6 You agree that the form and nature of the SDK that Google provides may change without prior notice to you and that future versions of the SDK may be incompatible with applications developed on previous versions of the SDK. You agree that Google may stop (permanently or temporarily) providing the SDK (or any features within the SDK) 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 SDK.
-
-
-<h3>4. Use of the SDK by You</h3>
-4.1 Google agrees that it obtains no right, title or interest from you (or your licensors) under the License Agreement in or to any software applications that you develop using the SDK, including any intellectual property rights that subsist in those applications.
-
-4.2 You agree to use the SDK 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 SDK to develop applications for general public users, you will protect the privacy and legal rights of those users. If the 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 the user provides your application 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, the user has given you permission to do so.
-
-4.4 You agree that you will not engage in any activity with the SDK, 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 any third party including, but not limited to, Google or any mobile communications carrier.
-
-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.
-
-
-<h3>5. Your Developer Credentials</h3>
-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.
-
-
-<h3>6. Privacy and Information</h3>
-6.1 In order to continually innovate and improve the SDK, 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 SDK are being used and how they are being used. Before any of this information is collected, the SDK 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 SDK and is maintained in accordance with Google's Privacy Policy.
-
-
-<h3>7. Third Party Applications</h3>
-7.1 If you use the SDK 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. In that case, the License Agreement does not affect your legal relationship with these third parties.
-
-
-<h3>8. Using Android APIs</h3>
-8.1 Google Data 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.
-
-
-<h3>9. Terminating this License Agreement</h3>
-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 SDK and any relevant developer credentials.
-
-9.3 Google may at any time, terminate the License Agreement with you if:
-(A) you have breached any provision of the License Agreement; or
-(B) Google is required to do so by law; or
-(C) the partner with whom Google offered certain parts of SDK (such as APIs) to you has terminated its relationship with Google or ceased to offer certain parts of the SDK to you; or
-(D) Google decides to no longer provide the SDK or certain parts of the SDK to users in the country in which you are resident or from which you use the service, or the provision of the SDK or certain SDK services to you by Google is, in Google's sole discretion, no longer commercially viable.
-
-9.4 When the License Agreement comes to an end, all of the legal rights, obligations and liabilities that you and Google have benefited from, been subject to (or which have accrued over time whilst the License Agreement has been in force) or which are expressed to continue indefinitely, shall be unaffected by this cessation, and the provisions of paragraph 14.7 shall continue to apply to such rights, obligations and liabilities indefinitely.
-
-
-<h3>10. DISCLAIMER OF WARRANTIES</h3>
-10.1 YOU EXPRESSLY UNDERSTAND AND AGREE THAT YOUR USE OF THE SDK IS AT YOUR SOLE RISK AND THAT THE SDK IS PROVIDED "AS IS" AND "AS AVAILABLE" WITHOUT WARRANTY OF ANY KIND FROM GOOGLE.
-
-10.2 YOUR USE OF THE SDK AND ANY MATERIAL DOWNLOADED OR OTHERWISE OBTAINED THROUGH THE USE OF THE SDK 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.
-
-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.
-
-
-<h3>11. LIMITATION OF LIABILITY</h3>
-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.
-
-
-<h3>12. Indemnification</h3>
-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 SDK, (b) any application you develop on the SDK that infringes any copyright, trademark, trade secret, trade dress, patent or other intellectual property right of any person or defames any person or violates their rights of publicity or privacy, and (c) any non-compliance by you with the License Agreement.
-
-
-<h3>13. Changes to the License Agreement</h3>
-13.1 Google may make changes to the License Agreement as it distributes new versions of the SDK. When these changes are made, Google will make a new version of the License Agreement available on the website where the SDK is made available.
-
-
-<h3>14. General Legal Terms</h3>
-14.1 The License Agreement constitutes the whole legal agreement between you and Google and governs your use of the SDK (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 SDK.
-
-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 SDK 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 SDK. THESE LAWS INCLUDE RESTRICTIONS ON DESTINATIONS, END USERS AND END USE.
-
-14.6 The rights granted in the License Agreement may not be assigned or transferred by either you or Google without the prior written approval of the other party. Neither you nor Google shall be permitted to delegate their responsibilities or obligations under the License Agreement without the prior written approval of the other party.
-
-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.
-
-<em>November 20, 2015</em>
-</div><!-- thin wrapper around tos doc -->
-
-
-<div id="usb-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="dac-button dac-raised dac-primary disabled ndk" id="downloadForRealz" onclick="return onDownloadForRealz(this);"></a></p>
-</div>
-
-
-
-</div><!-- end TOS -->
-
-
-
-<div class="wrap col-13" style="margin:0" id="main">
-
-
-<div id="qv-wrapper">
-<div id="qv">
-  <h2>In this document</h2>
-  <ol>
-    <li><a href="#WinUsbDriver">Downloading the Google USB Driver</a></li>
-  </ol>
-  <h2>See also</h2>
-  <ol>
-    <li><a href="{@docRoot}tools/extras/oem-usb.html#InstallingDriver">Installing a USB Driver</a></li>
-    <li><a href="{@docRoot}guide/developing/device.html">Using Hardware Devices</a></li>
-  </ol>
-
-<h2>Get it</h2>
-
-<div class="download-box">
-    <a onclick="return onDownload(this)"
-    href="https://dl-ssl.google.com//android/repository/latest_usb_driver_windows.zip"
-     class="button" id="usbDriverButton">
-    Download Google USB Driver
-    </a>
- <p class="filename">latest_usb_driver_windows.zip</p>
-</div>
-
-</div>
-</div>
-
-<p>The Google USB Driver is <strong>required for Windows only</strong> in order to perform
-<a href="{@docRoot}tools/help/adb.html">adb</a> debugging with any of
-the <strong>Google Nexus devices</strong>. The one exception is the
-Galaxy Nexus: the driver for Galaxy Nexus is distributed by <a
-href="http://www.samsung.com/us/support/downloads/verizon-wireless/SCH-I515MSAVZW">Samsung</a>
-(listed as model SCH-I515).</p>
-
-<p>Windows drivers for all other devices are provided by the respective hardware
-manufacturer, as listed in the <a href="{@docRoot}tools/extras/oem-usb.html">OEM USB Drivers</a>
-document.</p>
-
-
-
-<p class="note"><strong>Note:</strong>
-If you're developing on Mac OS X or Linux, then you <strong>do not</strong> need to install a USB
-driver. To start developing with your device, read
-<a href="{@docRoot}guide/developing/device.html">Using Hardware Devices</a>.</p>
-
-
-<h2 id="WinUsbDriver">Downloading the Google USB Driver</h2>
-
-<p>The Google USB Driver for Windows is available for download as an optional SDK
-component. You need the driver only if you are developing on Windows and
-want to connect a Google Android-powered device (such as a Nexus 7) to your
-development environment over USB.</p>
-
-<div class="figure" style="width:536px;margin:0">
-  <img src="{@docRoot}images/developing/sdk-usb-driver.png" alt="" />
-  <p class="img-caption"><strong>Figure 1.</strong> The SDK Manager
-    with the Google USB Driver selected.</p>
-</div>
-
-<p>You can download the Google USB Driver for Windows in one of two ways:</p>
-<ul>
-  <li>
-    <a onclick="$('#usbDriverButton').trigger('click');return false;" href="#">
-    Click here to download the latest Google USB Driver ZIP file</a>.</li>
-  <li>Or, use the Android SDK Manager tool that is
-included with the <a href="{@docRoot}sdk/index.html">Android SDK</a>. Using the SDK Manager
-helps you keep the driver up to date by notifying you when your current driver is out of date.
-    <ol>
-      <li>Launch the Android SDK Manager by double-clicking <code>SDK Manager.exe</code>,
-      at the root of your SDK directory.</li>
-      <li>Expand <em>Extras</em>.</li>
-      <li>Check <strong>Google USB Driver package</strong> and click <strong>Install</strong>.</li>
-      <li>Proceed to install the package. When done, the driver files are
-    downloaded into the <code>&lt;sdk&gt;\extras\google\usb_driver\</code> directory.</li>
-    </ol>
-  </li>
-</ul>
-
-<p>For installation information, read
-<a href="{@docRoot}tools/extras/oem-usb.html#InstallingDriver">Installing a USB Driver</a>.</p>
-
-
-
-</div><!-- end wrap "main" for document content -->
-
-</div><!-- end outter wrapper for page contents -->
-
-
-
-
-<script>
-
-
-  function onDownload(link) {
-
-    /* set text for download button */
-    $("#downloadForRealz").html($(link).text());
-    $("#downloadForRealz").attr('href',$(link).attr('href'));
-
-    $("#tos").fadeIn('fast');
-    $("#main").fadeOut('fast');
-
-    location.hash = "download";
-    return false;
-  }
-
-
-  function onAgreeChecked() {
-    /* verify that the TOS is agreed and a bit version is chosen */
-    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')) {
-      // OK, start the download and reset the page
-      $("input#agree").attr('checked',false);
-      $("a#downloadForRealz").addClass('disabled');
-      $("#tos").fadeOut('fast');
-      $("#main").fadeIn('fast');
-      location.hash = "top";
-    } else {
-      // Have not agreed to tos, make the checkbox blink
-      $("label#agreeLabel").parent().stop().animate({color: "#258AAF"}, 200,
-        function() {$("label#agreeLabel").parent().stop().animate({color: "#222"}, 200)}
-      );
-      return false;
-    }
-  }
-
-  $(window).hashchange( function(){
-    if (location.hash == "") {
-      location.reload();
-    }
-  });
-
-</script>
\ No newline at end of file
diff --git a/media/java/android/media/MediaCodecInfo.java b/media/java/android/media/MediaCodecInfo.java
index 6257238..b9ed269 100644
--- a/media/java/android/media/MediaCodecInfo.java
+++ b/media/java/android/media/MediaCodecInfo.java
@@ -2745,6 +2745,7 @@
         public static final int DolbyVisionProfileDvheDtr = 0x10;
         public static final int DolbyVisionProfileDvheStn = 0x20;
         public static final int DolbyVisionProfileDvheDth = 0x40;
+        public static final int DolbyVisionProfileDvheDtb = 0x80;
 
         // from OMX_VIDEO_DOLBYVISIONLEVELTYPE
         public static final int DolbyVisionLevelHd24    = 0x1;
diff --git a/packages/ExtServices/src/android/ext/services/notification/Ranker.java b/packages/ExtServices/src/android/ext/services/notification/Ranker.java
index 3ef2aea..fefedf8 100644
--- a/packages/ExtServices/src/android/ext/services/notification/Ranker.java
+++ b/packages/ExtServices/src/android/ext/services/notification/Ranker.java
@@ -68,9 +68,7 @@
                     if (notificationsForPackage == null) {
                         notificationsForPackage = new LinkedHashSet<>();
                     }
-                    if (notificationsForPackage.contains(sbn.getKey())) {
-                        return;
-                    }
+
                     notificationsForPackage.add(sbn.getKey());
                     mUnbundledNotifications.put(sbn.getPackageName(), notificationsForPackage);
 
diff --git a/packages/PrintSpooler/AndroidManifest.xml b/packages/PrintSpooler/AndroidManifest.xml
index ed6fdb7..2da4d6a 100644
--- a/packages/PrintSpooler/AndroidManifest.xml
+++ b/packages/PrintSpooler/AndroidManifest.xml
@@ -57,7 +57,7 @@
 
         <activity
             android:name=".ui.PrintActivity"
-            android:configChanges="screenSize|smallestScreenSize|orientation|locale|keyboard|keyboardHidden|fontScale|uiMode|layoutDirection"
+            android:configChanges="mnc|mnc|touchscreen|navigation|screenLayout|screenSize|smallestScreenSize|orientation|locale|keyboard|keyboardHidden|fontScale|uiMode|layoutDirection|density"
             android:permission="android.permission.BIND_PRINT_SPOOLER_SERVICE"
             android:theme="@style/Theme.PrintActivity">
             <intent-filter>
diff --git a/packages/PrintSpooler/src/com/android/printspooler/model/PageContentRepository.java b/packages/PrintSpooler/src/com/android/printspooler/model/PageContentRepository.java
index bb35917..999d82d 100644
--- a/packages/PrintSpooler/src/com/android/printspooler/model/PageContentRepository.java
+++ b/packages/PrintSpooler/src/com/android/printspooler/model/PageContentRepository.java
@@ -510,7 +510,12 @@
         public void destroy() {
             if (mBoundToService) {
                 mBoundToService = false;
-                mContext.unbindService(AsyncRenderer.this);
+                try {
+                    mContext.unbindService(AsyncRenderer.this);
+                } catch (IllegalArgumentException e) {
+                    // Service might have been forcefully unbound in onDestroy()
+                    Log.e(LOG_TAG, "Cannot unbind service", e);
+                }
             }
 
             mPageContentCache.invalidate();
diff --git a/packages/PrintSpooler/src/com/android/printspooler/ui/PrintActivity.java b/packages/PrintSpooler/src/com/android/printspooler/ui/PrintActivity.java
index c411186..cc0b4ca 100644
--- a/packages/PrintSpooler/src/com/android/printspooler/ui/PrintActivity.java
+++ b/packages/PrintSpooler/src/com/android/printspooler/ui/PrintActivity.java
@@ -268,7 +268,7 @@
                 new Runnable() {
             @Override
             public void run() {
-                if (isFinishing()) {
+                if (isFinishing() || isDestroyed()) {
                     // onPause might have not been able to cancel the job, see PrintActivity#onPause
                     // To be sure, cancel the job again. Double canceling does no harm.
                     mSpoolerProvider.getSpooler().setPrintJobState(mPrintJob.getId(),
@@ -288,12 +288,8 @@
         // the first batch of results which will be delivered
         // after reading historical data. This should be pretty
         // fast, so just wait before showing the UI.
-        mPrinterRegistry = new PrinterRegistry(PrintActivity.this,
-                new Runnable() {
-            @Override
-            public void run() {
-                onPrinterRegistryReady(documentAdapter);
-            }
+        mPrinterRegistry = new PrinterRegistry(PrintActivity.this, () -> {
+            (new Handler(getMainLooper())).post(() -> onPrinterRegistryReady(documentAdapter));
         }, LOADER_ID_PRINT_REGISTRY, LOADER_ID_PRINT_REGISTRY_INT);
     }
 
@@ -324,7 +320,8 @@
 
                 // If we are finishing or we are in a state that we do not need any
                 // data from the printing app, then no need to finish.
-                if (isFinishing() || (isFinalState(mState) && !mPrintedDocument.isUpdating())) {
+                if (isFinishing() || isDestroyed() ||
+                        (isFinalState(mState) && !mPrintedDocument.isUpdating())) {
                     return;
                 }
                 setState(STATE_PRINT_CANCELED);
@@ -622,6 +619,17 @@
     }
 
     @Override
+    protected void onDestroy() {
+        if (mPrintedDocument != null) {
+            mPrintedDocument.cancel(true);
+        }
+
+        doFinish();
+
+        super.onDestroy();
+    }
+
+    @Override
     protected void onActivityResult(int requestCode, int resultCode, Intent data) {
         switch (requestCode) {
             case ACTIVITY_REQUEST_CREATE_FILE: {
@@ -964,7 +972,7 @@
     }
 
     private void ensureProgressUiShown() {
-        if (isFinishing()) {
+        if (isFinishing() || isDestroyed()) {
             return;
         }
         if (mUiState != UI_STATE_PROGRESS) {
@@ -976,7 +984,7 @@
     }
 
     private void ensurePreviewUiShown() {
-        if (isFinishing()) {
+        if (isFinishing() || isDestroyed()) {
             return;
         }
         if (mUiState != UI_STATE_PREVIEW) {
@@ -987,7 +995,7 @@
     }
 
     private void ensureErrorUiShown(CharSequence message, int action) {
-        if (isFinishing()) {
+        if (isFinishing() || isDestroyed()) {
             return;
         }
         if (mUiState != UI_STATE_ERROR) {
@@ -1267,6 +1275,7 @@
         mPageRangeTitle = (TextView) findViewById(R.id.page_range_title);
         mPageRangeEditText = (EditText) findViewById(R.id.page_range_edittext);
         mPageRangeEditText.setVisibility(View.INVISIBLE);
+        mPageRangeTitle.setVisibility(View.INVISIBLE);
         mPageRangeEditText.setOnFocusChangeListener(mSelectAllOnFocusListener);
         mPageRangeEditText.addTextChangedListener(new RangeTextWatcher());
 
@@ -1353,7 +1362,7 @@
 
     @Override
     public void onLoaderReset(Loader<List<PrintServiceInfo>> loader) {
-        if (!isFinishing()) {
+        if (!(isFinishing() || isDestroyed())) {
             onLoadFinished(loader, null);
         }
     }
@@ -2036,7 +2045,9 @@
             mSpoolerProvider.destroy();
         }
 
-        setState(mProgressMessageController.cancel());
+        if (mProgressMessageController != null) {
+            setState(mProgressMessageController.cancel());
+        }
 
         if (mState != STATE_INITIALIZING) {
             mPrintedDocument.finish();
diff --git a/packages/Shell/Android.mk b/packages/Shell/Android.mk
index f8c13d6..73a0449 100644
--- a/packages/Shell/Android.mk
+++ b/packages/Shell/Android.mk
@@ -5,7 +5,8 @@
 
 LOCAL_SRC_FILES := $(call all-java-files-under, src)
 
-LOCAL_STATIC_JAVA_LIBRARIES := android-support-v4
+LOCAL_STATIC_JAVA_LIBRARIES := android-support-v4 \
+        android-support-documents-archive
 
 LOCAL_PACKAGE_NAME := Shell
 LOCAL_CERTIFICATE := platform
diff --git a/packages/Shell/src/com/android/shell/BugreportStorageProvider.java b/packages/Shell/src/com/android/shell/BugreportStorageProvider.java
index 814aa8c..0f92fa6 100644
--- a/packages/Shell/src/com/android/shell/BugreportStorageProvider.java
+++ b/packages/Shell/src/com/android/shell/BugreportStorageProvider.java
@@ -25,6 +25,7 @@
 import android.provider.DocumentsContract.Document;
 import android.provider.DocumentsContract.Root;
 import android.provider.DocumentsProvider;
+import android.support.provider.DocumentArchiveHelper;
 import android.webkit.MimeTypeMap;
 
 import java.io.File;
@@ -44,10 +45,12 @@
     };
 
     private File mRoot;
+    private DocumentArchiveHelper mArchiveHelper;
 
     @Override
     public boolean onCreate() {
         mRoot = new File(getContext().getFilesDir(), "bugreports");
+        mArchiveHelper = new DocumentArchiveHelper(this, (char) 0);
         return true;
     }
 
@@ -66,6 +69,10 @@
     @Override
     public Cursor queryDocument(String documentId, String[] projection)
             throws FileNotFoundException {
+        if (mArchiveHelper.isArchivedDocument(documentId)) {
+            return mArchiveHelper.queryDocument(documentId, projection);
+        }
+
         final MatrixCursor result = new MatrixCursor(resolveDocumentProjection(projection));
         if (DOC_ID_ROOT.equals(documentId)) {
             final RowBuilder row = result.newRow();
@@ -84,6 +91,11 @@
     public Cursor queryChildDocuments(
             String parentDocumentId, String[] projection, String sortOrder)
             throws FileNotFoundException {
+        if (mArchiveHelper.isArchivedDocument(parentDocumentId) ||
+                mArchiveHelper.isSupportedArchiveType(getDocumentType(parentDocumentId))) {
+            return mArchiveHelper.queryChildDocuments(parentDocumentId, projection, sortOrder);
+        }
+
         final MatrixCursor result = new MatrixCursor(resolveDocumentProjection(projection));
         if (DOC_ID_ROOT.equals(parentDocumentId)) {
             final File[] files = mRoot.listFiles();
@@ -100,6 +112,10 @@
     public ParcelFileDescriptor openDocument(
             String documentId, String mode, CancellationSignal signal)
             throws FileNotFoundException {
+        if (mArchiveHelper.isArchivedDocument(documentId)) {
+            return mArchiveHelper.openDocument(documentId, mode, signal);
+        }
+
         if (ParcelFileDescriptor.parseMode(mode) != ParcelFileDescriptor.MODE_READ_ONLY) {
             throw new FileNotFoundException("Failed to open: " + documentId + ", mode = " + mode);
         }
@@ -153,12 +169,18 @@
     }
 
     private void addFileRow(MatrixCursor result, File file) {
+        String mimeType = getTypeForName(file.getName());
+        int flags = Document.FLAG_SUPPORTS_DELETE;
+        if (mArchiveHelper.isSupportedArchiveType(mimeType)) {
+            flags |= Document.FLAG_ARCHIVE;
+        }
+
         final RowBuilder row = result.newRow();
         row.add(Document.COLUMN_DOCUMENT_ID, getDocIdForFile(file));
-        row.add(Document.COLUMN_MIME_TYPE, getTypeForName(file.getName()));
+        row.add(Document.COLUMN_MIME_TYPE, mimeType);
         row.add(Document.COLUMN_DISPLAY_NAME, file.getName());
         row.add(Document.COLUMN_LAST_MODIFIED, file.lastModified());
-        row.add(Document.COLUMN_FLAGS, Document.FLAG_SUPPORTS_DELETE);
+        row.add(Document.COLUMN_FLAGS, flags);
         row.add(Document.COLUMN_SIZE, file.length());
     }
 }
diff --git a/packages/SystemUI/src/com/android/systemui/qs/external/CustomTile.java b/packages/SystemUI/src/com/android/systemui/qs/external/CustomTile.java
index 54dd015..23a3ca1 100644
--- a/packages/SystemUI/src/com/android/systemui/qs/external/CustomTile.java
+++ b/packages/SystemUI/src/com/android/systemui/qs/external/CustomTile.java
@@ -40,9 +40,11 @@
 import com.android.internal.logging.MetricsProto.MetricsEvent;
 import com.android.systemui.R;
 import com.android.systemui.qs.QSTile;
+import com.android.systemui.qs.external.TileLifecycleManager.TileChangeListener;
 import com.android.systemui.statusbar.phone.QSTileHost;
+import libcore.util.Objects;
 
-public class CustomTile extends QSTile<QSTile.State> {
+public class CustomTile extends QSTile<QSTile.State> implements TileChangeListener {
     public static final String PREFIX = "custom(";
 
     private static final boolean DEBUG = false;
@@ -58,7 +60,7 @@
     private final IQSTileService mService;
     private final TileServiceManager mServiceManager;
     private final int mUser;
-    private final android.graphics.drawable.Icon mDefaultIcon;
+    private android.graphics.drawable.Icon mDefaultIcon;
 
     private boolean mListening;
     private boolean mBound;
@@ -71,21 +73,10 @@
         mComponent = ComponentName.unflattenFromString(action);
         mServiceManager = host.getTileServices().getTileWrapper(this);
         mService = mServiceManager.getTileService();
+        mServiceManager.setTileChangeListener(this);
         mTile = new Tile(mComponent);
         mUser = ActivityManager.getCurrentUser();
-        android.graphics.drawable.Icon defaultIcon;
-        try {
-            PackageManager pm = mContext.getPackageManager();
-            ServiceInfo info = pm.getServiceInfo(mComponent,
-                    PackageManager.MATCH_ENCRYPTION_AWARE_AND_UNAWARE);
-            defaultIcon = info.icon != 0 ? android.graphics.drawable.Icon
-                    .createWithResource(mComponent.getPackageName(), info.icon) : null;
-            mTile.setIcon(defaultIcon);
-            mTile.setLabel(info.loadLabel(pm));
-        } catch (Exception e) {
-            defaultIcon = null;
-        }
-        mDefaultIcon = defaultIcon;
+        setTileIcon();
         try {
             mService.setQSTile(mTile);
         } catch (RemoteException e) {
@@ -93,6 +84,57 @@
         }
     }
 
+    private void setTileIcon() {
+        try {
+            PackageManager pm = mContext.getPackageManager();
+            ServiceInfo info = pm.getServiceInfo(mComponent,
+                    PackageManager.MATCH_ENCRYPTION_AWARE_AND_UNAWARE);
+            // Update the icon if its not set or is the default icon.
+            boolean updateIcon = mTile.getIcon() == null
+                    || iconEquals(mTile.getIcon(), mDefaultIcon);
+            mDefaultIcon = info.icon != 0 ? android.graphics.drawable.Icon
+                    .createWithResource(mComponent.getPackageName(), info.icon) : null;
+            if (updateIcon) {
+                mTile.setIcon(mDefaultIcon);
+            }
+            // Update the label if there is no label.
+            if (mTile.getLabel() == null) {
+                mTile.setLabel(info.loadLabel(pm));
+            }
+        } catch (Exception e) {
+            mDefaultIcon = null;
+        }
+    }
+
+    /**
+     * Compare two icons, only works for resources.
+     */
+    private boolean iconEquals(android.graphics.drawable.Icon icon1,
+            android.graphics.drawable.Icon icon2) {
+        if (icon1 == icon2) {
+            return true;
+        }
+        if (icon1 == null || icon2 == null) {
+            return false;
+        }
+        if (icon1.getType() != android.graphics.drawable.Icon.TYPE_RESOURCE
+                || icon2.getType() != android.graphics.drawable.Icon.TYPE_RESOURCE) {
+            return false;
+        }
+        if (icon1.getResId() != icon2.getResId()) {
+            return false;
+        }
+        if (!Objects.equal(icon1.getResPackage(), icon2.getResPackage())) {
+            return false;
+        }
+        return true;
+    }
+
+    @Override
+    public void onTileChanged(ComponentName tile) {
+        setTileIcon();
+    }
+
     @Override
     public boolean isAvailable() {
         return mDefaultIcon != null;
@@ -136,6 +178,8 @@
         mListening = listening;
         try {
             if (listening) {
+                setTileIcon();
+                refreshState();
                 if (!mServiceManager.isActiveTile()) {
                     mServiceManager.setBindRequested(true);
                     mService.onStartListening();
diff --git a/packages/SystemUI/src/com/android/systemui/qs/external/TileLifecycleManager.java b/packages/SystemUI/src/com/android/systemui/qs/external/TileLifecycleManager.java
index 5903218..212f179 100644
--- a/packages/SystemUI/src/com/android/systemui/qs/external/TileLifecycleManager.java
+++ b/packages/SystemUI/src/com/android/systemui/qs/external/TileLifecycleManager.java
@@ -80,6 +80,7 @@
     boolean mReceiverRegistered;
     private IQSService mService;
     private boolean mUnbindImmediate;
+    private TileChangeListener mChangeListener;
 
     public TileLifecycleManager(Handler handler, Context context, Intent intent, UserHandle user) {
         mContext = context;
@@ -168,7 +169,7 @@
     @Override
     public void onServiceDisconnected(ComponentName name) {
         if (DEBUG) Log.d(TAG, "onServiceDisconnected " + name);
-        mWrapper = null;
+        handleDeath();
     }
 
     private void handlePendingMessages() {
@@ -279,6 +280,10 @@
         mReceiverRegistered = false;
     }
 
+    public void setTileChangeListener(TileChangeListener changeListener) {
+        mChangeListener = changeListener;
+    }
+
     @Override
     public void onReceive(Context context, Intent intent) {
         if (DEBUG) Log.d(TAG, "onReceive: " + intent);
@@ -289,6 +294,9 @@
                 return;
             }
         }
+        if (Intent.ACTION_PACKAGE_CHANGED.equals(intent.getAction()) && mChangeListener != null) {
+            mChangeListener.onTileChanged(mIntent.getComponent());
+        }
         stopPackageListening();
         if (mBound) {
             // Trying to bind again will check the state of the package before bothering to bind.
@@ -401,4 +409,8 @@
         if (DEBUG) Log.d(TAG, "binderDeath");
         handleDeath();
     }
+
+    public interface TileChangeListener {
+        void onTileChanged(ComponentName tile);
+    }
 }
diff --git a/packages/SystemUI/src/com/android/systemui/qs/external/TileServiceManager.java b/packages/SystemUI/src/com/android/systemui/qs/external/TileServiceManager.java
index f34df75..82a5622 100644
--- a/packages/SystemUI/src/com/android/systemui/qs/external/TileServiceManager.java
+++ b/packages/SystemUI/src/com/android/systemui/qs/external/TileServiceManager.java
@@ -27,6 +27,7 @@
 import android.service.quicksettings.IQSTileService;
 import android.support.annotation.VisibleForTesting;
 import android.util.Log;
+import com.android.systemui.qs.external.TileLifecycleManager.TileChangeListener;
 import libcore.util.Objects;
 
 /**
@@ -81,6 +82,10 @@
                 new UserHandle(ActivityManager.getCurrentUser()), filter, null, mHandler);
     }
 
+    public void setTileChangeListener(TileChangeListener changeListener) {
+        mStateManager.setTileChangeListener(changeListener);
+    }
+
     public boolean isActiveTile() {
         return mStateManager.isActiveTile();
     }
diff --git a/packages/SystemUI/src/com/android/systemui/recents/misc/SystemServicesProxy.java b/packages/SystemUI/src/com/android/systemui/recents/misc/SystemServicesProxy.java
index be06ad0..46b2612 100644
--- a/packages/SystemUI/src/com/android/systemui/recents/misc/SystemServicesProxy.java
+++ b/packages/SystemUI/src/com/android/systemui/recents/misc/SystemServicesProxy.java
@@ -414,8 +414,8 @@
         }
 
         try {
-            return mIam.moveTaskToDockedStack(
-                    taskId, createMode, true /* onTop */, false /* animate */, initialBounds);
+            return mIam.moveTaskToDockedStack(taskId, createMode, true /* onTop */,
+                    false /* animate */, initialBounds, true /* moveHomeStackFront */ );
         } catch (RemoteException e) {
             e.printStackTrace();
         }
diff --git a/services/appwidget/java/com/android/server/appwidget/AppWidgetServiceImpl.java b/services/appwidget/java/com/android/server/appwidget/AppWidgetServiceImpl.java
index 7b9d4456..c62689c 100644
--- a/services/appwidget/java/com/android/server/appwidget/AppWidgetServiceImpl.java
+++ b/services/appwidget/java/com/android/server/appwidget/AppWidgetServiceImpl.java
@@ -656,11 +656,15 @@
     }
 
     private void ensureGroupStateLoadedLocked(int userId) {
-        if (!mUserManager.isUserUnlockingOrUnlocked(userId)) {
+        ensureGroupStateLoadedLocked(userId, /* enforceUserUnlockingOrUnlocked */ true );
+    }
+
+    private void ensureGroupStateLoadedLocked(int userId, boolean enforceUserUnlockingOrUnlocked) {
+        if (enforceUserUnlockingOrUnlocked && !mUserManager.isUserUnlockingOrUnlocked(userId)) {
             throw new IllegalStateException(
                     "User " + userId + " must be unlocked for widgets to be available");
         }
-        if (isProfileWithLockedParent(userId)) {
+        if (enforceUserUnlockingOrUnlocked && isProfileWithLockedParent(userId)) {
             throw new IllegalStateException(
                     "Profile " + userId + " must have unlocked parent");
         }
@@ -3945,7 +3949,9 @@
         @Override
         public void run() {
             synchronized (mLock) {
-                ensureGroupStateLoadedLocked(mUserId);
+                // No need to enforce unlocked state when there is no caller. User can be in the
+                // stopping state or removed by the time the message is processed
+                ensureGroupStateLoadedLocked(mUserId, false /* enforceUserUnlockingOrUnlocked */ );
                 saveStateLocked(mUserId);
             }
         }
diff --git a/services/core/java/com/android/server/am/ActivityManagerService.java b/services/core/java/com/android/server/am/ActivityManagerService.java
index ddb9b8a..07f7e29 100644
--- a/services/core/java/com/android/server/am/ActivityManagerService.java
+++ b/services/core/java/com/android/server/am/ActivityManagerService.java
@@ -9700,7 +9700,7 @@
      */
     @Override
     public boolean moveTaskToDockedStack(int taskId, int createMode, boolean toTop, boolean animate,
-            Rect initialBounds) {
+            Rect initialBounds, boolean moveHomeStackFront) {
         enforceCallingPermission(MANAGE_ACTIVITY_STACKS, "moveTaskToDockedStack()");
         synchronized (this) {
             long ident = Binder.clearCallingIdentity();
@@ -9708,9 +9708,16 @@
                 if (DEBUG_STACK) Slog.d(TAG_STACK, "moveTaskToDockedStack: moving task=" + taskId
                         + " to createMode=" + createMode + " toTop=" + toTop);
                 mWindowManager.setDockedStackCreateState(createMode, initialBounds);
-                return mStackSupervisor.moveTaskToStackLocked(
-                        taskId, DOCKED_STACK_ID, toTop, !FORCE_FOCUS,
-                        "moveTaskToDockedStack", animate);
+                final boolean moved = mStackSupervisor.moveTaskToStackLocked(
+                        taskId, DOCKED_STACK_ID, toTop, !FORCE_FOCUS, "moveTaskToDockedStack",
+                        animate, DEFER_RESUME);
+                if (moved) {
+                    if (moveHomeStackFront) {
+                        mStackSupervisor.moveHomeStackToFront("moveTaskToDockedStack");
+                    }
+                    mStackSupervisor.ensureActivitiesVisibleLocked(null, 0, !PRESERVE_WINDOWS);
+                }
+                return moved;
             } finally {
                 Binder.restoreCallingIdentity(ident);
             }
diff --git a/services/core/java/com/android/server/am/ActivityRecord.java b/services/core/java/com/android/server/am/ActivityRecord.java
index 2386a36..fa69b4a 100755
--- a/services/core/java/com/android/server/am/ActivityRecord.java
+++ b/services/core/java/com/android/server/am/ActivityRecord.java
@@ -592,7 +592,7 @@
             ActivityRecord _resultTo, String _resultWho, int _reqCode,
             boolean _componentSpecified, boolean _rootVoiceInteraction,
             ActivityStackSupervisor supervisor,
-            ActivityContainer container, ActivityOptions options) {
+            ActivityContainer container, ActivityOptions options, ActivityRecord sourceRecord) {
         service = _service;
         appToken = new Token(this, service);
         info = aInfo;
@@ -705,21 +705,7 @@
             noDisplay = ent != null && ent.array.getBoolean(
                     com.android.internal.R.styleable.Window_windowNoDisplay, false);
 
-            if ((!_componentSpecified || _launchedFromUid == Process.myUid()
-                    || _launchedFromUid == 0) &&
-                    Intent.ACTION_MAIN.equals(_intent.getAction()) &&
-                    _intent.hasCategory(Intent.CATEGORY_HOME) &&
-                    _intent.getCategories().size() == 1 &&
-                    _intent.getData() == null &&
-                    _intent.getType() == null &&
-                    !isResolverActivity()) {
-                // This sure looks like a home activity!
-                mActivityType = HOME_ACTIVITY_TYPE;
-            } else if (realActivity.getClassName().contains(RECENTS_PACKAGE_NAME)) {
-                mActivityType = RECENTS_ACTIVITY_TYPE;
-            } else {
-                mActivityType = APPLICATION_ACTIVITY_TYPE;
-            }
+            setActivityType(_componentSpecified, _launchedFromUid, _intent, sourceRecord);
 
             immersive = (aInfo.flags & ActivityInfo.FLAG_IMMERSIVE) != 0;
 
@@ -740,6 +726,36 @@
         }
     }
 
+    private boolean isHomeIntent(Intent intent) {
+        return Intent.ACTION_MAIN.equals(intent.getAction())
+                && intent.hasCategory(Intent.CATEGORY_HOME)
+                && intent.getCategories().size() == 1
+                && intent.getData() == null
+                && intent.getType() == null;
+    }
+
+    private boolean canLaunchHomeActivity(int uid, ActivityRecord sourceRecord) {
+        if (uid == Process.myUid() || uid == 0) {
+            // System process can launch home activity.
+            return true;
+        }
+        // Resolver activity can launch home activity.
+        return sourceRecord != null && sourceRecord.isResolverActivity();
+    }
+
+    private void setActivityType(boolean componentSpecified,
+            int launchedFromUid, Intent intent, ActivityRecord sourceRecord) {
+        if ((!componentSpecified || canLaunchHomeActivity(launchedFromUid, sourceRecord))
+                && isHomeIntent(intent) && !isResolverActivity()) {
+            // This sure looks like a home activity!
+            mActivityType = HOME_ACTIVITY_TYPE;
+        } else if (realActivity.getClassName().contains(RECENTS_PACKAGE_NAME)) {
+            mActivityType = RECENTS_ACTIVITY_TYPE;
+        } else {
+            mActivityType = APPLICATION_ACTIVITY_TYPE;
+        }
+    }
+
     void setTask(TaskRecord newTask, TaskRecord taskToAffiliateWith) {
         if (task != null && task.removeActivity(this) && task != newTask && task.stack != null) {
             task.stack.removeTask(task, "setTask");
@@ -1473,7 +1489,7 @@
         }
         final ActivityRecord r = new ActivityRecord(service, /*caller*/null, launchedFromUid,
                 launchedFromPackage, intent, resolvedType, aInfo, service.getConfiguration(),
-                null, null, 0, componentSpecified, false, stackSupervisor, null, null);
+                null, null, 0, componentSpecified, false, stackSupervisor, null, null, null);
 
         r.persistentState = persistentState;
         r.taskDescription = taskDescription;
diff --git a/services/core/java/com/android/server/am/ActivityStack.java b/services/core/java/com/android/server/am/ActivityStack.java
index 21fc4d8..d751a32 100644
--- a/services/core/java/com/android/server/am/ActivityStack.java
+++ b/services/core/java/com/android/server/am/ActivityStack.java
@@ -3488,11 +3488,10 @@
         r.state = ActivityState.FINISHING;
 
         if (mode == FINISH_IMMEDIATELY
-                || (mode == FINISH_AFTER_PAUSE && prevState == ActivityState.PAUSED)
+                || (prevState == ActivityState.PAUSED
+                    && (mode == FINISH_AFTER_PAUSE || mStackId == PINNED_STACK_ID))
                 || prevState == ActivityState.STOPPED
                 || prevState == ActivityState.INITIALIZING) {
-            // If this activity is already stopped, we can just finish
-            // it right now.
             r.makeFinishingLocked();
             boolean activityRemoved = destroyActivityLocked(r, true, "finish-imm");
             if (activityRemoved) {
diff --git a/services/core/java/com/android/server/am/ActivityStarter.java b/services/core/java/com/android/server/am/ActivityStarter.java
index 82ec80c..c15effb 100644
--- a/services/core/java/com/android/server/am/ActivityStarter.java
+++ b/services/core/java/com/android/server/am/ActivityStarter.java
@@ -492,7 +492,7 @@
         ActivityRecord r = new ActivityRecord(mService, callerApp, callingUid, callingPackage,
                 intent, resolvedType, aInfo, mService.mConfiguration, resultRecord, resultWho,
                 requestCode, componentSpecified, voiceSession != null, mSupervisor, container,
-                options);
+                options, sourceRecord);
         if (outActivity != null) {
             outActivity[0] = r;
         }
diff --git a/services/core/java/com/android/server/connectivity/MetricsLoggerService.java b/services/core/java/com/android/server/connectivity/MetricsLoggerService.java
index 5096b35..6d1c531 100644
--- a/services/core/java/com/android/server/connectivity/MetricsLoggerService.java
+++ b/services/core/java/com/android/server/connectivity/MetricsLoggerService.java
@@ -144,8 +144,13 @@
 
             boolean dumpSerializedSize = false;
             boolean dumpEvents = false;
+            boolean dumpDebugInfo = false;
             for (String arg : args) {
                 switch (arg) {
+                    case "--debug":
+                        dumpDebugInfo = true;
+                        break;
+
                     case "--events":
                         dumpEvents = true;
                         break;
@@ -155,6 +160,7 @@
                         break;
 
                     case "--all":
+                        dumpDebugInfo = true;
                         dumpEvents = true;
                         dumpSerializedSize = true;
                         break;
@@ -163,6 +169,7 @@
 
             synchronized (mEvents) {
                 pw.println("Number of events: " + mEvents.size());
+                pw.println("Counter: " + mEventCounter);
                 if (mEvents.size() > 0) {
                     pw.println("Time span: " +
                             DateUtils.formatElapsedTime(
@@ -171,16 +178,12 @@
                 }
 
                 if (dumpSerializedSize) {
-                    long dataSize = 0;
                     Parcel p = Parcel.obtain();
                     for (ConnectivityMetricsEvent e : mEvents) {
-                        dataSize += 16; // timestamp and 2 stamps
-
-                        p.writeParcelable(e.data, 0);
+                        p.writeParcelable(e, 0);
                     }
-                    dataSize += p.dataSize();
+                    pw.println("Serialized data size: " + p.dataSize());
                     p.recycle();
-                    pw.println("Serialized data size: " + dataSize);
                 }
 
                 if (dumpEvents) {
@@ -192,6 +195,21 @@
                 }
             }
 
+            if (dumpDebugInfo) {
+                synchronized (mThrottlingCounters) {
+                    pw.println();
+                    for (int i = 0; i < ConnectivityMetricsLogger.NUMBER_OF_COMPONENTS; i++) {
+                        if (mThrottlingCounters[i] > 0) {
+                            pw.println("Throttling Counter #" + i + ": " + mThrottlingCounters[i]);
+                        }
+                    }
+                    pw.println("Throttling Time Remaining: " +
+                            DateUtils.formatElapsedTime(
+                                    (mThrottlingIntervalBoundaryMillis - System.currentTimeMillis())
+                                            / 1000));
+                }
+            }
+
             synchronized (mPendingIntents) {
                 if (!mPendingIntents.isEmpty()) {
                     pw.println();
diff --git a/services/core/java/com/android/server/pm/PackageInstallerService.java b/services/core/java/com/android/server/pm/PackageInstallerService.java
index 8368185..83af017 100644
--- a/services/core/java/com/android/server/pm/PackageInstallerService.java
+++ b/services/core/java/com/android/server/pm/PackageInstallerService.java
@@ -866,8 +866,9 @@
         if ((callingUid != Process.SHELL_UID) && (callingUid != Process.ROOT_UID)) {
             mAppOps.checkPackage(callingUid, callerPackageName);
             final String installerPackageName = mPm.getInstallerPackageName(packageName);
-            allowSilentUninstall = installerPackageName != null
-                    && installerPackageName.equals(callerPackageName);
+            allowSilentUninstall = mPm.isOrphaned(packageName) ||
+                    (installerPackageName != null
+                            && installerPackageName.equals(callerPackageName));
         }
 
         // Check whether the caller is device owner, in which case we do it silently.
diff --git a/services/core/java/com/android/server/pm/PackageManagerService.java b/services/core/java/com/android/server/pm/PackageManagerService.java
index 61e36d9..8fb7da4 100644
--- a/services/core/java/com/android/server/pm/PackageManagerService.java
+++ b/services/core/java/com/android/server/pm/PackageManagerService.java
@@ -17525,6 +17525,13 @@
         }
     }
 
+    public boolean isOrphaned(String packageName) {
+        // reader
+        synchronized (mPackages) {
+            return mSettings.isOrphaned(packageName);
+        }
+    }
+
     @Override
     public int getApplicationEnabledSetting(String packageName, int userId) {
         if (!sUserManager.exists(userId)) return COMPONENT_ENABLED_STATE_DISABLED;
diff --git a/services/core/java/com/android/server/pm/PackageSettingBase.java b/services/core/java/com/android/server/pm/PackageSettingBase.java
index 9d04472..851f085 100644
--- a/services/core/java/com/android/server/pm/PackageSettingBase.java
+++ b/services/core/java/com/android/server/pm/PackageSettingBase.java
@@ -125,6 +125,8 @@
 
     /** Package name of the app that installed this package */
     String installerPackageName;
+    /** Indicates if the package that installed this app has been uninstalled */
+    boolean isOrphaned;
     /** UUID of {@link VolumeInfo} hosting this app */
     String volumeUuid;
 
@@ -182,6 +184,7 @@
         origPackage = base.origPackage;
 
         installerPackageName = base.installerPackageName;
+        isOrphaned = base.isOrphaned;
         volumeUuid = base.volumeUuid;
 
         keySetData = new PackageKeySetData(base.keySetData);
diff --git a/services/core/java/com/android/server/pm/Settings.java b/services/core/java/com/android/server/pm/Settings.java
index 1040f85..e2e6c7b 100644
--- a/services/core/java/com/android/server/pm/Settings.java
+++ b/services/core/java/com/android/server/pm/Settings.java
@@ -1117,6 +1117,7 @@
             if (installerPackageName != null
                     && installerPackageName.equals(packageName)) {
                 ps.setInstallerPackageName(null);
+                ps.isOrphaned = true;
             }
         }
         mInstallerPackages.remove(packageName);
@@ -2647,6 +2648,9 @@
         if (pkg.installerPackageName != null) {
             serializer.attribute(null, "installer", pkg.installerPackageName);
         }
+        if (pkg.isOrphaned) {
+            serializer.attribute(null, "isOrphaned", "true");
+        }
         if (pkg.volumeUuid != null) {
             serializer.attribute(null, "volumeUuid", pkg.volumeUuid);
         }
@@ -3522,6 +3526,7 @@
         String cpuAbiOverrideString = null;
         String systemStr = null;
         String installerPackageName = null;
+        String isOrphaned = null;
         String volumeUuid = null;
         String uidError = null;
         int pkgFlags = 0;
@@ -3563,6 +3568,7 @@
                 }
             }
             installerPackageName = parser.getAttributeValue(null, "installer");
+            isOrphaned = parser.getAttributeValue(null, "isOrphaned");
             volumeUuid = parser.getAttributeValue(null, "volumeUuid");
 
             systemStr = parser.getAttributeValue(null, "publicFlags");
@@ -3713,6 +3719,7 @@
         if (packageSetting != null) {
             packageSetting.uidError = "true".equals(uidError);
             packageSetting.installerPackageName = installerPackageName;
+            packageSetting.isOrphaned = "true".equals(isOrphaned);
             packageSetting.volumeUuid = volumeUuid;
             packageSetting.legacyNativeLibraryPathString = legacyNativeLibraryPathStr;
             packageSetting.primaryCpuAbiString = primaryCpuAbiString;
@@ -4115,6 +4122,14 @@
         return pkg.installerPackageName;
     }
 
+    boolean isOrphaned(String packageName) {
+        final PackageSetting pkg = mPackages.get(packageName);
+        if (pkg == null) {
+            throw new IllegalArgumentException("Unknown package: " + packageName);
+        }
+        return pkg.isOrphaned;
+    }
+
     int getApplicationEnabledSettingLPr(String packageName, int userId) {
         final PackageSetting pkg = mPackages.get(packageName);
         if (pkg == null) {
diff --git a/services/core/java/com/android/server/wallpaper/WallpaperManagerService.java b/services/core/java/com/android/server/wallpaper/WallpaperManagerService.java
index af7e66d..4c7f9eb 100644
--- a/services/core/java/com/android/server/wallpaper/WallpaperManagerService.java
+++ b/services/core/java/com/android/server/wallpaper/WallpaperManagerService.java
@@ -73,6 +73,8 @@
 import android.service.wallpaper.IWallpaperEngine;
 import android.service.wallpaper.IWallpaperService;
 import android.service.wallpaper.WallpaperService;
+import android.system.ErrnoException;
+import android.system.Os;
 import android.util.EventLog;
 import android.util.Slog;
 import android.util.SparseArray;
@@ -224,6 +226,17 @@
                         + " whichPending=0x" + Integer.toHexString(wallpaper.whichPending)
                         + " written=" + written);
             }
+
+            if (moved && lockWallpaperChanged) {
+                // We just migrated sys -> lock to preserve imagery for an impending
+                // new system-only wallpaper.  Tell keyguard about it but that's it.
+                if (DEBUG) {
+                    Slog.i(TAG, "Sys -> lock MOVED_TO");
+                }
+                notifyLockWallpaperChanged();
+                return;
+            }
+
             synchronized (mLock) {
                 if (sysWallpaperChanged || lockWallpaperChanged) {
                     notifyCallbacksLocked(wallpaper);
@@ -276,14 +289,7 @@
                                     mLockWallpaperMap.remove(wallpaper.userId);
                                 }
                                 // and in any case, tell keyguard about it
-                                final IWallpaperManagerCallback cb = mKeyguardListener;
-                                if (cb != null) {
-                                    try {
-                                        cb.onWallpaperChanged();
-                                    } catch (RemoteException e) {
-                                        // Oh well it went away; no big deal
-                                    }
-                                }
+                                notifyLockWallpaperChanged();
                             }
                             saveSettingsLocked(wallpaper.userId);
                         }
@@ -293,6 +299,17 @@
         }
     }
 
+    void notifyLockWallpaperChanged() {
+        final IWallpaperManagerCallback cb = mKeyguardListener;
+        if (cb != null) {
+            try {
+                cb.onWallpaperChanged();
+            } catch (RemoteException e) {
+                // Oh well it went away; no big deal
+            }
+        }
+    }
+
     /**
      * Once a new wallpaper has been written via setWallpaper(...), it needs to be cropped
      * for display.
@@ -1334,6 +1351,17 @@
             if (DEBUG) Slog.v(TAG, "setWallpaper which=0x" + Integer.toHexString(which));
             WallpaperData wallpaper;
 
+            /* If we're setting system but not lock, and lock is currently sharing the system
+             * wallpaper, we need to migrate that image over to being lock-only before
+             * the caller here writes new bitmap data.
+             */
+            if (which == FLAG_SYSTEM && mLockWallpaperMap.get(userId) == null) {
+                if (DEBUG) {
+                    Slog.i(TAG, "Migrating system->lock to preserve");
+                }
+                migrateSystemToLockWallpaperLocked(userId);
+            }
+
             wallpaper = getWallpaperSafeLocked(userId, which);
             final long ident = Binder.clearCallingIdentity();
             try {
@@ -1354,6 +1382,38 @@
         }
     }
 
+    private void migrateSystemToLockWallpaperLocked(int userId) {
+        WallpaperData sysWP = mWallpaperMap.get(userId);
+        if (sysWP == null) {
+            if (DEBUG) {
+                Slog.i(TAG, "No system wallpaper?  Not tracking for lock-only");
+            }
+            return;
+        }
+
+        // We know a-priori that there is no lock-only wallpaper currently
+        WallpaperData lockWP = new WallpaperData(userId,
+                WALLPAPER_LOCK_ORIG, WALLPAPER_LOCK_CROP);
+        lockWP.wallpaperId = sysWP.wallpaperId;
+        lockWP.cropHint.set(sysWP.cropHint);
+        lockWP.width = sysWP.width;
+        lockWP.height = sysWP.height;
+        lockWP.allowBackup = false;
+
+        // Migrate the bitmap files outright; no need to copy
+        try {
+            Os.rename(sysWP.wallpaperFile.getAbsolutePath(), lockWP.wallpaperFile.getAbsolutePath());
+            Os.rename(sysWP.cropFile.getAbsolutePath(), lockWP.cropFile.getAbsolutePath());
+        } catch (ErrnoException e) {
+            Slog.e(TAG, "Can't migrate system wallpaper: " + e.getMessage());
+            lockWP.wallpaperFile.delete();
+            lockWP.cropFile.delete();
+            return;
+        }
+
+        mLockWallpaperMap.put(userId, lockWP);
+    }
+
     ParcelFileDescriptor updateWallpaperBitmapLocked(String name, WallpaperData wallpaper,
             Bundle extras) {
         if (name == null) name = "";
diff --git a/services/core/java/com/android/server/wm/TaskPositioner.java b/services/core/java/com/android/server/wm/TaskPositioner.java
index ae70aa8..222087d 100644
--- a/services/core/java/com/android/server/wm/TaskPositioner.java
+++ b/services/core/java/com/android/server/wm/TaskPositioner.java
@@ -204,7 +204,7 @@
                                     : DOCKED_STACK_CREATE_MODE_BOTTOM_OR_RIGHT;
                             mService.mActivityManager.moveTaskToDockedStack(
                                     mTask.mTaskId, createMode, true /*toTop*/, true /* animate */,
-                                    null /* initialBounds */);
+                                    null /* initialBounds */, false /* moveHomeStackFront */);
                         }
                     } catch(RemoteException e) {}
 
diff --git a/services/core/java/com/android/server/wm/WindowStateAnimator.java b/services/core/java/com/android/server/wm/WindowStateAnimator.java
index e319407..a0784b5 100644
--- a/services/core/java/com/android/server/wm/WindowStateAnimator.java
+++ b/services/core/java/com/android/server/wm/WindowStateAnimator.java
@@ -1448,7 +1448,7 @@
         // the same app again before the app's surface is destroyed or saved, the surface
         // is always ready in the whole process.) If we go ahead here, the opening app
         // will be shown with the full size before the correct animation spec arrives.
-        if (mService.mAppTransition.isReady() && isDummyAnimation() &&
+        if (mService.mAppTransition.isTransitionSet() && isDummyAnimation() &&
                 mService.mOpeningApps.contains(w.mAppToken)) {
             return;
         }
diff --git a/services/print/java/com/android/server/print/PrintManagerService.java b/services/print/java/com/android/server/print/PrintManagerService.java
index f2c995b..1feb816 100644
--- a/services/print/java/com/android/server/print/PrintManagerService.java
+++ b/services/print/java/com/android/server/print/PrintManagerService.java
@@ -836,6 +836,8 @@
             BackgroundThread.getHandler().post(new Runnable() {
                 @Override
                 public void run() {
+                    if (!mUserManager.isUserUnlockingOrUnlocked(userId)) return;
+
                     UserState userState;
                     synchronized (mLock) {
                         userState = getOrCreateUserStateLocked(userId, true);
diff --git a/services/voiceinteraction/java/com/android/server/soundtrigger/SoundTriggerHelper.java b/services/voiceinteraction/java/com/android/server/soundtrigger/SoundTriggerHelper.java
index 612e5e8..f58de26 100644
--- a/services/voiceinteraction/java/com/android/server/soundtrigger/SoundTriggerHelper.java
+++ b/services/voiceinteraction/java/com/android/server/soundtrigger/SoundTriggerHelper.java
@@ -501,7 +501,10 @@
                     if (status != STATUS_OK) {
                         Slog.w(TAG, "Error stopping keyphrase model: " + model.getHandle());
                     }
-                    model.clearState();
+                    model.setStopped();
+                    model.setRequested(false);
+                    model.clearCallback();
+                    model.setRecognitionConfig(null);
                 }
             }
             internalClearGlobalStateLocked();