@Override
        public void handleMessage(Message msg) {
          super.handleMessage(msg);

          switch (msg.what) {
            case DATA_COMPLETE:
              // 界面显示完成,结束进度框
              finishProgress();

              CreateAlbumActivity.this.finish();
              break;
            case DATA_ERROR:
              finishProgress();

              CreateAlbumActivity.this.finish();
              break;
            case DATA_FAULT:
              finishProgress();

              CreateAlbumActivity.this.finish();
              break;
            default:
              finishProgress();

              CreateAlbumActivity.this.finish();
              break;
          }
        }
  @Override
  public void onCreate(Bundle savedInstanceState) {
    // 隐藏标题栏
    requestWindowFeature(Window.FEATURE_NO_TITLE);

    super.onCreate(savedInstanceState);

    // 使用父类的renren对象
    if (renren == null) {
      // renren对象获取失败,无法执行创建相册的操作,直接退出本Activity
      Util.logger("renren object is null, can't create album!");
      showTip("无法创建相册,请稍后重试!");

      finish();
    }
    renren.init(this);

    // 权限验证,如果用户已经登录并且权限满足,则初始化界面,否则结束Activity
    AuthorizationHelper.check(
        renren,
        CreateAlbumActivity.this,
        new String[] {PhotoHelper.CREATE_ALBUM_PERMISSION},
        new RenrenAuthListener() {

          @Override
          public void onRenrenAuthError(RenrenAuthError renrenAuthError) {
            finish();
          }

          @Override
          public void onComplete(Bundle values) {
            initComponents();
          }

          @Override
          public void onCancelLogin() {
            finish();
          }

          @Override
          public void onCancelAuth(Bundle values) {
            finish();
          }
        });
  }