Update sample prebults for 2017-02 release (nyc-mr1-dev)

developers/samples/android commit: 6f3586bc08b96d14d8f1315f4839ac59aa39798c

Change-Id: Ifcba396ceecce1d5f9328dfa489508a8a1787bab
diff --git a/prebuilts/gradle/AgendaData/Application/build.gradle b/prebuilts/gradle/AgendaData/Application/build.gradle
index 647942d..96b8c6a 100644
--- a/prebuilts/gradle/AgendaData/Application/build.gradle
+++ b/prebuilts/gradle/AgendaData/Application/build.gradle
@@ -40,7 +40,7 @@
 
     defaultConfig {
         minSdkVersion 18
-        targetSdkVersion 23
+        targetSdkVersion 25
     }
 
     compileOptions {
diff --git a/prebuilts/gradle/AgendaData/Application/src/main/AndroidManifest.xml b/prebuilts/gradle/AgendaData/Application/src/main/AndroidManifest.xml
index ad6cccd..083b223 100644
--- a/prebuilts/gradle/AgendaData/Application/src/main/AndroidManifest.xml
+++ b/prebuilts/gradle/AgendaData/Application/src/main/AndroidManifest.xml
@@ -18,7 +18,7 @@
           package="com.example.android.wearable.agendadata">
 
     <uses-sdk android:minSdkVersion="18"
-        android:targetSdkVersion="23" />
+        android:targetSdkVersion="25" />
 
     <!-- BEGIN_INCLUDE(manifest) -->
 
diff --git a/prebuilts/gradle/AgendaData/Wearable/build.gradle b/prebuilts/gradle/AgendaData/Wearable/build.gradle
index b1d5ffd..89e2f84 100644
--- a/prebuilts/gradle/AgendaData/Wearable/build.gradle
+++ b/prebuilts/gradle/AgendaData/Wearable/build.gradle
@@ -20,7 +20,9 @@
     compile 'com.google.android.gms:play-services-wearable:10.0.1'
     compile 'com.android.support:support-v13:25.0.1'
 
-    compile 'com.google.android.support:wearable:1.4.0'
+    provided 'com.google.android.wearable:wearable:2.0.0'
+
+    compile 'com.google.android.support:wearable:2.0.0'
 
 }
 
@@ -43,7 +45,7 @@
 
         minSdkVersion 18
 
-        targetSdkVersion 23
+        targetSdkVersion 25
     }
 
     compileOptions {
diff --git a/prebuilts/gradle/AgendaData/Wearable/src/main/AndroidManifest.xml b/prebuilts/gradle/AgendaData/Wearable/src/main/AndroidManifest.xml
index 87bed70..f8bbdd8 100644
--- a/prebuilts/gradle/AgendaData/Wearable/src/main/AndroidManifest.xml
+++ b/prebuilts/gradle/AgendaData/Wearable/src/main/AndroidManifest.xml
@@ -18,7 +18,7 @@
         package="com.example.android.wearable.agendadata" >
 
     <uses-sdk android:minSdkVersion="20"
-        android:targetSdkVersion="23" />
+        android:targetSdkVersion="25" />
 
     <uses-feature android:name="android.hardware.type.watch" />
 
@@ -28,6 +28,10 @@
             >
 
         <meta-data
+            android:name="com.google.android.wearable.standalone"
+            android:value="false" />
+
+        <meta-data
                 android:name="com.google.android.gms.version"
                 android:value="@integer/google_play_services_version" />
 
diff --git a/prebuilts/gradle/AlwaysOn/NOTICE b/prebuilts/gradle/AlwaysOn/NOTICE
index 29ea77b..8f8105a 100644
--- a/prebuilts/gradle/AlwaysOn/NOTICE
+++ b/prebuilts/gradle/AlwaysOn/NOTICE
@@ -1,7 +1,7 @@
 
 This sample uses the following software:
 
-Copyright 2016 The Android Open Source Project
+Copyright 2017 The Android Open Source Project
 
 Licensed under the Apache License, Version 2.0 (the "License");
 you may not use this file except in compliance with the License.
diff --git a/prebuilts/gradle/AlwaysOn/Wearable/build.gradle b/prebuilts/gradle/AlwaysOn/Wearable/build.gradle
index 1c7e896..f8586fb 100644
--- a/prebuilts/gradle/AlwaysOn/Wearable/build.gradle
+++ b/prebuilts/gradle/AlwaysOn/Wearable/build.gradle
@@ -15,14 +15,14 @@
 
 dependencies {
 
-    compile 'com.google.android.support:wearable:1.3.0'
 
-    provided "com.google.android.wearable:wearable:1.0.0"
 
     compile 'com.google.android.gms:play-services-wearable:10.0.1'
     compile 'com.android.support:support-v13:25.0.1'
 
-    compile 'com.google.android.support:wearable:1.4.0'
+    provided 'com.google.android.wearable:wearable:2.0.0'
+
+    compile 'com.google.android.support:wearable:2.0.0'
 
 }
 
@@ -45,7 +45,7 @@
 
         minSdkVersion 24
 
-        targetSdkVersion 22
+        targetSdkVersion 25
     }
 
     compileOptions {
diff --git a/prebuilts/gradle/AlwaysOn/Wearable/src/main/AndroidManifest.xml b/prebuilts/gradle/AlwaysOn/Wearable/src/main/AndroidManifest.xml
index 12c4b03..c105808 100644
--- a/prebuilts/gradle/AlwaysOn/Wearable/src/main/AndroidManifest.xml
+++ b/prebuilts/gradle/AlwaysOn/Wearable/src/main/AndroidManifest.xml
@@ -25,7 +25,12 @@
 
     <application
         android:allowBackup="false"
-        android:label="@string/app_name">
+        android:label="@string/app_name"
+        android:theme="@android:style/Theme.DeviceDefault">
+
+        <meta-data
+            android:name="com.google.android.wearable.standalone"
+            android:value="true" />
 
         <!--If you want your app to run on pre-22, then set required to false -->
         <uses-library android:name="com.google.android.wearable" android:required="false" />
diff --git a/prebuilts/gradle/AppRestrictionEnforcer/.google/packaging.yaml b/prebuilts/gradle/AppRestrictionEnforcer/.google/packaging.yaml
index 8784363..911b0d2 100644
--- a/prebuilts/gradle/AppRestrictionEnforcer/.google/packaging.yaml
+++ b/prebuilts/gradle/AppRestrictionEnforcer/.google/packaging.yaml
@@ -6,8 +6,14 @@
 ---
 status:       PUBLISHED
 technologies: [Android]
-categories:   [Admin]
+categories:   [Device Admin]
 languages:    [Java]
 solutions:    [Mobile]
 github:       android-AppRestrictionEnforcer
+level:        ADVANCED
+icon:         screenshots/big_icon.png
+apiRefs:
+    - android:android.app.admin.DevicePolicyManager
+    - android:android.content.RestrictionEntry
+    - android:android.content.RestrictionsManager
 license: apache2
diff --git a/prebuilts/gradle/AppRestrictionEnforcer/Application/src/main/AndroidManifest.xml b/prebuilts/gradle/AppRestrictionEnforcer/Application/src/main/AndroidManifest.xml
index c66b4b3..1cd6ae8 100644
--- a/prebuilts/gradle/AppRestrictionEnforcer/Application/src/main/AndroidManifest.xml
+++ b/prebuilts/gradle/AppRestrictionEnforcer/Application/src/main/AndroidManifest.xml
@@ -16,15 +16,17 @@
 -->
 
 <manifest xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:tools="http://schemas.android.com/tools"
     package="com.example.android.apprestrictionenforcer"
     android:versionCode="1"
     android:versionName="1.0">
 
     <application
         android:allowBackup="true"
-        android:icon="@drawable/ic_launcher"
+        android:icon="@mipmap/ic_launcher"
         android:label="@string/app_name"
-        android:theme="@style/AppTheme">
+        android:theme="@style/AppTheme"
+        tools:ignore="GoogleAppIndexingWarning">
 
         <activity
             android:name=".MainActivity"
diff --git a/prebuilts/gradle/AppRestrictionEnforcer/Application/src/main/java/com/example/android/apprestrictionenforcer/Constants.java b/prebuilts/gradle/AppRestrictionEnforcer/Application/src/main/java/com/example/android/apprestrictionenforcer/Constants.java
index bb4e958..0f8a1e3 100644
--- a/prebuilts/gradle/AppRestrictionEnforcer/Application/src/main/java/com/example/android/apprestrictionenforcer/Constants.java
+++ b/prebuilts/gradle/AppRestrictionEnforcer/Application/src/main/java/com/example/android/apprestrictionenforcer/Constants.java
@@ -21,7 +21,6 @@
     /**
      * Package name of the AppRestrictionSchema sample.
      */
-    public static final String PACKAGE_NAME_APP_RESTRICTION_SCHEMA
-            = "com.example.android.apprestrictionschema";
+    String PACKAGE_NAME_APP_RESTRICTION_SCHEMA = "com.example.android.apprestrictionschema";
 
 }
diff --git a/prebuilts/gradle/AppRestrictionEnforcer/Application/src/main/java/com/example/android/apprestrictionenforcer/ItemAddFragment.java b/prebuilts/gradle/AppRestrictionEnforcer/Application/src/main/java/com/example/android/apprestrictionenforcer/ItemAddFragment.java
index 091a0a8..a5f6628 100644
--- a/prebuilts/gradle/AppRestrictionEnforcer/Application/src/main/java/com/example/android/apprestrictionenforcer/ItemAddFragment.java
+++ b/prebuilts/gradle/AppRestrictionEnforcer/Application/src/main/java/com/example/android/apprestrictionenforcer/ItemAddFragment.java
@@ -16,7 +16,6 @@
 
 package com.example.android.apprestrictionenforcer;
 
-import android.app.Activity;
 import android.content.Context;
 import android.os.Bundle;
 import android.support.annotation.Nullable;
diff --git a/prebuilts/gradle/AppRestrictionEnforcer/Application/src/main/java/com/example/android/apprestrictionenforcer/MainActivity.java b/prebuilts/gradle/AppRestrictionEnforcer/Application/src/main/java/com/example/android/apprestrictionenforcer/MainActivity.java
index 85eace9..e250e74 100644
--- a/prebuilts/gradle/AppRestrictionEnforcer/Application/src/main/java/com/example/android/apprestrictionenforcer/MainActivity.java
+++ b/prebuilts/gradle/AppRestrictionEnforcer/Application/src/main/java/com/example/android/apprestrictionenforcer/MainActivity.java
@@ -20,6 +20,7 @@
 import android.content.Context;
 import android.content.pm.ApplicationInfo;
 import android.content.pm.PackageManager;
+import android.os.Build;
 import android.os.Bundle;
 import android.support.v4.app.FragmentActivity;
 
@@ -38,9 +39,16 @@
                 showSetupProfile();
             } else {
                 try {
+                    int packageFlags;
+                    if (Build.VERSION.SDK_INT < 24) {
+                        //noinspection deprecation
+                        packageFlags = PackageManager.GET_UNINSTALLED_PACKAGES;
+                    } else {
+                        packageFlags = PackageManager.MATCH_UNINSTALLED_PACKAGES;
+                    }
                     ApplicationInfo info = packageManager.getApplicationInfo(
                             Constants.PACKAGE_NAME_APP_RESTRICTION_SCHEMA,
-                            PackageManager.GET_UNINSTALLED_PACKAGES);
+                            packageFlags);
                     if (0 == (info.flags & ApplicationInfo.FLAG_INSTALLED)) {
                         // Need to reinstall the sample app
                         showStatusProfile();
diff --git a/prebuilts/gradle/AppRestrictionEnforcer/Application/src/main/java/com/example/android/apprestrictionenforcer/SetupProfileFragment.java b/prebuilts/gradle/AppRestrictionEnforcer/Application/src/main/java/com/example/android/apprestrictionenforcer/SetupProfileFragment.java
index 29c36d4..28bd1da 100644
--- a/prebuilts/gradle/AppRestrictionEnforcer/Application/src/main/java/com/example/android/apprestrictionenforcer/SetupProfileFragment.java
+++ b/prebuilts/gradle/AppRestrictionEnforcer/Application/src/main/java/com/example/android/apprestrictionenforcer/SetupProfileFragment.java
@@ -80,6 +80,7 @@
             intent.putExtra(EXTRA_PROVISIONING_DEVICE_ADMIN_COMPONENT_NAME,
                     EnforcerDeviceAdminReceiver.getComponentName(activity));
         } else {
+            //noinspection deprecation
             intent.putExtra(EXTRA_PROVISIONING_DEVICE_ADMIN_PACKAGE_NAME,
                     activity.getApplicationContext().getPackageName());
             intent.putExtra(EXTRA_DEVICE_ADMIN, EnforcerDeviceAdminReceiver.getComponentName(activity));
diff --git a/prebuilts/gradle/AppRestrictionEnforcer/Application/src/main/java/com/example/android/apprestrictionenforcer/StatusFragment.java b/prebuilts/gradle/AppRestrictionEnforcer/Application/src/main/java/com/example/android/apprestrictionenforcer/StatusFragment.java
index f4a4eb7..ed32580 100644
--- a/prebuilts/gradle/AppRestrictionEnforcer/Application/src/main/java/com/example/android/apprestrictionenforcer/StatusFragment.java
+++ b/prebuilts/gradle/AppRestrictionEnforcer/Application/src/main/java/com/example/android/apprestrictionenforcer/StatusFragment.java
@@ -20,6 +20,7 @@
 import android.app.admin.DevicePolicyManager;
 import android.content.pm.ApplicationInfo;
 import android.content.pm.PackageManager;
+import android.os.Build;
 import android.os.Bundle;
 import android.support.annotation.Nullable;
 import android.support.v4.app.Fragment;
@@ -85,9 +86,16 @@
     private void updateUi(Activity activity) {
         PackageManager packageManager = activity.getPackageManager();
         try {
+            int packageFlags;
+            if (Build.VERSION.SDK_INT < 24) {
+                //noinspection deprecation
+                packageFlags = PackageManager.GET_UNINSTALLED_PACKAGES;
+            } else {
+                packageFlags = PackageManager.MATCH_UNINSTALLED_PACKAGES;
+            }
             ApplicationInfo info = packageManager.getApplicationInfo(
                     Constants.PACKAGE_NAME_APP_RESTRICTION_SCHEMA,
-                    PackageManager.GET_UNINSTALLED_PACKAGES);
+                    packageFlags);
             DevicePolicyManager devicePolicyManager =
                     (DevicePolicyManager) activity.getSystemService(Activity.DEVICE_POLICY_SERVICE);
             if ((info.flags & ApplicationInfo.FLAG_INSTALLED) != 0) {
diff --git a/prebuilts/gradle/AppRestrictionEnforcer/Application/src/main/res/drawable-hdpi/ic_launcher.png b/prebuilts/gradle/AppRestrictionEnforcer/Application/src/main/res/drawable-hdpi/ic_launcher.png
deleted file mode 100644
index e7bd161..0000000
--- a/prebuilts/gradle/AppRestrictionEnforcer/Application/src/main/res/drawable-hdpi/ic_launcher.png
+++ /dev/null
Binary files differ
diff --git a/prebuilts/gradle/AppRestrictionEnforcer/Application/src/main/res/drawable-mdpi/ic_launcher.png b/prebuilts/gradle/AppRestrictionEnforcer/Application/src/main/res/drawable-mdpi/ic_launcher.png
deleted file mode 100644
index 4c42c9c..0000000
--- a/prebuilts/gradle/AppRestrictionEnforcer/Application/src/main/res/drawable-mdpi/ic_launcher.png
+++ /dev/null
Binary files differ
diff --git a/prebuilts/gradle/AppRestrictionEnforcer/Application/src/main/res/drawable-xhdpi/ic_launcher.png b/prebuilts/gradle/AppRestrictionEnforcer/Application/src/main/res/drawable-xhdpi/ic_launcher.png
deleted file mode 100644
index 3ec3368..0000000
--- a/prebuilts/gradle/AppRestrictionEnforcer/Application/src/main/res/drawable-xhdpi/ic_launcher.png
+++ /dev/null
Binary files differ
diff --git a/prebuilts/gradle/AppRestrictionEnforcer/Application/src/main/res/drawable-xxhdpi/ic_launcher.png b/prebuilts/gradle/AppRestrictionEnforcer/Application/src/main/res/drawable-xxhdpi/ic_launcher.png
deleted file mode 100644
index 730f80c..0000000
--- a/prebuilts/gradle/AppRestrictionEnforcer/Application/src/main/res/drawable-xxhdpi/ic_launcher.png
+++ /dev/null
Binary files differ
diff --git a/prebuilts/gradle/AppRestrictionEnforcer/Application/src/main/res/layout/fragment_setup_profile.xml b/prebuilts/gradle/AppRestrictionEnforcer/Application/src/main/res/layout/fragment_setup_profile.xml
index 8fde91f..c219395 100644
--- a/prebuilts/gradle/AppRestrictionEnforcer/Application/src/main/res/layout/fragment_setup_profile.xml
+++ b/prebuilts/gradle/AppRestrictionEnforcer/Application/src/main/res/layout/fragment_setup_profile.xml
@@ -18,7 +18,7 @@
     xmlns:tools="http://schemas.android.com/tools"
     android:layout_width="match_parent"
     android:layout_height="match_parent"
-    tools:context="com.example.android.basicmanagedprofile.MainActivity.MainFragment">
+    tools:context="com.example.android.apprestrictionenforcer.MainActivity">
 
     <LinearLayout
         android:layout_width="match_parent"
diff --git a/prebuilts/gradle/AppRestrictionEnforcer/Application/src/main/res/layout/separator.xml b/prebuilts/gradle/AppRestrictionEnforcer/Application/src/main/res/layout/separator.xml
deleted file mode 100644
index 6927d80..0000000
--- a/prebuilts/gradle/AppRestrictionEnforcer/Application/src/main/res/layout/separator.xml
+++ /dev/null
@@ -1,22 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
-Copyright 2014 The Android Open Source Project
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
--->
-<View xmlns:android="http://schemas.android.com/apk/res/android"
-      android:layout_width="match_parent"
-      android:layout_height="1dp"
-      android:layout_marginBottom="@dimen/margin_medium"
-      android:layout_marginTop="@dimen/margin_medium"
-      android:background="#9000"/>
diff --git a/prebuilts/gradle/AppRestrictionEnforcer/Application/src/main/res/mipmap-hdpi/ic_launcher.png b/prebuilts/gradle/AppRestrictionEnforcer/Application/src/main/res/mipmap-hdpi/ic_launcher.png
new file mode 100644
index 0000000..7e0b8c8
--- /dev/null
+++ b/prebuilts/gradle/AppRestrictionEnforcer/Application/src/main/res/mipmap-hdpi/ic_launcher.png
Binary files differ
diff --git a/prebuilts/gradle/AppRestrictionEnforcer/Application/src/main/res/mipmap-mdpi/ic_launcher.png b/prebuilts/gradle/AppRestrictionEnforcer/Application/src/main/res/mipmap-mdpi/ic_launcher.png
new file mode 100644
index 0000000..963c36e
--- /dev/null
+++ b/prebuilts/gradle/AppRestrictionEnforcer/Application/src/main/res/mipmap-mdpi/ic_launcher.png
Binary files differ
diff --git a/prebuilts/gradle/AppRestrictionEnforcer/Application/src/main/res/mipmap-xhdpi/ic_launcher.png b/prebuilts/gradle/AppRestrictionEnforcer/Application/src/main/res/mipmap-xhdpi/ic_launcher.png
new file mode 100644
index 0000000..6e0f52d
--- /dev/null
+++ b/prebuilts/gradle/AppRestrictionEnforcer/Application/src/main/res/mipmap-xhdpi/ic_launcher.png
Binary files differ
diff --git a/prebuilts/gradle/AppRestrictionEnforcer/Application/src/main/res/mipmap-xxhdpi/ic_launcher.png b/prebuilts/gradle/AppRestrictionEnforcer/Application/src/main/res/mipmap-xxhdpi/ic_launcher.png
new file mode 100644
index 0000000..3ff049c
--- /dev/null
+++ b/prebuilts/gradle/AppRestrictionEnforcer/Application/src/main/res/mipmap-xxhdpi/ic_launcher.png
Binary files differ
diff --git a/prebuilts/gradle/AppRestrictionEnforcer/Application/src/main/res/mipmap-xxxhdpi/ic_launcher.png b/prebuilts/gradle/AppRestrictionEnforcer/Application/src/main/res/mipmap-xxxhdpi/ic_launcher.png
new file mode 100644
index 0000000..9bf83de
--- /dev/null
+++ b/prebuilts/gradle/AppRestrictionEnforcer/Application/src/main/res/mipmap-xxxhdpi/ic_launcher.png
Binary files differ
diff --git a/prebuilts/gradle/AppRestrictionEnforcer/Application/src/main/res/values/base-strings.xml b/prebuilts/gradle/AppRestrictionEnforcer/Application/src/main/res/values/base-strings.xml
index dbf51bd..9e3dc41 100644
--- a/prebuilts/gradle/AppRestrictionEnforcer/Application/src/main/res/values/base-strings.xml
+++ b/prebuilts/gradle/AppRestrictionEnforcer/Application/src/main/res/values/base-strings.xml
@@ -22,7 +22,7 @@
         
             
 	    This sample demonstrates how to set restrictions to other apps as a profile owner.
-	    Use AppRestrictionSchema sample as a app with available restrictions.
+	    Use the AppRestrictionSchema sample to set restrictions.
             
         
         ]]>
diff --git a/prebuilts/gradle/AppRestrictionEnforcer/Application/src/main/res/values/strings.xml b/prebuilts/gradle/AppRestrictionEnforcer/Application/src/main/res/values/strings.xml
index 07e1c85..88fe8cc 100644
--- a/prebuilts/gradle/AppRestrictionEnforcer/Application/src/main/res/values/strings.xml
+++ b/prebuilts/gradle/AppRestrictionEnforcer/Application/src/main/res/values/strings.xml
@@ -22,8 +22,6 @@
     <string name="status_need_reinstall">AppRestrictionSchema needs reinstalling.</string>
     <string name="unhide">Activate AppRestrictionSchema</string>
     <string name="allow_saying_hello">Allow AppRestrictionSchema to say hello: </string>
-    <string name="allowed">Allowed</string>
-    <string name="disallowed">Disallowed</string>
     <string name="profile_name">AppRestrictionEnforcer </string>
     <string name="message">Message: </string>
     <string name="number">Number: </string>
diff --git a/prebuilts/gradle/AppRestrictionEnforcer/Application/tests/src/com/example/android/apprestrictionenforcer/tests/SampleTests.java b/prebuilts/gradle/AppRestrictionEnforcer/Application/tests/src/com/example/android/apprestrictionenforcer/tests/SampleTests.java
deleted file mode 100644
index 0404d95..0000000
--- a/prebuilts/gradle/AppRestrictionEnforcer/Application/tests/src/com/example/android/apprestrictionenforcer/tests/SampleTests.java
+++ /dev/null
@@ -1,61 +0,0 @@
-/*
-* Copyright (C) 2013 The Android Open Source Project
-*
-* Licensed under the Apache License, Version 2.0 (the "License");
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-*
-*      http://www.apache.org/licenses/LICENSE-2.0
-*
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*/
-package com.example.android.apprestrictionenforcer.tests;
-
-import com.example.android.apprestrictionenforcer.*;
-
-import android.test.ActivityInstrumentationTestCase2;
-
-/**
-* Tests for AppRestrictionEnforcer sample.
-*/
-public class SampleTests extends ActivityInstrumentationTestCase2<MainActivity> {
-
-    private MainActivity mTestActivity;
-    private SetupProfileFragment mTestFragment;
-
-    public SampleTests() {
-        super(MainActivity.class);
-    }
-
-    @Override
-    protected void setUp() throws Exception {
-        super.setUp();
-
-        // Starts the activity under test using the default Intent with:
-        // action = {@link Intent#ACTION_MAIN}
-        // flags = {@link Intent#FLAG_ACTIVITY_NEW_TASK}
-        // All other fields are null or empty.
-        mTestActivity = getActivity();
-        mTestFragment = (SetupProfileFragment)
-            mTestActivity.getSupportFragmentManager().getFragments().get(0);
-    }
-
-    /**
-    * Test if the test fixture has been set up correctly.
-    */
-    public void testPreconditions() {
-        //Try to add a message to add context to your assertions. These messages will be shown if
-        //a tests fails and make it easy to understand why a test failed
-        assertNotNull("mTestActivity is null", mTestActivity);
-        assertNotNull("mTestFragment is null", mTestFragment);
-    }
-
-    /**
-    * Add more tests below.
-    */
-
-}
diff --git a/prebuilts/gradle/AppRestrictionEnforcer/README.md b/prebuilts/gradle/AppRestrictionEnforcer/README.md
index b10fd26..684c2c4 100644
--- a/prebuilts/gradle/AppRestrictionEnforcer/README.md
+++ b/prebuilts/gradle/AppRestrictionEnforcer/README.md
@@ -3,7 +3,26 @@
 ===================================
 
 This sample demonstrates how to set restrictions to other apps as a profile owner.
-Use AppRestrictionSchema sample as a app with available restrictions.
+            Use the AppRestrictionSchema sample to set restrictions.
+
+Introduction
+------------
+
+The [Android Device Administration API][1] allows enterprise administrators to
+enforce specific policies on a managed device. The system provides policies
+that control settings such as password complexity, screen lock, or camera
+availability. Developers can also augment this list with custom policies
+that control specific features within their applications. For example,
+a web browser could provide access to a whitelist of allowed domains.
+
+This sample demonstrates the 'admin' component and shows how a number of
+custom properties (booleans, strings, numbers, lists) can be set and
+enforced on another app.
+
+See the [AppRestrictionSchema sample][2] for further details.
+
+[1]: http://developer.android.com/guide/topics/admin/device-admin.html
+[2]: https://github.com/googlesamples/android-AppRestrictionSchema
 
 Pre-requisites
 --------------
@@ -12,6 +31,11 @@
 - Android Build Tools v25.0.2
 - Android Support Repository
 
+Screenshots
+-------------
+
+<img src="screenshots/main.png" height="400" alt="Screenshot"/> 
+
 Getting Started
 ---------------
 
diff --git a/prebuilts/gradle/AppRestrictionEnforcer/screenshots/big_icon.png b/prebuilts/gradle/AppRestrictionEnforcer/screenshots/big_icon.png
new file mode 100644
index 0000000..015cf52
--- /dev/null
+++ b/prebuilts/gradle/AppRestrictionEnforcer/screenshots/big_icon.png
Binary files differ
diff --git a/prebuilts/gradle/AppRestrictionEnforcer/screenshots/main.png b/prebuilts/gradle/AppRestrictionEnforcer/screenshots/main.png
new file mode 100644
index 0000000..3d74004
--- /dev/null
+++ b/prebuilts/gradle/AppRestrictionEnforcer/screenshots/main.png
Binary files differ
diff --git a/prebuilts/gradle/AppRestrictionSchema/.google/packaging.yaml b/prebuilts/gradle/AppRestrictionSchema/.google/packaging.yaml
index 7735a44..ddc88ae 100644
--- a/prebuilts/gradle/AppRestrictionSchema/.google/packaging.yaml
+++ b/prebuilts/gradle/AppRestrictionSchema/.google/packaging.yaml
@@ -11,7 +11,7 @@
 solutions:    [Mobile]
 github:       android-AppRestrictionSchema
 level:        ADVANCED
-icon:         Application/main/big_icon.png
+icon:         screenshots/big_icon.png
 apiRefs:
     - android:android.content.RestrictionsManager
 license: apache2
diff --git a/prebuilts/gradle/AppRestrictionSchema/Application/src/main/AndroidManifest.xml b/prebuilts/gradle/AppRestrictionSchema/Application/src/main/AndroidManifest.xml
index f8bbccc..6ef22ed 100644
--- a/prebuilts/gradle/AppRestrictionSchema/Application/src/main/AndroidManifest.xml
+++ b/prebuilts/gradle/AppRestrictionSchema/Application/src/main/AndroidManifest.xml
@@ -16,17 +16,17 @@
 -->
 
 <manifest xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:tools="http://schemas.android.com/tools"
     package="com.example.android.apprestrictionschema"
     android:versionCode="1"
     android:versionName="1.0">
 
-    <!-- uses-sdk android:minSdkVersion="21" android:targetSdkVersion="21" /-->
-
     <application
         android:allowBackup="true"
-        android:icon="@drawable/ic_launcher"
+        android:icon="@mipmap/ic_launcher"
         android:label="@string/app_name"
-        android:theme="@style/AppTheme">
+        android:theme="@style/AppTheme"
+        tools:ignore="GoogleAppIndexingWarning">
 
         <meta-data
             android:name="android.content.APP_RESTRICTIONS"
diff --git a/prebuilts/gradle/AppRestrictionSchema/Application/src/main/java/com/example/android/apprestrictionschema/AppRestrictionSchemaFragment.java b/prebuilts/gradle/AppRestrictionSchema/Application/src/main/java/com/example/android/apprestrictionschema/AppRestrictionSchemaFragment.java
index f15bd9d..3f4cea0 100644
--- a/prebuilts/gradle/AppRestrictionSchema/Application/src/main/java/com/example/android/apprestrictionschema/AppRestrictionSchemaFragment.java
+++ b/prebuilts/gradle/AppRestrictionSchema/Application/src/main/java/com/example/android/apprestrictionschema/AppRestrictionSchemaFragment.java
@@ -81,17 +81,11 @@
         mTextNumber = (TextView) view.findViewById(R.id.your_number);
         mTextRank = (TextView) view.findViewById(R.id.your_rank);
         mTextApprovals = (TextView) view.findViewById(R.id.approvals_you_have);
-        View bundleSeparator = view.findViewById(R.id.bundle_separator);
-        View bundleArraySeparator = view.findViewById(R.id.bundle_array_separator);
         mTextItems = (TextView) view.findViewById(R.id.your_items);
         mButtonSayHello.setOnClickListener(this);
         if (BUNDLE_SUPPORTED) {
-            bundleSeparator.setVisibility(View.VISIBLE);
-            bundleArraySeparator.setVisibility(View.VISIBLE);
             mTextItems.setVisibility(View.VISIBLE);
         } else {
-            bundleSeparator.setVisibility(View.GONE);
-            bundleArraySeparator.setVisibility(View.GONE);
             mTextItems.setVisibility(View.GONE);
         }
     }
diff --git a/prebuilts/gradle/AppRestrictionSchema/Application/src/main/res/drawable-hdpi/ic_launcher.png b/prebuilts/gradle/AppRestrictionSchema/Application/src/main/res/drawable-hdpi/ic_launcher.png
deleted file mode 100644
index 74344d7..0000000
--- a/prebuilts/gradle/AppRestrictionSchema/Application/src/main/res/drawable-hdpi/ic_launcher.png
+++ /dev/null
Binary files differ
diff --git a/prebuilts/gradle/AppRestrictionSchema/Application/src/main/res/drawable-mdpi/ic_launcher.png b/prebuilts/gradle/AppRestrictionSchema/Application/src/main/res/drawable-mdpi/ic_launcher.png
deleted file mode 100644
index a01dbd7..0000000
--- a/prebuilts/gradle/AppRestrictionSchema/Application/src/main/res/drawable-mdpi/ic_launcher.png
+++ /dev/null
Binary files differ
diff --git a/prebuilts/gradle/AppRestrictionSchema/Application/src/main/res/drawable-xhdpi/ic_launcher.png b/prebuilts/gradle/AppRestrictionSchema/Application/src/main/res/drawable-xhdpi/ic_launcher.png
deleted file mode 100644
index 19bb139..0000000
--- a/prebuilts/gradle/AppRestrictionSchema/Application/src/main/res/drawable-xhdpi/ic_launcher.png
+++ /dev/null
Binary files differ
diff --git a/prebuilts/gradle/AppRestrictionSchema/Application/src/main/res/drawable-xxhdpi/ic_launcher.png b/prebuilts/gradle/AppRestrictionSchema/Application/src/main/res/drawable-xxhdpi/ic_launcher.png
deleted file mode 100644
index 9922ae6..0000000
--- a/prebuilts/gradle/AppRestrictionSchema/Application/src/main/res/drawable-xxhdpi/ic_launcher.png
+++ /dev/null
Binary files differ
diff --git a/prebuilts/gradle/AppRestrictionSchema/Application/src/main/res/layout/fragment_app_restriction_schema.xml b/prebuilts/gradle/AppRestrictionSchema/Application/src/main/res/layout/fragment_app_restriction_schema.xml
index 01bda92..de43e1a 100644
--- a/prebuilts/gradle/AppRestrictionSchema/Application/src/main/res/layout/fragment_app_restriction_schema.xml
+++ b/prebuilts/gradle/AppRestrictionSchema/Application/src/main/res/layout/fragment_app_restriction_schema.xml
@@ -1,5 +1,4 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
+<?xml version="1.0" encoding="utf-8"?><!--
 Copyright 2014 The Android Open Source Project
 
 Licensed under the Apache License, Version 2.0 (the "License");
@@ -17,9 +16,9 @@
 
 
 <ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
-            xmlns:tools="http://schemas.android.com/tools"
-            android:layout_width="match_parent"
-            android:layout_height="match_parent">
+    xmlns:tools="http://schemas.android.com/tools"
+    android:layout_width="match_parent"
+    android:layout_height="match_parent">
 
     <LinearLayout
         android:layout_width="match_parent"
@@ -32,50 +31,50 @@
             android:layout_width="match_parent"
             android:layout_height="wrap_content"
             android:textAppearance="?android:attr/textAppearanceMedium"
-            tools:text="@string/explanation_can_say_hello_true"/>
+            tools:text="@string/explanation_can_say_hello_true" />
 
         <Button
             android:id="@+id/say_hello"
             android:layout_width="wrap_content"
             android:layout_height="wrap_content"
+            android:layout_marginBottom="@dimen/margin_medium"
             android:layout_marginStart="@dimen/margin_medium"
-            android:text="@string/action_can_say_hello"/>
-
-        <include layout="@layout/separator"/>
+            android:text="@string/action_can_say_hello" />
 
         <TextView
             android:id="@+id/your_number"
             android:layout_width="match_parent"
             android:layout_height="wrap_content"
+            android:layout_marginBottom="@dimen/margin_medium"
+            android:layout_marginTop="@dimen/margin_medium"
             android:textAppearance="?android:attr/textAppearanceMedium"
-            tools:text="@string/your_number"/>
-
-        <include layout="@layout/separator"/>
+            tools:text="@string/your_number" />
 
         <TextView
             android:id="@+id/your_rank"
             android:layout_width="match_parent"
             android:layout_height="wrap_content"
+            android:layout_marginBottom="@dimen/margin_medium"
+            android:layout_marginTop="@dimen/margin_medium"
             android:textAppearance="?android:attr/textAppearanceMedium"
-            tools:text="@string/your_rank"/>
-
-        <include layout="@layout/separator" android:id="@+id/bundle_separator"/>
+            tools:text="@string/your_rank" />
 
         <TextView
             android:id="@+id/approvals_you_have"
             android:layout_width="match_parent"
             android:layout_height="wrap_content"
+            android:layout_marginBottom="@dimen/margin_medium"
+            android:layout_marginTop="@dimen/margin_medium"
             android:textAppearance="?android:attr/textAppearanceMedium"
-            tools:text="@string/approvals_you_have"/>
-
-        <include layout="@layout/separator" android:id="@+id/bundle_array_separator" />
+            tools:text="@string/approvals_you_have" />
 
         <TextView
             android:id="@+id/your_items"
             android:layout_width="match_parent"
             android:layout_height="wrap_content"
+            android:layout_marginTop="@dimen/margin_medium"
             android:textAppearance="?android:attr/textAppearanceMedium"
-            tools:text="@string/your_items"/>
+            tools:text="@string/your_items" />
 
     </LinearLayout>
 
diff --git a/prebuilts/gradle/AppRestrictionSchema/Application/src/main/res/layout/separator.xml b/prebuilts/gradle/AppRestrictionSchema/Application/src/main/res/layout/separator.xml
deleted file mode 100644
index 6927d80..0000000
--- a/prebuilts/gradle/AppRestrictionSchema/Application/src/main/res/layout/separator.xml
+++ /dev/null
@@ -1,22 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
-Copyright 2014 The Android Open Source Project
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
--->
-<View xmlns:android="http://schemas.android.com/apk/res/android"
-      android:layout_width="match_parent"
-      android:layout_height="1dp"
-      android:layout_marginBottom="@dimen/margin_medium"
-      android:layout_marginTop="@dimen/margin_medium"
-      android:background="#9000"/>
diff --git a/prebuilts/gradle/AppRestrictionSchema/Application/src/main/res/mipmap-hdpi/ic_launcher.png b/prebuilts/gradle/AppRestrictionSchema/Application/src/main/res/mipmap-hdpi/ic_launcher.png
new file mode 100644
index 0000000..419e628
--- /dev/null
+++ b/prebuilts/gradle/AppRestrictionSchema/Application/src/main/res/mipmap-hdpi/ic_launcher.png
Binary files differ
diff --git a/prebuilts/gradle/AppRestrictionSchema/Application/src/main/res/mipmap-mdpi/ic_launcher.png b/prebuilts/gradle/AppRestrictionSchema/Application/src/main/res/mipmap-mdpi/ic_launcher.png
new file mode 100644
index 0000000..16ec1ce
--- /dev/null
+++ b/prebuilts/gradle/AppRestrictionSchema/Application/src/main/res/mipmap-mdpi/ic_launcher.png
Binary files differ
diff --git a/prebuilts/gradle/AppRestrictionSchema/Application/src/main/res/mipmap-xhdpi/ic_launcher.png b/prebuilts/gradle/AppRestrictionSchema/Application/src/main/res/mipmap-xhdpi/ic_launcher.png
new file mode 100644
index 0000000..4a1929e
--- /dev/null
+++ b/prebuilts/gradle/AppRestrictionSchema/Application/src/main/res/mipmap-xhdpi/ic_launcher.png
Binary files differ
diff --git a/prebuilts/gradle/AppRestrictionSchema/Application/src/main/res/mipmap-xxhdpi/ic_launcher.png b/prebuilts/gradle/AppRestrictionSchema/Application/src/main/res/mipmap-xxhdpi/ic_launcher.png
new file mode 100644
index 0000000..b359964
--- /dev/null
+++ b/prebuilts/gradle/AppRestrictionSchema/Application/src/main/res/mipmap-xxhdpi/ic_launcher.png
Binary files differ
diff --git a/prebuilts/gradle/AppRestrictionSchema/Application/src/main/res/mipmap-xxxhdpi/ic_launcher.png b/prebuilts/gradle/AppRestrictionSchema/Application/src/main/res/mipmap-xxxhdpi/ic_launcher.png
new file mode 100644
index 0000000..0c3cf75
--- /dev/null
+++ b/prebuilts/gradle/AppRestrictionSchema/Application/src/main/res/mipmap-xxxhdpi/ic_launcher.png
Binary files differ
diff --git a/prebuilts/gradle/AppRestrictionSchema/screenshots/big_icon.png b/prebuilts/gradle/AppRestrictionSchema/screenshots/big_icon.png
new file mode 100644
index 0000000..b988e02
--- /dev/null
+++ b/prebuilts/gradle/AppRestrictionSchema/screenshots/big_icon.png
Binary files differ
diff --git a/prebuilts/gradle/AppRestrictions/.google/packaging.yaml b/prebuilts/gradle/AppRestrictions/.google/packaging.yaml
index a2b6f99..c5c2b92 100644
--- a/prebuilts/gradle/AppRestrictions/.google/packaging.yaml
+++ b/prebuilts/gradle/AppRestrictions/.google/packaging.yaml
@@ -6,8 +6,13 @@
 ---
 status:       PUBLISHED
 technologies: [Android]
-categories:   [Content]
+categories:   [content]
 languages:    [Java]
 solutions:    [Mobile]
 github:       android-AppRestrictions
+level:        INTERMEDIATE
+icon:         screenshots/big_icon.png
+apiRefs:
+    - android:android.content.RestrictionEntry
+    - android:android.os.UserManager
 license: apache2
diff --git a/prebuilts/gradle/AppRestrictions/Application/src/main/AndroidManifest.xml b/prebuilts/gradle/AppRestrictions/Application/src/main/AndroidManifest.xml
index ddac9cf..5c0ca64 100644
--- a/prebuilts/gradle/AppRestrictions/Application/src/main/AndroidManifest.xml
+++ b/prebuilts/gradle/AppRestrictions/Application/src/main/AndroidManifest.xml
@@ -18,6 +18,7 @@
 
 
 <manifest xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:tools="http://schemas.android.com/tools"
     package="com.example.android.apprestrictions"
     android:versionCode="1"
     android:versionName="1.0">
@@ -25,7 +26,9 @@
     <!-- Min/target SDK versions (<uses-sdk>) managed by build.gradle -->
 
     <application android:label="@string/app_name"
-        android:icon="@drawable/ic_launcher">
+        android:icon="@mipmap/ic_launcher"
+        android:allowBackup="true"
+        tools:ignore="GoogleAppIndexingWarning">
 
         <activity android:name="MainActivity"
             android:label="@string/app_name" >
diff --git a/prebuilts/gradle/AppRestrictions/Application/src/main/java/com/example/android/apprestrictions/CustomRestrictionsFragment.java b/prebuilts/gradle/AppRestrictions/Application/src/main/java/com/example/android/apprestrictions/CustomRestrictionsFragment.java
index b04dfd1..516eb51 100644
--- a/prebuilts/gradle/AppRestrictions/Application/src/main/java/com/example/android/apprestrictions/CustomRestrictionsFragment.java
+++ b/prebuilts/gradle/AppRestrictions/Application/src/main/java/com/example/android/apprestrictions/CustomRestrictionsFragment.java
@@ -29,6 +29,7 @@
 import android.preference.PreferenceFragment;
 
 import java.util.ArrayList;
+import java.util.Collections;
 import java.util.HashSet;
 import java.util.List;
 import java.util.Set;
@@ -123,16 +124,14 @@
                     mChoicePref.setValue(entry.getSelectedString());
                     mChoiceEntry = entry;
                 } else if (entry.getKey().equals(GetRestrictionsReceiver.KEY_MULTI_SELECT)) {
-                    HashSet<String> set = new HashSet<String>();
-                    for (String value : entry.getAllSelectedStrings()) {
-                        set.add(value);
-                    }
+                    HashSet<String> set = new HashSet<>();
+                    Collections.addAll(set, entry.getAllSelectedStrings());
                     mMultiPref.setValues(set);
                     mMultiEntry = entry;
                 }
             }
         } else {
-            mRestrictions = new ArrayList<RestrictionEntry>();
+            mRestrictions = new ArrayList<>();
 
             // Initializes the boolean restriction entry and updates its corresponding shared
             // preference value.
@@ -155,13 +154,11 @@
                             GetRestrictionsReceiver.KEY_MULTI_SELECT));
             mMultiEntry.setType(RestrictionEntry.TYPE_MULTI_SELECT);
             if (mMultiEntry.getAllSelectedStrings() != null) {
-                HashSet<String> set = new HashSet<String>();
+                HashSet<String> set = new HashSet<>();
                 final String[] values = mRestrictionsBundle.getStringArray(
                         GetRestrictionsReceiver.KEY_MULTI_SELECT);
                 if (values != null) {
-                    for (String value : values) {
-                        set.add(value);
-                    }
+                    Collections.addAll(set, values);
                 }
                 mMultiPref.setValues(set);
             }
