-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(core.transform): 识别实现了onReceive方法的类时,排除静态内部类
静态内部类getDeclaredMethod时能获取到父类定义的方法, 但它带有Volatile标志位。
- Loading branch information
Showing
3 changed files
with
35 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
27 changes: 27 additions & 0 deletions
27
projects/sdk/core/transform/src/test/java/test/EggReceiver.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
package test; | ||
|
||
import android.content.BroadcastReceiver; | ||
import android.content.Context; | ||
import android.content.Intent; | ||
|
||
import java.util.List; | ||
|
||
abstract class EggReceiver extends BroadcastReceiver { | ||
List<String> log; | ||
|
||
EggReceiver(List<String> log) { | ||
this.log = log; | ||
} | ||
|
||
@Override | ||
public void onReceive(Context context, Intent intent) { | ||
log.add("EggReceiver onReceive"); | ||
} | ||
|
||
public static class FoxReceiver extends EggReceiver { | ||
FoxReceiver(List<String> log) { | ||
super(log); | ||
} | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters