Skip to content

Commit 6895eef

Browse files
committed
fix(core.manager): API 26保留odex过程
从AOSP源码和API 26虚拟机测试来看,DexClassLoader中new File的逻辑是API 27才去掉的。API 26的odex实际可能不生效。 fix #828
1 parent 50678f5 commit 6895eef

File tree

1 file changed

+2
-2
lines changed
  • projects/sdk/core/manager/src/main/java/com/tencent/shadow/core/manager/installplugin

1 file changed

+2
-2
lines changed

projects/sdk/core/manager/src/main/java/com/tencent/shadow/core/manager/installplugin/ODexBloc.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -31,13 +31,13 @@ public class ODexBloc {
3131
private static ConcurrentHashMap<String, Object> sLocks = new ConcurrentHashMap<>();
3232

3333
/**
34-
* DexClassLoader的optimizedDirectory参数从API 26起就无效了
34+
* DexClassLoader的optimizedDirectory参数从API 27起就无效了
3535
* 此方法统一判断这一特性是否生效
3636
*
3737
* @return <code>true</code>表示ODexBloc还有作用
3838
*/
3939
public static boolean isEffective() {
40-
return Build.VERSION.SDK_INT < Build.VERSION_CODES.O;
40+
return Build.VERSION.SDK_INT < Build.VERSION_CODES.O_MR1;
4141
}
4242

4343
public static void oDexPlugin(File apkFile, File oDexDir, File copiedTagFile) throws InstallPluginException {

0 commit comments

Comments
 (0)