android:fix DoricActivity be called externally
This commit is contained in:
parent
bc8e815b05
commit
a386c548ec
@ -5,10 +5,9 @@
|
|||||||
<application>
|
<application>
|
||||||
<activity
|
<activity
|
||||||
android:name="pub.doric.DoricActivity"
|
android:name="pub.doric.DoricActivity"
|
||||||
|
android:exported="false"
|
||||||
android:theme="@style/Theme.Design.Light.NoActionBar">
|
android:theme="@style/Theme.Design.Light.NoActionBar">
|
||||||
<intent-filter>
|
<intent-filter>
|
||||||
<action android:name="android.intent.action.VIEW" />
|
|
||||||
|
|
||||||
<category android:name="android.intent.category.DEFAULT" />
|
<category android:name="android.intent.category.DEFAULT" />
|
||||||
</intent-filter>
|
</intent-filter>
|
||||||
</activity>
|
</activity>
|
||||||
|
@ -16,6 +16,8 @@
|
|||||||
package pub.doric.loader;
|
package pub.doric.loader;
|
||||||
|
|
||||||
|
|
||||||
|
import android.text.TextUtils;
|
||||||
|
|
||||||
import java.util.Collection;
|
import java.util.Collection;
|
||||||
import java.util.HashSet;
|
import java.util.HashSet;
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
@ -53,12 +55,14 @@ public class DoricJSLoaderManager {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public AsyncResult<String> loadJSBundle(String source) {
|
public AsyncResult<String> loadJSBundle(String source) {
|
||||||
|
if (!TextUtils.isEmpty(source)) {
|
||||||
Collection<IDoricJSLoader> jsLoaders = getJSLoaders();
|
Collection<IDoricJSLoader> jsLoaders = getJSLoaders();
|
||||||
for (IDoricJSLoader jsLoader : jsLoaders) {
|
for (IDoricJSLoader jsLoader : jsLoaders) {
|
||||||
if (jsLoader.filter(source)) {
|
if (jsLoader.filter(source)) {
|
||||||
return jsLoader.request(source);
|
return jsLoader.request(source);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
AsyncResult<String> ret = new AsyncResult<>();
|
AsyncResult<String> ret = new AsyncResult<>();
|
||||||
ret.setError(new RuntimeException("Cannot find JS Loader for " + source));
|
ret.setError(new RuntimeException("Cannot find JS Loader for " + source));
|
||||||
return ret;
|
return ret;
|
||||||
|
Reference in New Issue
Block a user