shadows/framework/src/main/java/org/robolectric/shadows/ShadowPackageManager.java
private static void setUpPackageStorage(ApplicationInfo applicationInfo) {
    if (applicationInfo.sourceDir == null) {
      applicationInfo.sourceDir = createTempDir(applicationInfo.packageName + "-sourceDir");
    }

    if (applicationInfo.dataDir == null) {
      applicationInfo.dataDir = createTempDir(applicationInfo.packageName + "-dataDir");
    }
    if (applicationInfo.publicSourceDir == null) {
      applicationInfo.publicSourceDir = applicationInfo.sourceDir;
    }
    if (RuntimeEnvironment.getApiLevel() >= N) {
      applicationInfo.credentialProtectedDataDir = createTempDir("userDataDir");
      applicationInfo.deviceProtectedDataDir = createTempDir("deviceDataDir");
    }
  }
private static void setUpPackageStorage(ApplicationInfo applicationInfo) {
    if (applicationInfo.sourceDir == null) {
      applicationInfo.sourceDir = createTempDir(applicationInfo.packageName + "-sourceDir");
    }

    if (applicationInfo.dataDir == null) {
      applicationInfo.dataDir = createTempDir(applicationInfo.packageName + "-dataDir");
    }
    if (applicationInfo.publicSourceDir == null) {
      applicationInfo.publicSourceDir = applicationInfo.sourceDir;
    }
    if (RuntimeEnvironment.getApiLevel() >= N) {
      applicationInfo.credentialProtectedDataDir = createTempDir("userDataDir");
      applicationInfo.deviceProtectedDataDir = createTempDir("deviceDataDir");
    }
  }
TODO(christianw): reconcile with AndroidTestEnvironment.setUpPackageStorage