コード例 #1
0
 private String updateContent() {
   Log.e(TAG, "update = " + mContentChangedModel.toString());
   if (!TextUtils.isEmpty(mContentChangedModel.episodeId)) {
     return updateEpisode(mContentChangedModel.episodeId);
   }
   if (!TextUtils.isEmpty(mContentChangedModel.sceneId)) {
     return updateScene(mContentChangedModel.sceneId);
   }
   if (!TextUtils.isEmpty(mContentChangedModel.taskId)) {
     return updateTask(mContentChangedModel.taskId);
   }
   return null;
 }
コード例 #2
0
 private String createNewContent() {
   Log.e(TAG, "create new = " + mContentChangedModel.toString());
   if (!TextUtils.isEmpty(mContentChangedModel.taskId)) {
     return createNewTask(mContentChangedModel.taskId, mContentChangedModel.sceneId);
   }
   if (!TextUtils.isEmpty(mContentChangedModel.sceneId)) {
     return createNewScene(mContentChangedModel.sceneId, mContentChangedModel.episodeId);
   }
   if (!TextUtils.isEmpty(mContentChangedModel.episodeId)) {
     return createNewEpisode(mContentChangedModel.episodeId, mContentChangedModel.courseId);
   }
   return null;
 }