@@ -173,7 +170,7 @@
         // activity finishes.
         Intent intent = new Intent(getActivity().getIntent());
         intent.putParcelableArrayListExtra(Intent.EXTRA_RESTRICTIONS_LIST,
-                new ArrayList<RestrictionEntry>(mRestrictions));
+                new ArrayList<>(mRestrictions));
         getActivity().setResult(Activity.RESULT_OK, intent);
     }
 
@@ -183,9 +180,12 @@
             mBooleanEntry.setSelectedState((Boolean) newValue);
         } else if (preference == mChoicePref) {
             mChoiceEntry.setSelectedString((String) newValue);
-        } else if (preference == mMultiPref) {
-            String[] selectedStrings = new String[((Set<String>)newValue).size()];
+        } else if (preference == mMultiPref && newValue instanceof Set) {
+            // newValue is a Set<String>, skip the lint warning.
+            //noinspection unchecked
+            String[] selectedStrings = new String[((Set<String>) newValue).size()];
             int i = 0;
+            //noinspection unchecked
             for (String value : (Set<String>) newValue) {
                 selectedStrings[i++] = value;
             }
@@ -195,7 +195,7 @@
         // Saves all the app restriction configuration changes from the custom activity.
         Intent intent = new Intent(getActivity().getIntent());
         intent.putParcelableArrayListExtra(Intent.EXTRA_RESTRICTIONS_LIST,
-                new ArrayList<RestrictionEntry>(mRestrictions));
+                new ArrayList<>(mRestrictions));
         getActivity().setResult(Activity.RESULT_OK, intent);
         return true;
     }
diff --git a/prebuilts/gradle/AppRestrictions/Application/src/main/java/com/example/android/apprestrictions/GetRestrictionsReceiver.java b/prebuilts/gradle/AppRestrictions/Application/src/main/java/com/example/android/apprestrictions/GetRestrictionsReceiver.java
index bb5a283..a17a6c1 100644
--- a/prebuilts/gradle/AppRestrictions/Application/src/main/java/com/example/android/apprestrictions/GetRestrictionsReceiver.java
+++ b/prebuilts/gradle/AppRestrictions/Application/src/main/java/com/example/android/apprestrictions/GetRestrictionsReceiver.java
@@ -88,7 +88,7 @@
     // Demonstrates the creation of standard app restriction types: boolean, single choice, and
     // multi-select.
     private ArrayList<RestrictionEntry> initRestrictions(Context context) {
-        ArrayList<RestrictionEntry> newRestrictions = new ArrayList<RestrictionEntry>();
+        ArrayList<RestrictionEntry> newRestrictions = new ArrayList<>();
         Resources res = context.getResources();
 
         RestrictionEntry reBoolean = new RestrictionEntry(KEY_BOOLEAN, false);
diff --git a/prebuilts/gradle/AppRestrictions/Application/src/main/java/com/example/android/apprestrictions/MainActivity.java b/prebuilts/gradle/AppRestrictions/Application/src/main/java/com/example/android/apprestrictions/MainActivity.java
index 57c4439..1e76fbd 100644
--- a/prebuilts/gradle/AppRestrictions/Application/src/main/java/com/example/android/apprestrictions/MainActivity.java
+++ b/prebuilts/gradle/AppRestrictions/Application/src/main/java/com/example/android/apprestrictions/MainActivity.java
@@ -120,12 +120,10 @@
      *
      * This flag is used by {@code GetRestrictionsReceiver} to determine if a custom app
      * restriction activity should be used.
-     *
-     * @param view
      */
     public void onCustomClicked(View view) {
         final SharedPreferences.Editor editor =
                 PreferenceManager.getDefaultSharedPreferences(this).edit();
-        editor.putBoolean(CUSTOM_CONFIG_KEY, mCustomConfig.isChecked()).commit();
+        editor.putBoolean(CUSTOM_CONFIG_KEY, mCustomConfig.isChecked()).apply();
     }
 }
diff --git a/prebuilts/gradle/AppRestrictions/Application/src/main/res/drawable-hdpi/ic_launcher.png b/prebuilts/gradle/AppRestrictions/Application/src/main/res/drawable-hdpi/ic_launcher.png
deleted file mode 100755
index f36c473..0000000
--- a/prebuilts/gradle/AppRestrictions/Application/src/main/res/drawable-hdpi/ic_launcher.png
+++ /dev/null
Binary files differ
diff --git a/prebuilts/gradle/AppRestrictions/Application/src/main/res/drawable-mdpi/ic_launcher.png b/prebuilts/gradle/AppRestrictions/Application/src/main/res/drawable-mdpi/ic_launcher.png
deleted file mode 100755
index 5ab2e0d..0000000
--- a/prebuilts/gradle/AppRestrictions/Application/src/main/res/drawable-mdpi/ic_launcher.png
+++ /dev/null
Binary files differ
diff --git a/prebuilts/gradle/AppRestrictions/Application/src/main/res/drawable-xhdpi/ic_launcher.png b/prebuilts/gradle/AppRestrictions/Application/src/main/res/drawable-xhdpi/ic_launcher.png
deleted file mode 100755
index 7622838..0000000
--- a/prebuilts/gradle/AppRestrictions/Application/src/main/res/drawable-xhdpi/ic_launcher.png
+++ /dev/null
Binary files differ
diff --git a/prebuilts/gradle/AppRestrictions/Application/src/main/res/drawable-xxhdpi/ic_launcher.png b/prebuilts/gradle/AppRestrictions/Application/src/main/res/drawable-xxhdpi/ic_launcher.png
deleted file mode 100755
index 7f55fef..0000000
--- a/prebuilts/gradle/AppRestrictions/Application/src/main/res/drawable-xxhdpi/ic_launcher.png
+++ /dev/null
Binary files differ
diff --git a/prebuilts/gradle/AppRestrictions/Application/src/main/res/layout/main.xml b/prebuilts/gradle/AppRestrictions/Application/src/main/res/layout/main.xml
index 55e2c8e..5228754 100644
--- a/prebuilts/gradle/AppRestrictions/Application/src/main/res/layout/main.xml
+++ b/prebuilts/gradle/AppRestrictions/Application/src/main/res/layout/main.xml
@@ -18,7 +18,7 @@
             android:layout_height="match_parent">
     <LinearLayout android:orientation="vertical"
             android:layout_width="match_parent"
-            android:layout_height="match_parent"
+            android:layout_height="wrap_content"
             android:layout_margin="20dp">
 
         <TextView android:layout_width="match_parent"
@@ -35,7 +35,7 @@
                       android:layout_width="wrap_content"
                       android:layout_height="wrap_content"
                       android:onClick="onCustomClicked"/>
-            <TextView android:layout_width="wrap_content"
+            <TextView android:layout_width="0dp"
                       android:layout_height="wrap_content"
                       android:textSize="18sp"
                       android:text="@string/custom_description"
@@ -63,7 +63,7 @@
         <LinearLayout android:orientation="horizontal"
                       android:layout_width="match_parent"
                       android:layout_height="wrap_content"
-                      android:layout_marginLeft="20dp">
+                      android:layout_marginStart="20dp">
             <TextView android:layout_width="210dp"
                       android:layout_height="wrap_content"
                       android:textSize="18sp"
@@ -80,7 +80,7 @@
         <LinearLayout android:orientation="horizontal"
                       android:layout_width="match_parent"
                       android:layout_height="wrap_content"
-                      android:layout_marginLeft="20dp">
+                      android:layout_marginStart="20dp">
             <TextView android:layout_width="210dp"
                       android:layout_height="wrap_content"
                       android:textSize="18sp"
@@ -97,7 +97,7 @@
         <LinearLayout android:orientation="horizontal"
                       android:layout_width="match_parent"
                       android:layout_height="wrap_content"
-                      android:layout_marginLeft="20dp">
+                      android:layout_marginStart="20dp">
             <TextView android:layout_width="210dp"
                       android:layout_height="wrap_content"
                       android:textSize="18sp"
diff --git a/prebuilts/gradle/AppRestrictions/Application/src/main/res/mipmap-hdpi/ic_launcher.png b/prebuilts/gradle/AppRestrictions/Application/src/main/res/mipmap-hdpi/ic_launcher.png
new file mode 100644
index 0000000..f411ebb
--- /dev/null
+++ b/prebuilts/gradle/AppRestrictions/Application/src/main/res/mipmap-hdpi/ic_launcher.png
Binary files differ
diff --git a/prebuilts/gradle/AppRestrictions/Application/src/main/res/mipmap-mdpi/ic_launcher.png b/prebuilts/gradle/AppRestrictions/Application/src/main/res/mipmap-mdpi/ic_launcher.png
new file mode 100644
index 0000000..4489c8d
--- /dev/null
+++ b/prebuilts/gradle/AppRestrictions/Application/src/main/res/mipmap-mdpi/ic_launcher.png
Binary files differ
diff --git a/prebuilts/gradle/AppRestrictions/Application/src/main/res/mipmap-xhdpi/ic_launcher.png b/prebuilts/gradle/AppRestrictions/Application/src/main/res/mipmap-xhdpi/ic_launcher.png
new file mode 100644
index 0000000..07473b8
--- /dev/null
+++ b/prebuilts/gradle/AppRestrictions/Application/src/main/res/mipmap-xhdpi/ic_launcher.png
Binary files differ
diff --git a/prebuilts/gradle/AppRestrictions/Application/src/main/res/mipmap-xxhdpi/ic_launcher.png b/prebuilts/gradle/AppRestrictions/Application/src/main/res/mipmap-xxhdpi/ic_launcher.png
new file mode 100644
index 0000000..71d7bb7
--- /dev/null
+++ b/prebuilts/gradle/AppRestrictions/Application/src/main/res/mipmap-xxhdpi/ic_launcher.png
Binary files differ
diff --git a/prebuilts/gradle/AppRestrictions/Application/src/main/res/mipmap-xxxhdpi/ic_launcher.png b/prebuilts/gradle/AppRestrictions/Application/src/main/res/mipmap-xxxhdpi/ic_launcher.png
new file mode 100644
index 0000000..8f9e6cc
--- /dev/null
+++ b/prebuilts/gradle/AppRestrictions/Application/src/main/res/mipmap-xxxhdpi/ic_launcher.png
Binary files differ
diff --git a/prebuilts/gradle/AppRestrictions/README.md b/prebuilts/gradle/AppRestrictions/README.md
index 85542ad..f682572 100644
--- a/prebuilts/gradle/AppRestrictions/README.md
+++ b/prebuilts/gradle/AppRestrictions/README.md
@@ -2,13 +2,28 @@
 Android AppRestrictions Sample
 ===================================
 
+A sample that demonstrates the use of the App Restriction feature on devices with multiuser support
+
+Introduction
+------------
+
 This sample demonstrates the use of the App Restriction feature, which is available on
 Android 4.3 and above tablet device with the multiuser feature.
 
 When launched under the primary User account, you can toggle between standard app restriction
-types and custom.When launched under a restricted profile, this activity displays app
+types and custom.  When launched under a restricted profile, this activity displays app
 restriction settings, if available.
 
+This sample app maintains custom app restriction settings in shared preferences.  When
+the activity is invoked (from Settings > Users), the stored settings are used to initialize
+the custom configuration on the user interface.  Three sample [RestrictionEntry][1] types are
+shown: checkbox, single-choice, and multi-choice.  When the settings are modified by the user,
+the corresponding restriction entries are saved, which are retrievable under a restricted
+profile through the [UserManager][2].
+
+[1]: https://developer.android.com/reference/android/content/RestrictionEntry.html
+[2]: https://developer.android.com/reference/android/os/UserManager.html
+
 Pre-requisites
 --------------
 
@@ -16,6 +31,11 @@
 - Android Build Tools v25.0.2
 - Android Support Repository
 
+Screenshots
+-------------
+
+<img src="screenshots/1-application.png" height="400" alt="Screenshot"/> <img src="screenshots/2-custom-restrictions-actiivity.png" height="400" alt="Screenshot"/> 
+
 Getting Started
 ---------------
 
diff --git a/prebuilts/gradle/AppRestrictions/screenshots/1-application.png b/prebuilts/gradle/AppRestrictions/screenshots/1-application.png
new file mode 100644
index 0000000..1b914cf
--- /dev/null
+++ b/prebuilts/gradle/AppRestrictions/screenshots/1-application.png
Binary files differ
diff --git a/prebuilts/gradle/AppRestrictions/screenshots/2-custom-restrictions-actiivity.png b/prebuilts/gradle/AppRestrictions/screenshots/2-custom-restrictions-actiivity.png
new file mode 100644
index 0000000..54da75e
--- /dev/null
+++ b/prebuilts/gradle/AppRestrictions/screenshots/2-custom-restrictions-actiivity.png
Binary files differ
diff --git a/prebuilts/gradle/AppRestrictions/screenshots/big_icon.png b/prebuilts/gradle/AppRestrictions/screenshots/big_icon.png
new file mode 100644
index 0000000..34171b4
--- /dev/null
+++ b/prebuilts/gradle/AppRestrictions/screenshots/big_icon.png
Binary files differ
diff --git a/prebuilts/gradle/AppShortcuts/NOTICE b/prebuilts/gradle/AppShortcuts/NOTICE
index 29ea77b..8f8105a 100644
--- a/prebuilts/gradle/AppShortcuts/NOTICE
+++ b/prebuilts/gradle/AppShortcuts/NOTICE
@@ -1,7 +1,7 @@
 
 This sample uses the following software:
 
-Copyright 2016 The Android Open Source Project
+Copyright 2017 The Android Open Source Project
 
 Licensed under the Apache License, Version 2.0 (the "License");
 you may not use this file except in compliance with the License.
diff --git a/prebuilts/gradle/AsymmetricFingerprintDialog/.google/packaging.yaml b/prebuilts/gradle/AsymmetricFingerprintDialog/.google/packaging.yaml
index ba5ca50..ec1338c 100644
--- a/prebuilts/gradle/AsymmetricFingerprintDialog/.google/packaging.yaml
+++ b/prebuilts/gradle/AsymmetricFingerprintDialog/.google/packaging.yaml
@@ -4,7 +4,7 @@
 # This file is used by Google as part of our samples packaging process.
 # End users may safely ignore this file. It has no relevance to other systems.
 ---
-status:       DRAFT
+status:       PUBLISHED
 technologies: [Android]
 categories:   [security]
 languages:    [Java]
diff --git a/prebuilts/gradle/AsymmetricFingerprintDialog/Application/src/main/AndroidManifest.xml b/prebuilts/gradle/AsymmetricFingerprintDialog/Application/src/main/AndroidManifest.xml
index d1cf9f8..4dce266 100644
--- a/prebuilts/gradle/AsymmetricFingerprintDialog/Application/src/main/AndroidManifest.xml
+++ b/prebuilts/gradle/AsymmetricFingerprintDialog/Application/src/main/AndroidManifest.xml
@@ -14,25 +14,29 @@
  See the License for the specific language governing permissions and
  limitations under the License.
 -->
-<manifest xmlns:android="http://schemas.android.com/apk/res/android"
-          package="com.example.android.asymmetricfingerprintdialog"
-          android:versionCode="1"
-          android:versionName="1.0">
+<manifest package="com.example.android.asymmetricfingerprintdialog"
+    xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:tools="http://schemas.android.com/tools"
+    android:versionCode="1"
+    android:versionName="1.0">
 
-    <uses-permission android:name="android.permission.USE_FINGERPRINT"/>
+    <uses-permission android:name="android.permission.USE_FINGERPRINT" />
 
     <application
-            android:name=".InjectedApplication"
-            android:allowBackup="true"
-            android:label="@string/app_name"
-            android:icon="@mipmap/ic_launcher"
-            android:theme="@style/AppTheme">
+        android:name=".InjectedApplication"
+        android:allowBackup="true"
+        android:icon="@mipmap/ic_launcher"
+        android:label="@string/app_name"
+        android:supportsRtl="true"
+        android:theme="@style/AppTheme"
+        tools:ignore="GoogleAppIndexingWarning">
 
-        <activity android:name=".MainActivity"
-                  android:label="@string/app_name">
+        <activity
+            android:name=".MainActivity"
+            android:label="@string/app_name">
             <intent-filter>
-                <action android:name="android.intent.action.MAIN"/>
-                <category android:name="android.intent.category.LAUNCHER"/>
+                <action android:name="android.intent.action.MAIN" />
+                <category android:name="android.intent.category.LAUNCHER" />
             </intent-filter>
         </activity>
 
diff --git a/prebuilts/gradle/AsymmetricFingerprintDialog/Application/src/main/java/com/example/android/asymmetricfingerprintdialog/FingerprintAuthenticationDialogFragment.java b/prebuilts/gradle/AsymmetricFingerprintDialog/Application/src/main/java/com/example/android/asymmetricfingerprintdialog/FingerprintAuthenticationDialogFragment.java
index a56556f..fbe8ec9 100644
--- a/prebuilts/gradle/AsymmetricFingerprintDialog/Application/src/main/java/com/example/android/asymmetricfingerprintdialog/FingerprintAuthenticationDialogFragment.java
+++ b/prebuilts/gradle/AsymmetricFingerprintDialog/Application/src/main/java/com/example/android/asymmetricfingerprintdialog/FingerprintAuthenticationDialogFragment.java
@@ -19,8 +19,8 @@
 import com.example.android.asymmetricfingerprintdialog.server.StoreBackend;
 import com.example.android.asymmetricfingerprintdialog.server.Transaction;
 
