28
28
import android .view .WindowInsets ;
29
29
import android .support .wearable .complications .ComplicationData ;
30
30
import android .support .wearable .watchface .Gles2WatchFaceService ;
31
- import android .support .wearable .watchface .WatchFaceService ;
32
31
import android .support .wearable .watchface .WatchFaceStyle ;
33
- import android .support .wearable .watchface .WatchFaceService .TapType ;
34
32
import android .util .DisplayMetrics ;
35
33
import android .view .MotionEvent ;
36
34
import android .view .SurfaceHolder ;
37
35
import android .view .WindowManager ;
38
36
import processing .core .PApplet ;
39
- import processing .event .MouseEvent ;
40
37
import java .lang .reflect .Method ;
41
38
42
39
import android .graphics .Rect ;
@@ -189,8 +186,8 @@ private void initTapEvents() {
189
186
190
187
private void initComplications () {
191
188
try {
192
- compUpdatedMethod = sketch .getClass ().getMethod ("complicationsUpdated " ,
193
- new Class [] {int .class , ComplicationData .class });
189
+ compUpdatedMethod = sketch .getClass ().getMethod ("onComplicationDataUpdate " ,
190
+ new Class [] {int .class , ComplicationData .class });
194
191
} catch (Exception e ) {
195
192
compUpdatedMethod = null ;
196
193
}
@@ -268,8 +265,7 @@ public void onTouchEvent(MotionEvent event) {
268
265
269
266
270
267
@ Override
271
- public void onTapCommand (
272
- @ TapType int tapType , int x , int y , long eventTime ) {
268
+ public void onTapCommand (@ TapType int tapType , int x , int y , long eventTime ) {
273
269
if (tapCommandMethod != null ) {
274
270
try {
275
271
tapCommandMethod .invoke (tapType , x , y , eventTime );
@@ -280,8 +276,8 @@ public void onTapCommand(
280
276
281
277
282
278
@ Override
283
- public void onComplicationDataUpdate (
284
- int complicationId , ComplicationData complicationData ) {
279
+ public void onComplicationDataUpdate (int complicationId ,
280
+ ComplicationData complicationData ) {
285
281
if (compUpdatedMethod != null ) {
286
282
try {
287
283
compUpdatedMethod .invoke (complicationId , complicationData );
0 commit comments