@Override
  protected void onResumeFragments() {
    super.onResumeFragments();

    // エラーがあった場合には、ダイアログを表示する
    if (mError != null) {
      clearFragmentList();
      mLoadingFragment =
          new DialogFragment() {
            @Override
            public Dialog onCreateDialog(final Bundle savedInstanceState) {
              final AlertDialog.Builder builder = new AlertDialog.Builder(DConnectActivity.this);
              builder.setTitle(R.string.activity_failed_to_get_accesstoken);
              builder.setMessage(mError.toString());
              builder.setCancelable(true);
              mError = null;
              return builder.create();
            }
          };
      mLoadingFragment.show(getSupportFragmentManager(), "test");
    }
  }
  @Override
  protected void onCreate(final Bundle savedInstanceState) {
    if (BuildConfig.DEBUG) {
      AndroidHandler handler = new AndroidHandler("deviceconnect.uiapp");
      handler.setFormatter(new SimpleFormatter());
      handler.setLevel(Level.ALL);
      mLogger.addHandler(handler);
      mLogger.setLevel(Level.ALL);
    } else {
      mLogger.setLevel(Level.OFF);
    }

    mLogger.entering(getClass().getName(), "onCreate", savedInstanceState);
    super.onCreate(savedInstanceState);

    mDConnectClient = new HttpDConnectClient();
    HttpEventManager.INSTANCE.setOrigin(getPackageName());

    (new ServiceDiscoveryTask()).execute();

    mLogger.exiting(getClass().getName(), "onCreate");
  }