Merge "Displays background complication provider icon in preview when background complication is active, and optimizes UI for 6 watch sizes." into nyc-mr1-dev
diff --git a/wearable/wear/WatchFace/Wearable/src/main/java/com/example/android/wearable/watchface/config/AnalogComplicationConfigRecyclerViewAdapter.java b/wearable/wear/WatchFace/Wearable/src/main/java/com/example/android/wearable/watchface/config/AnalogComplicationConfigRecyclerViewAdapter.java
index 7e79d22..bb666d6 100644
--- a/wearable/wear/WatchFace/Wearable/src/main/java/com/example/android/wearable/watchface/config/AnalogComplicationConfigRecyclerViewAdapter.java
+++ b/wearable/wear/WatchFace/Wearable/src/main/java/com/example/android/wearable/watchface/config/AnalogComplicationConfigRecyclerViewAdapter.java
@@ -34,6 +34,7 @@
 import android.support.wearable.complications.ProviderInfoRetriever;
 import android.support.wearable.complications.ProviderInfoRetriever.OnProviderInfoReceivedCallback;
 import android.util.Log;
+import android.view.Gravity;
 import android.view.LayoutInflater;
 import android.view.View;
 import android.view.View.OnClickListener;
@@ -42,6 +43,7 @@
 import android.widget.ImageButton;
 import android.widget.ImageView;
 import android.widget.Switch;
+import android.widget.Toast;
 
 import com.example.android.wearable.watchface.R;
 import com.example.android.wearable.watchface.model.AnalogComplicationConfigData.BackgroundComplicationConfigItem;
@@ -232,11 +234,10 @@
 
                 int defaultComplicationResourceId =
                         previewAndComplicationsConfigItem.getDefaultComplicationResourceId();
-
-                previewAndComplicationsViewHolder.updateWatchFaceColors();
                 previewAndComplicationsViewHolder.setDefaultComplicationDrawable(
                         defaultComplicationResourceId);
-                previewAndComplicationsViewHolder.retrieveInitialComplicationsData();
+
+                previewAndComplicationsViewHolder.initializesColorsAndComplications();
                 break;
 
             case TYPE_MORE_OPTIONS:
@@ -345,7 +346,7 @@
 
         private View mWatchFaceArmsAndTicksView;
         private View mWatchFaceHighlightPreviewView;
-        private View mWatchFaceBackgroundPreviewView;
+        private ImageView mWatchFaceBackgroundPreviewImageView;
 
         private ImageView mLeftComplicationBackground;
         private ImageView mRightComplicationBackground;
@@ -355,10 +356,13 @@
 
         private Drawable mDefaultComplicationDrawable;
 
