Skip to content

Commit

Permalink
Merge pull request android#36 from android/update-versions-2
Browse files Browse the repository at this point in the history
Update the rest of samples to use latest libraries and gradle version.
  • Loading branch information
codingjeremy authored Mar 6, 2020
2 parents 6d73503 + 70ddcae commit e46bca1
Show file tree
Hide file tree
Showing 51 changed files with 127 additions and 170 deletions.
2 changes: 1 addition & 1 deletion AlwaysOn/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ In ambient mode, this app follows best practices by keeping most pixels black, a

In addition and most importantly, the app sleeps while in ambient mode for 20 seconds between any updates to conserving battery life (processor allowed to sleep). If you can hold off on updates for a full minute, you can throw away the Handler and just use onUpdateAmbient to save even more battery life.

As always, you will still want to apply the [performance guidelines][3] outlined in the Watch Faces documention to your app.
As always, you will still want to apply the [performance guidelines][3] outlined in the Watch Face documentation to your app.

[1]: http://developer.android.com/reference/android/support/wearable/activity/WearableActivity.html
[2]: https://developer.android.com/training/wearables/watch-faces/designing.html#DesignGuidelines
Expand Down
8 changes: 4 additions & 4 deletions AlwaysOn/Wearable/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ buildscript {
}

dependencies {
classpath 'com.android.tools.build:gradle:3.4.1'
classpath 'com.android.tools.build:gradle:3.6.1'
}
}

Expand All @@ -25,12 +25,12 @@ dependencies {
implementation 'androidx.legacy:legacy-support-v13:1.0.0'


implementation 'com.google.android.gms:play-services-wearable:16.0.1'
implementation 'com.google.android.gms:play-services-wearable:17.0.0'


compileOnly 'com.google.android.wearable:wearable:2.4.0'
compileOnly 'com.google.android.wearable:wearable:2.5.0'

implementation 'com.google.android.support:wearable:2.4.0'
implementation 'com.google.android.support:wearable:2.5.0'

}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -100,13 +100,13 @@ public class MainActivity extends FragmentActivity
private AmbientModeSupport.AmbientController mAmbientController;

/** If the display is low-bit in ambient mode. i.e. it requires anti-aliased fonts. */
boolean mIsLowBitAmbient;
private boolean mIsLowBitAmbient;

/**
* If the display requires burn-in protection in ambient mode, rendered pixels need to be
* intermittently offset to avoid screen burn-in.
*/
boolean mDoBurnInProtection;
private boolean mDoBurnInProtection;

