コード例 #1
0
ファイル: Utility.java プロジェクト: Noisyfox/CircleWidget3D
  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();
  }
コード例 #2
0
ファイル: Utility.java プロジェクト: Noisyfox/CircleWidget3D
 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());
 }
コード例 #3
0
ファイル: Utility.java プロジェクト: Noisyfox/CircleWidget3D
 public static void refreshCircles() {
   Context localContext = CircleWidget3DProvider.CircleService.getServiceContext();
   CircleClock.getInstance(localContext).refreshCircleIfNeeded();
   CircleBattery.getInstance(localContext).refreshCircleIfNeeded();
   CircleAlert.getInstance(localContext).refreshCircleIfNeeded();
 }