예제 #1
0
  @Override
  public void handleResult(OperateResult result) {
    AppItem appItem = (AppItem) result.getResultData();
    ATaskMark taskMark = result.getTaskMark();
    if (appItem != null) {
      // ����ظ�����ͬһ������ĸ�Ҫ��Ϣ�Ļ��������滻��ʹ�þ�ֵ
      AppItem oldAppItem = appCahceManager.getAppItemById(appItem.getId());
      if (oldAppItem != null) {
        trackerResult = oldAppItem;

      } else {
        appCahceManager.addAppItemToCache(appItem);
        trackerResult = appItem;
      }

    } else {
      taskMark.setTaskStatus(ATaskMark.HANDLE_ERROR);
    }
  }
예제 #2
0
  @Override
  public void receiveResult(ATaskMark taskMark, ActionException exception, Object trackerResult) {
    // ��ʼ��Ȩ��
    if (taskMark.getTaskStatus() == ATaskMark.HANDLE_OVER) {
      handleInitShowPermissionList();

    } else {
      Toast.makeText(getContext(), getResources().getString(R.string.load_permission_fail), 150)
          .show();
      handleBack();
    }
  }