WearSpeakerSample: Upgrades to androidx.

Bug: 129548613
Test: Manually tested.
Change-Id: I6e48843d5ad656bc94c8a1da77e2a20b98499796
diff --git a/wearable/wear/WearSpeakerSample/build.gradle b/wearable/wear/WearSpeakerSample/build.gradle
index 6c94f10..011fd35 100644
--- a/wearable/wear/WearSpeakerSample/build.gradle
+++ b/wearable/wear/WearSpeakerSample/build.gradle
@@ -22,7 +22,7 @@
         jcenter()
     }
     dependencies {
-        classpath 'com.android.tools.build:gradle:3.3.0'
+        classpath 'com.android.tools.build:gradle:3.3.2'
 
         // NOTE: Do not place your application dependencies here; they belong
         // in the individual module build.gradle files
diff --git a/wearable/wear/WearSpeakerSample/gradle.properties b/wearable/wear/WearSpeakerSample/gradle.properties
index 1d3591c..915f0e6 100644
--- a/wearable/wear/WearSpeakerSample/gradle.properties
+++ b/wearable/wear/WearSpeakerSample/gradle.properties
@@ -15,4 +15,6 @@
 # When configured, Gradle will run in incubating parallel mode.
 # This option should only be used with decoupled projects. More details, visit
 # http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
-# org.gradle.parallel=true
\ No newline at end of file
+# org.gradle.parallel=true
+android.enableJetifier=true
+android.useAndroidX=true
\ No newline at end of file
diff --git a/wearable/wear/WearSpeakerSample/wear/build.gradle b/wearable/wear/WearSpeakerSample/wear/build.gradle
index 08c92f4..b1557a8 100644
--- a/wearable/wear/WearSpeakerSample/wear/build.gradle
+++ b/wearable/wear/WearSpeakerSample/wear/build.gradle
@@ -18,13 +18,12 @@
 
 
 android {
-    compileSdkVersion 26
-    buildToolsVersion '27.0.3'
+    compileSdkVersion 28
 
     defaultConfig {
         applicationId "com.example.android.wearable.speaker"
         minSdkVersion 23
-        targetSdkVersion 26
+        targetSdkVersion 28
         versionCode 1
         versionName "1.0"
     }
@@ -38,16 +37,16 @@
 
 dependencies {
 
-    implementation 'com.android.support:wear:27.1.1'
-    implementation 'com.android.support:animated-vector-drawable:27.1.1'
-    implementation 'com.android.support:support-media-compat:27.1.1'
+    implementation 'androidx.wear:wear:1.0.0'
+    implementation 'androidx.vectordrawable:vectordrawable-animated:1.0.0'
+    implementation 'androidx.media:media:1.0.1'
 
-    implementation 'com.android.support:percent:27.1.1'
+    implementation 'androidx.percentlayout:percentlayout:1.0.0'
 
-    implementation 'com.google.android.gms:play-services-wearable:15.0.1'
-    implementation 'com.android.support:appcompat-v7:27.1.1'
-    implementation 'com.android.support:support-v4:27.1.1'
+    implementation 'com.google.android.gms:play-services-wearable:16.0.1'
+    implementation 'androidx.appcompat:appcompat:1.0.2'
+    implementation 'androidx.legacy:legacy-support-v4:1.0.0'
 
-    compileOnly 'com.google.android.wearable:wearable:2.3.0'
-    implementation 'com.google.android.support:wearable:2.3.0'
+    compileOnly 'com.google.android.wearable:wearable:2.4.0'
+    implementation 'com.google.android.support:wearable:2.4.0'
 }
diff --git a/wearable/wear/WearSpeakerSample/wear/src/main/java/com/example/android/wearable/speaker/MainActivity.java b/wearable/wear/WearSpeakerSample/wear/src/main/java/com/example/android/wearable/speaker/MainActivity.java
index 72813b4..defe9d1 100644
--- a/wearable/wear/WearSpeakerSample/wear/src/main/java/com/example/android/wearable/speaker/MainActivity.java
+++ b/wearable/wear/WearSpeakerSample/wear/src/main/java/com/example/android/wearable/speaker/MainActivity.java
@@ -26,10 +26,6 @@
 import android.os.Build;
 import android.os.Bundle;
 import android.os.CountDownTimer;
-import android.support.v4.app.ActivityCompat;
-import android.support.v4.app.FragmentActivity;
-import android.support.v4.content.ContextCompat;
-import android.support.wear.ambient.AmbientModeSupport;
 import android.util.Log;
 import android.view.View;
 import android.widget.ImageView;
@@ -37,6 +33,11 @@
 import android.widget.RelativeLayout;
 import android.widget.Toast;
 
+import androidx.core.app.ActivityCompat;
+import androidx.core.content.ContextCompat;
+import androidx.fragment.app.FragmentActivity;
+import androidx.wear.ambient.AmbientModeSupport;
+
 import java.util.concurrent.TimeUnit;
 
 /**