修复 ui线程下ui.xxx.on等函数不存在的问题
修复 非ui线程下ui.xxx.on等函数报错的问题 新增 注册ui.xxx支持增加成员 修复 多线程环境没有调用Context.exit()可能造成的内存泄漏
This commit is contained in:
@@ -446,7 +446,9 @@ public class UiGlobalSelector {
|
||||
for (ListFilter filter : mFilters) {
|
||||
str.append(filter.toString()).append(".");
|
||||
}
|
||||
str.deleteCharAt(str.length() - 1);
|
||||
if(str.length() > 0){
|
||||
str.deleteCharAt(str.length() - 1);
|
||||
}
|
||||
return str.toString();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -42,7 +42,7 @@ public class UiObjectCollection {
|
||||
}
|
||||
|
||||
public UiObject[] toArray(){
|
||||
return mNodes.toArray(new UiObject[mNodes.size()]);
|
||||
return mNodes.toArray(new UiObject[0]);
|
||||
}
|
||||
|
||||
public boolean performAction(int action) {
|
||||
|
||||
@@ -60,7 +60,7 @@ public class AccessibilityInfoProvider implements AccessibilityDelegate {
|
||||
return;
|
||||
try {
|
||||
ComponentName componentName = new ComponentName(latestPackageStr, latestClassStr);
|
||||
mLatestActivity = mPackageManager.getActivityInfo(componentName, 0).name;
|
||||
mLatestActivity = mPackageManager.getActivityInfo(componentName, PackageManager.MATCH_DEFAULT_ONLY).name;
|
||||
} catch (PackageManager.NameNotFoundException ignored) {
|
||||
return;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user