Index: base/test/android/javatests/src/org/chromium/base/test/BaseChromiumRunnerCommon.java |
diff --git a/base/test/android/javatests/src/org/chromium/base/test/BaseChromiumRunnerCommon.java b/base/test/android/javatests/src/org/chromium/base/test/BaseChromiumRunnerCommon.java |
index fcda91039be63d15930700cc63a94204b9dda9b0..e5eb2731b7b064f881f23eac7c17fc36719376e8 100644 |
--- a/base/test/android/javatests/src/org/chromium/base/test/BaseChromiumRunnerCommon.java |
+++ b/base/test/android/javatests/src/org/chromium/base/test/BaseChromiumRunnerCommon.java |
@@ -9,6 +9,7 @@ import android.content.ContextWrapper; |
import android.content.SharedPreferences; |
import android.content.pm.ApplicationInfo; |
import android.content.pm.PackageManager; |
+import android.support.v4.content.ContextCompat; |
import org.chromium.android.support.PackageManagerWrapper; |
import org.chromium.base.Log; |
@@ -59,9 +60,8 @@ class BaseChromiumRunnerCommon { |
try { |
ApplicationInfo ai = super.getApplicationInfo(packageName, flags); |
if (packageName.equals(getPackageName())) { |
- ApplicationInfo appAi = |
- super.getApplicationInfo(mAppContext.getPackageName(), flags); |
- File dataDir = new File(appAi.dataDir, "test-multidex"); |
+ File dataDir = new File( |
+ ContextCompat.getCodeCacheDir(mAppContext), "test-multidex"); |
if (!dataDir.exists() && !dataDir.mkdirs()) { |
throw new IOException(String.format( |
"Unable to create test multidex directory \"%s\"", |