public static void moveTexture( Messenger paramMessenger, String paramString1, String paramString2, int paramInt, float paramFloat1, float paramFloat2, float paramFloat3, long paramLong) { JSONArray localJSONArray = new JSONArray(); float[] arrayOfFloat = {paramFloat1, paramFloat2, paramFloat3}; localJSONArray.put( AnimUtils.createJSONData3D( paramString1 + ":t" + paramInt, "translation", paramString2, arrayOfFloat, (float) paramLong, false)); JSONObject localJSONObject = new JSONObject(); try { localJSONObject.put("new_data", localJSONArray); Bundle localBundle = new Bundle(); localBundle.putString("anim_data", localJSONObject.toString()); Message localMessage = Message.obtain(null, 9); localMessage.setData(localBundle); CircleWidget3DProvider.sendMessage(paramMessenger, localMessage); return; } catch (Exception localException) { while (true) Log.e("Circle", "Exception json" + localException); } }
public static void change2DViewVisibility( Messenger paramMessenger, String paramString, boolean paramBoolean) { Bundle localBundle = new Bundle(); localBundle.putString("visibility_shapes", paramString); localBundle.putBoolean("visibility", paramBoolean); Message localMessage = Message.obtain(null, 17); localMessage.setData(localBundle); CircleWidget3DProvider.sendMessage(paramMessenger, localMessage); }
public static void playFrames( Messenger paramMessenger, int paramInt1, int paramInt2, long paramLong, String paramString) { Message localMessage = Message.obtain(null, 11); Bundle localBundle = new Bundle(); localBundle.putInt("start_frame_index", paramInt1); localBundle.putInt("end_frame_index", paramInt2); localBundle.putLong("frame_anim_duration", paramLong); localBundle.putString("anim_id", paramString); localMessage.setData(localBundle); CircleWidget3DProvider.sendMessage(paramMessenger, localMessage); }
public static void changeVisibility( Messenger paramMessenger, String[] paramArrayOfString, boolean[] paramArrayOfBoolean) { if ((paramArrayOfString != null) && (paramArrayOfBoolean != null)) { if (paramArrayOfString.length != paramArrayOfBoolean.length) Log.e( "Circle", "length different : " + paramArrayOfString.length + " " + paramArrayOfBoolean.length); } else return; Bundle localBundle = new Bundle(); localBundle.putStringArray("visibility_shapes", paramArrayOfString); localBundle.putBooleanArray("visibility", paramArrayOfBoolean); Message localMessage = Message.obtain(null, 10); localMessage.setData(localBundle); CircleWidget3DProvider.sendMessage(paramMessenger, localMessage); }
public static void updateTexture( Messenger paramMessenger, String paramString1, String paramString2, boolean paramBoolean1, boolean paramBoolean2) { Bundle localBundle = new Bundle(); localBundle.putString("shape_name", paramString1); if (paramString2 != null) { localBundle.putString("resource_id_string", paramString2); if (paramBoolean1) localBundle.putBoolean("wrap_s", paramBoolean1); if (paramBoolean2) localBundle.putBoolean("wrap_t", paramBoolean2); Message localMessage = Message.obtain(null, 4); localMessage.setData(localBundle); CircleWidget3DProvider.sendMessage(paramMessenger, localMessage); return; } Log.e("Circle", "No Bitmap or ResourceId for texture"); }
public static void updateTexture( Messenger paramMessenger, String paramString, Bitmap paramBitmap, boolean paramBoolean1, boolean paramBoolean2) { Bundle localBundle = new Bundle(); localBundle.putString("shape_name", paramString); if (paramBitmap != null) { ByteArrayOutputStream localByteArrayOutputStream = new ByteArrayOutputStream(); paramBitmap.compress(Bitmap.CompressFormat.PNG, 100, localByteArrayOutputStream); localBundle.putByteArray("bitmap_stream", localByteArrayOutputStream.toByteArray()); Message localMessage = Message.obtain(null, 4); localMessage.setData(localBundle); CircleWidget3DProvider.sendMessage(paramMessenger, localMessage); return; } Log.e("Circle", "No Bitmap for texture"); }
public static void updatAnimation(Messenger messenger, JSONArray jsonarray) { if (jsonarray == null) { Log.e("Circle", "No anim data"); return; } JSONObject jsonobject = new JSONObject(); Bundle bundle; Message message; try { jsonobject.put("new_data", jsonarray); } catch (Exception exception) { Log.e("Circle", "exception json"); } bundle = new Bundle(); bundle.putString("anim_data", jsonobject.toString()); message = Message.obtain(null, 9); message.setData(bundle); CircleWidget3DProvider.sendMessage(messenger, message); }
public static void prepareCircles(Context paramContext) { CircleBattery.getInstance(paramContext) .prepareCircle(R.layout.battery_circle, CircleConsts.BATTERY_BITMAP_SIZE.intValue()); CircleClock.getInstance(paramContext) .prepareCircle(R.layout.clock_circle, CircleConsts.CLOCK_BITMAP_SIZE.intValue()); CircleWeather.getInstance(paramContext) .prepareCircle(R.layout.weather_circle, CircleConsts.WEATHER_BITMAP_SIZE.intValue()); CircleAlert.getInstance(paramContext) .prepareCircle(R.layout.alert_circle, CircleConsts.CLOCK_BITMAP_SIZE.intValue()); if ((CircleAlert.isAlertDisplayed()) && (CircleAlert.getAlertType() == 2)) { AlertVoicemailMoto localAlertVoicemailMoto = AlertVoicemailMoto.getInstance(paramContext); localAlertVoicemailMoto.retrieveStrings(paramContext); localAlertVoicemailMoto.addItem(null); } AlertMMS.getInstance(paramContext).retrieveStrings(paramContext); if ((CircleWidget3DProvider.isDataServiceAvail()) || (Config.isDeviceDataSupported())) CircleData.getInstance(paramContext) .prepareCircle(R.layout.data_circle, CircleConsts.BATTERY_BITMAP_SIZE.intValue()); }
public static void flipCircle( Messenger messenger, String s, float f, long l, boolean flag, String s1) { float f1; JSONArray jsonarray; float af[]; JSONObject jsonobject; JSONObject jsonobject1; Bundle bundle; Message message; if (flag) f1 = 0.0F; else f1 = 180F; jsonarray = new JSONArray(); af = new float[3]; af[0] = 0.0F; if (f > 0.0F) f1 = -f1; af[1] = f1; af[2] = 0.0F; jsonobject = AnimUtils.createJSONData3D(s, "rotation", af, l, 7, 2.0F); if (s1 != null) try { jsonobject.put("anim_id", s1); } catch (Exception exception1) { Log.e( "Circle", (new StringBuilder()) .append("Exception adding animation ID") .append(exception1) .toString()); } jsonarray.put(jsonobject); jsonobject1 = new JSONObject(); try { jsonobject1.put("new_data", jsonarray); } catch (Exception exception) { Log.e("Circle", (new StringBuilder()).append("Exception json").append(exception).toString()); } bundle = new Bundle(); bundle.putString("anim_data", jsonobject1.toString()); message = Message.obtain(null, 9); message.setData(bundle); CircleWidget3DProvider.sendMessage(messenger, message); }
public static void sendAllTextures() { initCircleInCaseLoadingFirstTime(); playFrames(null, 0, 120, 1L, "start_anim_id"); CircleBattery circlebattery = CircleBattery.getInstance(null); CircleClock circleclock; if (!circlebattery.shouldDisplayDataCircle() && (!Config.isDeviceDataSupported() || !CircleData.isFrontSideIsDataCircle())) circlebattery.updateCircle(); else if (Config.isDeviceDataSupported()) CircleData.getInstance(null).updateCircle(); if (circlebattery.isFlipped()) flipCircle(null, "circle_battery", 300F, false); else if (CircleWidget3DProvider.isDataServiceAvail() && CircleData.isDataCircleEnable() && CircleData.isHasCachedData()) CircleData.getInstance(null).populateData(); circleclock = CircleClock.getInstance(null); circleclock.setAnalogClockState(-1); if (CircleHelp.isHelpDisplayed()) CircleHelp.getInstance(null).restoreHelpState(); circleclock.getAlarmCondition(); circleclock.updateCircle(); if (circleclock.isFlipped()) flipCircle(null, "circle_time", 300F, false); final CircleWeather circleweather = CircleWeather.getInstance(null); CircleAlert.loadLastAlert(); circleweather.setFlipped(false); circleweather.preUpdateCircle(); (new Thread( new Runnable() { public void run() { try { Thread.sleep(1400L); circleweather.postUpdateCircle(true); return; } catch (InterruptedException interruptedexception) { interruptedexception.printStackTrace(); } } })) .start(); }