2828import android .view .WindowInsets ;
2929import android .support .wearable .complications .ComplicationData ;
3030import android .support .wearable .watchface .Gles2WatchFaceService ;
31- import android .support .wearable .watchface .WatchFaceService ;
3231import android .support .wearable .watchface .WatchFaceStyle ;
33- import android .support .wearable .watchface .WatchFaceService .TapType ;
3432import android .util .DisplayMetrics ;
3533import android .view .MotionEvent ;
3634import android .view .SurfaceHolder ;
3735import android .view .WindowManager ;
3836import processing .core .PApplet ;
39- import processing .event .MouseEvent ;
4037import java .lang .reflect .Method ;
4138
4239import android .graphics .Rect ;
@@ -189,8 +186,8 @@ private void initTapEvents() {
189186
190187 private void initComplications () {
191188 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 });
194191 } catch (Exception e ) {
195192 compUpdatedMethod = null ;
196193 }
@@ -268,8 +265,7 @@ public void onTouchEvent(MotionEvent event) {
268265
269266
270267 @ 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 ) {
273269 if (tapCommandMethod != null ) {
274270 try {
275271 tapCommandMethod .invoke (tapType , x , y , eventTime );
@@ -280,8 +276,8 @@ public void onTapCommand(
280276
281277
282278 @ Override
283- public void onComplicationDataUpdate (
284- int complicationId , ComplicationData complicationData ) {
279+ public void onComplicationDataUpdate (int complicationId ,
280+ ComplicationData complicationData ) {
285281 if (compUpdatedMethod != null ) {
286282 try {
287283 compUpdatedMethod .invoke (complicationId , complicationData );
0 commit comments