Skip to content

Commit

Permalink
Updates AlwaysOn to latest libraries.
Browse files Browse the repository at this point in the history
  • Loading branch information
Jeremy Walker committed Mar 5, 2020
1 parent c8bfd81 commit e2b8a90
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 14 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.5.3'
}
}

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 12:37:35 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.4.1-all.zip

0 comments on commit e2b8a90

Please sign in to comment.