コード例 #1
0
  static String getPath() {
    String state = Environment.getExternalStorageState();
    String logPath =
        BlockCanaryInternals.getContext() == null
            ? ""
            : BlockCanaryInternals.getContext().providePath();

    if (Environment.MEDIA_MOUNTED.equals(state)
        && Environment.getExternalStorageDirectory().canWrite()) {
      return Environment.getExternalStorageDirectory().getPath() + logPath;
    }
    return Environment.getDataDirectory().getAbsolutePath()
        + BlockCanaryInternals.getContext().providePath();
  }
コード例 #2
0
 long getSampleDelay() {
   return (long) (BlockCanaryInternals.getContext().provideBlockThreshold() * 0.8f);
 }