コード例 #1
0
ファイル: RhodesActivity.java プロジェクト: stinie/rhodes
  @Override
  public void onServiceConnected(ComponentName name, IBinder service) {
    Log.d(TAG, "Connected to service");
    mRhodesService = ((RhodesService.LocalBinder) service).getService();

    if (!isValidSecurityToken()) {
      Logger.E(TAG, "SECURITY_TOKEN parameter is not valid for this application !");
      getRhodesApplication().exit();
      return;
    }

    ENABLE_LOADING_INDICATION = !RhoConf.getBool("disable_loading_indication");
  }
コード例 #2
0
ファイル: NativeBar.java プロジェクト: heathsmith/rhodes
    public void run() {
      try {
        RhodesService r = RhodesService.getInstance();

        MainView mainView = r.getMainView();
        MainView v = null;

        SimpleMainView smv = null;
        if (mainView instanceof SimpleMainView) {
          smv = (SimpleMainView) mainView;
        }

        switch (type) {
          case NOBAR_TYPE:
            if (smv == null) v = new SimpleMainView(mainView);
            else smv.removeToolbar();
            started = false;
            break;
          case TOOLBAR_TYPE:
            if (smv == null) v = new SimpleMainView(mainView, params);
            else smv.setToolbar(params);
            started = true;
            break;
          case TABBAR_TYPE:
            v = new TabbedMainView(params);
            started = true;
            break;
          default:
            Logger.E(TAG, "Unknown bar type passed: " + type);
        }

        if (v != null) {
          r.setMainView(v);
          if (v instanceof TabbedMainView) {
            // loading of default opened tab should be after TabView insert to real Views tree
            TabbedMainView tmv = (TabbedMainView) v;
            tmv.loadFirstPage();
          }
        }
      } catch (Exception e) {
        reportFail("CreateTask", e);
      }
    }
コード例 #3
0
ファイル: NativeBar.java プロジェクト: heathsmith/rhodes
 private static void reportFail(String name, Exception e) {
   Logger.E(TAG, "Call of \"" + name + "\" failed: " + e.getMessage());
 }