Exemplo n.º 1
0
  /** @param context */
  public AppPermssionView(Context context, AppItem appItem) {
    super(context);

    setBackgroundColor(getResources().getColor(R.color.content_bg_color));
    this.appItem = appItem;

    // ���Ȩ���б�
    taskMark = marketContext.getTaskMarkPool().createAppPermissionTaskMark(appItem.getId());
    if (appItem.getPermissionList().size() == 0) {
      addView(R.layout.progressbar_view_l_r);
      marketContext.getServiceWraper().getAppPermissionList(this, taskMark, null, appItem.getId());
    } else {
      handleInitShowPermissionList();
    }
  }
Exemplo n.º 2
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);
    }
  }