Skip to content

Commit

Permalink
fix(activity-container): 添加API23,24引入的类型的假定义,使API22可以正常启动
Browse files Browse the repository at this point in the history
Activity在新版本上添加的新接口带有一些新版本才引入的系统类。这些类在低版本系统上找不到,会导致Crash。通过定义假的类定义,可以使ClassLoader在BootClassLoader找不到类定义时也能找到一个假的定义。由于这些方法在低版本系统上本来就不工作,所以假定义可以满足需求。

Tencent#230
  • Loading branch information
shifujun committed Dec 27, 2019
1 parent f0a0aa6 commit 62cc578
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
package android.app.assist;

//避免API 23以下系统找不到这个类
public interface AssistContent {
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
package android.view;

//避免API 23以下系统找不到这个类
public interface SearchEvent {
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
package java.util.function;

//避免API 24以下系统找不到这个类
public interface Consumer<T> {
}

0 comments on commit 62cc578

Please sign in to comment.