コード例 #1
0
 private void doIntentCityManager() {
   if (WeatherData.getCityInfo(Gl.getCurrentCityIndex()).mShowType
       == com.moji.mjweather.data.CityWeatherInfo.ShowType.ST_UPDATING) {
     Toast.makeText(this, 0x7f0b0041, 0).show();
   } else {
     Gl.setChangedCity(false);
     startActivityForResult(new Intent(this, CityManagerActivity.class), 99);
   }
 }
コード例 #2
0
 private void forFirstRun() {
   if (Gl.getIsFirstRun()) {
     if (!Gl.getAdON()) StatsService.checkAdSwitchAsync();
     StatsUtil.setNextSendTime(false);
     if (PlayerUtil.isDataExpired()) {
       FileUtil.delFile(PlayerUtil.TTS_DATA_BG_PATH);
       Toast.makeText(Gl.Ct(), 0x7f0b0221, 1).show();
     }
   }
 }
コード例 #3
0
 private void cancelUpdateWeather(CityWeatherInfo cityweatherinfo, boolean flag) {
   if (cityweatherinfo == null)
     cityweatherinfo = WeatherData.getCityInfo(Gl.getCurrentCityIndex());
   mUpdateWeather.setImageResource(0x7f02014e);
   isUpdating = false;
   Gl.setIsLocationbyGPS(false);
   if (mWeatherUpdater != null) mWeatherUpdater.cancel();
   if (mUpdateCallbackImpl != null)
     WeatherPublisher.getInstance().unSubscribe(mUpdateCallbackImpl);
   mUpdateLayout.setVisibility(8);
   if (mPublicTextView != null) mPublicTextView.setVisibility(0);
   if (cityweatherinfo.mShowType == com.moji.mjweather.data.CityWeatherInfo.ShowType.ST_UPDATING)
     if (cityweatherinfo.m_lastUpdateTime.length() <= 0)
       cityweatherinfo.mShowType =
           com.moji.mjweather.data.CityWeatherInfo.ShowType.ST_NEED_BE_UPDATE;
     else cityweatherinfo.mShowType = com.moji.mjweather.data.CityWeatherInfo.ShowType.ST_OK;
   if (flag) Toast.makeText(this, 0x7f0b0039, 0).show();
 }