+        private boolean mBackgroundComplicationEnabled;
+
         public PreviewAndComplicationsViewHolder(final View view) {
             super(view);
 
-            mWatchFaceBackgroundPreviewView = view.findViewById(R.id.watch_face_background);
+            mWatchFaceBackgroundPreviewImageView =
+                    (ImageView) view.findViewById(R.id.watch_face_background);
             mWatchFaceArmsAndTicksView = view.findViewById(R.id.watch_face_arms_and_ticks);
 
             // In our case, just the second arm.
@@ -394,15 +398,30 @@
         }
 
         public void updateWatchFaceColors() {
-            // Updates background color.
-            String backgroundSharedPrefString = mContext.getString(R.string.saved_background_color);
-            int currentBackgroundColor =
-                    mSharedPref.getInt(backgroundSharedPrefString, Color.BLACK);
 
-            PorterDuffColorFilter backgroundColorFilter =
-                    new PorterDuffColorFilter(currentBackgroundColor, PorterDuff.Mode.SRC_ATOP);
+            // Only update background colors for preview if background complications are disabled.
+            if (!mBackgroundComplicationEnabled) {
+                // Updates background color.
+                String backgroundSharedPrefString =
+                        mContext.getString(R.string.saved_background_color);
+                int currentBackgroundColor =
+                        mSharedPref.getInt(backgroundSharedPrefString, Color.BLACK);
 
-            mWatchFaceBackgroundPreviewView.getBackground().setColorFilter(backgroundColorFilter);
+                PorterDuffColorFilter backgroundColorFilter =
+                        new PorterDuffColorFilter(currentBackgroundColor, PorterDuff.Mode.SRC_ATOP);
+
+                mWatchFaceBackgroundPreviewImageView
+                        .getBackground()
+                        .setColorFilter(backgroundColorFilter);
+
+            } else {
+                // Inform user that they need to disable background image for color to work.
+                CharSequence text = "Selected image overrides background color.";
+                int duration = Toast.LENGTH_SHORT;
+                Toast toast = Toast.makeText(mContext, text, duration);
+                toast.setGravity(Gravity.CENTER, 0, 0);
+                toast.show();
+            }
 
             // Updates highlight color (just second arm).
             String highlightSharedPrefString = mContext.getString(R.string.saved_marker_color);
@@ -422,6 +441,8 @@
             mSelectedComplicationId =
                     AnalogComplicationWatchFaceService.getComplicationId(complicationLocation);
 
+            mBackgroundComplicationEnabled = false;
+
             if (mSelectedComplicationId >= 0) {
 
                 int[] supportedTypes =
@@ -463,8 +484,37 @@
 
             if (watchFaceComplicationId == mBackgroundComplicationId) {
                 if (complicationProviderInfo != null) {
-                    // TODO: Something with icon to show background set?
-                    // complicationProviderInfo.providerIcon
+                    mBackgroundComplicationEnabled = true;
+
+                    // Since we can't get the background complication image outside of the
+                    // watch face, we set the icon for that provider instead with a gray background.
+                    PorterDuffColorFilter backgroundColorFilter =
+                            new PorterDuffColorFilter(Color.GRAY, PorterDuff.Mode.SRC_ATOP);
+
+                    mWatchFaceBackgroundPreviewImageView
+                            .getBackground()
+                            .setColorFilter(backgroundColorFilter);
+                    mWatchFaceBackgroundPreviewImageView.setImageIcon(
+                            complicationProviderInfo.providerIcon);
+
+                } else {
+                    mBackgroundComplicationEnabled = false;
+
+                    // Clears icon for background if it was present before.
+                    mWatchFaceBackgroundPreviewImageView.setImageResource(
+                            android.R.color.transparent);
+                    String backgroundSharedPrefString =
+                            mContext.getString(R.string.saved_background_color);
+                    int currentBackgroundColor =
+                            mSharedPref.getInt(backgroundSharedPrefString, Color.BLACK);
+
+                    PorterDuffColorFilter backgroundColorFilter =
+                            new PorterDuffColorFilter(
+                                    currentBackgroundColor, PorterDuff.Mode.SRC_ATOP);
+
+                    mWatchFaceBackgroundPreviewImageView
+                            .getBackground()
+                            .setColorFilter(backgroundColorFilter);
                 }
 
             } else if (watchFaceComplicationId == mLeftComplicationId) {
@@ -489,8 +539,27 @@
             }
         }
 
-        public void retrieveInitialComplicationsData() {
+        public void initializesColorsAndComplications() {
 
+            // Initializes highlight color (just second arm and part of complications).
+            String highlightSharedPrefString = mContext.getString(R.string.saved_marker_color);
+            int currentHighlightColor = mSharedPref.getInt(highlightSharedPrefString, Color.RED);
+
+            PorterDuffColorFilter highlightColorFilter =
+                    new PorterDuffColorFilter(currentHighlightColor, PorterDuff.Mode.SRC_ATOP);
+
+            mWatchFaceHighlightPreviewView.getBackground().setColorFilter(highlightColorFilter);
+
+            // Initializes background color to gray (updates to color or complication icon based
+            // on whether the background complication is live or not.
+            PorterDuffColorFilter backgroundColorFilter =
+                    new PorterDuffColorFilter(Color.GRAY, PorterDuff.Mode.SRC_ATOP);
+
+            mWatchFaceBackgroundPreviewImageView
+                    .getBackground()
+                    .setColorFilter(backgroundColorFilter);
+
+            // TODO: change this to return from watch face
             final int[] complicationIds =
                     new int[] {
                         mBackgroundComplicationId, mLeftComplicationId, mRightComplicationId
diff --git a/wearable/wear/WatchFace/Wearable/src/main/java/com/example/android/wearable/watchface/watchface/AnalogComplicationWatchFaceService.java b/wearable/wear/WatchFace/Wearable/src/main/java/com/example/android/wearable/watchface/watchface/AnalogComplicationWatchFaceService.java
index 9a4cf44..12a7dec 100644
--- a/wearable/wear/WatchFace/Wearable/src/main/java/com/example/android/wearable/watchface/watchface/AnalogComplicationWatchFaceService.java
+++ b/wearable/wear/WatchFace/Wearable/src/main/java/com/example/android/wearable/watchface/watchface/AnalogComplicationWatchFaceService.java
@@ -49,7 +49,7 @@
 
 /** Demonstrates two simple complications in a watch face. */
 public class AnalogComplicationWatchFaceService extends CanvasWatchFaceService {
-    private static final String TAG = "SimpleComplicationWF";
+    private static final String TAG = "AnalogWatchFace";
 
     // Unique IDs for each complication. The settings activity that supports allowing users
     // to select their complication data provider requires numbers to be >= 0.
diff --git a/wearable/wear/WatchFace/Wearable/src/main/res/layout/activity_analog_complication_config.xml b/wearable/wear/WatchFace/Wearable/src/main/res/layout/activity_analog_complication_config.xml
index afac6b4..61beb90 100644
--- a/wearable/wear/WatchFace/Wearable/src/main/res/layout/activity_analog_complication_config.xml
+++ b/wearable/wear/WatchFace/Wearable/src/main/res/layout/activity_analog_complication_config.xml
@@ -19,8 +19,8 @@
     android:layout_width="match_parent"
     android:layout_height="match_parent"
     android:background="@color/dark_grey"
-    android:paddingStart="24dp"
-    android:paddingEnd="24dp">
+    android:paddingStart="@dimen/activity_config_padding"
+    android:paddingEnd="@dimen/activity_config_padding">
     <android.support.wearable.view.WearableRecyclerView
         android:id="@+id/wearable_recycler_view"
         android:layout_height="wrap_content"
diff --git a/wearable/wear/WatchFace/Wearable/src/main/res/layout/config_list_preview_and_complications_item.xml b/wearable/wear/WatchFace/Wearable/src/main/res/layout/config_list_preview_and_complications_item.xml
index c1a925d..41fb79a 100644
--- a/wearable/wear/WatchFace/Wearable/src/main/res/layout/config_list_preview_and_complications_item.xml
+++ b/wearable/wear/WatchFace/Wearable/src/main/res/layout/config_list_preview_and_complications_item.xml
@@ -23,8 +23,10 @@
     android:layout_width="match_parent"
     android:layout_height="match_parent">
 
-    <View
+    <ImageView
         android:id="@+id/watch_face_background"
+        android:padding="@dimen/watch_face_preview_background_padding"
+        android:scaleType="fitXY"
         android:layout_width="@dimen/analog_complication_settings_preview_size"
         android:layout_height="@dimen/analog_complication_settings_preview_size"
         android:layout_centerHorizontal="true"
diff --git a/wearable/wear/WatchFace/Wearable/src/main/res/values-280dpi/dimens.xml b/wearable/wear/WatchFace/Wearable/src/main/res/values-280dpi/dimens.xml
new file mode 100644
index 0000000..2e8a5ae
--- /dev/null
+++ b/wearable/wear/WatchFace/Wearable/src/main/res/values-280dpi/dimens.xml
@@ -0,0 +1,21 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 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.
+ 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.
+-->
+<resources>
+    <dimen name="activity_config_padding">24dp</dimen>
+    <dimen name="analog_complication_settings_preview_size">180dp</dimen>
+    <dimen name="analog_complication_color_picker_size">70dp</dimen>
+    <dimen name="watch_face_preview_background_padding">16dp</dimen>
+</resources>
diff --git a/wearable/wear/WatchFace/Wearable/src/main/res/values-280dpi/styles.xml b/wearable/wear/WatchFace/Wearable/src/main/res/values-280dpi/styles.xml
new file mode 100644
index 0000000..79cfa93
--- /dev/null
+++ b/wearable/wear/WatchFace/Wearable/src/main/res/values-280dpi/styles.xml
@@ -0,0 +1,27 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+ Copyright (C) 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.
+     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.
+-->
+<resources>
+    <style name="ButtonConfigurationStyle" parent="android:Widget.Holo.Button.Borderless">
+        <item name="android:padding">8dp</item>
+        <item name="android:textSize">16sp</item>
+        <item name="android:textColor">@color/white</item>
+        <item name="android:drawablePadding">10dp</item>
+        <item name="android:textAllCaps">false</item>
+        <item name="android:gravity">left|center_vertical</item>
+        <item name="android:drawableLeft">@drawable/icn_styles</item>
+    </style>
+</resources>
\ No newline at end of file
diff --git a/wearable/wear/WatchFace/Wearable/src/main/res/values-360dpi/dimens.xml b/wearable/wear/WatchFace/Wearable/src/main/res/values-360dpi/dimens.xml
new file mode 100644
index 0000000..2e8a5ae
--- /dev/null
+++ b/wearable/wear/WatchFace/Wearable/src/main/res/values-360dpi/dimens.xml
@@ -0,0 +1,21 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 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.
+ 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.
+-->
+<resources>
+    <dimen name="activity_config_padding">24dp</dimen>
+    <dimen name="analog_complication_settings_preview_size">180dp</dimen>
+    <dimen name="analog_complication_color_picker_size">70dp</dimen>
+    <dimen name="watch_face_preview_background_padding">16dp</dimen>
+</resources>
diff --git a/wearable/wear/WatchFace/Wearable/src/main/res/values-360dpi/styles.xml b/wearable/wear/WatchFace/Wearable/src/main/res/values-360dpi/styles.xml
new file mode 100644
index 0000000..79cfa93
--- /dev/null
+++ b/wearable/wear/WatchFace/Wearable/src/main/res/values-360dpi/styles.xml
@@ -0,0 +1,27 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+ Copyright (C) 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.
+     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.
+-->
+<resources>
+    <style name="ButtonConfigurationStyle" parent="android:Widget.Holo.Button.Borderless">
+        <item name="android:padding">8dp</item>
+        <item name="android:textSize">16sp</item>
+        <item name="android:textColor">@color/white</item>
+        <item name="android:drawablePadding">10dp</item>
+        <item name="android:textAllCaps">false</item>
+        <item name="android:gravity">left|center_vertical</item>
+        <item name="android:drawableLeft">@drawable/icn_styles</item>
+    </style>
+</resources>
\ No newline at end of file
diff --git a/wearable/wear/WatchFace/Wearable/src/main/res/values-hdpi/dimens.xml b/wearable/wear/WatchFace/Wearable/src/main/res/values-hdpi/dimens.xml
new file mode 100644
index 0000000..8dc1ba6
--- /dev/null
+++ b/wearable/wear/WatchFace/Wearable/src/main/res/values-hdpi/dimens.xml
@@ -0,0 +1,21 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 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.
+ 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.
+-->
+<resources>
+    <dimen name="activity_config_padding">6dp</dimen>
+    <dimen name="analog_complication_settings_preview_size">130dp</dimen>
+    <dimen name="analog_complication_color_picker_size">50dp</dimen>
+    <dimen name="watch_face_preview_background_padding">12dp</dimen>
+</resources>
diff --git a/wearable/wear/WatchFace/Wearable/src/main/res/values-hdpi/styles.xml b/wearable/wear/WatchFace/Wearable/src/main/res/values-hdpi/styles.xml
new file mode 100644
index 0000000..2d2b468
--- /dev/null
+++ b/wearable/wear/WatchFace/Wearable/src/main/res/values-hdpi/styles.xml
@@ -0,0 +1,27 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+ Copyright (C) 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.
+     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.
+-->
+<resources>
+    <style name="ButtonConfigurationStyle" parent="android:Widget.Holo.Button.Borderless">
+        <item name="android:padding">4dp</item>
+        <item name="android:textSize">12sp</item>
+        <item name="android:textColor">@color/white</item>
+        <item name="android:drawablePadding">8dp</item>
+        <item name="android:textAllCaps">false</item>
+        <item name="android:gravity">left|center_vertical</item>
+        <item name="android:drawableLeft">@drawable/icn_styles</item>
+    </style>
+</resources>
\ No newline at end of file
diff --git a/wearable/wear/WatchFace/Wearable/src/main/res/values-xhdpi/dimens.xml b/wearable/wear/WatchFace/Wearable/src/main/res/values-xhdpi/dimens.xml
new file mode 100644
index 0000000..ca2a055
--- /dev/null
+++ b/wearable/wear/WatchFace/Wearable/src/main/res/values-xhdpi/dimens.xml
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 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.
+ 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.
+-->
+<resources>
+    <dimen name="activity_config_padding">18dp</dimen>
+    <dimen name="analog_complication_settings_preview_size">140dp</dimen>
+</resources>
diff --git a/wearable/wear/WatchFace/Wearable/src/main/res/values-xhdpi/styles.xml b/wearable/wear/WatchFace/Wearable/src/main/res/values-xhdpi/styles.xml
new file mode 100644
index 0000000..0f2bd86
--- /dev/null
+++ b/wearable/wear/WatchFace/Wearable/src/main/res/values-xhdpi/styles.xml
@@ -0,0 +1,27 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+ Copyright (C) 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.
+     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.
+-->
+<resources>
+    <style name="ButtonConfigurationStyle" parent="android:Widget.Holo.Button.Borderless">
+        <item name="android:padding">6dp</item>
+        <item name="android:textSize">12sp</item>
+        <item name="android:textColor">@color/white</item>
+        <item name="android:drawablePadding">10dp</item>
+        <item name="android:textAllCaps">false</item>
+        <item name="android:gravity">left|center_vertical</item>
+        <item name="android:drawableLeft">@drawable/icn_styles</item>
+    </style>
+</resources>
\ No newline at end of file
diff --git a/wearable/wear/WatchFace/Wearable/src/main/res/values/dimens.xml b/wearable/wear/WatchFace/Wearable/src/main/res/values/dimens.xml
index ab69db5..007b0ae 100644
--- a/wearable/wear/WatchFace/Wearable/src/main/res/values/dimens.xml
+++ b/wearable/wear/WatchFace/Wearable/src/main/res/values/dimens.xml
@@ -37,7 +37,8 @@
     <dimen name="activity_horizontal_margin">16dp</dimen>
     <dimen name="activity_vertical_margin">16dp</dimen>
 
-    <!-- TODO: 180 H1, 140, H2 -->
+    <dimen name="activity_config_padding">24dp</dimen>
     <dimen name="analog_complication_settings_preview_size">180dp</dimen>
     <dimen name="analog_complication_color_picker_size">70dp</dimen>
+    <dimen name="watch_face_preview_background_padding">16dp</dimen>
 </resources>
diff --git a/wearable/wear/WatchFace/Wearable/src/main/res/values/strings.xml b/wearable/wear/WatchFace/Wearable/src/main/res/values/strings.xml
index ac8ea8b..0bad170 100644
--- a/wearable/wear/WatchFace/Wearable/src/main/res/values/strings.xml
+++ b/wearable/wear/WatchFace/Wearable/src/main/res/values/strings.xml
@@ -18,8 +18,8 @@
 
     <string name="opengl_name">Sample OpenGL</string>
     <string name="interactive_name">Sample Interactive</string>
-    <string name="analog_complication">Sample Analog with Complications</string>
-    <string name="digital_name">Sample Digital</string>
+    <string name="analog_complication">Sample Analog</string>
+    <string name="digital_name">Sample Digital 1.0</string>
 
     <string name="digital_background_color">Background color</string>
     <string name="digital_config_name">Digital watch face configuration</string>
@@ -34,7 +34,7 @@
     <string name="saved_background_color">saved_background_color</string>
     <string name="saved_unread_notifications_pref">saved_unread_notifications</string>
 
-    <!-- Using "\n" to conserve horizontal space in config menu. -->
+    <!-- Use of "\n" is to conserve horizontal space in config menu. -->
     <string name="config_marker_color_label">Marker\nColor</string>
     <string name="config_background_color_label">Background\nColor</string>
     <string name="config_unread_notifications_label">Unread\nNotifications</string>
diff --git a/wearable/wear/WatchFace/template-params.xml b/wearable/wear/WatchFace/template-params.xml
index 10ade0e..41e5703 100644
--- a/wearable/wear/WatchFace/template-params.xml
+++ b/wearable/wear/WatchFace/template-params.xml
@@ -27,11 +27,11 @@
     <targetSdkVersion>25</targetSdkVersion>
     <targetSdkVersionWear>25</targetSdkVersionWear>
 
-    <dependency>com.google.android.support:wearable:2.0.0</dependency>
-    <dependency_wearable>com.android.support:palette-v7:25.1.1</dependency_wearable>
+    <dependency>com.google.android.support:wearable:2.0.2</dependency>
+    <dependency_wearable>com.android.support:palette-v7:25.2.0</dependency_wearable>
 
-    <preview_wearable_support_provided_dependency>com.google.android.wearable:wearable:2.0.1</preview_wearable_support_provided_dependency>
-    <preview_wearable_support_dependency>com.google.android.support:wearable:2.0.2-preview</preview_wearable_support_dependency>
+    <preview_wearable_support_provided_dependency>com.google.android.wearable:wearable:2.0.2</preview_wearable_support_provided_dependency>
+    <preview_wearable_support_dependency>com.google.android.support:wearable:2.0.2</preview_wearable_support_dependency>
 
     <wearable>
         <has_handheld_app>true</has_handheld_app>