-import android.app.Activity;
 import android.app.DialogFragment;
+import android.content.Context;
 import android.content.SharedPreferences;
 import android.hardware.fingerprint.FingerprintManager;
 import android.os.Bundle;
@@ -158,9 +158,9 @@
     }
 
     @Override
-    public void onAttach(Activity activity) {
-        super.onAttach(activity);
-        mActivity = (MainActivity) activity;
+    public void onAttach(Context context) {
+        super.onAttach(context);
+        mActivity = (MainActivity) getActivity();
     }
 
     /**
diff --git a/prebuilts/gradle/AsymmetricFingerprintDialog/Application/src/main/java/com/example/android/asymmetricfingerprintdialog/FingerprintUiHelper.java b/prebuilts/gradle/AsymmetricFingerprintDialog/Application/src/main/java/com/example/android/asymmetricfingerprintdialog/FingerprintUiHelper.java
index f654811..dee4270 100644
--- a/prebuilts/gradle/AsymmetricFingerprintDialog/Application/src/main/java/com/example/android/asymmetricfingerprintdialog/FingerprintUiHelper.java
+++ b/prebuilts/gradle/AsymmetricFingerprintDialog/Application/src/main/java/com/example/android/asymmetricfingerprintdialog/FingerprintUiHelper.java
@@ -27,7 +27,11 @@
 
 /**
  * Small helper class to manage text/icon around fingerprint authentication UI.
+ * This class assumes that the {@link android.Manifest.permission#USE_FINGERPRINT}
+ * permission has already been granted. (As of API 23 this permission is normal instead of dangerous
+ * and is granted at install time.)
  */
+@SuppressWarnings("MissingPermission")
 public class FingerprintUiHelper extends FingerprintManager.AuthenticationCallback {
 
     @VisibleForTesting static final long ERROR_TIMEOUT_MILLIS = 1600;
diff --git a/prebuilts/gradle/AsymmetricFingerprintDialog/Application/src/main/res/layout/activity_main.xml b/prebuilts/gradle/AsymmetricFingerprintDialog/Application/src/main/res/layout/activity_main.xml
index 8f30557..16b29bd 100644
--- a/prebuilts/gradle/AsymmetricFingerprintDialog/Application/src/main/res/layout/activity_main.xml
+++ b/prebuilts/gradle/AsymmetricFingerprintDialog/Application/src/main/res/layout/activity_main.xml
@@ -31,7 +31,8 @@
                 android:layout_marginBottom="32dp"
                 android:layout_gravity="center_horizontal"
                 android:scaleType="fitCenter"
-                android:src="@drawable/android_robot"/>
+                android:src="@drawable/android_robot"
+                android:contentDescription="@string/description_bugdroid_icon" />
 
         <LinearLayout
                 android:layout_width="match_parent"
@@ -77,8 +78,7 @@
                 android:layout_gravity="end"
                 android:textColor="?android:attr/textColorPrimaryInverse"
                 android:text="@string/purchase"
-                android:id="@+id/purchase_button"
-                android:layout_alignParentEnd="true"/>
+                android:id="@+id/purchase_button"/>
 
         <TextView
                 android:id="@+id/confirmation_message"
diff --git a/prebuilts/gradle/AsymmetricFingerprintDialog/Application/src/main/res/layout/fingerprint_dialog_content.xml b/prebuilts/gradle/AsymmetricFingerprintDialog/Application/src/main/res/layout/fingerprint_dialog_content.xml
index 3929eba..5bb65b2 100644
--- a/prebuilts/gradle/AsymmetricFingerprintDialog/Application/src/main/res/layout/fingerprint_dialog_content.xml
+++ b/prebuilts/gradle/AsymmetricFingerprintDialog/Application/src/main/res/layout/fingerprint_dialog_content.xml
@@ -41,7 +41,8 @@
         android:layout_alignParentStart="true"
         android:layout_below="@+id/fingerprint_description"
         android:layout_marginTop="20dp"
-        android:src="@drawable/ic_fp_40px" />
+        android:src="@drawable/ic_fp_40px"
+        android:contentDescription="@string/description_fingerprint_icon"/>
 
     <TextView
         android:id="@+id/fingerprint_status"
diff --git a/prebuilts/gradle/AsymmetricFingerprintDialog/Application/src/main/res/menu/menu_main.xml b/prebuilts/gradle/AsymmetricFingerprintDialog/Application/src/main/res/menu/menu_main.xml
index 73f5e89..1596970 100644
--- a/prebuilts/gradle/AsymmetricFingerprintDialog/Application/src/main/res/menu/menu_main.xml
+++ b/prebuilts/gradle/AsymmetricFingerprintDialog/Application/src/main/res/menu/menu_main.xml
@@ -15,7 +15,12 @@
   ~ limitations under the License
   -->
 <menu xmlns:android="http://schemas.android.com/apk/res/android"
-    xmlns:tools="http://schemas.android.com/tools" tools:context=".MainActivity">
-    <item android:id="@+id/action_settings" android:title="@string/action_settings"
-        android:orderInCategory="100" android:showAsAction="never" />
+    xmlns:app="http://schemas.android.com/apk/res-auto"
+    xmlns:tools="http://schemas.android.com/tools"
+    tools:context=".MainActivity">
+    <item
+        android:id="@+id/action_settings"
+        android:orderInCategory="100"
+        android:title="@string/action_settings"
+        app:showAsAction="never" />
 </menu>
diff --git a/prebuilts/gradle/AsymmetricFingerprintDialog/Application/src/main/res/values/strings.xml b/prebuilts/gradle/AsymmetricFingerprintDialog/Application/src/main/res/values/strings.xml
index f44c06d..86b8d42 100644
--- a/prebuilts/gradle/AsymmetricFingerprintDialog/Application/src/main/res/values/strings.xml
+++ b/prebuilts/gradle/AsymmetricFingerprintDialog/Application/src/main/res/values/strings.xml
@@ -19,7 +19,7 @@
     <string name="cancel">Cancel</string>
     <string name="use_password">Use password</string>
     <string name="sign_in">Sign in</string>
-    <string name="ok">Ok</string>
+    <string name="ok">OK</string>
     <string name="password">Password</string>
     <string name="fingerprint_description">Confirm fingerprint to continue</string>
     <string name="fingerprint_hint">Touch sensor</string>
@@ -36,4 +36,6 @@
     <string name="use_fingerprint_in_future">Use fingerprint in the future</string>
     <string name="use_fingerprint_to_authenticate_title">Use fingerprint to authenticate</string>
     <string name="use_fingerprint_to_authenticate_key" >use_fingerprint_to_authenticate_key</string>
+    <string name="description_bugdroid_icon">Android bugdroid image</string>
+    <string name="description_fingerprint_icon">Fingerprint icon</string>
 </resources>
diff --git a/prebuilts/gradle/BasicAndroidKeyStore/.google/packaging.yaml b/prebuilts/gradle/BasicAndroidKeyStore/.google/packaging.yaml
index a1ad8be..8d67067 100644
--- a/prebuilts/gradle/BasicAndroidKeyStore/.google/packaging.yaml
+++ b/prebuilts/gradle/BasicAndroidKeyStore/.google/packaging.yaml
@@ -13,5 +13,8 @@
 level:        ADVANCED
 icon:         screenshots/big-icon.png
 apiRefs:
+    - android:android.security.keystore.KeyGenParameterSpec
+    - android:android.security.keystore.KeyProperties
     - android:android.security.KeyPairGeneratorSpec
+    - android:java.security.KeyStore
 license: apache2
diff --git a/prebuilts/gradle/BasicAndroidKeyStore/Application/src/main/AndroidManifest.xml b/prebuilts/gradle/BasicAndroidKeyStore/Application/src/main/AndroidManifest.xml
index 1c3b255..1f8a431 100644
--- a/prebuilts/gradle/BasicAndroidKeyStore/Application/src/main/AndroidManifest.xml
+++ b/prebuilts/gradle/BasicAndroidKeyStore/Application/src/main/AndroidManifest.xml
@@ -26,7 +26,7 @@
 
     <application android:allowBackup="true"
         android:label="@string/app_name"
-        android:icon="@drawable/ic_launcher"
+        android:icon="@mipmap/ic_launcher"
         android:theme="@style/AppTheme">
 
         <activity android:name=".MainActivity"
diff --git a/prebuilts/gradle/BasicAndroidKeyStore/Application/src/main/java/com/example/android/basicandroidkeystore/BasicAndroidKeyStoreFragment.java b/prebuilts/gradle/BasicAndroidKeyStore/Application/src/main/java/com/example/android/basicandroidkeystore/BasicAndroidKeyStoreFragment.java
index e6244bf..3616e88 100644
--- a/prebuilts/gradle/BasicAndroidKeyStore/Application/src/main/java/com/example/android/basicandroidkeystore/BasicAndroidKeyStoreFragment.java
+++ b/prebuilts/gradle/BasicAndroidKeyStore/Application/src/main/java/com/example/android/basicandroidkeystore/BasicAndroidKeyStoreFragment.java
@@ -16,15 +16,18 @@
 
 package com.example.android.basicandroidkeystore;
 
+import com.example.android.common.logger.Log;
+
 import android.content.Context;
+import android.os.Build;
 import android.os.Bundle;
 import android.security.KeyPairGeneratorSpec;
+import android.security.keystore.KeyGenParameterSpec;
+import android.security.keystore.KeyProperties;
 import android.support.v4.app.Fragment;
 import android.util.Base64;
 import android.view.MenuItem;
 
-import com.example.android.common.logger.Log;
-
 import java.io.IOException;
 import java.math.BigInteger;
 import java.security.InvalidAlgorithmParameterException;
@@ -39,6 +42,7 @@
 import java.security.SignatureException;
 import java.security.UnrecoverableEntryException;
 import java.security.cert.CertificateException;
+import java.security.spec.AlgorithmParameterSpec;
 import java.util.Calendar;
 import java.util.GregorianCalendar;
 
@@ -46,7 +50,7 @@
 
 public class BasicAndroidKeyStoreFragment extends Fragment {
 
-    public static final String TAG = "BasicAndroidKeyStoreFragment";
+    public static final String TAG = "KeyStoreFragment";
 
     // BEGIN_INCLUDE(values)
 
@@ -159,36 +163,54 @@
         end.add(Calendar.YEAR, 1);
         //END_INCLUDE(create_valid_dates)
 
-
-        // BEGIN_INCLUDE(create_spec)
-        // The KeyPairGeneratorSpec object is how parameters for your key pair are passed
-        // to the KeyPairGenerator.  For a fun home game, count how many classes in this sample
-        // start with the phrase "KeyPair".
-        KeyPairGeneratorSpec spec =
-                new KeyPairGeneratorSpec.Builder(context)
-                        // You'll use the alias later to retrieve the key.  It's a key for the key!
-                        .setAlias(mAlias)
-                                // The subject used for the self-signed certificate of the generated pair
-                        .setSubject(new X500Principal("CN=" + mAlias))
-                                // The serial number used for the self-signed certificate of the
-                                // generated pair.
-                        .setSerialNumber(BigInteger.valueOf(1337))
-                                // Date range of validity for the generated pair.
-                        .setStartDate(start.getTime())
-                        .setEndDate(end.getTime())
-                        .build();
-        // END_INCLUDE(create_spec)
-
         // BEGIN_INCLUDE(create_keypair)
         // Initialize a KeyPair generator using the the intended algorithm (in this example, RSA
         // and the KeyStore.  This example uses the AndroidKeyStore.
         KeyPairGenerator kpGenerator = KeyPairGenerator
                 .getInstance(SecurityConstants.TYPE_RSA,
                         SecurityConstants.KEYSTORE_PROVIDER_ANDROID_KEYSTORE);
-        kpGenerator.initialize(spec);
-        KeyPair kp = kpGenerator.generateKeyPair();
-        Log.d(TAG, "Public Key is: " + kp.getPublic().toString());
         // END_INCLUDE(create_keypair)
+
+        // BEGIN_INCLUDE(create_spec)
+        // The KeyPairGeneratorSpec object is how parameters for your key pair are passed
+        // to the KeyPairGenerator.
+        AlgorithmParameterSpec spec;
+
+        if (Build.VERSION.SDK_INT < Build.VERSION_CODES.M) {
+            // Below Android M, use the KeyPairGeneratorSpec.Builder.
+
+            spec = new KeyPairGeneratorSpec.Builder(context)
+                    // You'll use the alias later to retrieve the key.  It's a key for the key!
+                    .setAlias(mAlias)
+                    // The subject used for the self-signed certificate of the generated pair
+                    .setSubject(new X500Principal("CN=" + mAlias))
+                    // The serial number used for the self-signed certificate of the
+                    // generated pair.
+                    .setSerialNumber(BigInteger.valueOf(1337))
+                    // Date range of validity for the generated pair.
+                    .setStartDate(start.getTime())
+                    .setEndDate(end.getTime())
+                    .build();
+
+
+        } else {
+            // On Android M or above, use the KeyGenparameterSpec.Builder and specify permitted
+            // properties  and restrictions of the key.
+            spec = new KeyGenParameterSpec.Builder(mAlias, KeyProperties.PURPOSE_SIGN)
+                    .setCertificateSubject(new X500Principal("CN=" + mAlias))
+                    .setDigests(KeyProperties.DIGEST_SHA256)
+                    .setSignaturePaddings(KeyProperties.SIGNATURE_PADDING_RSA_PKCS1)
+                    .setCertificateSerialNumber(BigInteger.valueOf(1337))
+                    .setCertificateNotBefore(start.getTime())
+                    .setCertificateNotAfter(end.getTime())
+                    .build();
+        }
+
+        kpGenerator.initialize(spec);
+
+        KeyPair kp = kpGenerator.generateKeyPair();
+        // END_INCLUDE(create_spec)
+        Log.d(TAG, "Public Key is: " + kp.getPublic().toString());
     }
 
     /**
diff --git a/prebuilts/gradle/BasicAndroidKeyStore/Application/src/main/res/drawable-hdpi/ic_launcher.png b/prebuilts/gradle/BasicAndroidKeyStore/Application/src/main/res/drawable-hdpi/ic_launcher.png
deleted file mode 100644
index b1efaf4..0000000
--- a/prebuilts/gradle/BasicAndroidKeyStore/Application/src/main/res/drawable-hdpi/ic_launcher.png
+++ /dev/null
Binary files differ
diff --git a/prebuilts/gradle/BasicAndroidKeyStore/Application/src/main/res/drawable-mdpi/ic_launcher.png b/prebuilts/gradle/BasicAndroidKeyStore/Application/src/main/res/drawable-mdpi/ic_launcher.png
deleted file mode 100644
index f5f9244..0000000
--- a/prebuilts/gradle/BasicAndroidKeyStore/Application/src/main/res/drawable-mdpi/ic_launcher.png
+++ /dev/null
Binary files differ
diff --git a/prebuilts/gradle/BasicAndroidKeyStore/Application/src/main/res/drawable-xhdpi/ic_launcher.png b/prebuilts/gradle/BasicAndroidKeyStore/Application/src/main/res/drawable-xhdpi/ic_launcher.png
deleted file mode 100644
index 5d07b3f..0000000
--- a/prebuilts/gradle/BasicAndroidKeyStore/Application/src/main/res/drawable-xhdpi/ic_launcher.png
+++ /dev/null
Binary files differ
diff --git a/prebuilts/gradle/BasicAndroidKeyStore/Application/src/main/res/drawable-xxhdpi/ic_launcher.png b/prebuilts/gradle/BasicAndroidKeyStore/Application/src/main/res/drawable-xxhdpi/ic_launcher.png
deleted file mode 100644
index 6ef21e1..0000000
--- a/prebuilts/gradle/BasicAndroidKeyStore/Application/src/main/res/drawable-xxhdpi/ic_launcher.png
+++ /dev/null
Binary files differ
diff --git a/prebuilts/gradle/BasicAndroidKeyStore/Application/src/main/res/mipmap-hdpi/ic_launcher.png b/prebuilts/gradle/BasicAndroidKeyStore/Application/src/main/res/mipmap-hdpi/ic_launcher.png
new file mode 100644
index 0000000..c57b83a
--- /dev/null
+++ b/prebuilts/gradle/BasicAndroidKeyStore/Application/src/main/res/mipmap-hdpi/ic_launcher.png
Binary files differ
diff --git a/prebuilts/gradle/BasicAndroidKeyStore/Application/src/main/res/mipmap-mdpi/ic_launcher.png b/prebuilts/gradle/BasicAndroidKeyStore/Application/src/main/res/mipmap-mdpi/ic_launcher.png
new file mode 100644
index 0000000..c43fc24
--- /dev/null
+++ b/prebuilts/gradle/BasicAndroidKeyStore/Application/src/main/res/mipmap-mdpi/ic_launcher.png
Binary files differ
diff --git a/prebuilts/gradle/BasicAndroidKeyStore/Application/src/main/res/mipmap-xhdpi/ic_launcher.png b/prebuilts/gradle/BasicAndroidKeyStore/Application/src/main/res/mipmap-xhdpi/ic_launcher.png
new file mode 100644
index 0000000..4255f23
--- /dev/null
+++ b/prebuilts/gradle/BasicAndroidKeyStore/Application/src/main/res/mipmap-xhdpi/ic_launcher.png
Binary files differ
diff --git a/prebuilts/gradle/BasicAndroidKeyStore/Application/src/main/res/mipmap-xxhdpi/ic_launcher.png b/prebuilts/gradle/BasicAndroidKeyStore/Application/src/main/res/mipmap-xxhdpi/ic_launcher.png
new file mode 100644
index 0000000..f6ca8a9
--- /dev/null
+++ b/prebuilts/gradle/BasicAndroidKeyStore/Application/src/main/res/mipmap-xxhdpi/ic_launcher.png
Binary files differ
diff --git a/prebuilts/gradle/BasicAndroidKeyStore/Application/src/main/res/mipmap-xxxhdpi/ic_launcher.png b/prebuilts/gradle/BasicAndroidKeyStore/Application/src/main/res/mipmap-xxxhdpi/ic_launcher.png
new file mode 100644
index 0000000..0f623f6
--- /dev/null
+++ b/prebuilts/gradle/BasicAndroidKeyStore/Application/src/main/res/mipmap-xxxhdpi/ic_launcher.png
Binary files differ
diff --git a/prebuilts/gradle/BasicAndroidKeyStore/README.md b/prebuilts/gradle/BasicAndroidKeyStore/README.md
index 545bea8..db0c94b 100644
--- a/prebuilts/gradle/BasicAndroidKeyStore/README.md
+++ b/prebuilts/gradle/BasicAndroidKeyStore/README.md
@@ -13,12 +13,19 @@
 A [KeyPair][2] consisting of a [PrivateKey][3] and a [PublicKey][4] is being generated.
 The private key then is being used to sign and verify a String.
 
+Below Android M, this sample uses a [KeyPairGeneratorSpec][5] to generate a key pair.
+On newer versions of Android, a [KeyGenParameterSpec][6] generates a key pair with
+additional restrictions and properties.
+
+
 Next to that appropriate exception handling for potential errors is being displayed.
 
 [1]: https://developer.android.com/reference/java/security/KeyStore.html
 [2]: https://developer.android.com/reference/java/security/KeyPair.html
 [3]: https://developer.android.com/reference/java/security/PrivateKey.html
 [4]: https://developer.android.com/reference/java/security/PublicKey.html
+[5]: https://developer.android.com/reference/android/security/KeyPairGeneratorSpec.html
+[6]: https://developer.android.com/reference/android/security/keystore/KeyGenParameterSpec.html
 
 Pre-requisites
 --------------
diff --git a/prebuilts/gradle/BasicAndroidKeyStore/screenshots/big_icon.png b/prebuilts/gradle/BasicAndroidKeyStore/screenshots/big_icon.png
index 004d80c..aa816d7 100644
--- a/prebuilts/gradle/BasicAndroidKeyStore/screenshots/big_icon.png
+++ b/prebuilts/gradle/BasicAndroidKeyStore/screenshots/big_icon.png
Binary files differ
diff --git a/prebuilts/gradle/BluetoothChat/Application/src/main/java/com/example/android/bluetoothchat/BluetoothChatFragment.java b/prebuilts/gradle/BluetoothChat/Application/src/main/java/com/example/android/bluetoothchat/BluetoothChatFragment.java
index 8ee9062..b77ef55 100644
--- a/prebuilts/gradle/BluetoothChat/Application/src/main/java/com/example/android/bluetoothchat/BluetoothChatFragment.java
+++ b/prebuilts/gradle/BluetoothChat/Application/src/main/java/com/example/android/bluetoothchat/BluetoothChatFragment.java
@@ -188,7 +188,7 @@
     }
 
     /**
-     * Makes this device discoverable.
+     * Makes this device discoverable for 300 seconds (5 minutes).
      */
     private void ensureDiscoverable() {
         if (mBluetoothAdapter.getScanMode() !=
@@ -355,7 +355,7 @@
     }
 
     /**
-     * Establish connection with other divice
+     * Establish connection with other device
      *
      * @param data   An {@link Intent} with {@link DeviceListActivity#EXTRA_DEVICE_ADDRESS} extra.
      * @param secure Socket Security type - Secure (true) , Insecure (false)
diff --git a/prebuilts/gradle/BluetoothChat/Application/src/main/java/com/example/android/bluetoothchat/BluetoothChatService.java b/prebuilts/gradle/BluetoothChat/Application/src/main/java/com/example/android/bluetoothchat/BluetoothChatService.java
index a1e7cc0..ad4a6d1 100644
--- a/prebuilts/gradle/BluetoothChat/Application/src/main/java/com/example/android/bluetoothchat/BluetoothChatService.java
+++ b/prebuilts/gradle/BluetoothChat/Application/src/main/java/com/example/android/bluetoothchat/BluetoothChatService.java
@@ -60,6 +60,7 @@
     private ConnectThread mConnectThread;
     private ConnectedThread mConnectedThread;
     private int mState;
+    private int mNewState;
 
     // Constants that indicate the current connection state
     public static final int STATE_NONE = 0;       // we're doing nothing
@@ -76,20 +77,20 @@
     public BluetoothChatService(Context context, Handler handler) {
         mAdapter = BluetoothAdapter.getDefaultAdapter();
         mState = STATE_NONE;
+        mNewState = mState;
         mHandler = handler;
     }
 
     /**
-     * Set the current state of the chat connection
-     *
-     * @param state An integer defining the current connection state
+     * Update UI title according to the current state of the chat connection
      */
-    private synchronized void setState(int state) {
-        Log.d(TAG, "setState() " + mState + " -> " + state);
-        mState = state;
+    private synchronized void updateUserInterfaceTitle() {
+        mState = getState();
+        Log.d(TAG, "updateUserInterfaceTitle() " + mNewState + " -> " + mState);
+        mNewState = mState;
 
         // Give the new state to the Handler so the UI Activity can update
-        mHandler.obtainMessage(Constants.MESSAGE_STATE_CHANGE, state, -1).sendToTarget();
+        mHandler.obtainMessage(Constants.MESSAGE_STATE_CHANGE, mNewState, -1).sendToTarget();
     }
 
     /**
@@ -118,8 +119,6 @@
             mConnectedThread = null;
         }
 
-        setState(STATE_LISTEN);
-
         // Start the thread to listen on a BluetoothServerSocket
         if (mSecureAcceptThread == null) {
             mSecureAcceptThread = new AcceptThread(true);
@@ -129,6 +128,8 @@
             mInsecureAcceptThread = new AcceptThread(false);
             mInsecureAcceptThread.start();
         }
+        // Update UI title
+        updateUserInterfaceTitle();
     }
 
     /**
@@ -157,7 +158,8 @@
         // Start the thread to connect with the given device
         mConnectThread = new ConnectThread(device, secure);
         mConnectThread.start();
-        setState(STATE_CONNECTING);
+        // Update UI title
+        updateUserInterfaceTitle();
     }
 
     /**
@@ -202,8 +204,8 @@
         bundle.putString(Constants.DEVICE_NAME, device.getName());
         msg.setData(bundle);
         mHandler.sendMessage(msg);
-
-        setState(STATE_CONNECTED);
+        // Update UI title
+        updateUserInterfaceTitle();
     }
 
     /**
@@ -231,7 +233,9 @@
             mInsecureAcceptThread.cancel();
             mInsecureAcceptThread = null;
         }
-        setState(STATE_NONE);
+        mState = STATE_NONE;
+        // Update UI title
+        updateUserInterfaceTitle();
     }
 
     /**
@@ -263,6 +267,10 @@
         msg.setData(bundle);
         mHandler.sendMessage(msg);
 
+        mState = STATE_NONE;
+        // Update UI title
+        updateUserInterfaceTitle();
+
         // Start the service over to restart listening mode
         BluetoothChatService.this.start();
     }
@@ -278,6 +286,10 @@
         msg.setData(bundle);
         mHandler.sendMessage(msg);
 
+        mState = STATE_NONE;
+        // Update UI title
+        updateUserInterfaceTitle();
+
         // Start the service over to restart listening mode
         BluetoothChatService.this.start();
     }
@@ -309,6 +321,7 @@
                 Log.e(TAG, "Socket Type: " + mSocketType + "listen() failed", e);
             }
             mmServerSocket = tmp;
+            mState = STATE_LISTEN;
         }
 
         public void run() {
@@ -396,6 +409,7 @@
                 Log.e(TAG, "Socket Type: " + mSocketType + "create() failed", e);
             }
             mmSocket = tmp;
+            mState = STATE_CONNECTING;
         }
 
         public void run() {
@@ -465,6 +479,7 @@
 
             mmInStream = tmpIn;
             mmOutStream = tmpOut;
+            mState = STATE_CONNECTED;
         }
 
         public void run() {
@@ -484,8 +499,6 @@
                 } catch (IOException e) {
                     Log.e(TAG, "disconnected", e);
                     connectionLost();
-                    // Start the service over to restart listening mode
-                    BluetoothChatService.this.start();
                     break;
                 }
             }
diff --git a/prebuilts/gradle/CardView/Application/src/main/res/values/base-strings.xml b/prebuilts/gradle/CardView/Application/src/main/res/values/base-strings.xml
index 1286322..4db4349 100644
--- a/prebuilts/gradle/CardView/Application/src/main/res/values/base-strings.xml
+++ b/prebuilts/gradle/CardView/Application/src/main/res/values/base-strings.xml
@@ -21,8 +21,8 @@
         <![CDATA[
         
             
-            This sample demonstrates how to use CardView introduced in the support library for the
-            Android L preview.
+            This sample demonstrates how to use CardView introduced in the support library in
+            Android 5.0.
             
         
         ]]>
diff --git a/prebuilts/gradle/CardView/README.md b/prebuilts/gradle/CardView/README.md
index 5b1698f..4e3067a 100644
--- a/prebuilts/gradle/CardView/README.md
+++ b/prebuilts/gradle/CardView/README.md
@@ -2,8 +2,8 @@
 Android CardView Sample Sample
 ===================================
 
-This sample demonstrates how to use CardView introduced in the support library for the
-Android L preview.
+This sample demonstrates how to use CardView introduced in the support library in
+Android 5.0.
 
 Pre-requisites
 --------------
diff --git a/prebuilts/gradle/CommitContentSampleApp/NOTICE b/prebuilts/gradle/CommitContentSampleApp/NOTICE
index 29ea77b..8f8105a 100644
--- a/prebuilts/gradle/CommitContentSampleApp/NOTICE
+++ b/prebuilts/gradle/CommitContentSampleApp/NOTICE
@@ -1,7 +1,7 @@
 
 This sample uses the following software:
 
-Copyright 2016 The Android Open Source Project
+Copyright 2017 The Android Open Source Project
 
 Licensed under the Apache License, Version 2.0 (the "License");
 you may not use this file except in compliance with the License.
diff --git a/prebuilts/gradle/CommitContentSampleApp/app/build.gradle b/prebuilts/gradle/CommitContentSampleApp/app/build.gradle
index fcaa562..294f02f 100644
--- a/prebuilts/gradle/CommitContentSampleApp/app/build.gradle
+++ b/prebuilts/gradle/CommitContentSampleApp/app/build.gradle
@@ -4,7 +4,7 @@
     compileSdkVersion 25
     buildToolsVersion "25.0.0"
     defaultConfig {
-        applicationId "com.example.android.android.sampleapp"
+        applicationId "com.example.android.commitcontent.app"
         minSdkVersion 16
         targetSdkVersion 25
         versionCode 1
diff --git a/prebuilts/gradle/CommitContentSampleIME/NOTICE b/prebuilts/gradle/CommitContentSampleIME/NOTICE
index 29ea77b..8f8105a 100644
--- a/prebuilts/gradle/CommitContentSampleIME/NOTICE
+++ b/prebuilts/gradle/CommitContentSampleIME/NOTICE
@@ -1,7 +1,7 @@
 
 This sample uses the following software:
 
-Copyright 2016 The Android Open Source Project
+Copyright 2017 The Android Open Source Project
 
 Licensed under the Apache License, Version 2.0 (the "License");
 you may not use this file except in compliance with the License.
diff --git a/prebuilts/gradle/CommitContentSampleIME/app/build.gradle b/prebuilts/gradle/CommitContentSampleIME/app/build.gradle
index 7856e5d..c753aa1 100644
--- a/prebuilts/gradle/CommitContentSampleIME/app/build.gradle
+++ b/prebuilts/gradle/CommitContentSampleIME/app/build.gradle
@@ -4,7 +4,7 @@
     compileSdkVersion 25
     buildToolsVersion "25.0.0"
     defaultConfig {
-        applicationId "com.example.android.supportv13.sampleime"
+        applicationId "com.example.android.commitcontent.ime"
         minSdkVersion 16
         targetSdkVersion 25
         versionCode 1
diff --git a/prebuilts/gradle/CommitContentSampleIME/app/src/main/java/com/example/android/commitcontent/ime/ImageKeyboard.java b/prebuilts/gradle/CommitContentSampleIME/app/src/main/java/com/example/android/commitcontent/ime/ImageKeyboard.java
index eb5dae7..9209100 100644
--- a/prebuilts/gradle/CommitContentSampleIME/app/src/main/java/com/example/android/commitcontent/ime/ImageKeyboard.java
+++ b/prebuilts/gradle/CommitContentSampleIME/app/src/main/java/com/example/android/commitcontent/ime/ImageKeyboard.java
@@ -49,7 +49,7 @@
 public class ImageKeyboard extends InputMethodService {
 
     private static final String TAG = "ImageKeyboard";
-    private static final String AUTHORITY = "com.example.android.supportv13.sampleime.inputcontent";
+    private static final String AUTHORITY = "com.example.android.commitcontent.ime.inputcontent";
     private static final String MIME_TYPE_GIF = "image/gif";
     private static final String MIME_TYPE_PNG = "image/png";
     private static final String MIME_TYPE_WEBP = "image/webp";
diff --git a/prebuilts/gradle/DataLayer/Application/build.gradle b/prebuilts/gradle/DataLayer/Application/build.gradle
index 970996d..6ca0636 100644
--- a/prebuilts/gradle/DataLayer/Application/build.gradle
+++ b/prebuilts/gradle/DataLayer/Application/build.gradle
@@ -39,7 +39,7 @@
 
     defaultConfig {
         minSdkVersion 18
-        targetSdkVersion 23
+        targetSdkVersion 25
     }
 
     compileOptions {
diff --git a/prebuilts/gradle/DataLayer/Wearable/build.gradle b/prebuilts/gradle/DataLayer/Wearable/build.gradle
index 70b665d..89e2f84 100644
--- a/prebuilts/gradle/DataLayer/Wearable/build.gradle
+++ b/prebuilts/gradle/DataLayer/Wearable/build.gradle
@@ -20,7 +20,9 @@
     compile 'com.google.android.gms:play-services-wearable:10.0.1'
     compile 'com.android.support:support-v13:25.0.1'
 
-    compile 'com.google.android.support:wearable:1.4.0'
+    provided 'com.google.android.wearable:wearable:2.0.0'
+
+    compile 'com.google.android.support:wearable:2.0.0'
 
 }
 
@@ -43,7 +45,7 @@
 
         minSdkVersion 18
 
-        targetSdkVersion 22
+        targetSdkVersion 25
     }
 
     compileOptions {
diff --git a/prebuilts/gradle/DataLayer/Wearable/src/main/AndroidManifest.xml b/prebuilts/gradle/DataLayer/Wearable/src/main/AndroidManifest.xml
index 6608bb7..2bc5f4c 100644
--- a/prebuilts/gradle/DataLayer/Wearable/src/main/AndroidManifest.xml
+++ b/prebuilts/gradle/DataLayer/Wearable/src/main/AndroidManifest.xml
@@ -18,7 +18,7 @@
         package="com.example.android.wearable.datalayer" >
 
     <uses-sdk android:minSdkVersion="20"
-              android:targetSdkVersion="23" />
+              android:targetSdkVersion="25" />
 
     <uses-feature android:name="android.hardware.type.watch" />
 
@@ -29,6 +29,10 @@
             android:theme="@android:style/Theme.DeviceDefault">
 
         <meta-data
+            android:name="com.google.android.wearable.standalone"
+            android:value="false" />
+
+        <meta-data
                 android:name="com.google.android.gms.version"
                 android:value="@integer/google_play_services_version" />
 
diff --git a/prebuilts/gradle/DelayedConfirmation/Wearable/build.gradle b/prebuilts/gradle/DelayedConfirmation/Wearable/build.gradle
index 70b665d..3651c81 100644
--- a/prebuilts/gradle/DelayedConfirmation/Wearable/build.gradle
+++ b/prebuilts/gradle/DelayedConfirmation/Wearable/build.gradle
@@ -20,7 +20,9 @@
     compile 'com.google.android.gms:play-services-wearable:10.0.1'
     compile 'com.android.support:support-v13:25.0.1'
 
-    compile 'com.google.android.support:wearable:1.4.0'
+    provided 'com.google.android.wearable:wearable:2.0.0'
+
+    compile 'com.google.android.support:wearable:2.0.0'
 
 }
 
diff --git a/prebuilts/gradle/DragAndDropAcrossApps/NOTICE b/prebuilts/gradle/DragAndDropAcrossApps/NOTICE
index 29ea77b..8f8105a 100644
--- a/prebuilts/gradle/DragAndDropAcrossApps/NOTICE
+++ b/prebuilts/gradle/DragAndDropAcrossApps/NOTICE
@@ -1,7 +1,7 @@
 
 This sample uses the following software:
 
-Copyright 2016 The Android Open Source Project
+Copyright 2017 The Android Open Source Project
 
 Licensed under the Apache License, Version 2.0 (the "License");
 you may not use this file except in compliance with the License.
diff --git a/prebuilts/gradle/FindMyPhone/Wearable/build.gradle b/prebuilts/gradle/FindMyPhone/Wearable/build.gradle
index 70b665d..3651c81 100644
--- a/prebuilts/gradle/FindMyPhone/Wearable/build.gradle
+++ b/prebuilts/gradle/FindMyPhone/Wearable/build.gradle
@@ -20,7 +20,9 @@
     compile 'com.google.android.gms:play-services-wearable:10.0.1'
     compile 'com.android.support:support-v13:25.0.1'
 
-    compile 'com.google.android.support:wearable:1.4.0'
+    provided 'com.google.android.wearable:wearable:2.0.0'
+
+    compile 'com.google.android.support:wearable:2.0.0'
 
 }
 
diff --git a/prebuilts/gradle/FingerprintDialog/Application/src/main/AndroidManifest.xml b/prebuilts/gradle/FingerprintDialog/Application/src/main/AndroidManifest.xml
index 77d9949..337f641 100644
--- a/prebuilts/gradle/FingerprintDialog/Application/src/main/AndroidManifest.xml
+++ b/prebuilts/gradle/FingerprintDialog/Application/src/main/AndroidManifest.xml
@@ -1,5 +1,4 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
+<?xml version="1.0" encoding="UTF-8"?><!--
  Copyright 2015 The Android Open Source Project
 
  Licensed under the Apache License, Version 2.0 (the "License");
@@ -14,24 +13,28 @@
  See the License for the specific language governing permissions and
  limitations under the License.
 -->
-<manifest xmlns:android="http://schemas.android.com/apk/res/android"
-          package="com.example.android.fingerprintdialog"
-          android:versionCode="1"
-          android:versionName="1.0">
+<manifest package="com.example.android.fingerprintdialog"
+    xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:tools="http://schemas.android.com/tools"
+    android:versionCode="1"
+    android:versionName="1.0">
 
-    <uses-permission android:name="android.permission.USE_FINGERPRINT"/>
+    <uses-permission android:name="android.permission.USE_FINGERPRINT" />
 
     <application
-            android:allowBackup="true"
-            android:label="@string/application_name"
-            android:icon="@mipmap/ic_launcher"
-            android:theme="@style/Theme.AppCompat.Light">
+        android:allowBackup="true"
+        android:icon="@mipmap/ic_launcher"
+        android:label="@string/application_name"
+        android:supportsRtl="true"
+        android:theme="@style/Theme.AppCompat.Light"
+        tools:ignore="GoogleAppIndexingWarning">
 
-        <activity android:name=".MainActivity"
-                  android:label="@string/application_name">
+        <activity
+            android:name=".MainActivity"
+            android:label="@string/application_name">
             <intent-filter>
-                <action android:name="android.intent.action.MAIN"/>
-                <category android:name="android.intent.category.LAUNCHER"/>
+                <action android:name="android.intent.action.MAIN" />
+                <category android:name="android.intent.category.LAUNCHER" />
             </intent-filter>
         </activity>
 
diff --git a/prebuilts/gradle/FingerprintDialog/Application/src/main/java/com/example/android/fingerprintdialog/FingerprintAuthenticationDialogFragment.java b/prebuilts/gradle/FingerprintDialog/Application/src/main/java/com/example/android/fingerprintdialog/FingerprintAuthenticationDialogFragment.java
index 0537573..9f4a684 100644
--- a/prebuilts/gradle/FingerprintDialog/Application/src/main/java/com/example/android/fingerprintdialog/FingerprintAuthenticationDialogFragment.java
+++ b/prebuilts/gradle/FingerprintDialog/Application/src/main/java/com/example/android/fingerprintdialog/FingerprintAuthenticationDialogFragment.java
@@ -16,8 +16,8 @@
 
 package com.example.android.fingerprintdialog;
 
-import android.app.Activity;
 import android.app.DialogFragment;
+import android.content.Context;
 import android.content.SharedPreferences;
 import android.hardware.fingerprint.FingerprintManager;
 import android.os.Bundle;
@@ -134,11 +134,11 @@
     }
 
     @Override
-    public void onAttach(Activity activity) {
-        super.onAttach(activity);
-        mActivity = (MainActivity) activity;
-        mInputMethodManager = mActivity.getSystemService(InputMethodManager.class);
-        mSharedPreferences = PreferenceManager.getDefaultSharedPreferences(mActivity);
+    public void onAttach(Context context) {
+        super.onAttach(context);
+        mActivity = (MainActivity) getActivity();
+        mInputMethodManager = context.getSystemService(InputMethodManager.class);
+        mSharedPreferences = PreferenceManager.getDefaultSharedPreferences(context);
     }
 
     /**
diff --git a/prebuilts/gradle/FingerprintDialog/Application/src/main/res/layout/activity_main.xml b/prebuilts/gradle/FingerprintDialog/Application/src/main/res/layout/activity_main.xml
index 075899f..f0a596f 100644
--- a/prebuilts/gradle/FingerprintDialog/Application/src/main/res/layout/activity_main.xml
+++ b/prebuilts/gradle/FingerprintDialog/Application/src/main/res/layout/activity_main.xml
@@ -31,7 +31,8 @@
                 android:layout_marginBottom="32dp"
                 android:layout_gravity="center_horizontal"
                 android:scaleType="fitCenter"
-                android:src="@drawable/android_robot"/>
+                android:src="@drawable/android_robot"
+                android:contentDescription="@string/description_bugdroid_icon"/>
 
         <LinearLayout
                 android:layout_width="match_parent"
diff --git a/prebuilts/gradle/FingerprintDialog/Application/src/main/res/layout/fingerprint_dialog_content.xml b/prebuilts/gradle/FingerprintDialog/Application/src/main/res/layout/fingerprint_dialog_content.xml
index 3929eba..5bb65b2 100644
--- a/prebuilts/gradle/FingerprintDialog/Application/src/main/res/layout/fingerprint_dialog_content.xml
+++ b/prebuilts/gradle/FingerprintDialog/Application/src/main/res/layout/fingerprint_dialog_content.xml
@@ -41,7 +41,8 @@
         android:layout_alignParentStart="true"
         android:layout_below="@+id/fingerprint_description"
         android:layout_marginTop="20dp"
-        android:src="@drawable/ic_fp_40px" />
+        android:src="@drawable/ic_fp_40px"
+        android:contentDescription="@string/description_fingerprint_icon"/>
 
     <TextView
         android:id="@+id/fingerprint_status"
diff --git a/prebuilts/gradle/FingerprintDialog/Application/src/main/res/menu/menu_main.xml b/prebuilts/gradle/FingerprintDialog/Application/src/main/res/menu/menu_main.xml
index 73f5e89..6a6ba0f 100644
--- a/prebuilts/gradle/FingerprintDialog/Application/src/main/res/menu/menu_main.xml
+++ b/prebuilts/gradle/FingerprintDialog/Application/src/main/res/menu/menu_main.xml
@@ -1,5 +1,4 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
+<?xml version="1.0" encoding="utf-8"?><!--
   ~ Copyright (C) 2015 The Android Open Source Project
   ~
   ~ Licensed under the Apache License, Version 2.0 (the "License");
@@ -15,7 +14,12 @@
   ~ limitations under the License
   -->
 <menu xmlns:android="http://schemas.android.com/apk/res/android"
-    xmlns:tools="http://schemas.android.com/tools" tools:context=".MainActivity">
-    <item android:id="@+id/action_settings" android:title="@string/action_settings"
-        android:orderInCategory="100" android:showAsAction="never" />
+    xmlns:app="http://schemas.android.com/apk/res-auto"
+    xmlns:tools="http://schemas.android.com/tools"
+    tools:context=".MainActivity">
+    <item
+        android:id="@+id/action_settings"
+        android:orderInCategory="100"
+        android:title="@string/action_settings"
+        app:showAsAction="never" />
 </menu>
diff --git a/prebuilts/gradle/FingerprintDialog/Application/src/main/res/values/strings.xml b/prebuilts/gradle/FingerprintDialog/Application/src/main/res/values/strings.xml
index 86f200c..b085606 100644
--- a/prebuilts/gradle/FingerprintDialog/Application/src/main/res/values/strings.xml
+++ b/prebuilts/gradle/FingerprintDialog/Application/src/main/res/values/strings.xml
@@ -25,7 +25,7 @@
     <string name="cancel">Cancel</string>
     <string name="use_password">Use password</string>
     <string name="sign_in">Sign in</string>
-    <string name="ok">Ok</string>
+    <string name="ok">OK</string>
     <string name="password">Password</string>
     <string name="fingerprint_description">Confirm fingerprint to continue</string>
     <string name="fingerprint_hint">Touch sensor</string>
@@ -45,4 +45,6 @@
     <string name="use_fingerprint_in_future">Use fingerprint in the future</string>
     <string name="use_fingerprint_to_authenticate_title">Use fingerprint to authenticate</string>
     <string name="use_fingerprint_to_authenticate_key" >use_fingerprint_to_authenticate_key</string>
+    <string name="description_bugdroid_icon">Android bugdroid image</string>
+    <string name="description_fingerprint_icon">Fingerprint icon</string>
 </resources>
diff --git a/prebuilts/gradle/Flashlight/NOTICE b/prebuilts/gradle/Flashlight/NOTICE
index 29ea77b..8f8105a 100644
--- a/prebuilts/gradle/Flashlight/NOTICE
+++ b/prebuilts/gradle/Flashlight/NOTICE
@@ -1,7 +1,7 @@
 
 This sample uses the following software:
 
-Copyright 2016 The Android Open Source Project
+Copyright 2017 The Android Open Source Project
 
 Licensed under the Apache License, Version 2.0 (the "License");
 you may not use this file except in compliance with the License.
diff --git a/prebuilts/gradle/Flashlight/Wearable/build.gradle b/prebuilts/gradle/Flashlight/Wearable/build.gradle
index 70b665d..3651c81 100644
--- a/prebuilts/gradle/Flashlight/Wearable/build.gradle
+++ b/prebuilts/gradle/Flashlight/Wearable/build.gradle
@@ -20,7 +20,9 @@
     compile 'com.google.android.gms:play-services-wearable:10.0.1'
     compile 'com.android.support:support-v13:25.0.1'
 
-    compile 'com.google.android.support:wearable:1.4.0'
+    provided 'com.google.android.wearable:wearable:2.0.0'
+
+    compile 'com.google.android.support:wearable:2.0.0'
 
 }
 
diff --git a/prebuilts/gradle/Geofencing/Wearable/build.gradle b/prebuilts/gradle/Geofencing/Wearable/build.gradle
index 70b665d..3651c81 100644
--- a/prebuilts/gradle/Geofencing/Wearable/build.gradle
+++ b/prebuilts/gradle/Geofencing/Wearable/build.gradle
@@ -20,7 +20,9 @@
     compile 'com.google.android.gms:play-services-wearable:10.0.1'
     compile 'com.android.support:support-v13:25.0.1'
 
-    compile 'com.google.android.support:wearable:1.4.0'
+    provided 'com.google.android.wearable:wearable:2.0.0'
+
+    compile 'com.google.android.support:wearable:2.0.0'
 
 }
 
diff --git a/prebuilts/gradle/GridViewPager/NOTICE b/prebuilts/gradle/GridViewPager/NOTICE
index 29ea77b..8f8105a 100644
--- a/prebuilts/gradle/GridViewPager/NOTICE
+++ b/prebuilts/gradle/GridViewPager/NOTICE
@@ -1,7 +1,7 @@
 
 This sample uses the following software:
 
-Copyright 2016 The Android Open Source Project
+Copyright 2017 The Android Open Source Project
 
 Licensed under the Apache License, Version 2.0 (the "License");
 you may not use this file except in compliance with the License.
diff --git a/prebuilts/gradle/GridViewPager/Wearable/build.gradle b/prebuilts/gradle/GridViewPager/Wearable/build.gradle
index a065722..f8586fb 100644
--- a/prebuilts/gradle/GridViewPager/Wearable/build.gradle
+++ b/prebuilts/gradle/GridViewPager/Wearable/build.gradle
@@ -20,7 +20,9 @@
     compile 'com.google.android.gms:play-services-wearable:10.0.1'
     compile 'com.android.support:support-v13:25.0.1'
 
-    compile 'com.google.android.support:wearable:1.4.0'
+    provided 'com.google.android.wearable:wearable:2.0.0'
+
+    compile 'com.google.android.support:wearable:2.0.0'
 
 }
 
@@ -43,7 +45,7 @@
 
         minSdkVersion 24
 
-        targetSdkVersion 22
+        targetSdkVersion 25
     }
 
     compileOptions {
diff --git a/prebuilts/gradle/GridViewPager/Wearable/src/main/AndroidManifest.xml b/prebuilts/gradle/GridViewPager/Wearable/src/main/AndroidManifest.xml
index e25cd63..bd6df94 100644
--- a/prebuilts/gradle/GridViewPager/Wearable/src/main/AndroidManifest.xml
+++ b/prebuilts/gradle/GridViewPager/Wearable/src/main/AndroidManifest.xml
@@ -27,6 +27,11 @@
         android:icon="@drawable/ic_launcher"
         android:label="@string/app_name"
         android:theme="@android:style/Theme.DeviceDefault.Light" >
+
+        <meta-data
+            android:name="com.google.android.wearable.standalone"
+            android:value="true" />
+
         <activity
             android:name="com.example.android.wearable.gridviewpager.MainActivity"
             android:label="@string/app_name" >
diff --git a/prebuilts/gradle/JumpingJack/NOTICE b/prebuilts/gradle/JumpingJack/NOTICE
index 29ea77b..8f8105a 100644
--- a/prebuilts/gradle/JumpingJack/NOTICE
+++ b/prebuilts/gradle/JumpingJack/NOTICE
@@ -1,7 +1,7 @@
 
 This sample uses the following software:
 
-Copyright 2016 The Android Open Source Project
+Copyright 2017 The Android Open Source Project
 
 Licensed under the Apache License, Version 2.0 (the "License");
 you may not use this file except in compliance with the License.
diff --git a/prebuilts/gradle/JumpingJack/Wearable/build.gradle b/prebuilts/gradle/JumpingJack/Wearable/build.gradle
index a065722..f8586fb 100644
--- a/prebuilts/gradle/JumpingJack/Wearable/build.gradle
+++ b/prebuilts/gradle/JumpingJack/Wearable/build.gradle
@@ -20,7 +20,9 @@
     compile 'com.google.android.gms:play-services-wearable:10.0.1'
     compile 'com.android.support:support-v13:25.0.1'
 
-    compile 'com.google.android.support:wearable:1.4.0'
+    provided 'com.google.android.wearable:wearable:2.0.0'
+
+    compile 'com.google.android.support:wearable:2.0.0'
 
 }
 
@@ -43,7 +45,7 @@
 
         minSdkVersion 24
 
-        targetSdkVersion 22
+        targetSdkVersion 25
     }
 
     compileOptions {
diff --git a/prebuilts/gradle/JumpingJack/Wearable/src/main/AndroidManifest.xml b/prebuilts/gradle/JumpingJack/Wearable/src/main/AndroidManifest.xml
index f6cf220..0e0475a 100644
--- a/prebuilts/gradle/JumpingJack/Wearable/src/main/AndroidManifest.xml
+++ b/prebuilts/gradle/JumpingJack/Wearable/src/main/AndroidManifest.xml
@@ -18,7 +18,7 @@
           package="com.example.android.wearable.jumpingjack">
 
    <uses-sdk android:minSdkVersion="20"
-             android:targetSdkVersion="22" />
+             android:targetSdkVersion="25" />
 
     <uses-feature android:name="android.hardware.type.watch" />
 
@@ -29,6 +29,11 @@
             android:icon="@drawable/ic_launcher"
             android:label="@string/app_name"
             android:theme="@android:style/Theme.DeviceDefault.Light">
+
+        <meta-data
+            android:name="com.google.android.wearable.standalone"
+            android:value="true" />
+
         <activity
                 android:name=".MainActivity"
                 android:label="@string/app_name">
diff --git a/prebuilts/gradle/MediaBrowserService/NOTICE b/prebuilts/gradle/MediaBrowserService/NOTICE
index 29ea77b..8f8105a 100644
--- a/prebuilts/gradle/MediaBrowserService/NOTICE
+++ b/prebuilts/gradle/MediaBrowserService/NOTICE
@@ -1,7 +1,7 @@
 
 This sample uses the following software:
 
-Copyright 2016 The Android Open Source Project
+Copyright 2017 The Android Open Source Project
 
 Licensed under the Apache License, Version 2.0 (the "License");
 you may not use this file except in compliance with the License.
diff --git a/prebuilts/gradle/MessagingService/NOTICE b/prebuilts/gradle/MessagingService/NOTICE
index 29ea77b..8f8105a 100644
--- a/prebuilts/gradle/MessagingService/NOTICE
+++ b/prebuilts/gradle/MessagingService/NOTICE
@@ -1,7 +1,7 @@
 
 This sample uses the following software:
 
-Copyright 2016 The Android Open Source Project
+Copyright 2017 The Android Open Source Project
 
 Licensed under the Apache License, Version 2.0 (the "License");
 you may not use this file except in compliance with the License.
diff --git a/prebuilts/gradle/MultiWindowPlayground/NOTICE b/prebuilts/gradle/MultiWindowPlayground/NOTICE
index 29ea77b..8f8105a 100644
--- a/prebuilts/gradle/MultiWindowPlayground/NOTICE
+++ b/prebuilts/gradle/MultiWindowPlayground/NOTICE
@@ -1,7 +1,7 @@
 
 This sample uses the following software:
 
-Copyright 2016 The Android Open Source Project
+Copyright 2017 The Android Open Source Project
 
 Licensed under the Apache License, Version 2.0 (the "License");
 you may not use this file except in compliance with the License.
diff --git a/prebuilts/gradle/NetworkConnect/.google/packaging.yaml b/prebuilts/gradle/NetworkConnect/.google/packaging.yaml
index aad047a..a60d4a6 100644
--- a/prebuilts/gradle/NetworkConnect/.google/packaging.yaml
+++ b/prebuilts/gradle/NetworkConnect/.google/packaging.yaml
@@ -14,4 +14,6 @@
 icon:         screenshots/icon-web.png
 apiRefs:
     - android:android.os.AsyncTask
+    - android:android.net.ConnectivityManager
+    - android:android.net.NetworkInfo
 license: apache2
diff --git a/prebuilts/gradle/NetworkConnect/Application/build.gradle b/prebuilts/gradle/NetworkConnect/Application/build.gradle
index b6e6c7f..6c9529e 100644
--- a/prebuilts/gradle/NetworkConnect/Application/build.gradle
+++ b/prebuilts/gradle/NetworkConnect/Application/build.gradle
@@ -35,7 +35,7 @@
     buildToolsVersion "25.0.2"
 
     defaultConfig {
-        minSdkVersion 8
+        minSdkVersion 11
         targetSdkVersion 25
     }
 
diff --git a/prebuilts/gradle/NetworkConnect/Application/src/main/AndroidManifest.xml b/prebuilts/gradle/NetworkConnect/Application/src/main/AndroidManifest.xml
index 00ce7f3..654203b 100644
--- a/prebuilts/gradle/NetworkConnect/Application/src/main/AndroidManifest.xml
+++ b/prebuilts/gradle/NetworkConnect/Application/src/main/AndroidManifest.xml
@@ -31,8 +31,8 @@
         android:label="@string/app_name"
         android:icon="@drawable/ic_launcher"
         android:theme="@style/Theme.Sample"
-        android:allowBackup="true">
-
+        android:allowBackup="true"
+        android:networkSecurityConfig="@xml/network_security_config">
         <activity
             android:name="com.example.android.networkconnect.MainActivity"
             android:label="@string/app_name"
diff --git a/prebuilts/gradle/NetworkConnect/Application/src/main/java/com/example/android/common/logger/Log.java b/prebuilts/gradle/NetworkConnect/Application/src/main/java/com/example/android/common/logger/Log.java
deleted file mode 100644
index 17503c5..0000000
--- a/prebuilts/gradle/NetworkConnect/Application/src/main/java/com/example/android/common/logger/Log.java
+++ /dev/null
@@ -1,236 +0,0 @@
-/*
- * Copyright (C) 2013 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.example.android.common.logger;
-
-/**
- * Helper class for a list (or tree) of LoggerNodes.
- *
- * <p>When this is set as the head of the list,
- * an instance of it can function as a drop-in replacement for {@link android.util.Log}.
- * Most of the methods in this class server only to map a method call in Log to its equivalent
- * in LogNode.</p>
- */
-public class Log {
-    // Grabbing the native values from Android's native logging facilities,
-    // to make for easy migration and interop.
-    public static final int NONE = -1;
-    public static final int VERBOSE = android.util.Log.VERBOSE;
-    public static final int DEBUG = android.util.Log.DEBUG;
-    public static final int INFO = android.util.Log.INFO;
-    public static final int WARN = android.util.Log.WARN;
-    public static final int ERROR = android.util.Log.ERROR;
-    public static final int ASSERT = android.util.Log.ASSERT;
-
-    // Stores the beginning of the LogNode topology.
-    private static LogNode mLogNode;
-
-    /**
-     * Returns the next LogNode in the linked list.
-     */
-    public static LogNode getLogNode() {
-        return mLogNode;
-    }
-
-    /**
-     * Sets the LogNode data will be sent to.
-     */
-    public static void setLogNode(LogNode node) {
-        mLogNode = node;
-    }
-
-    /**
-     * Instructs the LogNode to print the log data provided. Other LogNodes can
-     * be chained to the end of the LogNode as desired.
-     *
-     * @param priority Log level of the data being logged. Verbose, Error, etc.
-     * @param tag Tag for for the log data. Can be used to organize log statements.
-     * @param msg The actual message to be logged.
-     * @param tr If an exception was thrown, this can be sent along for the logging facilities
-     *           to extract and print useful information.
-     */
-    public static void println(int priority, String tag, String msg, Throwable tr) {
-        if (mLogNode != null) {
-            mLogNode.println(priority, tag, msg, tr);
-        }
-    }
-
-    /**
-     * Instructs the LogNode to print the log data provided. Other LogNodes can
-     * be chained to the end of the LogNode as desired.
-     *
-     * @param priority Log level of the data being logged. Verbose, Error, etc.
-     * @param tag Tag for for the log data. Can be used to organize log statements.
-     * @param msg The actual message to be logged. The actual message to be logged.
-     */
-    public static void println(int priority, String tag, String msg) {
-        println(priority, tag, msg, null);
-    }
-
-   /**
-     * Prints a message at VERBOSE priority.
-     *
-     * @param tag Tag for for the log data. Can be used to organize log statements.
-     * @param msg The actual message to be logged.
-     * @param tr If an exception was thrown, this can be sent along for the logging facilities
-     *           to extract and print useful information.
-     */
-    public static void v(String tag, String msg, Throwable tr) {
-        println(VERBOSE, tag, msg, tr);
-    }
-
-    /**
-     * Prints a message at VERBOSE priority.
-     *
-     * @param tag Tag for for the log data. Can be used to organize log statements.
-     * @param msg The actual message to be logged.
-     */
-    public static void v(String tag, String msg) {
-        v(tag, msg, null);
-    }
-
-
-    /**
-     * Prints a message at DEBUG priority.
-     *
-     * @param tag Tag for for the log data. Can be used to organize log statements.
-     * @param msg The actual message to be logged.
-     * @param tr If an exception was thrown, this can be sent along for the logging facilities
-     *           to extract and print useful information.
-     */
-    public static void d(String tag, String msg, Throwable tr) {
-        println(DEBUG, tag, msg, tr);
-    }
-
-    /**
-     * Prints a message at DEBUG priority.
-     *
-     * @param tag Tag for for the log data. Can be used to organize log statements.
-     * @param msg The actual message to be logged.
-     */
-    public static void d(String tag, String msg) {
-        d(tag, msg, null);
-    }
-
-    /**
-     * Prints a message at INFO priority.
-     *
-     * @param tag Tag for for the log data. Can be used to organize log statements.
-     * @param msg The actual message to be logged.
-     * @param tr If an exception was thrown, this can be sent along for the logging facilities
-     *           to extract and print useful information.
-     */
-    public static void i(String tag, String msg, Throwable tr) {
-        println(INFO, tag, msg, tr);
-    }
-
-    /**
-     * Prints a message at INFO priority.
-     *
-     * @param tag Tag for for the log data. Can be used to organize log statements.
-     * @param msg The actual message to be logged.
-     */
-    public static void i(String tag, String msg) {
-        i(tag, msg, null);
-    }
-
-    /**
-     * Prints a message at WARN priority.
-     *
-     * @param tag Tag for for the log data. Can be used to organize log statements.
-     * @param msg The actual message to be logged.
-     * @param tr If an exception was thrown, this can be sent along for the logging facilities
-     *           to extract and print useful information.
-     */
-    public static void w(String tag, String msg, Throwable tr) {
-        println(WARN, tag, msg, tr);
-    }
-
-    /**
-     * Prints a message at WARN priority.
-     *
-     * @param tag Tag for for the log data. Can be used to organize log statements.
-     * @param msg The actual message to be logged.
-     */
-    public static void w(String tag, String msg) {
-        w(tag, msg, null);
-    }
-
-    /**
-     * Prints a message at WARN priority.
-     *
-     * @param tag Tag for for the log data. Can be used to organize log statements.
-     * @param tr If an exception was thrown, this can be sent along for the logging facilities
-     *           to extract and print useful information.
-     */
-    public static void w(String tag, Throwable tr) {
-        w(tag, null, tr);
-    }
-
-    /**
-     * Prints a message at ERROR priority.
-     *
-     * @param tag Tag for for the log data. Can be used to organize log statements.
-     * @param msg The actual message to be logged.
-     * @param tr If an exception was thrown, this can be sent along for the logging facilities
-     *           to extract and print useful information.
-     */
-    public static void e(String tag, String msg, Throwable tr) {
-        println(ERROR, tag, msg, tr);
-    }
-
-    /**
-     * Prints a message at ERROR priority.
-     *
-     * @param tag Tag for for the log data. Can be used to organize log statements.
-     * @param msg The actual message to be logged.
-     */
-    public static void e(String tag, String msg) {
-        e(tag, msg, null);
-    }
-
-    /**
-     * Prints a message at ASSERT priority.
-     *
-     * @param tag Tag for for the log data. Can be used to organize log statements.
-     * @param msg The actual message to be logged.
-     * @param tr If an exception was thrown, this can be sent along for the logging facilities
-     *           to extract and print useful information.
-     */
-    public static void wtf(String tag, String msg, Throwable tr) {
-        println(ASSERT, tag, msg, tr);
-    }
-
-    /**
-     * Prints a message at ASSERT priority.
-     *
-     * @param tag Tag for for the log data. Can be used to organize log statements.
-     * @param msg The actual message to be logged.
-     */
-    public static void wtf(String tag, String msg) {
-        wtf(tag, msg, null);
-    }
-
-    /**
-     * Prints a message at ASSERT priority.
-     *
-     * @param tag Tag for for the log data. Can be used to organize log statements.
-     * @param tr If an exception was thrown, this can be sent along for the logging facilities
-     *           to extract and print useful information.
-     */
-    public static void wtf(String tag, Throwable tr) {
-        wtf(tag, null, tr);
-    }
-}
diff --git a/prebuilts/gradle/NetworkConnect/Application/src/main/java/com/example/android/common/logger/LogFragment.java b/prebuilts/gradle/NetworkConnect/Application/src/main/java/com/example/android/common/logger/LogFragment.java
deleted file mode 100644
index b302acd..0000000
--- a/prebuilts/gradle/NetworkConnect/Application/src/main/java/com/example/android/common/logger/LogFragment.java
+++ /dev/null
@@ -1,109 +0,0 @@
-/*
-* Copyright 2013 The Android Open Source Project
-*
-* Licensed under the Apache License, Version 2.0 (the "License");
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-*
-*     http://www.apache.org/licenses/LICENSE-2.0
-*
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*/
-/*
- * Copyright 2013 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package com.example.android.common.logger;
-
-import android.graphics.Typeface;
-import android.os.Bundle;
-import android.support.v4.app.Fragment;
-import android.text.Editable;
-import android.text.TextWatcher;
-import android.view.Gravity;
-import android.view.LayoutInflater;
-import android.view.View;
-import android.view.ViewGroup;
-import android.widget.ScrollView;
-
-/**
- * Simple fraggment which contains a LogView and uses is to output log data it receives
- * through the LogNode interface.
- */
-public class LogFragment extends Fragment {
-
-    private LogView mLogView;
-    private ScrollView mScrollView;
-
-    public LogFragment() {}
-
-    public View inflateViews() {
-        mScrollView = new ScrollView(getActivity());
-        ViewGroup.LayoutParams scrollParams = new ViewGroup.LayoutParams(
-                ViewGroup.LayoutParams.MATCH_PARENT,
-                ViewGroup.LayoutParams.MATCH_PARENT);
-        mScrollView.setLayoutParams(scrollParams);
-
-        mLogView = new LogView(getActivity());
-        ViewGroup.LayoutParams logParams = new ViewGroup.LayoutParams(scrollParams);
-        logParams.height = ViewGroup.LayoutParams.WRAP_CONTENT;
-        mLogView.setLayoutParams(logParams);
-        mLogView.setClickable(true);
-        mLogView.setFocusable(true);
-        mLogView.setTypeface(Typeface.MONOSPACE);
-
-        // Want to set padding as 16 dips, setPadding takes pixels.  Hooray math!
-        int paddingDips = 16;
-        double scale = getResources().getDisplayMetrics().density;
-        int paddingPixels = (int) ((paddingDips * (scale)) + .5);
-        mLogView.setPadding(paddingPixels, paddingPixels, paddingPixels, paddingPixels);
-        mLogView.setCompoundDrawablePadding(paddingPixels);
-
-        mLogView.setGravity(Gravity.BOTTOM);
-        mLogView.setTextAppearance(getActivity(), android.R.style.TextAppearance_Holo_Medium);
-
-        mScrollView.addView(mLogView);
-        return mScrollView;
-    }
-
-    @Override
-    public View onCreateView(LayoutInflater inflater, ViewGroup container,
-                             Bundle savedInstanceState) {
-
-        View result = inflateViews();
-
-        mLogView.addTextChangedListener(new TextWatcher() {
-            @Override
-            public void beforeTextChanged(CharSequence s, int start, int count, int after) {}
-
-            @Override
-            public void onTextChanged(CharSequence s, int start, int before, int count) {}
-
-            @Override
-            public void afterTextChanged(Editable s) {
-                mScrollView.fullScroll(ScrollView.FOCUS_DOWN);
-            }
-        });
-        return result;
-    }
-
-    public LogView getLogView() {
-        return mLogView;
-    }
-}
\ No newline at end of file
diff --git a/prebuilts/gradle/NetworkConnect/Application/src/main/java/com/example/android/common/logger/LogNode.java b/prebuilts/gradle/NetworkConnect/Application/src/main/java/com/example/android/common/logger/LogNode.java
deleted file mode 100644
index bc37cab..0000000
--- a/prebuilts/gradle/NetworkConnect/Application/src/main/java/com/example/android/common/logger/LogNode.java
+++ /dev/null
@@ -1,39 +0,0 @@
-/*
- * Copyright (C) 2012 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.example.android.common.logger;
-
-/**
- * Basic interface for a logging system that can output to one or more targets.
- * Note that in addition to classes that will output these logs in some format,
- * one can also implement this interface over a filter and insert that in the chain,
- * such that no targets further down see certain data, or see manipulated forms of the data.
- * You could, for instance, write a "ToHtmlLoggerNode" that just converted all the log data
- * it received to HTML and sent it along to the next node in the chain, without printing it
- * anywhere.
- */
-public interface LogNode {
-
-    /**
-     * Instructs first LogNode in the list to print the log data provided.
-     * @param priority Log level of the data being logged.  Verbose, Error, etc.
-     * @param tag Tag for for the log data.  Can be used to organize log statements.
-     * @param msg The actual message to be logged. The actual message to be logged.
-     * @param tr If an exception was thrown, this can be sent along for the logging facilities
-     *           to extract and print useful information.
-     */
-    public void println(int priority, String tag, String msg, Throwable tr);
-
-}
diff --git a/prebuilts/gradle/NetworkConnect/Application/src/main/java/com/example/android/common/logger/LogView.java b/prebuilts/gradle/NetworkConnect/Application/src/main/java/com/example/android/common/logger/LogView.java
deleted file mode 100644
index c01542b..0000000
--- a/prebuilts/gradle/NetworkConnect/Application/src/main/java/com/example/android/common/logger/LogView.java
+++ /dev/null
@@ -1,145 +0,0 @@
-/*
- * Copyright (C) 2013 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.example.android.common.logger;
-
-import android.app.Activity;
-import android.content.Context;
-import android.util.*;
-import android.widget.TextView;
-
-/** Simple TextView which is used to output log data received through the LogNode interface.
-*/
-public class LogView extends TextView implements LogNode {
-
-    public LogView(Context context) {
-        super(context);
-    }
-
-    public LogView(Context context, AttributeSet attrs) {
-        super(context, attrs);
-    }
-
-    public LogView(Context context, AttributeSet attrs, int defStyle) {
-        super(context, attrs, defStyle);
-    }
-
-    /**
-     * Formats the log data and prints it out to the LogView.
-     * @param priority Log level of the data being logged.  Verbose, Error, etc.
-     * @param tag Tag for for the log data.  Can be used to organize log statements.
-     * @param msg The actual message to be logged. The actual message to be logged.
-     * @param tr If an exception was thrown, this can be sent along for the logging facilities
-     *           to extract and print useful information.
-     */
-    @Override
-    public void println(int priority, String tag, String msg, Throwable tr) {
-
-        
-        String priorityStr = null;
-
-        // For the purposes of this View, we want to print the priority as readable text.
-        switch(priority) {
-            case android.util.Log.VERBOSE:
-                priorityStr = "VERBOSE";
-                break;
-            case android.util.Log.DEBUG:
-                priorityStr = "DEBUG";
-                break;
-            case android.util.Log.INFO:
-                priorityStr = "INFO";
-                break;
-            case android.util.Log.WARN:
-                priorityStr = "WARN";
-                break;
-            case android.util.Log.ERROR:
-                priorityStr = "ERROR";
-                break;
-            case android.util.Log.ASSERT:
-                priorityStr = "ASSERT";
-                break;
-            default:
-                break;
-        }
-
-        // Handily, the Log class has a facility for converting a stack trace into a usable string.
-        String exceptionStr = null;
-        if (tr != null) {
-            exceptionStr = android.util.Log.getStackTraceString(tr);
-        }
-
-        // Take the priority, tag, message, and exception, and concatenate as necessary
-        // into one usable line of text.
-        final StringBuilder outputBuilder = new StringBuilder();
-
-        String delimiter = "\t";
-        appendIfNotNull(outputBuilder, priorityStr, delimiter);
-        appendIfNotNull(outputBuilder, tag, delimiter);
-        appendIfNotNull(outputBuilder, msg, delimiter);
-        appendIfNotNull(outputBuilder, exceptionStr, delimiter);
-
-        // In case this was originally called from an AsyncTask or some other off-UI thread,
-        // make sure the update occurs within the UI thread.
-        ((Activity) getContext()).runOnUiThread( (new Thread(new Runnable() {
-            @Override
-            public void run() {
-                // Display the text we just generated within the LogView.
-                appendToLog(outputBuilder.toString());
-            }
-        })));
-
-        if (mNext != null) {
-            mNext.println(priority, tag, msg, tr);
-        }
-    }
-
-    public LogNode getNext() {
-        return mNext;
-    }
-
-    public void setNext(LogNode node) {
-        mNext = node;
-    }
-
-    /** Takes a string and adds to it, with a separator, if the bit to be added isn't null. Since
-     * the logger takes so many arguments that might be null, this method helps cut out some of the
-     * agonizing tedium of writing the same 3 lines over and over.
-     * @param source StringBuilder containing the text to append to.
-     * @param addStr The String to append
-     * @param delimiter The String to separate the source and appended strings. A tab or comma,
-     *                  for instance.
-     * @return The fully concatenated String as a StringBuilder
-     */
-    private StringBuilder appendIfNotNull(StringBuilder source, String addStr, String delimiter) {
-        if (addStr != null) {
-            if (addStr.length() == 0) {
-                delimiter = "";
-            }
-
-            return source.append(addStr).append(delimiter);
-        }
-        return source;
-    }
-
-    // The next LogNode in the chain.
-    LogNode mNext;
-
-    /** Outputs the string as a new line of log data in the LogView. */
-    public void appendToLog(String s) {
-        append("\n" + s);
-    }
-
-
-}
diff --git a/prebuilts/gradle/NetworkConnect/Application/src/main/java/com/example/android/common/logger/LogWrapper.java b/prebuilts/gradle/NetworkConnect/Application/src/main/java/com/example/android/common/logger/LogWrapper.java
deleted file mode 100644
index 16a9e7b..0000000
--- a/prebuilts/gradle/NetworkConnect/Application/src/main/java/com/example/android/common/logger/LogWrapper.java
+++ /dev/null
@@ -1,75 +0,0 @@
-/*
- * Copyright (C) 2012 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.example.android.common.logger;
-
-import android.util.Log;
-
-/**
- * Helper class which wraps Android's native Log utility in the Logger interface.  This way
- * normal DDMS output can be one of the many targets receiving and outputting logs simultaneously.
- */
-public class LogWrapper implements LogNode {
-
-    // For piping:  The next node to receive Log data after this one has done its work.
-    private LogNode mNext;
-
-    /**
-     * Returns the next LogNode in the linked list.
-     */
-    public LogNode getNext() {
-        return mNext;
-    }
-
-    /**
-     * Sets the LogNode data will be sent to..
-     */
-    public void setNext(LogNode node) {
-        mNext = node;
-    }
-
-    /**
-     * Prints data out to the console using Android's native log mechanism.
-     * @param priority Log level of the data being logged.  Verbose, Error, etc.
-     * @param tag Tag for for the log data.  Can be used to organize log statements.
-     * @param msg The actual message to be logged. The actual message to be logged.
-     * @param tr If an exception was thrown, this can be sent along for the logging facilities
-     *           to extract and print useful information.
-     */
-    @Override
-    public void println(int priority, String tag, String msg, Throwable tr) {
-        // There actually are log methods that don't take a msg parameter.  For now,
-        // if that's the case, just convert null to the empty string and move on.
-        String useMsg = msg;
-        if (useMsg == null) {
-            useMsg = "";
-        }
-
-        // If an exeption was provided, convert that exception to a usable string and attach
-        // it to the end of the msg method.
-        if (tr != null) {
-            msg += "\n" + Log.getStackTraceString(tr);
-        }
-
-        // This is functionally identical to Log.x(tag, useMsg);
-        // For instance, if priority were Log.VERBOSE, this would be the same as Log.v(tag, useMsg)
-        Log.println(priority, tag, useMsg);
-
-        // If this isn't the last node in the chain, move things along.
-        if (mNext != null) {
-            mNext.println(priority, tag, msg, tr);
-        }
-    }
-}
diff --git a/prebuilts/gradle/NetworkConnect/Application/src/main/java/com/example/android/common/logger/MessageOnlyLogFilter.java b/prebuilts/gradle/NetworkConnect/Application/src/main/java/com/example/android/common/logger/MessageOnlyLogFilter.java
deleted file mode 100644
index 19967dc..0000000
--- a/prebuilts/gradle/NetworkConnect/Application/src/main/java/com/example/android/common/logger/MessageOnlyLogFilter.java
+++ /dev/null
@@ -1,60 +0,0 @@
-/*
- * Copyright (C) 2013 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.example.android.common.logger;
-
-/**
- * Simple {@link LogNode} filter, removes everything except the message.
- * Useful for situations like on-screen log output where you don't want a lot of metadata displayed,
- * just easy-to-read message updates as they're happening.
- */
-public class MessageOnlyLogFilter implements LogNode {
-
-    LogNode mNext;
-
-    /**
-     * Takes the "next" LogNode as a parameter, to simplify chaining.
-     *
-     * @param next The next LogNode in the pipeline.
-     */
-    public MessageOnlyLogFilter(LogNode next) {
-        mNext = next;
-    }
-
-    public MessageOnlyLogFilter() {
-    }
-
-    @Override
-    public void println(int priority, String tag, String msg, Throwable tr) {
-        if (mNext != null) {
-            getNext().println(Log.NONE, null, msg, null);
-        }
-    }
-
-    /**
-     * Returns the next LogNode in the chain.
-     */
-    public LogNode getNext() {
-        return mNext;
-    }
-
-    /**
-     * Sets the LogNode data will be sent to..
-     */
-    public void setNext(LogNode node) {
-        mNext = node;
-    }
-
-}
diff --git a/prebuilts/gradle/NetworkConnect/Application/src/main/java/com/example/android/networkconnect/DownloadCallback.java b/prebuilts/gradle/NetworkConnect/Application/src/main/java/com/example/android/networkconnect/DownloadCallback.java
new file mode 100644
index 0000000..b553e85
--- /dev/null
+++ b/prebuilts/gradle/NetworkConnect/Application/src/main/java/com/example/android/networkconnect/DownloadCallback.java
@@ -0,0 +1,60 @@
+/*
+ * Copyright (C) 2016 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package com.example.android.networkconnect;
+
+import android.net.NetworkInfo;
+import android.support.annotation.IntDef;
+
+/**
+ * Sample interface containing bare minimum methods needed for an asynchronous task
+ * to update the UI Context.
+ */
+
+public interface DownloadCallback {
+    interface Progress {
+        int ERROR = -1;
+        int CONNECT_SUCCESS = 0;
+        int GET_INPUT_STREAM_SUCCESS = 1;
+        int PROCESS_INPUT_STREAM_IN_PROGRESS = 2;
+        int PROCESS_INPUT_STREAM_SUCCESS = 3;
+    }
+
+    /**
+     * Indicates that the callback handler needs to update its appearance or information based on
+     * the result of the task. Expected to be called from the main thread.
+     */
+    void updateFromDownload(String result);
+
+    /**
+     * Get the device's active network status in the form of a NetworkInfo object.
+     */
+    NetworkInfo getActiveNetworkInfo();
+
+    /**
+     * Indicate to callback handler any progress update.
+     * @param progressCode must be one of the constants defined in DownloadCallback.Progress.
+     * @param percentComplete must be 0-100.
+     */
+    void onProgressUpdate(int progressCode, int percentComplete);
+
+    /**
+     * Indicates that the download operation has finished. This method is called even if the
+     * download hasn't completed successfully.
+     */
+    void finishDownloading();
+
+}
diff --git a/prebuilts/gradle/NetworkConnect/Application/src/main/java/com/example/android/networkconnect/MainActivity.java b/prebuilts/gradle/NetworkConnect/Application/src/main/java/com/example/android/networkconnect/MainActivity.java
index 3ad4646..d490f5d 100755
--- a/prebuilts/gradle/NetworkConnect/Application/src/main/java/com/example/android/networkconnect/MainActivity.java
+++ b/prebuilts/gradle/NetworkConnect/Application/src/main/java/com/example/android/networkconnect/MainActivity.java
@@ -1,5 +1,5 @@
 /*
- * Copyright 2013 The Android Open Source Project
+ * Copyright (C) 2016 The Android Open Source Project
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -16,55 +16,42 @@
 
 package com.example.android.networkconnect;
 
-import android.os.AsyncTask;
+import android.content.Context;
+import android.net.ConnectivityManager;
+import android.net.NetworkInfo;
 import android.os.Bundle;
 import android.support.v4.app.FragmentActivity;
-import android.util.TypedValue;
+import android.util.Log;
 import android.view.Menu;
 import android.view.MenuItem;
-
-import com.example.android.common.logger.Log;
-import com.example.android.common.logger.LogFragment;
-import com.example.android.common.logger.LogWrapper;
-import com.example.android.common.logger.MessageOnlyLogFilter;
-
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.InputStreamReader;
-import java.io.Reader;
-import java.io.UnsupportedEncodingException;
-import java.net.HttpURLConnection;
-import java.net.URL;
+import android.widget.TextView;
 
 /**
- * Sample application demonstrating how to connect to the network and fetch raw
- * HTML. It uses AsyncTask to do the fetch on a background thread. To establish
- * the network connection, it uses HttpURLConnection.
+ * Sample Activity demonstrating how to connect to the network and fetch raw
+ * HTML. It uses a Fragment that encapsulates the network operations on an AsyncTask.
  *
- * This sample uses the logging framework to display log output in the log
- * fragment (LogFragment).
+ * This sample uses a TextView to display output.
  */
-public class MainActivity extends FragmentActivity {
+public class MainActivity extends FragmentActivity implements DownloadCallback {
 
-    public static final String TAG = "Network Connect";
-
-    // Reference to the fragment showing events, so we can clear it with a button
+    // Reference to the TextView showing fetched data, so we can clear it with a button
     // as necessary.
-    private LogFragment mLogFragment;
+    private TextView mDataText;
+
+    // Keep a reference to the NetworkFragment which owns the AsyncTask object
+    // that is used to execute network ops.
+    private NetworkFragment mNetworkFragment;
+
+    // Boolean telling us whether a download is in progress, so we don't trigger overlapping
+    // downloads with consecutive button clicks.
+    private boolean mDownloading = false;
 
     @Override
     protected void onCreate(Bundle savedInstanceState) {
         super.onCreate(savedInstanceState);
         setContentView(R.layout.sample_main);
-
-        // Initialize text fragment that displays intro text.
-        SimpleTextFragment introFragment = (SimpleTextFragment)
-                    getSupportFragmentManager().findFragmentById(R.id.intro_fragment);
-        introFragment.setText(R.string.welcome_message);
-        introFragment.getTextView().setTextSize(TypedValue.COMPLEX_UNIT_DIP, 16.0f);
-
-        // Initialize the logging framework.
-        initializeLogging();
+        mDataText = (TextView) findViewById(R.id.data_text);
+        mNetworkFragment = NetworkFragment.getInstance(getSupportFragmentManager(), "https://www.google.com");
     }
 
     @Override
@@ -79,111 +66,65 @@
             // When the user clicks FETCH, fetch the first 500 characters of
             // raw HTML from www.google.com.
             case R.id.fetch_action:
-                new DownloadTask().execute("http://www.google.com");
+                startDownload();
                 return true;
-            // Clear the log view fragment.
+            // Clear the text and cancel download.
             case R.id.clear_action:
-              mLogFragment.getLogView().setText("");
-              return true;
+                finishDownloading();
+                mDataText.setText("");
+                return true;
         }
         return false;
     }
 
-    /**
-     * Implementation of AsyncTask, to fetch the data in the background away from
-     * the UI thread.
-     */
-    private class DownloadTask extends AsyncTask<String, Void, String> {
-
-        @Override
-        protected String doInBackground(String... urls) {
-            try {
-                return loadFromNetwork(urls[0]);
-            } catch (IOException e) {
-              return getString(R.string.connection_error);
-            }
-        }
-
-        /**
-         * Uses the logging framework to display the output of the fetch
-         * operation in the log fragment.
-         */
-        @Override
-        protected void onPostExecute(String result) {
-          Log.i(TAG, result);
+    private void startDownload() {
+        if (!mDownloading && mNetworkFragment != null) {
+            // Execute the async download.
+            mNetworkFragment.startDownload();
+            mDownloading = true;
         }
     }
 
-    /** Initiates the fetch operation. */
-    private String loadFromNetwork(String urlString) throws IOException {
-        InputStream stream = null;
-        String str ="";
-
-        try {
-            stream = downloadUrl(urlString);
-            str = readIt(stream, 500);
-       } finally {
-           if (stream != null) {
-               stream.close();
-            }
+    @Override
+    public void updateFromDownload(String result) {
+        if (result != null) {
+            mDataText.setText(result);
+        } else {
+            mDataText.setText(getString(R.string.connection_error));
         }
-        return str;
     }
 
-    /**
-     * Given a string representation of a URL, sets up a connection and gets
-     * an input stream.
-     * @param urlString A string representation of a URL.
-     * @return An InputStream retrieved from a successful HttpURLConnection.
-     * @throws java.io.IOException
-     */
-    private InputStream downloadUrl(String urlString) throws IOException {
-        // BEGIN_INCLUDE(get_inputstream)
-        URL url = new URL(urlString);
-        HttpURLConnection conn = (HttpURLConnection) url.openConnection();
-        conn.setReadTimeout(10000 /* milliseconds */);
-        conn.setConnectTimeout(15000 /* milliseconds */);
-        conn.setRequestMethod("GET");
-        conn.setDoInput(true);
-        // Start the query
-        conn.connect();
-        InputStream stream = conn.getInputStream();
-        return stream;
-        // END_INCLUDE(get_inputstream)
+    @Override
+    public NetworkInfo getActiveNetworkInfo() {
+        ConnectivityManager connectivityManager =
+                (ConnectivityManager) getSystemService(Context.CONNECTIVITY_SERVICE);
+        NetworkInfo networkInfo = connectivityManager.getActiveNetworkInfo();
+        return networkInfo;
     }
 
-    /** Reads an InputStream and converts it to a String.
-     * @param stream InputStream containing HTML from targeted site.
-     * @param len Length of string that this method returns.
-     * @return String concatenated according to len parameter.
-     * @throws java.io.IOException
-     * @throws java.io.UnsupportedEncodingException
-     */
-    private String readIt(InputStream stream, int len) throws IOException, UnsupportedEncodingException {
-        Reader reader = null;
-        reader = new InputStreamReader(stream, "UTF-8");
-        char[] buffer = new char[len];
-        reader.read(buffer);
-        return new String(buffer);
+    @Override
+    public void finishDownloading() {
+        mDownloading = false;
+        if (mNetworkFragment != null) {
+            mNetworkFragment.cancelDownload();
+        }
     }
 
-    /** Create a chain of targets that will receive log data */
-    public void initializeLogging() {
-
-        // Using Log, front-end to the logging chain, emulates
-        // android.util.log method signatures.
-
-        // Wraps Android's native log framework
-        LogWrapper logWrapper = new LogWrapper();
-        Log.setLogNode(logWrapper);
-
-        // A filter that strips out everything except the message text.
-        MessageOnlyLogFilter msgFilter = new MessageOnlyLogFilter();
-        logWrapper.setNext(msgFilter);
-
-        // On screen logging via a fragment with a TextView.
-        mLogFragment =
-                (LogFragment) getSupportFragmentManager().findFragmentById(R.id.log_fragment);
-        msgFilter.setNext(mLogFragment.getLogView());
+    @Override
+    public void onProgressUpdate(int progressCode, int percentComplete) {
+        switch(progressCode) {
+            // You can add UI behavior for progress updates here.
+            case Progress.ERROR:
+                break;
+            case Progress.CONNECT_SUCCESS:
+                break;
+            case Progress.GET_INPUT_STREAM_SUCCESS:
+                break;
+            case Progress.PROCESS_INPUT_STREAM_IN_PROGRESS:
+                mDataText.setText("" + percentComplete + "%");
+                break;
+            case Progress.PROCESS_INPUT_STREAM_SUCCESS:
+                break;
+        }
     }
 }
diff --git a/prebuilts/gradle/NetworkConnect/Application/src/main/java/com/example/android/networkconnect/NetworkFragment.java b/prebuilts/gradle/NetworkConnect/Application/src/main/java/com/example/android/networkconnect/NetworkFragment.java
new file mode 100644
index 0000000..cc41075
--- /dev/null
+++ b/prebuilts/gradle/NetworkConnect/Application/src/main/java/com/example/android/networkconnect/NetworkFragment.java
@@ -0,0 +1,289 @@
+/*
+ * Copyright (C) 2016 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package com.example.android.networkconnect;
+
+import android.content.Context;
+import android.net.ConnectivityManager;
+import android.net.NetworkInfo;
+import android.os.AsyncTask;
+import android.os.Bundle;
+import android.support.annotation.Nullable;
+import android.support.v4.app.Fragment;
+import android.support.v4.app.FragmentManager;
+import android.util.Log;
+
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.InputStreamReader;
+import java.io.Reader;
+import java.net.URL;
+
+import javax.net.ssl.HttpsURLConnection;
+
+/**
+ * Implementation of headless Fragment that runs an AsyncTask to fetch data from the network.
+ */
+public class NetworkFragment extends Fragment {
+    public static final String TAG = "NetworkFragment";
+
+    private static final String URL_KEY = "UrlKey";
+
+    private DownloadCallback mCallback;
+    private DownloadTask mDownloadTask;
+    private String mUrlString;
+
+    /**
+     * Static initializer for NetworkFragment that sets the URL of the host it will be downloading
+     * from.
+     */
+    public static NetworkFragment getInstance(FragmentManager fragmentManager, String url) {
+        // Recover NetworkFragment in case we are re-creating the Activity due to a config change.
+        // This is necessary because NetworkFragment might have a task that began running before
+        // the config change and has not finished yet.
+        // The NetworkFragment is recoverable via this method because it calls
+        // setRetainInstance(true) upon creation.
+        NetworkFragment networkFragment = (NetworkFragment) fragmentManager
+                .findFragmentByTag(NetworkFragment.TAG);
+        if (networkFragment == null) {
+            networkFragment = new NetworkFragment();
+            Bundle args = new Bundle();
+            args.putString(URL_KEY, url);
+            networkFragment.setArguments(args);
+            fragmentManager.beginTransaction().add(networkFragment, TAG).commit();
+        }
+        return networkFragment;
+    }
+
+    @Override
+    public void onCreate(@Nullable Bundle savedInstanceState) {
+        super.onCreate(savedInstanceState);
+        // Retain this Fragment across configuration changes in the host Activity.
+        setRetainInstance(true);
+        mUrlString = getArguments().getString(URL_KEY);
+    }
+
+    @Override
+    public void onAttach(Context context) {
+        super.onAttach(context);
+        // Host Activity will handle callbacks from task.
+        mCallback = (DownloadCallback)context;
+    }
+
+    @Override
+    public void onDetach() {
+        super.onDetach();
+        // Clear reference to host Activity.
+        mCallback = null;
+    }
+
+    @Override
+    public void onDestroy() {
+        // Cancel task when Fragment is destroyed.
+        cancelDownload();
+        super.onDestroy();
+    }
+
+    /**
+     * Start non-blocking execution of DownloadTask.
+     */
+    public void startDownload() {
+        cancelDownload();
+        mDownloadTask = new DownloadTask();
+        mDownloadTask.execute(mUrlString);
+    }
+
+    /**
+     * Cancel (and interrupt if necessary) any ongoing DownloadTask execution.
+     */
+    public void cancelDownload() {
+        if (mDownloadTask != null) {
+            mDownloadTask.cancel(true);
+            mDownloadTask = null;
+        }
+    }
+
+    /**
+     * Implementation of AsyncTask that runs a network operation on a background thread.
+     */
+    private class DownloadTask extends AsyncTask<String, Integer, DownloadTask.Result> {
+
+        /**
+         * Wrapper class that serves as a union of a result value and an exception. When the
+         * download task has completed, either the result value or exception can be a non-null
+         * value. This allows you to pass exceptions to the UI thread that were thrown during
+         * doInBackground().
+         */
+        class Result {
+            public String mResultValue;
+            public Exception mException;
+            public Result(String resultValue) {
+                mResultValue = resultValue;
+            }
+            public Result(Exception exception) {
+                mException = exception;
+            }
+        }
+
+        /**
+         * Cancel background network operation if we do not have network connectivity.
+         */
+        @Override
+        protected void onPreExecute() {
+            if (mCallback != null) {
+                NetworkInfo networkInfo = mCallback.getActiveNetworkInfo();
+                if (networkInfo == null || !networkInfo.isConnected() ||
+                        (networkInfo.getType() != ConnectivityManager.TYPE_WIFI
+                                && networkInfo.getType() != ConnectivityManager.TYPE_MOBILE)) {
+                    // If no connectivity, cancel task and update Callback with null data.
+                    mCallback.updateFromDownload(null);
+                    cancel(true);
+                }
+            }
+        }
+
+        /**
+         * Defines work to perform on the background thread.
+         */
+        @Override
+        protected Result doInBackground(String... urls) {
+            Result result = null;
+            if (!isCancelled() && urls != null && urls.length > 0) {
+                String urlString = urls[0];
+                try {
+                    URL url = new URL(urlString);
+                    String resultString = downloadUrl(url);
+                    if (resultString != null) {
+                        result = new Result(resultString);
+                    } else {
+                        throw new IOException("No response received.");
+                    }
+                } catch(Exception e) {
+                    result = new Result(e);
+                }
+            }
+            return result;
+        }
+
+        /**
+         * Send DownloadCallback a progress update.
+         */
+        @Override
+        protected void onProgressUpdate(Integer... values) {
+            super.onProgressUpdate(values);
+            if (values.length >= 2) {
+                mCallback.onProgressUpdate(values[0], values[1]);
+            }
+        }
+
+        /**
+         * Updates the DownloadCallback with the result.
+         */
+        @Override
+        protected void onPostExecute(Result result) {
+            if (result != null && mCallback != null) {
+                if (result.mException != null) {
+                    mCallback.updateFromDownload(result.mException.getMessage());
+                } else if (result.mResultValue != null) {
+                    mCallback.updateFromDownload(result.mResultValue);
+                }
+                mCallback.finishDownloading();
+            }
+        }
+
+        /**
+         * Override to add special behavior for cancelled AsyncTask.
+         */
+        @Override
+        protected void onCancelled(Result result) {
+        }
+
+        /**
+         * Given a URL, sets up a connection and gets the HTTP response body from the server.
+         * If the network request is successful, it returns the response body in String form. Otherwise,
+         * it will throw an IOException.
+         */
+        private String downloadUrl(URL url) throws IOException {
+            InputStream stream = null;
+            HttpsURLConnection connection = null;
+            String result = null;
+            try {
+                connection = (HttpsURLConnection) url.openConnection();
+                // Timeout for reading InputStream arbitrarily set to 3000ms.
+                connection.setReadTimeout(3000);
+                // Timeout for connection.connect() arbitrarily set to 3000ms.
+                connection.setConnectTimeout(3000);
+                // For this use case, set HTTP method to GET.
+                connection.setRequestMethod("GET");
+                // Already true by default but setting just in case; needs to be true since this request
+                // is carrying an input (response) body.
+                connection.setDoInput(true);
+                // Open communications link (network traffic occurs here).
+                connection.connect();
+                publishProgress(DownloadCallback.Progress.CONNECT_SUCCESS);
+                int responseCode = connection.getResponseCode();
+                if (responseCode != HttpsURLConnection.HTTP_OK) {
+                    throw new IOException("HTTP error code: " + responseCode);
+                }
+                // Retrieve the response body as an InputStream.
+                stream = connection.getInputStream();
+                publishProgress(DownloadCallback.Progress.GET_INPUT_STREAM_SUCCESS, 0);
+                if (stream != null) {
+                    // Converts Stream to String with max length of 500.
+                    result = readStream(stream, 500);
+                    publishProgress(DownloadCallback.Progress.PROCESS_INPUT_STREAM_SUCCESS, 0);
+                }
+            } finally {
+                // Close Stream and disconnect HTTPS connection.
+                if (stream != null) {
+                    stream.close();
+                }
+                if (connection != null) {
+                    connection.disconnect();
+                }
+            }
+            return result;
+        }
+
+        /**
+         * Converts the contents of an InputStream to a String.
+         */
+        private String readStream(InputStream stream, int maxLength) throws IOException {
+            String result = null;
+            // Read InputStream using the UTF-8 charset.
+            InputStreamReader reader = new InputStreamReader(stream, "UTF-8");
+            // Create temporary buffer to hold Stream data with specified max length.
+            char[] buffer = new char[maxLength];
+            // Populate temporary buffer with Stream data.
+            int numChars = 0;
+            int readSize = 0;
+            while (numChars < maxLength && readSize != -1) {
+                numChars += readSize;
+                int pct = (100 * numChars) / maxLength;
+                publishProgress(DownloadCallback.Progress.PROCESS_INPUT_STREAM_IN_PROGRESS, pct);
+                readSize = reader.read(buffer, numChars, buffer.length - numChars);
+            }
+            if (numChars != -1) {
+                // The stream was not empty.
+                // Create String that is actual length of response body if actual length was less than
+                // max length.
+                numChars = Math.min(numChars, maxLength);
+                result = new String(buffer, 0, numChars);
+            }
+            return result;
+        }
+    }
+}
diff --git a/prebuilts/gradle/NetworkConnect/Application/src/main/java/com/example/android/networkconnect/SimpleTextFragment.java b/prebuilts/gradle/NetworkConnect/Application/src/main/java/com/example/android/networkconnect/SimpleTextFragment.java
deleted file mode 100644
index 3202937..0000000
--- a/prebuilts/gradle/NetworkConnect/Application/src/main/java/com/example/android/networkconnect/SimpleTextFragment.java
+++ /dev/null
@@ -1,98 +0,0 @@
-/*
- * Copyright 2013 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package com.example.android.networkconnect;
-
-import android.os.Bundle;
-import android.support.v4.app.Fragment;
-import android.util.Log;
-import android.view.Gravity;
-import android.view.LayoutInflater;
-import android.view.View;
-import android.view.ViewGroup;
-import android.widget.TextView;
-
-/**
- * Simple fragment containing only a TextView. Used by TextPagerAdapter to create
- * tutorial-style pages for apps.
- */
-public class SimpleTextFragment extends Fragment {
-
-    // Contains the text that will be displayed by this Fragment
-    String mText;
-
-    // Contains a resource ID for the text that will be displayed by this fragment.
-    int mTextId = -1;
-
-    // Keys which will be used to store/retrieve text passed in via setArguments.
-    public static final String TEXT_KEY = "text";
-    public static final String TEXT_ID_KEY = "text_id";
-
-    // For situations where the app wants to modify text at Runtime, exposing the TextView.
-    private TextView mTextView;
-
-    public SimpleTextFragment() {
-    }
-
-    @Override
-    public View onCreateView(LayoutInflater inflater, ViewGroup container,
-            Bundle savedInstanceState) {
-        // Before initializing the textView, check if any arguments were provided via setArguments.
-        processArguments();
-
-        // Create a new TextView and set its text to whatever was provided.
-        mTextView = new TextView(getActivity());
-        mTextView.setGravity(Gravity.CENTER);
-
-        if (mText != null) {
-            mTextView.setText(mText);
-            Log.i("SimpleTextFragment", mText);
-        }
-        return mTextView;
-    }
-
-    public TextView getTextView() {
-        return mTextView;
-    }
-
-    /**
-     * Changes the text for this TextView, according to the resource ID provided.
-     * @param stringId A resource ID representing the text content for this Fragment's TextView.
-     */
-    public void setText(int stringId) {
-        getTextView().setText(getActivity().getString(stringId));
-    }
-
-    /**
-     * Processes the arguments passed into this Fragment via setArguments method.
-     * Currently the method only looks for text or a textID, nothing else.
-     */
-    public void processArguments() {
-        // For most objects we'd handle the multiple possibilities for initialization variables
-        // as multiple constructors.  For Fragments, however, it's customary to use
-        // setArguments / getArguments.
-        if (getArguments() != null) {
-            Bundle args = getArguments();
-            if (args.containsKey(TEXT_KEY)) {
-                mText = args.getString(TEXT_KEY);
-                Log.d("Constructor", "Added Text.");
-            } else if (args.containsKey(TEXT_ID_KEY)) {
-                mTextId = args.getInt(TEXT_ID_KEY);
-                mText = getString(mTextId);
-            }
-        }
-    }
-}
\ No newline at end of file
diff --git a/prebuilts/gradle/NetworkConnect/Application/src/main/res/layout/sample_main.xml b/prebuilts/gradle/NetworkConnect/Application/src/main/res/layout/sample_main.xml
index 76fa7d7..00e219c 100755
--- a/prebuilts/gradle/NetworkConnect/Application/src/main/res/layout/sample_main.xml
+++ b/prebuilts/gradle/NetworkConnect/Application/src/main/res/layout/sample_main.xml
@@ -21,20 +21,22 @@
     android:orientation="vertical"
     android:layout_width="fill_parent"
     android:layout_height="fill_parent">
-    <fragment
-        android:name="com.example.android.networkconnect.SimpleTextFragment"
-        android:id="@+id/intro_fragment"
+    <TextView
+        android:id="@+id/intro_text"
         android:layout_weight="1"
         android:layout_width="match_parent"
-        android:layout_height="match_parent" />
+        android:layout_height="match_parent"
+        android:textSize="16sp"
+        android:text="@string/welcome_message"
+        android:freezesText="true"/>
     <View
         android:layout_width="fill_parent"
         android:layout_height="1dp"
         android:background="@android:color/darker_gray"/>
-    <fragment
-        android:name="com.example.android.common.logger.LogFragment"
-        android:id="@+id/log_fragment"
+    <TextView
+        android:id="@+id/data_text"
         android:layout_weight="1"
         android:layout_width="match_parent"
-        android:layout_height="match_parent" />
+        android:layout_height="match_parent"
+        android:freezesText="true"/>
 </LinearLayout>
diff --git a/prebuilts/gradle/NetworkConnect/Application/src/main/res/values/base-strings.xml b/prebuilts/gradle/NetworkConnect/Application/src/main/res/values/base-strings.xml
index ae4485e..820b921 100644
--- a/prebuilts/gradle/NetworkConnect/Application/src/main/res/values/base-strings.xml
+++ b/prebuilts/gradle/NetworkConnect/Application/src/main/res/values/base-strings.xml
@@ -22,7 +22,7 @@
         
             
             This sample demonstrates how to connect to the network and fetch raw HTML using
-            HttpURLConnection. AsyncTask is used to perform the fetch on a background thread.
+            HttpsURLConnection. AsyncTask is used to perform the fetch on a background thread.
             
         
         ]]>
diff --git a/prebuilts/gradle/NetworkConnect/Application/src/main/res/values/strings.xml b/prebuilts/gradle/NetworkConnect/Application/src/main/res/values/strings.xml
index 1e7915a..d2be145 100755
--- a/prebuilts/gradle/NetworkConnect/Application/src/main/res/values/strings.xml
+++ b/prebuilts/gradle/NetworkConnect/Application/src/main/res/values/strings.xml
@@ -18,8 +18,8 @@
     <string name="welcome_message">Welcome to Network Connect!
         Click FETCH to fetch the first 500 characters of raw HTML from www.google.com.
     </string>
-
     <string name="fetch_text">Fetch</string>
     <string name="clear_text">Clear</string>
     <string name="connection_error">Connection error.</string>
+    <string name="fetch_cancelled">Fetch cancelled.</string>
 </resources>
diff --git a/prebuilts/gradle/NetworkConnect/Application/src/main/res/xml/network_security_config.xml b/prebuilts/gradle/NetworkConnect/Application/src/main/res/xml/network_security_config.xml
new file mode 100644
index 0000000..4631b89
--- /dev/null
+++ b/prebuilts/gradle/NetworkConnect/Application/src/main/res/xml/network_security_config.xml
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="utf-8"?>
+<network-security-config>
+    <!--Set application-wide security config using base-config tag.-->
+    <base-config clearTextTrafficPermitted="false"/>
+    <!--Set domain-specific security config using domain-config tags. -->
+    <!--See https://developer.android.com/training/articles/security-config.html for more information.-->
+</network-security-config>
\ No newline at end of file
diff --git a/prebuilts/gradle/NetworkConnect/README.md b/prebuilts/gradle/NetworkConnect/README.md
index 2a16753..8c9ea50 100644
--- a/prebuilts/gradle/NetworkConnect/README.md
+++ b/prebuilts/gradle/NetworkConnect/README.md
@@ -3,16 +3,30 @@
 ===================================
 
 This sample demonstrates how to connect to the network and fetch raw HTML using
-HttpURLConnection. AsyncTask is used to perform the fetch on a background thread.
+HttpsURLConnection. AsyncTask is used to perform the fetch on a background thread.
 
 Introduction
 ------------
 
-This sample application demonstrates how to connect to the network and fetch raw
-HTML. It uses AsyncTask, a background task manager, to perform the network fetch
-on a background thread. By using AsyncTask, the app can avoid hanging on the UI
-thread, and instead update the UI when the response is ready. To establish the
-network connection, the sample uses HttpURLConnection.
+This sample demonstrates how to connect to the network and fetch raw HTML using
+[`HttpsURLConnection`][4]. Since API 11, it is required by default that all network
+operations run on a background thread in order to avoid hanging on the UI thread. Only
+when the network response is ready should the work return to the main thread to update
+the UI. An [`AsyncTask`][3] is a viable background task manager that is used to perform
+the network operation and return to the UI thread upon completion.
+
+The sample also utilizes the [`ConnectivityManager`][1] to determine if you have
+a network connection, and if so, what type of connection it is.
+
+Using an [`AsyncTaskLoader`][6] or an [`IntentService`][5] are two common alternatives
+for managing longer running background work.
+
+[1]: https://developer.android.com/reference/android/net/ConnectivityManager.html
+[2]: https://developer.android.com/reference/android/net/NetworkInfo.html
+[3]: https://developer.android.com/reference/android/os/AsyncTask.html
+[4]: https://developer.android.com/reference/javax/net/ssl/HttpsURLConnection.html
+[5]: https://developer.android.com/reference/android/app/IntentService.html
+[6]: https://developer.android.com/reference/android/content/AsyncTaskLoader.html
 
 Pre-requisites
 --------------
diff --git a/prebuilts/gradle/Notifications/.google/packaging.yaml b/prebuilts/gradle/Notifications/.google/packaging.yaml
index 6ba981e..8f921cf 100644
--- a/prebuilts/gradle/Notifications/.google/packaging.yaml
+++ b/prebuilts/gradle/Notifications/.google/packaging.yaml
@@ -9,7 +9,7 @@
 categories:   [Wearable]
 languages:    [Java]
 solutions:    [Mobile]
-github:       android-Wearable Notifications
+github:       android-Notifications
 level:        INTERMEDIATE
 icon:         screenshots/ic_launcher.png
 apiRefs:
diff --git a/prebuilts/gradle/Notifications/Application/build.gradle b/prebuilts/gradle/Notifications/Application/build.gradle
index 970996d..6ca0636 100644
--- a/prebuilts/gradle/Notifications/Application/build.gradle
+++ b/prebuilts/gradle/Notifications/Application/build.gradle
@@ -39,7 +39,7 @@
 
     defaultConfig {
         minSdkVersion 18
-        targetSdkVersion 23
+        targetSdkVersion 25
     }
 
     compileOptions {
diff --git a/prebuilts/gradle/Notifications/Application/src/main/AndroidManifest.xml b/prebuilts/gradle/Notifications/Application/src/main/AndroidManifest.xml
index 6a17ad8..4b0a9b3 100644
--- a/prebuilts/gradle/Notifications/Application/src/main/AndroidManifest.xml
+++ b/prebuilts/gradle/Notifications/Application/src/main/AndroidManifest.xml
@@ -18,7 +18,7 @@
         package="com.example.android.support.wearable.notifications" >
 
     <uses-sdk android:minSdkVersion="18"
-              android:targetSdkVersion="23" />
+              android:targetSdkVersion="25" />
 
     <uses-permission android:name="android.permission.VIBRATE" />
 
diff --git a/prebuilts/gradle/Notifications/Application/src/main/res/values/base-strings.xml b/prebuilts/gradle/Notifications/Application/src/main/res/values/base-strings.xml
index 9ab282f..c5ef069 100644
--- a/prebuilts/gradle/Notifications/Application/src/main/res/values/base-strings.xml
+++ b/prebuilts/gradle/Notifications/Application/src/main/res/values/base-strings.xml
@@ -16,7 +16,7 @@
 -->
 
 <resources>
-    <string name="app_name">Wearable Notifications</string>
+    <string name="app_name">Notifications</string>
     <string name="intro_message">
         <![CDATA[
         
diff --git a/prebuilts/gradle/Notifications/README.md b/prebuilts/gradle/Notifications/README.md
index 35bc2a6..d593501 100644
--- a/prebuilts/gradle/Notifications/README.md
+++ b/prebuilts/gradle/Notifications/README.md
@@ -1,5 +1,5 @@
 
-Android Wearable Notifications Sample
+Android Notifications Sample
 ===================================
 
 This sample showcases the available notification styles on a device and wearable.
@@ -45,7 +45,7 @@
 - Stack Overflow: http://stackoverflow.com/questions/tagged/android
 
 If you've found an error in this sample, please file an issue:
-https://github.com/googlesamples/android-Wearable Notifications
+https://github.com/googlesamples/android-Notifications
 
 Patches are encouraged, and may be submitted by forking this project and
 submitting a pull request through GitHub. Please see CONTRIBUTING.md for more details.
diff --git a/prebuilts/gradle/Notifications/Wearable/build.gradle b/prebuilts/gradle/Notifications/Wearable/build.gradle
index 70b665d..89e2f84 100644
--- a/prebuilts/gradle/Notifications/Wearable/build.gradle
+++ b/prebuilts/gradle/Notifications/Wearable/build.gradle
@@ -20,7 +20,9 @@
     compile 'com.google.android.gms:play-services-wearable:10.0.1'
     compile 'com.android.support:support-v13:25.0.1'
 
-    compile 'com.google.android.support:wearable:1.4.0'
+    provided 'com.google.android.wearable:wearable:2.0.0'
+
+    compile 'com.google.android.support:wearable:2.0.0'
 
 }
 
@@ -43,7 +45,7 @@
 
         minSdkVersion 18
 
-        targetSdkVersion 22
+        targetSdkVersion 25
     }
 
     compileOptions {
diff --git a/prebuilts/gradle/Notifications/Wearable/src/main/AndroidManifest.xml b/prebuilts/gradle/Notifications/Wearable/src/main/AndroidManifest.xml
index a446fd9..0bce3ea 100644
--- a/prebuilts/gradle/Notifications/Wearable/src/main/AndroidManifest.xml
+++ b/prebuilts/gradle/Notifications/Wearable/src/main/AndroidManifest.xml
@@ -17,8 +17,8 @@
 <manifest xmlns:android="http://schemas.android.com/apk/res/android"
         package="com.example.android.support.wearable.notifications" >
 
-    <uses-sdk android:minSdkVersion="20"
-        android:targetSdkVersion="22" />
+    <uses-sdk android:minSdkVersion="22"
+        android:targetSdkVersion="25" />
 
     <uses-feature android:name="android.hardware.type.watch" />
 
@@ -28,6 +28,10 @@
             android:label="@string/app_name"
             android:theme="@android:style/Theme.DeviceDefault.Light" >
 
+        <meta-data
+            android:name="com.google.android.wearable.standalone"
+            android:value="false" />
+
         <activity
                 android:name=".MainActivity"
                 android:label="@string/app_name" >
diff --git a/prebuilts/gradle/PdfRendererBasic/Application/build.gradle b/prebuilts/gradle/PdfRendererBasic/Application/build.gradle
index 239df0e..0c19226 100644
--- a/prebuilts/gradle/PdfRendererBasic/Application/build.gradle
+++ b/prebuilts/gradle/PdfRendererBasic/Application/build.gradle
@@ -56,7 +56,4 @@
 
     }
 
-    aaptOptions {
-        noCompress "pdf"
-    }
 }
diff --git a/prebuilts/gradle/PdfRendererBasic/Application/src/main/java/com/example/android/pdfrendererbasic/PdfRendererBasicFragment.java b/prebuilts/gradle/PdfRendererBasic/Application/src/main/java/com/example/android/pdfrendererbasic/PdfRendererBasicFragment.java
index e413c65..20b0a7f 100644
--- a/prebuilts/gradle/PdfRendererBasic/Application/src/main/java/com/example/android/pdfrendererbasic/PdfRendererBasicFragment.java
+++ b/prebuilts/gradle/PdfRendererBasic/Application/src/main/java/com/example/android/pdfrendererbasic/PdfRendererBasicFragment.java
@@ -30,7 +30,10 @@
 import android.widget.ImageView;
 import android.widget.Toast;
 
+import java.io.File;
+import java.io.FileOutputStream;
 import java.io.IOException;
+import java.io.InputStream;
 
 /**
  * This fragment has a big {@ImageView} that shows PDF pages, and 2 {@link android.widget.Button}s to move between
@@ -44,6 +47,11 @@
     private static final String STATE_CURRENT_PAGE_INDEX = "current_page_index";
 
     /**
+     * The filename of the PDF.
+     */
+    private static final String FILENAME = "sample.pdf";
+
+    /**
      * File descriptor of the PDF.
      */
     private ParcelFileDescriptor mFileDescriptor;
@@ -136,7 +144,21 @@
      */
     private void openRenderer(Context context) throws IOException {
         // In this sample, we read a PDF from the assets directory.
-        mFileDescriptor = context.getAssets().openFd("sample.pdf").getParcelFileDescriptor();
+        File file = new File(context.getCacheDir(), FILENAME);
+        if (!file.exists()) {
+            // Since PdfRenderer cannot handle the compressed asset file directly, we copy it into
+            // the cache directory.
+            InputStream asset = context.getAssets().open(FILENAME);
+            FileOutputStream output = new FileOutputStream(file);
+            final byte[] buffer = new byte[1024];
+            int size;
+            while ((size = asset.read(buffer)) != -1) {
+                output.write(buffer, 0, size);
+            }
+            asset.close();
+            output.close();
+        }
+        mFileDescriptor = ParcelFileDescriptor.open(file, ParcelFileDescriptor.MODE_READ_ONLY);
         // This is the PdfRenderer we use to render the PDF.
         mPdfRenderer = new PdfRenderer(mFileDescriptor);
     }
diff --git a/prebuilts/gradle/PdfRendererBasic/README.md b/prebuilts/gradle/PdfRendererBasic/README.md
index 7d4d2b8..42a6b30 100644
--- a/prebuilts/gradle/PdfRendererBasic/README.md
+++ b/prebuilts/gradle/PdfRendererBasic/README.md
@@ -16,20 +16,13 @@
 [PdfRenderer.Page][5] into a bitmap.
 
 This sample loads the PDF from assets. Contents of assets are compressed by
-default, but we disable it since PdfRenderer class cannot handle it.
-
-```groovy
-android {
-    aaptOptions {
-        noCompress "pdf"
-    }
-}
-```
+default, and the PdfRenderer class cannot open it. In this sample, we work
+around this by copying the file into the cache directory.
 
 [1]: https://developer.android.com/reference/android/graphics/pdf/PdfRenderer.html
 [2]: https://developer.android.com/reference/android/os/ParcelFileDescriptor.html
 [3]: https://developer.android.com/reference/android/graphics/pdf/PdfRenderer.html#openPage(int)
-[4]: https://developer.android.com/reference/android/graphics/pdf/PdfRenderer.Page.html#render(android.graphics.Bitmap, android.graphics.Rect, android.graphics.Matrix, int)
+[4]: https://developer.android.com/reference/android/graphics/pdf/PdfRenderer.Page.html#render(android.graphics.Bitmap,%20android.graphics.Rect,%20android.graphics.Matrix,%20int)
 [5]: https://developer.android.com/reference/android/graphics/pdf/PdfRenderer.Page.html
 
 Pre-requisites
diff --git a/prebuilts/gradle/PermissionRequest/Application/src/main/assets/sample.js b/prebuilts/gradle/PermissionRequest/Application/src/main/assets/sample.js
index e2806a0..b9d2fdc 100644
--- a/prebuilts/gradle/PermissionRequest/Application/src/main/assets/sample.js
+++ b/prebuilts/gradle/PermissionRequest/Application/src/main/assets/sample.js
@@ -20,7 +20,7 @@
     navigator.getUserMedia = navigator.getUserMedia || navigator.webkitGetUserMedia;
     window.URL = window.URL || window.webkitURL;
 
-    window.onload = function () {
+    document.addEventListener('DOMContentLoaded', function () {
 
         var video = document.querySelector('#video'),
             toggle = document.querySelector('#toggle'),
@@ -42,7 +42,13 @@
                     console.error('Error starting camera. Denied.');
                 });
             } else {
-                stream.stop();
+                if (stream.getTracks) {
+                    stream.getTracks().forEach(function (track) {
+                        track.stop();
+                    });
+                } else if (stream.stop) {
+                    stream.stop();
+                }
                 stream = null;
                 toggle.innerText = 'Start';
                 console.log('Stopped');
@@ -51,6 +57,6 @@
 
         console.log('Page loaded');
 
-    };
+    });
 
 })();
diff --git a/prebuilts/gradle/PermissionRequest/Application/src/main/java/com/example/android/permissionrequest/ConfirmationDialogFragment.java b/prebuilts/gradle/PermissionRequest/Application/src/main/java/com/example/android/permissionrequest/ConfirmationDialogFragment.java
index 7dae56e..ca173b4 100644
--- a/prebuilts/gradle/PermissionRequest/Application/src/main/java/com/example/android/permissionrequest/ConfirmationDialogFragment.java
+++ b/prebuilts/gradle/PermissionRequest/Application/src/main/java/com/example/android/permissionrequest/ConfirmationDialogFragment.java
@@ -13,12 +13,14 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
+
 package com.example.android.permissionrequest;
 
 import android.app.AlertDialog;
 import android.app.Dialog;
 import android.content.DialogInterface;
 import android.os.Bundle;
+import android.support.annotation.NonNull;
 import android.support.v4.app.DialogFragment;
 import android.text.TextUtils;
 
@@ -32,7 +34,7 @@
     /**
      * Creates a new instance of ConfirmationDialogFragment.
      *
-     * @param resources The list of resources requested by PermissionRequeste.
+     * @param resources The list of resources requested by PermissionRequest.
      * @return A new instance.
      */
     public static ConfirmationDialogFragment newInstance(String[] resources) {
@@ -43,21 +45,22 @@
         return fragment;
     }
 
+    @NonNull
     @Override
     public Dialog onCreateDialog(Bundle savedInstanceState) {
-        String[] resources = getArguments().getStringArray(ARG_RESOURCES);
+        final String[] resources = getArguments().getStringArray(ARG_RESOURCES);
         return new AlertDialog.Builder(getActivity())
                 .setMessage(getString(R.string.confirmation, TextUtils.join("\n", resources)))
                 .setNegativeButton(R.string.deny, new DialogInterface.OnClickListener() {
                     @Override
                     public void onClick(DialogInterface dialog, int which) {
-                        ((Listener) getParentFragment()).onConfirmation(false);
+                        ((Listener) getParentFragment()).onConfirmation(false, resources);
                     }
                 })
                 .setPositiveButton(R.string.allow, new DialogInterface.OnClickListener() {
                     @Override
                     public void onClick(DialogInterface dialog, int which) {
-                        ((Listener) getParentFragment()).onConfirmation(true);
+                        ((Listener) getParentFragment()).onConfirmation(true, resources);
                     }
                 })
                 .create();
@@ -66,14 +69,15 @@
     /**
      * Callback for the user's response.
      */
-    public interface Listener {
+    interface Listener {
 
         /**
-         * Called when the PermissoinRequest is allowed or denied by the user.
+         * Called when the PermissionRequest is allowed or denied by the user.
          *
-         * @param allowed True if the user allowed the request.
+         * @param allowed   True if the user allowed the request.
+         * @param resources The resources to be granted.
          */
-        public void onConfirmation(boolean allowed);
+        void onConfirmation(boolean allowed, String[] resources);
     }
 
 }
diff --git a/prebuilts/gradle/PermissionRequest/Application/src/main/java/com/example/android/permissionrequest/MessageDialogFragment.java b/prebuilts/gradle/PermissionRequest/Application/src/main/java/com/example/android/permissionrequest/MessageDialogFragment.java
new file mode 100644
index 0000000..31d0bcb
--- /dev/null
+++ b/prebuilts/gradle/PermissionRequest/Application/src/main/java/com/example/android/permissionrequest/MessageDialogFragment.java
@@ -0,0 +1,61 @@
+/*
+ * Copyright (C) 2016 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package com.example.android.permissionrequest;
+
+import android.app.AlertDialog;
+import android.app.Dialog;
+import android.content.DialogInterface;
+import android.os.Bundle;
+import android.support.annotation.NonNull;
+import android.support.annotation.StringRes;
+import android.support.v4.app.DialogFragment;
+
+/**
+ * Shows a dialog with a brief message.
+ */
+public class MessageDialogFragment extends DialogFragment {
+
+    private static final String ARG_MESSAGE_RES_ID = "message_res_id";
+
+    public static MessageDialogFragment newInstance(@StringRes int message) {
+        MessageDialogFragment fragment = new MessageDialogFragment();
+        Bundle args = new Bundle();
+        args.putInt(ARG_MESSAGE_RES_ID, message);
+        fragment.setArguments(args);
+        return fragment;
+    }
+
+    @NonNull
+    @Override
+    public Dialog onCreateDialog(Bundle savedInstanceState) {
+        return new AlertDialog.Builder(getContext())
+                .setMessage(getArguments().getInt(ARG_MESSAGE_RES_ID))
+                .setCancelable(false)
+                .setPositiveButton(android.R.string.ok, new DialogInterface.OnClickListener() {
+                    @Override
+                    public void onClick(DialogInterface dialog, int which) {
+                        ((Listener) getParentFragment()).onOkClicked();
+                    }
+                })
+                .create();
+    }
+
+    interface Listener {
+        void onOkClicked();
+    }
+
+}
diff --git a/prebuilts/gradle/PermissionRequest/Application/src/main/java/com/example/android/permissionrequest/PermissionRequestFragment.java b/prebuilts/gradle/PermissionRequest/Application/src/main/java/com/example/android/permissionrequest/PermissionRequestFragment.java
index 44f1d6e..418c90d 100644
--- a/prebuilts/gradle/PermissionRequest/Application/src/main/java/com/example/android/permissionrequest/PermissionRequestFragment.java
+++ b/prebuilts/gradle/PermissionRequest/Application/src/main/java/com/example/android/permissionrequest/PermissionRequestFragment.java
@@ -16,12 +16,15 @@
 
 package com.example.android.permissionrequest;
 
+import android.Manifest;
 import android.annotation.SuppressLint;
+import android.content.pm.PackageManager;
 import android.os.Bundle;
 import android.support.annotation.NonNull;
 import android.support.annotation.Nullable;
 import android.support.v4.app.DialogFragment;
 import android.support.v4.app.Fragment;
+import android.support.v4.content.ContextCompat;
 import android.view.LayoutInflater;
 import android.view.View;
 import android.view.ViewGroup;
@@ -37,12 +40,14 @@
  * This fragment shows a {@link WebView} and loads a web app from the {@link SimpleWebServer}.
  */
 public class PermissionRequestFragment extends Fragment
-        implements ConfirmationDialogFragment.Listener {
+        implements ConfirmationDialogFragment.Listener, MessageDialogFragment.Listener {
 
     private static final String TAG = PermissionRequestFragment.class.getSimpleName();
 
     private static final String FRAGMENT_DIALOG = "dialog";
 
+    private static final int REQUEST_CAMERA_PERMISSION = 1;
+
     /**
      * We use this web server to serve HTML files in the assets folder. This is because we cannot
      * use the JavaScript method "getUserMedia" from "file:///android_assets/..." URLs.
@@ -67,7 +72,7 @@
 
     @Override
     public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container,
-                             @Nullable Bundle savedInstanceState) {
+            @Nullable Bundle savedInstanceState) {
         return inflater.inflate(R.layout.fragment_permission_request, container, false);
     }
 
@@ -85,7 +90,14 @@
         final int port = 8080;
         mWebServer = new SimpleWebServer(port, getResources().getAssets());
         mWebServer.start();
-        mWebView.loadUrl("http://localhost:" + port + "/sample.html");
+        // This is for runtime permission on Marshmallow and above; It is not directly related to
+        // PermissionRequest API.
+        if (ContextCompat.checkSelfPermission(getActivity(), Manifest.permission.CAMERA)
+                != PackageManager.PERMISSION_GRANTED) {
+            requestCameraPermission();
+        } else {
+            mWebView.loadUrl("http://localhost:" + port + "/sample.html");
+        }
     }
 
     @Override
@@ -94,6 +106,32 @@
         super.onPause();
     }
 
+    @Override
+    public void onRequestPermissionsResult(int requestCode, @NonNull String[] permissions,
+            @NonNull int[] grantResults) {
+        // This is for runtime permission on Marshmallow and above; It is not directly related to
+        // PermissionRequest API.
+        if (requestCode == REQUEST_CAMERA_PERMISSION) {
+            if (permissions.length != 1 || grantResults.length != 1 ||
+                    grantResults[0] != PackageManager.PERMISSION_GRANTED) {
+                Log.e(TAG, "Camera permission not granted.");
+            } else if (mWebView != null && mWebServer != null) {
+                mWebView.loadUrl("http://localhost:" + mWebServer.getPort() + "/sample.html");
+            }
+        } else {
+            super.onRequestPermissionsResult(requestCode, permissions, grantResults);
+        }
+    }
+
+    private void requestCameraPermission() {
+        if (shouldShowRequestPermissionRationale(Manifest.permission.CAMERA)) {
+            MessageDialogFragment.newInstance(R.string.permission_message)
+                    .show(getChildFragmentManager(), FRAGMENT_DIALOG);
+        } else {
+            requestPermissions(new String[]{Manifest.permission.CAMERA}, REQUEST_CAMERA_PERMISSION);
+        }
+    }
+
     @SuppressLint("SetJavaScriptEnabled")
     private static void configureWebSettings(WebSettings settings) {
         settings.setJavaScriptEnabled(true);
@@ -110,8 +148,16 @@
         public void onPermissionRequest(PermissionRequest request) {
             Log.i(TAG, "onPermissionRequest");
             mPermissionRequest = request;
-            ConfirmationDialogFragment.newInstance(request.getResources())
-                    .show(getChildFragmentManager(), FRAGMENT_DIALOG);
+            final String[] requestedResources = request.getResources();
+            for (String r : requestedResources) {
+                if (r.equals(PermissionRequest.RESOURCE_VIDEO_CAPTURE)) {
+                    // In this sample, we only accept video capture request.
+                    ConfirmationDialogFragment
+                            .newInstance(new String[]{PermissionRequest.RESOURCE_VIDEO_CAPTURE})
+                            .show(getChildFragmentManager(), FRAGMENT_DIALOG);
+                    break;
+                }
+            }
         }
 
         // This method is called when the permission request is canceled by the web content.
@@ -155,9 +201,14 @@
     };
 
     @Override
-    public void onConfirmation(boolean allowed) {
+    public void onOkClicked() {
+        requestPermissions(new String[]{Manifest.permission.CAMERA}, REQUEST_CAMERA_PERMISSION);
+    }
+
+    @Override
+    public void onConfirmation(boolean allowed, String[] resources) {
         if (allowed) {
-            mPermissionRequest.grant(mPermissionRequest.getResources());
+            mPermissionRequest.grant(resources);
             Log.d(TAG, "Permission granted.");
         } else {
             mPermissionRequest.deny();
@@ -174,7 +225,7 @@
      * For testing.
      */
     public interface ConsoleMonitor {
-        public void onConsoleMessage(ConsoleMessage message);
+        void onConsoleMessage(ConsoleMessage message);
     }
 
 }
diff --git a/prebuilts/gradle/PermissionRequest/Application/src/main/java/com/example/android/permissionrequest/SimpleWebServer.java b/prebuilts/gradle/PermissionRequest/Application/src/main/java/com/example/android/permissionrequest/SimpleWebServer.java
index 36b7c46..b02275a 100644
--- a/prebuilts/gradle/PermissionRequest/Application/src/main/java/com/example/android/permissionrequest/SimpleWebServer.java
+++ b/prebuilts/gradle/PermissionRequest/Application/src/main/java/com/example/android/permissionrequest/SimpleWebServer.java
@@ -90,6 +90,10 @@
         }
     }
 
+    public int getPort() {
+        return mPort;
+    }
+
     @Override
     public void run() {
         try {
diff --git a/prebuilts/gradle/PermissionRequest/Application/src/main/res/values/strings.xml b/prebuilts/gradle/PermissionRequest/Application/src/main/res/values/strings.xml
index c3e5574..2488766 100644
--- a/prebuilts/gradle/PermissionRequest/Application/src/main/res/values/strings.xml
+++ b/prebuilts/gradle/PermissionRequest/Application/src/main/res/values/strings.xml
@@ -15,6 +15,7 @@
  limitations under the License.
 -->
 <resources>
+    <string name="permission_message">This sample app uses camera.</string>
     <string name="confirmation">This web page wants to use following resources:\n\n%s</string>
     <string name="allow">Allow</string>
     <string name="deny">Deny</string>
diff --git a/prebuilts/gradle/Quiz/Wearable/build.gradle b/prebuilts/gradle/Quiz/Wearable/build.gradle
index 70b665d..3651c81 100644
--- a/prebuilts/gradle/Quiz/Wearable/build.gradle
+++ b/prebuilts/gradle/Quiz/Wearable/build.gradle
@@ -20,7 +20,9 @@
     compile 'com.google.android.gms:play-services-wearable:10.0.1'
     compile 'com.android.support:support-v13:25.0.1'
 
-    compile 'com.google.android.support:wearable:1.4.0'
+    provided 'com.google.android.wearable:wearable:2.0.0'
+
+    compile 'com.google.android.support:wearable:2.0.0'
 
 }
 
diff --git a/prebuilts/gradle/RuntimePermissionsWear/Wearable/build.gradle b/prebuilts/gradle/RuntimePermissionsWear/Wearable/build.gradle
index 4caba7a..248667f 100644
--- a/prebuilts/gradle/RuntimePermissionsWear/Wearable/build.gradle
+++ b/prebuilts/gradle/RuntimePermissionsWear/Wearable/build.gradle
@@ -21,7 +21,9 @@
     compile 'com.google.android.gms:play-services-wearable:10.0.1'
     compile 'com.android.support:support-v13:25.0.1'
 
-    compile 'com.google.android.support:wearable:1.4.0'
+    provided 'com.google.android.wearable:wearable:2.0.0'
+
+    compile 'com.google.android.support:wearable:2.0.0'
 
     compile project(':Shared')
 }
@@ -43,7 +45,7 @@
         versionCode 1
         versionName "1.0"
 
-        targetSdkVersion 23
+        targetSdkVersion 25
 
     }
 
diff --git a/prebuilts/gradle/RuntimePermissionsWear/Wearable/src/main/AndroidManifest.xml b/prebuilts/gradle/RuntimePermissionsWear/Wearable/src/main/AndroidManifest.xml
index e654253..385d3ce 100644
--- a/prebuilts/gradle/RuntimePermissionsWear/Wearable/src/main/AndroidManifest.xml
+++ b/prebuilts/gradle/RuntimePermissionsWear/Wearable/src/main/AndroidManifest.xml
@@ -31,6 +31,10 @@
         android:theme="@android:style/Theme.DeviceDefault" >
 
         <meta-data
+            android:name="com.google.android.wearable.standalone"
+            android:value="false" />
+
+        <meta-data
             android:name="com.google.android.gms.version"
             android:value="@integer/google_play_services_version" />
 
diff --git a/prebuilts/gradle/SkeletonWearableApp/NOTICE b/prebuilts/gradle/SkeletonWearableApp/NOTICE
index 29ea77b..8f8105a 100644
--- a/prebuilts/gradle/SkeletonWearableApp/NOTICE
+++ b/prebuilts/gradle/SkeletonWearableApp/NOTICE
@@ -1,7 +1,7 @@
 
 This sample uses the following software:
 
-Copyright 2016 The Android Open Source Project
+Copyright 2017 The Android Open Source Project
 
 Licensed under the Apache License, Version 2.0 (the "License");
 you may not use this file except in compliance with the License.
diff --git a/prebuilts/gradle/SkeletonWearableApp/Wearable/build.gradle b/prebuilts/gradle/SkeletonWearableApp/Wearable/build.gradle
index a065722..0dc44e0 100644
--- a/prebuilts/gradle/SkeletonWearableApp/Wearable/build.gradle
+++ b/prebuilts/gradle/SkeletonWearableApp/Wearable/build.gradle
@@ -20,7 +20,9 @@
     compile 'com.google.android.gms:play-services-wearable:10.0.1'
     compile 'com.android.support:support-v13:25.0.1'
 
-    compile 'com.google.android.support:wearable:1.4.0'
+    provided 'com.google.android.wearable:wearable:2.0.0'
+
+    compile 'com.google.android.support:wearable:2.0.0'
 
 }
 
diff --git a/prebuilts/gradle/SpeedTracker/Application/build.gradle b/prebuilts/gradle/SpeedTracker/Application/build.gradle
index d20a27b..1d1da77 100644
--- a/prebuilts/gradle/SpeedTracker/Application/build.gradle
+++ b/prebuilts/gradle/SpeedTracker/Application/build.gradle
@@ -18,6 +18,7 @@
 
 dependencies {
     compile 'com.android.support:design:24.0.0'
+    compile 'com.google.android.gms:play-services-maps:10.0.1'
     compile 'com.google.android.gms:play-services-location:10.0.1'
     compile 'com.google.android.gms:play-services-wearable:10.0.1'
     compile 'com.android.support:support-v13:25.0.1'
diff --git a/prebuilts/gradle/SpeedTracker/Application/src/main/AndroidManifest.xml b/prebuilts/gradle/SpeedTracker/Application/src/main/AndroidManifest.xml
index debd11d..bf86a10 100644
--- a/prebuilts/gradle/SpeedTracker/Application/src/main/AndroidManifest.xml
+++ b/prebuilts/gradle/SpeedTracker/Application/src/main/AndroidManifest.xml
@@ -5,7 +5,7 @@
 
     <uses-sdk
         android:minSdkVersion="18"
-        android:targetSdkVersion="23" />
+        android:targetSdkVersion="25" />
 
     <!-- BEGIN_INCLUDE(manifest) -->
 
diff --git a/prebuilts/gradle/SpeedTracker/Application/src/main/java/com/example/android/wearable/speedtracker/PhoneMainActivity.java b/prebuilts/gradle/SpeedTracker/Application/src/main/java/com/example/android/wearable/speedtracker/PhoneMainActivity.java
index c645bdd..b915d26 100644
--- a/prebuilts/gradle/SpeedTracker/Application/src/main/java/com/example/android/wearable/speedtracker/PhoneMainActivity.java
+++ b/prebuilts/gradle/SpeedTracker/Application/src/main/java/com/example/android/wearable/speedtracker/PhoneMainActivity.java
@@ -18,7 +18,8 @@
 
 import com.google.android.gms.maps.CameraUpdateFactory;
 import com.google.android.gms.maps.GoogleMap;
-import com.google.android.gms.maps.MapFragment;
+import com.google.android.gms.maps.SupportMapFragment;
+import com.google.android.gms.maps.OnMapReadyCallback;
 import com.google.android.gms.maps.model.LatLng;
 import com.google.android.gms.maps.model.LatLngBounds;
 import com.google.android.gms.maps.model.PolylineOptions;
@@ -46,19 +47,21 @@
  * deleted.
  */
 public class PhoneMainActivity extends AppCompatActivity implements
-        DatePickerDialog.OnDateSetListener {
+        DatePickerDialog.OnDateSetListener, OnMapReadyCallback {
 
     private static final String TAG = "PhoneMainActivity";
     private static final int BOUNDING_BOX_PADDING_PX = 50;
     private TextView mSelectedDateText;
     private GoogleMap mMap;
+    private SupportMapFragment mMapFragment;
 
     @Override
     protected void onCreate(Bundle savedInstanceState) {
         super.onCreate(savedInstanceState);
         setContentView(R.layout.main_activity);
         mSelectedDateText = (TextView) findViewById(R.id.selected_date);
-        mMap = ((MapFragment) getFragmentManager().findFragmentById(R.id.map)).getMap();
+        mMapFragment = (SupportMapFragment) getSupportFragmentManager().findFragmentById(R.id.map);
+        mMapFragment.getMapAsync(this);
     }
 
     public void onClick(View view) {
@@ -132,4 +135,9 @@
 
         }.execute(calendar);
     }
+
+    @Override
+    public void onMapReady(GoogleMap googleMap) {
+        mMap = googleMap;
+    }
 }
diff --git a/prebuilts/gradle/SpeedTracker/Application/src/main/res/layout/main_activity.xml b/prebuilts/gradle/SpeedTracker/Application/src/main/res/layout/main_activity.xml
index 17a8f6a..ef2480a 100644
--- a/prebuilts/gradle/SpeedTracker/Application/src/main/res/layout/main_activity.xml
+++ b/prebuilts/gradle/SpeedTracker/Application/src/main/res/layout/main_activity.xml
@@ -43,10 +43,10 @@
     </RelativeLayout>
 
     <fragment
+        class="com.google.android.gms.maps.SupportMapFragment"
         android:id="@+id/map"
         android:layout_below="@+id/top_container"
-        android:layout_width="fill_parent"
-        android:layout_height="match_parent"
-        android:name="com.google.android.gms.maps.MapFragment"/>
+        android:layout_width="match_parent"
+        android:layout_height="match_parent"/>
 
-</RelativeLayout>
\ No newline at end of file
+</RelativeLayout>
diff --git a/prebuilts/gradle/SpeedTracker/Wearable/build.gradle b/prebuilts/gradle/SpeedTracker/Wearable/build.gradle
index 0004f1e..c0c6820 100644
--- a/prebuilts/gradle/SpeedTracker/Wearable/build.gradle
+++ b/prebuilts/gradle/SpeedTracker/Wearable/build.gradle
@@ -22,7 +22,9 @@
     compile 'com.google.android.gms:play-services-wearable:10.0.1'
     compile 'com.android.support:support-v13:25.0.1'
 
-    compile 'com.google.android.support:wearable:1.4.0'
+    provided 'com.google.android.wearable:wearable:2.0.0'
+
+    compile 'com.google.android.support:wearable:2.0.0'
 
     compile project(':Shared')
 }
@@ -44,7 +46,7 @@
         versionCode 1
         versionName "1.0"
 
-        targetSdkVersion 23
+        targetSdkVersion 25
 
     }
 
diff --git a/prebuilts/gradle/SpeedTracker/Wearable/src/main/AndroidManifest.xml b/prebuilts/gradle/SpeedTracker/Wearable/src/main/AndroidManifest.xml
index e120686..feb2b81 100644
--- a/prebuilts/gradle/SpeedTracker/Wearable/src/main/AndroidManifest.xml
+++ b/prebuilts/gradle/SpeedTracker/Wearable/src/main/AndroidManifest.xml
@@ -24,7 +24,7 @@
 
     <uses-sdk
         android:minSdkVersion="20"
-        android:targetSdkVersion="23" />
+        android:targetSdkVersion="25" />
 
     <application
         android:allowBackup="true"
@@ -32,6 +32,10 @@
         android:label="@string/app_name"
         android:theme="@android:style/Theme.DeviceDefault">
 
+        <meta-data
+            android:name="com.google.android.wearable.standalone"
+            android:value="false" />
+
         <!--If you want your app to run on pre-22, then set required to false -->
         <uses-library android:name="com.google.android.wearable" android:required="false" />
 
diff --git a/prebuilts/gradle/SpeedTracker/Wearable/src/main/java/com/example/android/wearable/speedtracker/WearableMainActivity.java b/prebuilts/gradle/SpeedTracker/Wearable/src/main/java/com/example/android/wearable/speedtracker/WearableMainActivity.java
index 66550c6..20ded86 100644
--- a/prebuilts/gradle/SpeedTracker/Wearable/src/main/java/com/example/android/wearable/speedtracker/WearableMainActivity.java
+++ b/prebuilts/gradle/SpeedTracker/Wearable/src/main/java/com/example/android/wearable/speedtracker/WearableMainActivity.java
@@ -29,6 +29,7 @@
 import com.google.android.gms.wearable.Wearable;
 
 import android.Manifest;
+import android.annotation.SuppressLint;
 import android.app.AlertDialog;
 import android.content.DialogInterface;
 import android.content.Intent;
@@ -326,6 +327,7 @@
         }
     }
 
