MCPcopy Index your code
hub / github.com/wyouflf/xUtils3 / app

Method app

xutils/src/main/java/org/xutils/x.java:35–50  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

33 }
34
35 public static Application app() {
36 if (Ext.app == null) {
37 try {
38 // 仅在IDE进行布局预览时使用,真机或模拟器不使用MockApplication.
39 @SuppressLint("PrivateApi")
40 Class<?> renderActionClass = Class.forName("com.android.layoutlib.bridge.impl.RenderAction");
41 Method method = renderActionClass.getDeclaredMethod("getCurrentContext");
42 Context context = (Context) method.invoke(null);
43 Ext.app = new MockApplication(context);
44 } catch (Throwable ignored) {
45 throw new RuntimeException("please invoke x.Ext.init(app) on Application#onCreate()"
46 + " and register your Application in manifest.");
47 }
48 }
49 return Ext.app;
50 }
51
52 public static TaskController task() {
53 return Ext.taskController;

Callers 15

ImageLoaderClass · 0.80
FakeImageViewMethod · 0.80
decodeFileWithLockMethod · 0.80
RequestParamsMethod · 0.80
ProcessLockClass · 0.80
tryLockInternalMethod · 0.80
getCacheDirMethod · 0.80
getDensityMethod · 0.80
getScreenWidthMethod · 0.80
getScreenHeightMethod · 0.80
openOrCreateDatabaseMethod · 0.80
getViewMethod · 0.80

Calls 1

invokeMethod · 0.80

Tested by

no test coverage detected