コード例 #1
0
 @Override
 protected boolean isCompleted() {
   final ChallengeData challengeData =
       ChallengeManager.getInstance().getChallengeData(this.m_challengeId);
   final ChallengeDataModel model =
       ChallengeManager.getInstance().getChallengeDataModel(this.m_challengeId);
   final ChallengeGoalData goalData = model.getGoal(this.m_goalId);
   return challengeData == null || challengeData.getGoalStatus(goalData) == 2;
 }
コード例 #2
0
 @Override
 protected String getDescription() {
   final ChallengeData challengeData =
       ChallengeManager.getInstance().getChallengeData(this.m_challengeId);
   final ChallengeDataModel model =
       ChallengeManager.getInstance().getChallengeDataModel(this.m_challengeId);
   final ChallengeGoalData goalData = model.getGoal(this.m_goalId);
   long score = 0L;
   final String jaugeVarName = goalData.getJaugeVarName();
   if (challengeData != null && jaugeVarName != null && jaugeVarName.length() > 0) {
     score = challengeData.getVarValue(jaugeVarName);
   }
   if (score == 0L || challengeData.isProposed()) {
     return getGoalDescription(model);
   }
   if (challengeData.getGoalStatus(goalData) == 1) {
     final String text = getGoalText(goalData, challengeData, model);
     if (text != null) {
       return text;
     }
   }
   return null;
 }