+    @SuppressLint("MissingPermission")
     @Override
     public void onConnected(Bundle bundle) {
 
diff --git a/prebuilts/gradle/SynchronizedNotifications/.google/packaging.yaml b/prebuilts/gradle/SynchronizedNotifications/.google/packaging.yaml
index 4745d5f..3be5338 100644
--- a/prebuilts/gradle/SynchronizedNotifications/.google/packaging.yaml
+++ b/prebuilts/gradle/SynchronizedNotifications/.google/packaging.yaml
@@ -4,7 +4,7 @@
 # This file is used by Google as part of our samples packaging process.
 # End users may safely ignore this file. It has no relevance to other systems.
 ---
-status:       PUBLISHED
+status:       DEPRECATED
 technologies: [Android]
 categories:   [Wearable]
 languages:    [Java]
diff --git a/prebuilts/gradle/SynchronizedNotifications/Wearable/build.gradle b/prebuilts/gradle/SynchronizedNotifications/Wearable/build.gradle
index 1f361f2..248667f 100644
--- a/prebuilts/gradle/SynchronizedNotifications/Wearable/build.gradle
+++ b/prebuilts/gradle/SynchronizedNotifications/Wearable/build.gradle
@@ -21,7 +21,9 @@
     compile 'com.google.android.gms:play-services-wearable:10.0.1'
     compile 'com.android.support:support-v13:25.0.1'
 
-    compile 'com.google.android.support:wearable:1.4.0'
+    provided 'com.google.android.wearable:wearable:2.0.0'
+
+    compile 'com.google.android.support:wearable:2.0.0'
 
     compile project(':Shared')
 }
