修复 app.viewFile等FileUriExposed异常

This commit is contained in:
hyb1996
2018-10-15 00:59:39 +08:00
parent d1fb2c44f2
commit 1094965eb1
2 changed files with 12 additions and 1 deletions

View File

@@ -61,7 +61,7 @@ public abstract class AutoJs {
mContext = application.getApplicationContext();
mApplication = application;
mUiHandler = new UiHandler(mContext);
mAppUtils = new AppUtils(mContext);
mAppUtils = createAppUtils(mContext);
mGlobalConsole = createGlobalConsole();
mNotificationObserver = new AccessibilityNotificationObserver(mContext);
mAccessibilityInfoProvider = new AccessibilityInfoProvider(mContext.getPackageManager());
@@ -70,6 +70,10 @@ public abstract class AutoJs {
init();
}
protected AppUtils createAppUtils(Context context) {
return new AppUtils(mContext);
}
protected GlobalStardustConsole createGlobalConsole() {
return new GlobalStardustConsole(mUiHandler);
}