mirror of
https://github.com/revanced/smali.git
synced 2025-05-28 11:50:12 +02:00
Fix an unprotected read in SmaliClassReferenceSearcher
This commit is contained in:
parent
1895a4df82
commit
546fdfe3d1
@ -71,14 +71,22 @@ public class SmaliClassReferenceSearcher extends QueryExecutorBase<PsiReference,
|
||||
|
||||
final SingleTargetRequestResultProcessor processor = new SingleTargetRequestResultProcessor(element);
|
||||
|
||||
SearchScope querySearchScope = ApplicationManager.getApplication().runReadAction(
|
||||
new Computable<SearchScope>() {
|
||||
@Override public SearchScope compute() {
|
||||
return queryParameters.getEffectiveSearchScope();
|
||||
}
|
||||
});
|
||||
|
||||
// TODO: is it possible to get a LocalSearchScope here? If so, how to handle it?
|
||||
if (!(queryParameters.getEffectiveSearchScope() instanceof GlobalSearchScope)) {
|
||||
if (!(querySearchScope instanceof GlobalSearchScope)) {
|
||||
assert false;
|
||||
return;
|
||||
}
|
||||
|
||||
PsiSearchHelper helper = PsiSearchHelper.SERVICE.getInstance(element.getProject());
|
||||
// TODO: limit search scope to only smali files. See, e.g. AnnotatedPackagesSearcher.PackageInfoFilesOnly
|
||||
helper.processAllFilesWithWord(smaliType, (GlobalSearchScope)queryParameters.getEffectiveSearchScope(),
|
||||
helper.processAllFilesWithWord(smaliType, (GlobalSearchScope)querySearchScope,
|
||||
new Processor<PsiFile>() {
|
||||
@Override
|
||||
public boolean process(PsiFile file) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user