@@ -43,7 +45,7 @@
         versionCode 1
         versionName "1.0"
 
-        targetSdkVersion 22
+        targetSdkVersion 25
 
     }
 
diff --git a/prebuilts/gradle/SynchronizedNotifications/Wearable/src/main/AndroidManifest.xml b/prebuilts/gradle/SynchronizedNotifications/Wearable/src/main/AndroidManifest.xml
index 2bc2fd8..86e8f7a 100644
--- a/prebuilts/gradle/SynchronizedNotifications/Wearable/src/main/AndroidManifest.xml
+++ b/prebuilts/gradle/SynchronizedNotifications/Wearable/src/main/AndroidManifest.xml
@@ -20,7 +20,7 @@
     package="com.example.android.wearable.synchronizednotifications">
 
     <uses-sdk android:minSdkVersion="20"
-        android:targetSdkVersion="22" />
+        android:targetSdkVersion="25" />
 
     <uses-feature android:name="android.hardware.type.watch" />
 
@@ -29,6 +29,11 @@
         android:icon="@drawable/ic_launcher"
         android:label="@string/app_name"
         android:theme="@android:style/Theme.DeviceDefault.Light" >
+
+        <meta-data
+            android:name="com.google.android.wearable.standalone"
+            android:value="false" />
+
         <meta-data android:name="com.google.android.gms.version"
                    android:value="@integer/google_play_services_version" />
         <activity
