@Override
 public void onReceive(Context context, Intent intent) {
   UserProfile profile =
       intent.getParcelableExtra(Lock.AUTHENTICATION_ACTION_PROFILE_PARAMETER);
   Token token = intent.getParcelableExtra(Lock.AUTHENTICATION_ACTION_TOKEN_PARAMETER);
   startActivity(
       RequestActivity.newIntent(
           MainActivity.this,
           profile.getEmail(),
           token.getIdToken(),
           profile.getPictureURL()));
 }
示例#2
0
  private static SimpleCategoryModel createCategoryModel(List<RequestActivity> list) {
    SimpleCategoryModel model = new SimpleCategoryModel();
    for (int i = 0; i < list.size(); i++) {
      RequestActivity req = list.get(i);

      String strPath = " (" + req.getContextPath() + ")";
      // if (req.getRequestLatency() != null)
      //	model.setValue(req.getRequestId() + strPath, "Request Latency", req.getRequestLatency());
      // if (req.getResponseLatency() != null)
      //	model.setValue(req.getRequestId() + strPath, "Response Latency", req.getResponseLatency());
      if (req.getServerExecution() != null)
        model.setValue(req.getRequestId() + strPath, "Server Execution", req.getServerExecution());
      if (req.getBrowserExecution() != null)
        model.setValue(req.getRequestId() + strPath, "Client Execution", req.getBrowserExecution());
      if (req.getNetworkLatency() != null)
        model.setValue(req.getRequestId() + strPath, "Network Latency", req.getNetworkLatency());
    }
    return model;
  }