pull/137/head
FongMi 3 years ago
parent ac46c9ecde
commit 659d0be15c
  1. 2
      app/build.gradle
  2. 12
      app/src/main/java/com/fongmi/android/tv/utils/Clock.java

@ -116,7 +116,7 @@ dependencies {
implementation 'com.google.android.material:material:1.9.0'
implementation 'com.google.code.gson:gson:' + gsonVersion
implementation 'com.google.net.cronet:cronet-okhttp:0.1.0'
implementation 'com.google.zxing:core:3.4.1'
implementation 'com.google.zxing:core:3.3.0'
implementation 'com.guolindev.permissionx:permissionx:1.7.1'
implementation 'com.hierynomus:smbj:0.11.5'
implementation 'com.squareup.okhttp3:okhttp:' + okhttpVersion

@ -32,7 +32,7 @@ public class Clock {
}
public static void stop() {
get().release();
if (get().timer != null) get().timer.cancel();
}
public static void start() {
@ -52,6 +52,11 @@ public class Clock {
this.callback = callback;
}
public void release() {
if (timer != null) timer.cancel();
if (callback != null) callback = null;
}
private void run(TextView view) {
timer = new Timer();
timer.schedule(new TimerTask() {
@ -71,11 +76,6 @@ public class Clock {
}
}
public void release() {
if (timer != null) timer.cancel();
if (callback != null) callback = null;
}
public interface Callback {
void onTimeChanged();

Loading…
Cancel
Save