diff --git a/prebuilts/gradle/Timer/NOTICE b/prebuilts/gradle/Timer/NOTICE
index 29ea77b..8f8105a 100644
--- a/prebuilts/gradle/Timer/NOTICE
+++ b/prebuilts/gradle/Timer/NOTICE
@@ -1,7 +1,7 @@
 
 This sample uses the following software:
 
-Copyright 2016 The Android Open Source Project
+Copyright 2017 The Android Open Source Project
 
 Licensed under the Apache License, Version 2.0 (the "License");
 you may not use this file except in compliance with the License.
diff --git a/prebuilts/gradle/Timer/Wearable/build.gradle b/prebuilts/gradle/Timer/Wearable/build.gradle
index a065722..0dc44e0 100644
--- a/prebuilts/gradle/Timer/Wearable/build.gradle
+++ b/prebuilts/gradle/Timer/Wearable/build.gradle
@@ -20,7 +20,9 @@
     compile 'com.google.android.gms:play-services-wearable:10.0.1'
     compile 'com.android.support:support-v13:25.0.1'
 
-    compile 'com.google.android.support:wearable:1.4.0'
+    provided 'com.google.android.wearable:wearable:2.0.0'
+
+    compile 'com.google.android.support:wearable:2.0.0'
 
 }
 
