MCPcopy Create free account
hub / github.com/cinit/TMoe / ActProxyMgr

Class ActProxyMgr

app/src/main/java/cc/ioctl/tmoe/lifecycle/ActProxyMgr.java:11–46  ·  view source on GitHub ↗

This class is used to cope with Activity

Source from the content-addressed store, hash-verified

9 * This class is used to cope with Activity
10 */
11public class ActProxyMgr {
12
13 public static final String STUB_TRANSLUCENT_ACTIVITY = "org.telegram.ui.VoIPPermissionActivity";
14
15 public static final String ACTIVITY_PROXY_INTENT = "Lcc/ioctl/tmoe/lifecycle/ActProxyMgr;->ACTIVITY_PROXY_INTENT";
16
17 private ActProxyMgr() {
18 throw new AssertionError("No instance for you!");
19 }
20
21 // NOTICE: ** If you have created your own package, add it to proguard-rules.pro.**
22
23 public static boolean isModuleProxyActivity(@NonNull String className) {
24 if (TextUtils.isEmpty(className)) {
25 return false;
26 }
27 return className.startsWith("cc.ioctl.tmoe.activity.");
28 }
29
30 public static boolean isModuleBundleClassLoaderRequired(@NonNull String className) {
31 if (!isModuleProxyActivity(className)) {
32 return false;
33 }
34 try {
35 Class<?> clazz = Class.forName(className);
36 return AppCompatActivity.class.isAssignableFrom(clazz);
37 } catch (ClassNotFoundException cnfe) {
38 return false;
39 }
40 }
41
42 public static boolean isWindowTranslucent(Class<?> clazz) {
43 // We can only use the only one proxy activity, where is always being able to set translucent.
44 return clazz != null;
45 }
46}

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected