From d008d55f8ab1b1cf6e09aa49170f4b05f66ce764 Mon Sep 17 00:00:00 2001 From: Steve Kondik Date: Fri, 29 May 2015 15:36:36 -0700 Subject: themes: Fix strictmode warnings * Use access() in the native layer instead of constructing a File object, as this will open the file and trigger a strictmode warning any time we hit this code path. Change-Id: I0ee93e84c4b6d4937fc1ab08975e1a4c10a80295 --- core/java/android/content/res/AssetManager.java | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) (limited to 'core/java') diff --git a/core/java/android/content/res/AssetManager.java b/core/java/android/content/res/AssetManager.java index ebbfd09..3329025 100644 --- a/core/java/android/content/res/AssetManager.java +++ b/core/java/android/content/res/AssetManager.java @@ -671,11 +671,7 @@ public final class AssetManager implements AutoCloseable { public final int addCommonOverlayPath(String themeApkPath, String resApkPath, String prefixPath) { synchronized (this) { - if ((new File(themeApkPath).exists()) && (new File(resApkPath).exists())) { - return addCommonOverlayPathNative(themeApkPath, resApkPath, prefixPath); - } - - return 0; + return addCommonOverlayPathNative(themeApkPath, resApkPath, prefixPath); } } -- cgit v1.1