diff --git a/prebuilts/gradle/WatchFace/Application/build.gradle b/prebuilts/gradle/WatchFace/Application/build.gradle
index ed9472f..a935dbd 100644
--- a/prebuilts/gradle/WatchFace/Application/build.gradle
+++ b/prebuilts/gradle/WatchFace/Application/build.gradle
@@ -20,7 +20,7 @@
     compile "com.android.support:support-v13:25.0.1"
     compile "com.android.support:cardview-v7:25.0.1"
     compile "com.android.support:appcompat-v7:25.0.1"
-    compile 'com.google.android.support:wearable:1.4.0'
+    compile 'com.google.android.support:wearable:2.0.0'
     compile 'com.google.android.gms:play-services-fitness:10.0.1'
     compile 'com.google.android.gms:play-services-wearable:10.0.1'
     compile 'com.android.support:support-v13:25.0.1'
@@ -41,7 +41,7 @@
 
     defaultConfig {
         minSdkVersion 18
-        targetSdkVersion 23
+        targetSdkVersion 25
     }
 
     compileOptions {
diff --git a/prebuilts/gradle/WatchFace/Application/src/main/AndroidManifest.xml b/prebuilts/gradle/WatchFace/Application/src/main/AndroidManifest.xml
index d946cdb..4092097 100644
--- a/prebuilts/gradle/WatchFace/Application/src/main/AndroidManifest.xml
+++ b/prebuilts/gradle/WatchFace/Application/src/main/AndroidManifest.xml
@@ -18,7 +18,7 @@
         package="com.example.android.wearable.watchface" >
 
     <uses-sdk android:minSdkVersion="18"
-              android:targetSdkVersion="23" />
+              android:targetSdkVersion="25" />
 
     <!-- Permissions required by the wearable app -->
     <uses-permission android:name="android.permission.WAKE_LOCK" />
diff --git a/prebuilts/gradle/WatchFace/Application/src/main/res/values/base-strings.xml b/prebuilts/gradle/WatchFace/Application/src/main/res/values/base-strings.xml
index 49e7100..be177c5 100644
--- a/prebuilts/gradle/WatchFace/Application/src/main/res/values/base-strings.xml
+++ b/prebuilts/gradle/WatchFace/Application/src/main/res/values/base-strings.xml
@@ -20,17 +20,32 @@
     <string name="intro_message">
         <![CDATA[
         
-            
+
 This sample demonstrates how to create watch faces for android wear and includes a phone app
 and a wearable app. The wearable app has a variety of watch faces including analog, digital,
 opengl, calendar, steps, interactive, etc. It also includes a watch-side configuration example.
 The phone app includes a phone-side configuration example.
 
-Additional note on Steps WatchFace Sample, if the user has not installed or setup the Google Fit app
-on their phone and their Wear device has not configured the Google Fit Wear App, then you may get
-zero steps until one of the two is setup. Please note, many Wear devices configure the Google Fit
-Wear App beforehand.
-            
+Because watch face apps do not have a default Activity in their project, you will need to set your
+Configurations to "Do not launch Activity" for both the Wear and Application modules. If you are
+unsure how to do this, please review the "Run Starter project" section in the
+[Google Watch Face Code Lab][1].
+
+For the Fit Distance related watch face, authentication IS a requirement to request distance from
+Google Fit on Wear. Otherwise, distance will always come back as zero (or stay at whatever the
+distance was prior to you de-authorizing the watch face).
+
+To authenticate and communicate with Google Fit, you must create a project in the Google Developers
+Console, activate the Fitness API, create an OAuth 2.0 client ID, and register the public
+certificate from your signed APK. More details can be found [here][2].
+
+If the user has not installed or setup the Google Fit app on their phone and their Wear device has
+not configured the Google Fit Wear App, then you may get zero steps until one of the two is setup.
+Please note, many Wear devices configure the Google Fit Wear App beforehand.
+
+[1]: https://codelabs.developers.google.com/codelabs/watchface/index.html
+[2]: https://developers.google.com/fit/android/get-started#step_3_enable_the_fitness_api
+
         
         ]]>
     </string>
diff --git a/prebuilts/gradle/WatchFace/README.md b/prebuilts/gradle/WatchFace/README.md
index 8bbfe5a..74c1d34 100644
--- a/prebuilts/gradle/WatchFace/README.md
+++ b/prebuilts/gradle/WatchFace/README.md
@@ -7,10 +7,25 @@
 opengl, calendar, steps, interactive, etc. It also includes a watch-side configuration example.
 The phone app includes a phone-side configuration example.
 
-Additional note on Steps WatchFace Sample, if the user has not installed or setup the Google Fit app
-on their phone and their Wear device has not configured the Google Fit Wear App, then you may get
-zero steps until one of the two is setup. Please note, many Wear devices configure the Google Fit
-Wear App beforehand.
+Because watch face apps do not have a default Activity in their project, you will need to set your
+Configurations to "Do not launch Activity" for both the Wear and Application modules. If you are
+unsure how to do this, please review the "Run Starter project" section in the
+[Google Watch Face Code Lab][1].
+
+For the Fit Distance related watch face, authentication IS a requirement to request distance from
+Google Fit on Wear. Otherwise, distance will always come back as zero (or stay at whatever the
+distance was prior to you de-authorizing the watch face).
+
+To authenticate and communicate with Google Fit, you must create a project in the Google Developers
+Console, activate the Fitness API, create an OAuth 2.0 client ID, and register the public
+certificate from your signed APK. More details can be found [here][2].
+
+If the user has not installed or setup the Google Fit app on their phone and their Wear device has
+not configured the Google Fit Wear App, then you may get zero steps until one of the two is setup.
+Please note, many Wear devices configure the Google Fit Wear App beforehand.
+
+[1]: https://codelabs.developers.google.com/codelabs/watchface/index.html
+[2]: https://developers.google.com/fit/android/get-started#step_3_enable_the_fitness_api
 
 Pre-requisites
 --------------
diff --git a/prebuilts/gradle/WatchFace/Wearable/build.gradle b/prebuilts/gradle/WatchFace/Wearable/build.gradle
index b59361a..dc02b0e 100644
--- a/prebuilts/gradle/WatchFace/Wearable/build.gradle
+++ b/prebuilts/gradle/WatchFace/Wearable/build.gradle
@@ -15,14 +15,16 @@
 
 dependencies {
 
-    compile 'com.android.support:palette-v7:24.1.1'
+    compile 'com.android.support:palette-v7:25.1.0'
     compile 'com.google.android.gms:play-services-fitness:10.0.1'
 
 
     compile 'com.google.android.gms:play-services-wearable:10.0.1'
     compile 'com.android.support:support-v13:25.0.1'
 
-    compile 'com.google.android.support:wearable:2.0.0-alpha3'
+    provided 'com.google.android.wearable:wearable:2.0.0'
+
+    compile 'com.google.android.support:wearable:2.0.0'
 
 }
 
@@ -43,9 +45,9 @@
         versionCode 1
         versionName "1.0"
 
-        minSdkVersion 18
+        minSdkVersion 22
 
-        targetSdkVersion 23
+        targetSdkVersion 25
     }
 
     compileOptions {
diff --git a/prebuilts/gradle/WatchFace/Wearable/src/main/AndroidManifest.xml b/prebuilts/gradle/WatchFace/Wearable/src/main/AndroidManifest.xml
index 7dd5b69..09b914e 100644
--- a/prebuilts/gradle/WatchFace/Wearable/src/main/AndroidManifest.xml
+++ b/prebuilts/gradle/WatchFace/Wearable/src/main/AndroidManifest.xml
@@ -19,7 +19,7 @@
 
     <uses-sdk
         android:minSdkVersion="21"
-        android:targetSdkVersion="23"/>
+        android:targetSdkVersion="25"/>
 
     <uses-feature android:name="android.hardware.type.watch"/>
 
@@ -35,14 +35,19 @@
     <!-- Location permission used by FitDistanceWatchFaceService -->
     <uses-permission android:name="android.permission.ACCESS_FINE_LOCATION"/>
 
-    <android:uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
-    <android:uses-permission android:name="android.permission.READ_PHONE_STATE"/>
-    <android:uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE"/>
+    <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
+    <uses-permission android:name="android.permission.READ_PHONE_STATE"/>
+    <uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE"/>
 
     <application
         android:allowBackup="true"
         android:icon="@drawable/ic_launcher"
         android:label="@string/app_name">
+
+        <meta-data
+            android:name="com.google.android.wearable.standalone"
+            android:value="true" />
+
         <meta-data
             android:name="com.google.android.gms.version"
             android:value="@integer/google_play_services_version"/>
diff --git a/prebuilts/gradle/WatchFace/Wearable/src/main/java/com/example/android/wearable/watchface/DigitalWatchFaceService.java b/prebuilts/gradle/WatchFace/Wearable/src/main/java/com/example/android/wearable/watchface/DigitalWatchFaceService.java
index 0a9eff2..f3f97fb 100644
--- a/prebuilts/gradle/WatchFace/Wearable/src/main/java/com/example/android/wearable/watchface/DigitalWatchFaceService.java
+++ b/prebuilts/gradle/WatchFace/Wearable/src/main/java/com/example/android/wearable/watchface/DigitalWatchFaceService.java
@@ -28,6 +28,7 @@
 import android.os.Bundle;
 import android.os.Handler;
 import android.os.Message;
+import android.support.v4.content.ContextCompat;
 import android.support.wearable.watchface.CanvasWatchFaceService;
 import android.support.wearable.watchface.WatchFaceService;
 import android.support.wearable.watchface.WatchFaceStyle;
@@ -200,12 +201,15 @@
 
             mBackgroundPaint = new Paint();
             mBackgroundPaint.setColor(mInteractiveBackgroundColor);
-            mDatePaint = createTextPaint(resources.getColor(R.color.digital_date));
+            mDatePaint = createTextPaint(
+                    ContextCompat.getColor(getApplicationContext(), R.color.digital_date));
             mHourPaint = createTextPaint(mInteractiveHourDigitsColor, BOLD_TYPEFACE);
             mMinutePaint = createTextPaint(mInteractiveMinuteDigitsColor);
             mSecondPaint = createTextPaint(mInteractiveSecondDigitsColor);
-            mAmPmPaint = createTextPaint(resources.getColor(R.color.digital_am_pm));
-            mColonPaint = createTextPaint(resources.getColor(R.color.digital_colons));
+            mAmPmPaint = createTextPaint(
+                    ContextCompat.getColor(getApplicationContext(), R.color.digital_am_pm));
+            mColonPaint = createTextPaint(
+                    ContextCompat.getColor(getApplicationContext(), R.color.digital_colons));
 
             mCalendar = Calendar.getInstance();
             mDate = new Date();
diff --git a/prebuilts/gradle/WatchViewStub/.google/packaging.yaml b/prebuilts/gradle/WatchViewStub/.google/packaging.yaml
index 3d128d5..45d6ea6 100644
--- a/prebuilts/gradle/WatchViewStub/.google/packaging.yaml
+++ b/prebuilts/gradle/WatchViewStub/.google/packaging.yaml
@@ -4,7 +4,7 @@
 # This file is used by Google as part of our samples packaging process.
 # End users may safely ignore this file. It has no relevance to other systems.
 ---
-status:       PUBLISHED
+status:       DEPRECATED
 technologies: [Android]
 categories:   [Wearable]
 languages:    [Java]
diff --git a/prebuilts/gradle/WatchViewStub/NOTICE b/prebuilts/gradle/WatchViewStub/NOTICE
index 29ea77b..8f8105a 100644
--- a/prebuilts/gradle/WatchViewStub/NOTICE
+++ b/prebuilts/gradle/WatchViewStub/NOTICE
@@ -1,7 +1,7 @@
 
 This sample uses the following software:
 
-Copyright 2016 The Android Open Source Project
+Copyright 2017 The Android Open Source Project
 
 Licensed under the Apache License, Version 2.0 (the "License");
 you may not use this file except in compliance with the License.
diff --git a/prebuilts/gradle/WatchViewStub/Wearable/build.gradle b/prebuilts/gradle/WatchViewStub/Wearable/build.gradle
index a065722..f8586fb 100644
--- a/prebuilts/gradle/WatchViewStub/Wearable/build.gradle
+++ b/prebuilts/gradle/WatchViewStub/Wearable/build.gradle
@@ -20,7 +20,9 @@
     compile 'com.google.android.gms:play-services-wearable:10.0.1'
     compile 'com.android.support:support-v13:25.0.1'
 
-    compile 'com.google.android.support:wearable:1.4.0'
+    provided 'com.google.android.wearable:wearable:2.0.0'
+
+    compile 'com.google.android.support:wearable:2.0.0'
 
 }
 
@@ -43,7 +45,7 @@
 
         minSdkVersion 24
 
-        targetSdkVersion 22
+        targetSdkVersion 25
     }
 
     compileOptions {
diff --git a/prebuilts/gradle/WatchViewStub/Wearable/src/main/AndroidManifest.xml b/prebuilts/gradle/WatchViewStub/Wearable/src/main/AndroidManifest.xml
index 774817b..ce1dfc3 100644
--- a/prebuilts/gradle/WatchViewStub/Wearable/src/main/AndroidManifest.xml
+++ b/prebuilts/gradle/WatchViewStub/Wearable/src/main/AndroidManifest.xml
@@ -17,8 +17,8 @@
 <manifest xmlns:android="http://schemas.android.com/apk/res/android"
         package="com.example.android.google.wearable.watchviewstub" >
 
-    <uses-sdk android:minSdkVersion="20"
-              android:targetSdkVersion="22" />
+    <uses-sdk android:minSdkVersion="22"
+              android:targetSdkVersion="25" />
 
     <uses-feature android:name="android.hardware.type.watch" />
 
@@ -27,6 +27,11 @@
             android:icon="@drawable/ic_launcher"
             android:label="@string/app_name"
             android:theme="@android:style/Theme.DeviceDefault">
+
+        <meta-data
+            android:name="com.google.android.wearable.standalone"
+            android:value="true" />
+
         <activity
             android:name="com.example.android.google.wearable.watchviewstub.MainActivity"
             android:label="@string/app_name">
diff --git a/prebuilts/gradle/WearDrawers/NOTICE b/prebuilts/gradle/WearDrawers/NOTICE
index 29ea77b..8f8105a 100644
--- a/prebuilts/gradle/WearDrawers/NOTICE
+++ b/prebuilts/gradle/WearDrawers/NOTICE
@@ -1,7 +1,7 @@
 
 This sample uses the following software:
 
-Copyright 2016 The Android Open Source Project
+Copyright 2017 The Android Open Source Project
 
 Licensed under the Apache License, Version 2.0 (the "License");
 you may not use this file except in compliance with the License.
diff --git a/prebuilts/gradle/WearDrawers/Wearable/build.gradle b/prebuilts/gradle/WearDrawers/Wearable/build.gradle
index b5cd7a8..f8586fb 100644
--- a/prebuilts/gradle/WearDrawers/Wearable/build.gradle
+++ b/prebuilts/gradle/WearDrawers/Wearable/build.gradle
@@ -16,12 +16,13 @@
 dependencies {
 
 
-    provided "com.google.android.wearable:wearable:1.0.0"
 
     compile 'com.google.android.gms:play-services-wearable:10.0.1'
     compile 'com.android.support:support-v13:25.0.1'
 
-    compile 'com.google.android.support:wearable:2.0.0-alpha1'
+    provided 'com.google.android.wearable:wearable:2.0.0'
+
+    compile 'com.google.android.support:wearable:2.0.0'
 
 }
 
@@ -42,9 +43,9 @@
         versionCode 1
         versionName "1.0"
 
-        minSdkVersion 23
+        minSdkVersion 24
 
-        targetSdkVersion 23
+        targetSdkVersion 25
     }
 
     compileOptions {
diff --git a/prebuilts/gradle/WearDrawers/Wearable/src/main/AndroidManifest.xml b/prebuilts/gradle/WearDrawers/Wearable/src/main/AndroidManifest.xml
index eaf9dbd..fae56dc 100644
--- a/prebuilts/gradle/WearDrawers/Wearable/src/main/AndroidManifest.xml
+++ b/prebuilts/gradle/WearDrawers/Wearable/src/main/AndroidManifest.xml
@@ -13,6 +13,10 @@
         android:supportsRtl="true"
         android:theme="@android:style/Theme.DeviceDefault">
 
+        <meta-data
+            android:name="com.google.android.wearable.standalone"
+            android:value="true" />
+
         <!--If you want your app to run on pre-22, then set required to false -->
         <uses-library android:name="com.google.android.wearable" android:required="false" />
 
diff --git a/prebuilts/gradle/WearDrawers/Wearable/src/main/java/com/example/android/wearable/wear/weardrawers/MainActivity.java b/prebuilts/gradle/WearDrawers/Wearable/src/main/java/com/example/android/wearable/wear/weardrawers/MainActivity.java
index f2e00c0..4fc2f2f 100644
--- a/prebuilts/gradle/WearDrawers/Wearable/src/main/java/com/example/android/wearable/wear/weardrawers/MainActivity.java
+++ b/prebuilts/gradle/WearDrawers/Wearable/src/main/java/com/example/android/wearable/wear/weardrawers/MainActivity.java
@@ -27,11 +27,10 @@
 import android.util.Log;
 import android.view.Gravity;
 import android.view.LayoutInflater;
-import android.view.Menu;
-import android.view.MenuInflater;
 import android.view.MenuItem;
 import android.view.View;
 import android.view.ViewGroup;
+import android.view.ViewTreeObserver;
 import android.widget.ImageView;
 import android.widget.Toast;
 
@@ -86,17 +85,22 @@
                 (WearableNavigationDrawer) findViewById(R.id.top_navigation_drawer);
         mWearableNavigationDrawer.setAdapter(new NavigationAdapter(this));
 
-        // Peeks Navigation drawer on the top.
-        mWearableDrawerLayout.peekDrawer(Gravity.TOP);
-
         // Bottom Action Drawer
         mWearableActionDrawer =
                 (WearableActionDrawer) findViewById(R.id.bottom_action_drawer);
 
         mWearableActionDrawer.setOnMenuItemClickListener(this);
 
-        // Peeks action drawer on the bottom.
-        mWearableDrawerLayout.peekDrawer(Gravity.BOTTOM);
+        // Temporarily peeks the navigation and action drawers to ensure the user is aware of them.
+        ViewTreeObserver observer = mWearableDrawerLayout.getViewTreeObserver();
+        observer.addOnGlobalLayoutListener(new ViewTreeObserver.OnGlobalLayoutListener() {
+            @Override
+            public void onGlobalLayout() {
+                mWearableDrawerLayout.getViewTreeObserver().removeOnGlobalLayoutListener(this);
+                mWearableDrawerLayout.peekDrawer(Gravity.TOP);
+                mWearableDrawerLayout.peekDrawer(Gravity.BOTTOM);
+            }
+        });
 
         /* Action Drawer Tip: If you only have a single action for your Action Drawer, you can use a
          * (custom) View to peek on top of the content by calling
diff --git a/prebuilts/gradle/WearHighBandwidthNetworking/NOTICE b/prebuilts/gradle/WearHighBandwidthNetworking/NOTICE
index 29ea77b..8f8105a 100644
--- a/prebuilts/gradle/WearHighBandwidthNetworking/NOTICE
+++ b/prebuilts/gradle/WearHighBandwidthNetworking/NOTICE
@@ -1,7 +1,7 @@
 
 This sample uses the following software:
 
-Copyright 2016 The Android Open Source Project
+Copyright 2017 The Android Open Source Project
 
 Licensed under the Apache License, Version 2.0 (the "License");
 you may not use this file except in compliance with the License.
diff --git a/prebuilts/gradle/WearHighBandwidthNetworking/Wearable/build.gradle b/prebuilts/gradle/WearHighBandwidthNetworking/Wearable/build.gradle
index 592c8b3..f8586fb 100644
--- a/prebuilts/gradle/WearHighBandwidthNetworking/Wearable/build.gradle
+++ b/prebuilts/gradle/WearHighBandwidthNetworking/Wearable/build.gradle
@@ -15,14 +15,14 @@
 
 dependencies {
 
-    compile 'com.google.android.gms:play-services-wearable:10.0.1'
 
-    provided "com.google.android.wearable:wearable:1.0.0"
 
     compile 'com.google.android.gms:play-services-wearable:10.0.1'
     compile 'com.android.support:support-v13:25.0.1'
 
-    compile 'com.google.android.support:wearable:2.0.0-beta1'
+    provided 'com.google.android.wearable:wearable:2.0.0'
+
+    compile 'com.google.android.support:wearable:2.0.0'
 
 }
 
diff --git a/prebuilts/gradle/WearHighBandwidthNetworking/Wearable/src/main/AndroidManifest.xml b/prebuilts/gradle/WearHighBandwidthNetworking/Wearable/src/main/AndroidManifest.xml
index cde6118..bc25c0e 100644
--- a/prebuilts/gradle/WearHighBandwidthNetworking/Wearable/src/main/AndroidManifest.xml
+++ b/prebuilts/gradle/WearHighBandwidthNetworking/Wearable/src/main/AndroidManifest.xml
@@ -33,6 +33,10 @@
         android:supportsRtl="true"
         android:theme="@style/AppTheme">
 
+        <meta-data
+            android:name="com.google.android.wearable.standalone"
+            android:value="true" />
+
         <activity
             android:name=".MainActivity"
             android:label="@string/app_name">
diff --git a/prebuilts/gradle/WearNotifications/.google/packaging.yaml b/prebuilts/gradle/WearNotifications/.google/packaging.yaml
index 082c84a..4ac2ccf 100644
--- a/prebuilts/gradle/WearNotifications/.google/packaging.yaml
+++ b/prebuilts/gradle/WearNotifications/.google/packaging.yaml
@@ -9,7 +9,7 @@
 categories:   [Notification, Wearable]
 languages:    [Java]
 solutions:    [Mobile]
-github:       android-Wear Notifications
+github:       android-WearNotifications
 level:        INTERMEDIATE
 icon:         screenshots/icon-web.png
 apiRefs:
diff --git a/prebuilts/gradle/WearNotifications/Application/src/main/res/values/base-strings.xml b/prebuilts/gradle/WearNotifications/Application/src/main/res/values/base-strings.xml
index 5544289..e6aee0d 100644
--- a/prebuilts/gradle/WearNotifications/Application/src/main/res/values/base-strings.xml
+++ b/prebuilts/gradle/WearNotifications/Application/src/main/res/values/base-strings.xml
@@ -16,7 +16,7 @@
 -->
 
 <resources>
-    <string name="app_name">Wear Notifications</string>
+    <string name="app_name">WearNotifications</string>
     <string name="intro_message">
         <![CDATA[
         
diff --git a/prebuilts/gradle/WearNotifications/README.md b/prebuilts/gradle/WearNotifications/README.md
index f38d28d..01334a9 100644
--- a/prebuilts/gradle/WearNotifications/README.md
+++ b/prebuilts/gradle/WearNotifications/README.md
@@ -1,5 +1,5 @@
 
-Android Wear Notifications Sample
+Android WearNotifications Sample
 ===================================
 
 Sample demonstrates best practices for using NotificationStyle Notifications (Inbox,
@@ -68,7 +68,7 @@
 - Stack Overflow: http://stackoverflow.com/questions/tagged/android
 
 If you've found an error in this sample, please file an issue:
-https://github.com/googlesamples/android-Wear Notifications
+https://github.com/googlesamples/android-WearNotifications
 
 Patches are encouraged, and may be submitted by forking this project and
 submitting a pull request through GitHub. Please see CONTRIBUTING.md for more details.
diff --git a/prebuilts/gradle/WearNotifications/Wearable/build.gradle b/prebuilts/gradle/WearNotifications/Wearable/build.gradle
index 7d35b4b..dfb1c67 100644
--- a/prebuilts/gradle/WearNotifications/Wearable/build.gradle
+++ b/prebuilts/gradle/WearNotifications/Wearable/build.gradle
@@ -18,12 +18,13 @@
     compile 'com.android.support:appcompat-v7:24.0.0'
     compile 'com.android.support:design:24.0.0'
 
-    provided "com.google.android.wearable:wearable:1.0.0"
 
     compile 'com.google.android.gms:play-services-wearable:10.0.1'
     compile 'com.android.support:support-v13:25.0.1'
 
-    compile 'com.google.android.support:wearable:2.0.0-alpha3'
+    provided 'com.google.android.wearable:wearable:2.0.0'
+
+    compile 'com.google.android.support:wearable:2.0.0'
 
 }
 
diff --git a/prebuilts/gradle/WearNotifications/Wearable/src/main/AndroidManifest.xml b/prebuilts/gradle/WearNotifications/Wearable/src/main/AndroidManifest.xml
index c97025d..2fdee0d 100644
--- a/prebuilts/gradle/WearNotifications/Wearable/src/main/AndroidManifest.xml
+++ b/prebuilts/gradle/WearNotifications/Wearable/src/main/AndroidManifest.xml
@@ -29,6 +29,9 @@
                  android:supportsRtl="true"
                  android:theme="@style/AppThemeOverride">
 
+        <!-- Let's Play Store know this app is standalone. -->
+        <meta-data android:name="com.google.android.wearable.standalone" android:value="true"/>
+
         <!--
         Important Note: Usually, you will want to disable bridging if you have a local/native
         Android Wear app creating Notifications. In our case, we don't, as our sample shows both
diff --git a/prebuilts/gradle/WearNotifications/Wearable/src/main/java/com/example/android/wearable/wear/wearnotifications/StandaloneMainActivity.java b/prebuilts/gradle/WearNotifications/Wearable/src/main/java/com/example/android/wearable/wear/wearnotifications/StandaloneMainActivity.java
index 7e78fc3..95baa6d 100644
--- a/prebuilts/gradle/WearNotifications/Wearable/src/main/java/com/example/android/wearable/wear/wearnotifications/StandaloneMainActivity.java
+++ b/prebuilts/gradle/WearNotifications/Wearable/src/main/java/com/example/android/wearable/wear/wearnotifications/StandaloneMainActivity.java
@@ -92,6 +92,9 @@
         mMainFrameLayout = (FrameLayout) findViewById(R.id.mainFrameLayout);
         mWearableRecyclerView = (WearableRecyclerView) findViewById(R.id.recycler_view);
 
+        // Aligns the first and last items on the list vertically centered on the screen.
+        mWearableRecyclerView.setCenterEdgeItems(true);
+
         // Customizes scrolling (zoom) and offsets of WearableRecyclerView's items
         ScalingOffsettingHelper scalingOffsettingHelper = new ScalingOffsettingHelper();
         mWearableRecyclerView.setOffsettingHelper(scalingOffsettingHelper);
diff --git a/prebuilts/gradle/WearSpeakerSample/wear/build.gradle b/prebuilts/gradle/WearSpeakerSample/wear/build.gradle
index 8d3e550..5a0264e 100644
--- a/prebuilts/gradle/WearSpeakerSample/wear/build.gradle
+++ b/prebuilts/gradle/WearSpeakerSample/wear/build.gradle
@@ -18,13 +18,13 @@
 
 
 android {
-    compileSdkVersion 23
-    buildToolsVersion "23.0.1"
+    compileSdkVersion 25
+    buildToolsVersion "25.0.2"
 
     defaultConfig {
         applicationId "com.example.android.wearable.speaker"
-        minSdkVersion 21
-        targetSdkVersion 23
+        minSdkVersion 22
+        targetSdkVersion 25
         versionCode 1
         versionName "1.0"
     }
@@ -37,8 +37,8 @@
 }
 
 dependencies {
-    compile 'com.google.android.support:wearable:1.3.0'
-    compile 'com.google.android.gms:play-services-wearable:8.3.0'
-    compile 'com.android.support:appcompat-v7:23.1.0'
-
+    provided 'com.google.android.wearable:wearable:2.0.0'
+    compile 'com.google.android.support:wearable:2.0.0'
+    compile 'com.google.android.gms:play-services-wearable:10.0.1'
+    compile 'com.android.support:appcompat-v7:25.0.1'
 }
diff --git a/prebuilts/gradle/WearSpeakerSample/wear/src/main/AndroidManifest.xml b/prebuilts/gradle/WearSpeakerSample/wear/src/main/AndroidManifest.xml
index 135d3e0..e8d9a29 100644
--- a/prebuilts/gradle/WearSpeakerSample/wear/src/main/AndroidManifest.xml
+++ b/prebuilts/gradle/WearSpeakerSample/wear/src/main/AndroidManifest.xml
@@ -26,6 +26,11 @@
         android:label="@string/app_name"
         android:supportsRtl="true"
         android:theme="@android:style/Theme.DeviceDefault" >
+
+        <meta-data
+            android:name="com.google.android.wearable.standalone"
+            android:value="true" />
+
         <uses-library android:name="com.google.android.wearable" android:required="false" />
         <activity
             android:name=".MainActivity"
@@ -37,5 +42,4 @@
             </intent-filter>
         </activity>
     </application>
-
-</manifest>
+</manifest>
\ No newline at end of file
diff --git a/prebuilts/gradle/WearVerifyRemoteApp/Application/build.gradle b/prebuilts/gradle/WearVerifyRemoteApp/Application/build.gradle
index cfd4139..478ca1b 100644
--- a/prebuilts/gradle/WearVerifyRemoteApp/Application/build.gradle
+++ b/prebuilts/gradle/WearVerifyRemoteApp/Application/build.gradle
@@ -20,7 +20,7 @@
     compile "com.android.support:support-v13:25.0.1"
     compile "com.android.support:cardview-v7:25.0.1"
     compile "com.android.support:appcompat-v7:25.0.1"
-    compile 'com.google.android.support:wearable:2.0.0-beta1'
+    compile 'com.google.android.support:wearable:2.0.0'
     compile 'com.google.android.gms:play-services-wearable:10.0.1'
     compile 'com.android.support:support-v13:25.0.1'
     wearApp project(':Wearable')
@@ -40,7 +40,7 @@
 
     defaultConfig {
         minSdkVersion 23
-        targetSdkVersion 24
+        targetSdkVersion 25
     }
 
     compileOptions {
diff --git a/prebuilts/gradle/WearVerifyRemoteApp/Application/src/main/java/com/example/android/wearable/wear/wearverifyremoteapp/MainMobileActivity.java b/prebuilts/gradle/WearVerifyRemoteApp/Application/src/main/java/com/example/android/wearable/wear/wearverifyremoteapp/MainMobileActivity.java
index 0d06ed5..ed15119 100644
--- a/prebuilts/gradle/WearVerifyRemoteApp/Application/src/main/java/com/example/android/wearable/wear/wearverifyremoteapp/MainMobileActivity.java
+++ b/prebuilts/gradle/WearVerifyRemoteApp/Application/src/main/java/com/example/android/wearable/wear/wearverifyremoteapp/MainMobileActivity.java
@@ -99,15 +99,16 @@
             if (resultCode == RemoteIntent.RESULT_OK) {
                 Toast toast = Toast.makeText(
                         getApplicationContext(),
-                        "Successfully sent to device",
+                        "Play Store Request to Wear device successful.",
                         Toast.LENGTH_SHORT);
                 toast.show();
 
             } else if (resultCode == RemoteIntent.RESULT_FAILED) {
                 Toast toast = Toast.makeText(
                         getApplicationContext(),
-                        "Failed to send to device.",
-                        Toast.LENGTH_SHORT);
+                        "Play Store Request Failed. Wear device(s) may not support Play Store, "
+                                + " that is, the Wear device may be version 1.0.",
+                        Toast.LENGTH_LONG);
                 toast.show();
 
             } else {
@@ -188,7 +189,7 @@
         // Initial request for devices with our capability, aka, our Wear app installed.
         findWearDevicesWithApp();
 
-        // Initial request for devices all Wear devices connected (with or without our capability).
+        // Initial request for all Wear devices connected (with or without our capability).
         // Additional Note: Because there isn't a listener for ALL Nodes added/removed from network
         // that isn't deprecated, we simply update the full list when the Google API Client is
         // connected and when capability changes come through in the onCapabilityChanged() method.
diff --git a/prebuilts/gradle/WearVerifyRemoteApp/Wearable/build.gradle b/prebuilts/gradle/WearVerifyRemoteApp/Wearable/build.gradle
index f9abc17..b5bd1a2 100644
--- a/prebuilts/gradle/WearVerifyRemoteApp/Wearable/build.gradle
+++ b/prebuilts/gradle/WearVerifyRemoteApp/Wearable/build.gradle
@@ -16,12 +16,13 @@
 dependencies {
 
 
-    provided "com.google.android.wearable:wearable:1.0.0"
 
     compile 'com.google.android.gms:play-services-wearable:10.0.1'
     compile 'com.android.support:support-v13:25.0.1'
 
-    compile 'com.google.android.support:wearable:2.0.0-beta1'
+    provided 'com.google.android.wearable:wearable:2.0.0'
+
+    compile 'com.google.android.support:wearable:2.0.0'
 
 }
 
@@ -44,7 +45,7 @@
 
         minSdkVersion 23
 
-        targetSdkVersion 24
+        targetSdkVersion 25
     }
 
     compileOptions {
diff --git a/prebuilts/gradle/WearVerifyRemoteApp/Wearable/src/main/AndroidManifest.xml b/prebuilts/gradle/WearVerifyRemoteApp/Wearable/src/main/AndroidManifest.xml
index d77cf5f..ee3f2dc 100644
--- a/prebuilts/gradle/WearVerifyRemoteApp/Wearable/src/main/AndroidManifest.xml
+++ b/prebuilts/gradle/WearVerifyRemoteApp/Wearable/src/main/AndroidManifest.xml
@@ -30,6 +30,10 @@
         android:supportsRtl="true"
         android:theme="@android:style/Theme.DeviceDefault">
 
+        <meta-data
+            android:name="com.google.android.wearable.standalone"
+            android:value="true" />
+
         <!--If you want your app to run on pre-22, then set required to false -->
         <uses-library android:name="com.google.android.wearable" android:required="false" />
 
diff --git a/prebuilts/gradle/WearVerifyRemoteApp/Wearable/src/main/java/com/example/android/wearable/wear/wearverifyremoteapp/MainWearActivity.java b/prebuilts/gradle/WearVerifyRemoteApp/Wearable/src/main/java/com/example/android/wearable/wear/wearverifyremoteapp/MainWearActivity.java
index 260ed44..31882b0 100644
--- a/prebuilts/gradle/WearVerifyRemoteApp/Wearable/src/main/java/com/example/android/wearable/wear/wearverifyremoteapp/MainWearActivity.java
+++ b/prebuilts/gradle/WearVerifyRemoteApp/Wearable/src/main/java/com/example/android/wearable/wear/wearverifyremoteapp/MainWearActivity.java
@@ -72,12 +72,15 @@
     // IMPORTANT NOTE: This should be named differently than your Wear app's capability.
     private static final String CAPABILITY_PHONE_APP = "verify_remote_example_phone_app";
 
-
-    // Links to mobile app for Android (Play Store).
+    // Links to install mobile app for both Android (Play Store) and iOS.
     // TODO: Replace with your links/packages.
     private static final String PLAY_STORE_APP_URI =
             "market://details?id=com.example.android.wearable.wear.wearverifyremoteapp";
 
+    // TODO: Replace with your links/packages.
+    private static final String APP_STORE_APP_URI =
+            "https://itunes.apple.com/us/app/android-wear/id986496028?mt=8";
+
     // Result from sending RemoteIntent to phone to open app in play/app store.
     private final ResultReceiver mResultReceiver = new ResultReceiver(new Handler()) {
         @Override
@@ -263,6 +266,17 @@
             // Assume iPhone (iOS device) or Android without Play Store (not supported right now).
             case PlayStoreAvailability.PLAY_STORE_ON_PHONE_UNAVAILABLE:
                 Log.d(TAG, "\tPLAY_STORE_ON_PHONE_UNAVAILABLE");
+
+                // Create Remote Intent to open App Store listing of app on iPhone.
+                Intent intentIOS =
+                        new Intent(Intent.ACTION_VIEW)
+                                .addCategory(Intent.CATEGORY_BROWSABLE)
+                                .setData(Uri.parse(APP_STORE_APP_URI));
+
+                RemoteIntent.startRemoteActivity(
+                        getApplicationContext(),
+                        intentIOS,
+                        mResultReceiver);
                 break;
 
             case PlayStoreAvailability.PLAY_STORE_ON_PHONE_ERROR_UNKNOWN:
diff --git a/prebuilts/gradle/XYZTouristAttractions/Shared/build.gradle b/prebuilts/gradle/XYZTouristAttractions/Shared/build.gradle
index 256ada6..6982765 100644
--- a/prebuilts/gradle/XYZTouristAttractions/Shared/build.gradle
+++ b/prebuilts/gradle/XYZTouristAttractions/Shared/build.gradle
@@ -18,7 +18,7 @@
 dependencies {
     compile 'com.android.support:support-v13:23.0.0'
     compile 'com.google.android.gms:play-services-wearable:10.0.1'
-    compile 'com.google.android.gms:play-services-location:10.0.1'
+    compile 'com.google.android.gms:play-services-maps:10.0.1'
     compile 'com.google.maps.android:android-maps-utils:0.3.4'
 }
 
diff --git a/prebuilts/gradle/XYZTouristAttractions/Wearable/build.gradle b/prebuilts/gradle/XYZTouristAttractions/Wearable/build.gradle
index 0ff802f..37c2c7d 100644
--- a/prebuilts/gradle/XYZTouristAttractions/Wearable/build.gradle
+++ b/prebuilts/gradle/XYZTouristAttractions/Wearable/build.gradle
@@ -18,11 +18,13 @@
 }
 
 dependencies {
-    compile 'com.google.android.gms:play-services-location:10.0.1'
+    compile 'com.google.android.gms:play-services-maps:10.0.1'
     compile 'com.google.android.gms:play-services-wearable:10.0.1'
     compile 'com.android.support:support-v13:25.0.1'
 
-    compile 'com.google.android.support:wearable:1.4.0'
+    provided 'com.google.android.wearable:wearable:2.0.0'
+
+    compile 'com.google.android.support:wearable:2.0.0'
 
     compile project(':Shared')
 }
@@ -44,7 +46,7 @@
         versionCode 1
         versionName "1.0"
 
-        targetSdkVersion 22
+        targetSdkVersion 25
 
     }
 
diff --git a/prebuilts/gradle/XYZTouristAttractions/Wearable/src/main/AndroidManifest.xml b/prebuilts/gradle/XYZTouristAttractions/Wearable/src/main/AndroidManifest.xml
index fc086da..320396d 100644
--- a/prebuilts/gradle/XYZTouristAttractions/Wearable/src/main/AndroidManifest.xml
+++ b/prebuilts/gradle/XYZTouristAttractions/Wearable/src/main/AndroidManifest.xml
@@ -25,8 +25,8 @@
     <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" tools:node="remove" />
 
     <uses-sdk
-        android:minSdkVersion="21"
-        android:targetSdkVersion="22" />
+        android:minSdkVersion="22"
+        android:targetSdkVersion="25" />
 
     <application
         android:allowBackup="true"
@@ -34,6 +34,10 @@
         android:label="@string/app_name"
         android:theme="@android:style/Theme.DeviceDefault" >
 
+        <meta-data
+            android:name="com.google.android.wearable.standalone"
+            android:value="false" />
+
         <activity
             android:name=".ui.AttractionsActivity"
             android:label="@string/app_name" />