コード例 #1
0
ファイル: JREInfo.java プロジェクト: khatkar/jdd
  /** print out some info about the system and JVM etc. */
  public static void show() {
    Properties prop = System.getProperties();

    JDDConsole.out.println(
        "Using JDD build " + jdd.Version.build + " on " + (new Date()).toString() + "\n");
    JDDConsole.out.print(
        "Using " + prop.getProperty("java.vendor") + " JRE " + prop.getProperty("java.version"));
    String jit = prop.getProperty("java.compiler");
    if (jit != null) JDDConsole.out.print(", " + jit + " JIT in");
    JDDConsole.out.println(" " + prop.getProperty("java.vm.name"));

    JDDConsole.out.println(
        "OS "
            + prop.getProperty("os.name")
            + " on "
            + rt.availableProcessors()
            + " "
            + prop.getProperty("os.arch")
            + " CPU(s)");
    JDDConsole.out.print("Total JRE memory: ");
    Digits.printNumber1024(rt.maxMemory());
    JDDConsole.out.print(", memory currently reserved by the JRE: ");
    Digits.printNumber1024(usedMemory());
    JDDConsole.out.println("\n");
  }
コード例 #2
0
  DigitsApiClient getApiClient(Session session) {
    if (digitsApiClient != null && digitsApiClient.getSession().equals(session)) {
      return digitsApiClient;
    }

    digitsApiClient =
        new DigitsApiClient(
            session,
            twitterCore.getAuthConfig(),
            twitterCore.getSSLSocketFactory(),
            digits.getExecutorService(),
            new DigitsUserAgent(digits.getVersion(), Build.VERSION.RELEASE));

    return digitsApiClient;
  }
コード例 #3
0
 private void startPhoneNumberActivity(Context context, Bundle bundle) {
   final Intent intent =
       new Intent(context, digits.getActivityClassManager().getPhoneNumberActivity());
   intent.putExtras(bundle);
   intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_CLEAR_TOP);
   context.startActivity(intent);
 }
コード例 #4
0
 private void startSignUpWithBundle(AuthCallback callback, Bundle bundle) {
   final DigitsSession session = sessionManager.getActiveSession();
   digits.getScribeService().dailyPing();
   if (session != null && !session.isLoggedOutUser()) {
     callback.success(session, null);
   } else {
     startPhoneNumberActivity(twitterCore.getContext(), bundle);
   }
 }
コード例 #5
0
 @Override
 DigitsActivityDelegate getActivityDelegate() {
   return new ConfirmationCodeActivityDelegate(
       new ConfirmationCodeScribeService(Digits.getInstance().getScribeClient()));
 }
コード例 #6
0
 @Override
 DigitsActivityDelegate getActivityDelegate() {
   return new PhoneNumberActivityDelegate(Digits.getInstance().getDigitsEventCollector());
 }
コード例 #7
0
 DigitsClient() {
   this(Digits.getInstance(), TwitterCore.getInstance(), Digits.getSessionManager(), null);
 }