private View mContentView;
private TextView mTimeTextView;
Expand Down Expand Up @@ -385,10 +385,8 @@ public void handleMessage(Message message) {
MainActivity mainActivity = mMainActivityWeakReference.get();

if (mainActivity != null) {
switch (message.what) {
case MSG_UPDATE_SCREEN:
mainActivity.refreshDisplayAndSetNextUpdate();
break;
if (message.what == MSG_UPDATE_SCREEN) {
mainActivity.refreshDisplayAndSetNextUpdate();
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion AlwaysOn/Wearable/src/main/res/layout/activity_main.xml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:padding="10px"
android:padding="10dp"
tools:context=".MainActivity">

<LinearLayout
Expand Down
4 changes: 2 additions & 2 deletions AlwaysOn/gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#Tue Jun 04 13:20:34 PDT 2019
#Thu Mar 05 13:51:46 PST 2020
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-5.1.1-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-5.6.4-all.zip
8 changes: 4 additions & 4 deletions DataLayer/Application/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ buildscript {
}

dependencies {
classpath 'com.android.tools.build:gradle:3.3.2'
classpath 'com.android.tools.build:gradle:3.6.1'
}
}

Expand All @@ -23,13 +23,13 @@ dependencies {
implementation 'androidx.legacy:legacy-support-v4:1.0.0'
implementation 'androidx.legacy:legacy-support-v13:1.0.0'
implementation 'androidx.cardview:cardview:1.0.0'
implementation 'androidx.appcompat:appcompat:1.0.2'
implementation 'androidx.recyclerview:recyclerview:1.0.0'
implementation 'androidx.appcompat:appcompat:1.1.0'
implementation 'androidx.recyclerview:recyclerview:1.1.0'
implementation 'androidx.percentlayout:percentlayout:1.0.0'



implementation 'com.google.android.gms:play-services-wearable:16.0.1'
implementation 'com.google.android.gms:play-services-wearable:17.0.0'


wearApp project(':Wearable')
Expand Down
22 changes: 0 additions & 22 deletions DataLayer/Application/src/main/res/values-v11/template-styles.xml

This file was deleted.

10 changes: 5 additions & 5 deletions DataLayer/Wearable/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ buildscript {
}

dependencies {
classpath 'com.android.tools.build:gradle:3.3.2'
classpath 'com.android.tools.build:gradle:3.6.1'
}
}

Expand All @@ -22,17 +22,17 @@ repositories {
dependencies {

implementation 'androidx.wear:wear:1.0.0'
implementation 'androidx.recyclerview:recyclerview:1.0.0'
implementation 'androidx.recyclerview:recyclerview:1.1.0'
implementation 'androidx.percentlayout:percentlayout:1.0.0'
implementation 'androidx.legacy:legacy-support-v13:1.0.0'


implementation 'com.google.android.gms:play-services-wearable:16.0.1'
implementation 'com.google.android.gms:play-services-wearable:17.0.0'


compileOnly 'com.google.android.wearable:wearable:2.4.0'
compileOnly 'com.google.android.wearable:wearable:2.5.0'

implementation 'com.google.android.support:wearable:2.4.0'
implementation 'com.google.android.support:wearable:2.5.0'

}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -330,7 +330,6 @@ protected void onPostExecute(Bitmap bitmap) {
// Moves RecyclerView to appropriate row to show new image sent over.
if (imageAssetItemIndex > -1) {
mWearableRecyclerView.scrollToPosition(imageAssetItemIndex);
;
}
}
}
Expand Down
3 changes: 2 additions & 1 deletion DataLayer/gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#Thu Mar 05 13:52:01 PST 2020
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-4.10.3-all.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-5.6.4-all.zip
2 changes: 1 addition & 1 deletion JumpingJack/Wearable/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ buildscript {
}

dependencies {
classpath 'com.android.tools.build:gradle:3.5.3'
classpath 'com.android.tools.build:gradle:3.6.1'
}
}

Expand Down
4 changes: 2 additions & 2 deletions JumpingJack/gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#Wed Mar 04 09:06:56 PST 2020
#Thu Mar 05 13:52:33 PST 2020
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-5.4.1-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-5.6.4-all.zip
8 changes: 4 additions & 4 deletions RuntimePermissionsWear/Application/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ buildscript {
}

dependencies {
classpath 'com.android.tools.build:gradle:3.3.2'
classpath 'com.android.tools.build:gradle:3.6.1'
}
}

Expand All @@ -18,10 +18,10 @@ repositories {
}

dependencies {
implementation 'androidx.appcompat:appcompat:1.0.2'
implementation 'com.google.android.material:material:1.0.0'
implementation 'androidx.appcompat:appcompat:1.1.0'
implementation 'com.google.android.material:material:1.1.0'
implementation 'androidx.legacy:legacy-support-v13:1.0.0'
implementation 'com.google.android.gms:play-services-wearable:16.0.1'
implementation 'com.google.android.gms:play-services-wearable:17.0.0'


implementation project(':Shared')
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -203,6 +203,7 @@ public void onComplete(Task<CapabilityInfo> task) {

@Override
protected void onActivityResult(int requestCode, int resultCode, Intent data) {
super.onActivityResult(requestCode, resultCode, data);
Log.d(TAG, "onActivityResult()");
if (requestCode == REQUEST_WEAR_PERMISSION_RATIONALE) {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
tools:context=".MainActivity"
tools:context=".MainPhoneActivity"
tools:deviceIds="wear_square"
android:padding="12dp">

Expand Down

This file was deleted.

2 changes: 1 addition & 1 deletion RuntimePermissionsWear/Shared/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ buildscript {
}

dependencies {
classpath 'com.android.tools.build:gradle:3.3.2'
classpath 'com.android.tools.build:gradle:3.6.1'
}
}

Expand Down
8 changes: 4 additions & 4 deletions RuntimePermissionsWear/Wearable/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ buildscript {
}

dependencies {
classpath 'com.android.tools.build:gradle:3.3.2'
classpath 'com.android.tools.build:gradle:3.6.1'
}
}

Expand All @@ -20,12 +20,12 @@ repositories {
dependencies {
implementation 'androidx.wear:wear:1.0.0'
implementation 'androidx.legacy:legacy-support-v13:1.0.0'
implementation 'com.google.android.gms:play-services-wearable:16.0.1'
implementation 'com.google.android.gms:play-services-wearable:17.0.0'


compileOnly 'com.google.android.wearable:wearable:2.4.0'
compileOnly 'com.google.android.wearable:wearable:2.5.0'

implementation 'com.google.android.support:wearable:2.4.0'
implementation 'com.google.android.support:wearable:2.5.0'

implementation project(':Shared')
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ public class MainWearActivity extends FragmentActivity
@Override
protected void onCreate(Bundle savedInstanceState) {
Log.d(TAG, "onCreate()");
super.onCreate(savedInstanceState);;
super.onCreate(savedInstanceState);

/*
* Since this is a remote permission, we initialize it to false and then check the remote
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#Thu Mar 05 13:52:57 PST 2020
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https://services.gradle.org/distributions/gradle-4.10.3-all.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-5.6.4-all.zip
2 changes: 1 addition & 1 deletion SpeedTracker/Application/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ buildscript {
}

dependencies {
classpath 'com.android.tools.build:gradle:3.5.3'
classpath 'com.android.tools.build:gradle:3.6.1'
}
}

Expand Down
2 changes: 1 addition & 1 deletion SpeedTracker/Shared/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ buildscript {
}

dependencies {
classpath 'com.android.tools.build:gradle:3.5.3'
classpath 'com.android.tools.build:gradle:3.6.1'
}
}

Expand Down
2 changes: 1 addition & 1 deletion SpeedTracker/Wearable/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ buildscript {
}

dependencies {
classpath 'com.android.tools.build:gradle:3.5.3'
classpath 'com.android.tools.build:gradle:3.6.1'
}
}

Expand Down
4 changes: 2 additions & 2 deletions SpeedTracker/gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#Wed Mar 04 09:33:44 PST 2020
#Thu Mar 05 13:53:18 PST 2020
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-5.4.1-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-5.6.4-all.zip
11 changes: 5 additions & 6 deletions WatchFace/Application/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ buildscript {
}

dependencies {
classpath 'com.android.tools.build:gradle:3.3.2'
classpath 'com.android.tools.build:gradle:3.6.1'
}
}

Expand All @@ -23,13 +23,12 @@ dependencies {
implementation 'androidx.legacy:legacy-support-v4:1.0.0'
implementation 'androidx.legacy:legacy-support-v13:1.0.0'
implementation 'androidx.cardview:cardview:1.0.0'
implementation 'androidx.appcompat:appcompat:1.0.2'
implementation 'com.google.android.support:wearable:2.4.0'
implementation 'androidx.appcompat:appcompat:1.1.0'

implementation 'com.google.android.gms:play-services-wearable:17.0.0'


implementation 'com.google.android.gms:play-services-wearable:16.0.1'

implementation 'com.google.android.support:wearable:2.5.0'
compileOnly 'com.google.android.wearable:wearable:2.5.0'

wearApp project(':Wearable')

Expand Down
10 changes: 4 additions & 6 deletions WatchFace/Wearable/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ buildscript {
}

dependencies {
classpath 'com.android.tools.build:gradle:3.3.2'
classpath 'com.android.tools.build:gradle:3.6.1'
}
}

Expand All @@ -26,12 +26,10 @@ dependencies {
implementation 'androidx.legacy:legacy-support-v13:1.0.0'


implementation 'com.google.android.gms:play-services-wearable:16.0.1'
implementation 'com.google.android.gms:play-services-wearable:17.0.0'


compileOnly 'com.google.android.wearable:wearable:2.4.0'

implementation 'com.google.android.support:wearable:2.4.0'
implementation 'com.google.android.support:wearable:2.5.0'
compileOnly 'com.google.android.wearable:wearable:2.5.0'

}

Expand Down
Loading

0 comments on commit e46bca1

Please sign in to comment.