This class is used to cope with Activity
| 9 | * This class is used to cope with Activity |
| 10 | */ |
| 11 | public 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 | } |
nothing calls this directly
no outgoing calls
no test coverage detected