@Override public Object call(Object who, Method method, Object... args) throws Throwable { Intent intent = (Intent) args[1]; String type = (String) args[2]; intent.setDataAndType(intent.getData(), type); if (VirtualCore.get().getComponentDelegate() != null) { VirtualCore.get().getComponentDelegate().onSendBroadcast(intent); } Intent newIntent = handleIntent(intent); if (newIntent != null) { args[1] = newIntent; } else { return 0; } if (args[7] instanceof String || args[7] instanceof String[]) { // clear the permission args[7] = null; } return method.invoke(who, args); }
@Override public void callActivityOnDestroy(Activity activity) { VirtualCore.get().getComponentDelegate().beforeActivityDestroy(activity); super.callActivityOnDestroy(activity); VirtualCore.get().getComponentDelegate().afterActivityDestroy(activity); }
@Override public void callActivityOnPause(Activity activity) { VirtualCore.get().getComponentDelegate().beforeActivityPause(activity); super.callActivityOnPause(activity); VirtualCore.get().getComponentDelegate().afterActivityPause(activity); }
@Override public void callActivityOnResume(Activity activity) { VirtualCore.get().getComponentDelegate().beforeActivityResume(activity); VActivityManager.get().onActivityResumed(activity); super.callActivityOnResume(activity); VirtualCore.get().getComponentDelegate().afterActivityResume(activity); Intent intent = activity.getIntent(); callUiCallback(intent, true); }
BundleCompat.clearParcelledData(icicle); VirtualCore.get().getComponentDelegate().beforeActivityCreate(activity); IBinder token = mirror.android.app.Activity.mToken.get(activity); ActivityClientRecord r = VActivityManager.get().getActivityRecord(token); VirtualCore.get().getComponentDelegate().afterActivityCreate(activity);
mTempLock = null; VirtualCore.get().getComponentDelegate().beforeApplicationCreate(mInitialApplication); try { mInstrumentation.callApplicationOnCreate(mInitialApplication); VirtualCore.get().getComponentDelegate().afterApplicationCreate(mInitialApplication);
@Override public Object call(Object who, Method method, Object... args) throws Throwable { Intent intent = (Intent) args[1]; String type = (String) args[2]; intent.setDataAndType(intent.getData(), type); if (VirtualCore.get().getComponentDelegate() != null) { VirtualCore.get().getComponentDelegate().onSendBroadcast(intent); } Intent newIntent = handleIntent(intent); if (newIntent != null) { args[1] = newIntent; } else { return 0; } if (args[7] instanceof String || args[7] instanceof String[]) { // clear the permission args[7] = null; } return method.invoke(who, args); }
@Override public Object call(Object who, Method method, Object... args) throws Throwable { Intent intent = (Intent) args[1]; String type = (String) args[2]; intent.setDataAndType(intent.getData(), type); if (VirtualCore.get().getComponentDelegate() != null) { VirtualCore.get().getComponentDelegate().onSendBroadcast(intent); } Intent newIntent = handleIntent(intent); if (newIntent != null) { args[1] = newIntent; } else { return 0; } if (args[7] instanceof String || args[7] instanceof String[]) { // clear the permission args[7] = null; } return method.invoke(who, args); }
@Override public void callActivityOnPause(Activity activity) { VirtualCore.get().getComponentDelegate().beforeActivityPause(activity); super.callActivityOnPause(activity); VirtualCore.get().getComponentDelegate().afterActivityPause(activity); }
@Override public void callActivityOnDestroy(Activity activity) { VirtualCore.get().getComponentDelegate().beforeActivityDestroy(activity); super.callActivityOnDestroy(activity); VirtualCore.get().getComponentDelegate().afterActivityDestroy(activity); }
@Override public void callActivityOnDestroy(Activity activity) { VirtualCore.get().getComponentDelegate().beforeActivityDestroy(activity); super.callActivityOnDestroy(activity); VirtualCore.get().getComponentDelegate().afterActivityDestroy(activity); }
@Override public void callActivityOnPause(Activity activity) { VirtualCore.get().getComponentDelegate().beforeActivityPause(activity); super.callActivityOnPause(activity); VirtualCore.get().getComponentDelegate().afterActivityPause(activity); }
@Override public void callActivityOnResume(Activity activity) { VirtualCore.get().getComponentDelegate().beforeActivityResume(activity); VActivityManager.get().onActivityResumed(activity); super.callActivityOnResume(activity); VirtualCore.get().getComponentDelegate().afterActivityResume(activity); Intent intent = activity.getIntent(); callUiCallback(intent, true); }
@Override public void callActivityOnCreate(Activity activity, Bundle icicle) { if (icicle != null) { BundleCompat.clearParcelledData(icicle); } VirtualCore.get().getComponentDelegate().beforeActivityCreate(activity); IBinder token = mirror.android.app.Activity.mToken.get(activity); ActivityClientRecord r = VActivityManager.get().getActivityRecord(token); if (r != null) { r.activity = activity; } ContextFixer.fixContext(activity); ActivityFixer.fixActivity(activity); ActivityInfo info = null; if (r != null) { info = r.info; } if (info != null) { if (info.theme != 0) { activity.setTheme(info.theme); } if (activity.getRequestedOrientation() == ActivityInfo.SCREEN_ORIENTATION_UNSPECIFIED && info.screenOrientation != ActivityInfo.SCREEN_ORIENTATION_UNSPECIFIED) { activity.setRequestedOrientation(info.screenOrientation); } } super.callActivityOnCreate(activity, icicle); VirtualCore.get().getComponentDelegate().afterActivityCreate(activity); }
@Override public void callActivityOnResume(Activity activity) { VirtualCore.get().getComponentDelegate().beforeActivityResume(activity); VActivityManager.get().onActivityResumed(activity); super.callActivityOnResume(activity); VirtualCore.get().getComponentDelegate().afterActivityResume(activity); Intent intent = activity.getIntent(); if (intent != null) { Bundle bundle = intent.getBundleExtra("_VA_|_sender_"); if (bundle != null) { IBinder callbackToken = BundleCompat.getBinder(bundle, "_VA_|_ui_callback_"); IUiCallback callback = IUiCallback.Stub.asInterface(callbackToken); if (callback != null) { try { callback.onAppOpened(VClientImpl.get().getCurrentPackage(), VUserHandle.myUserId()); } catch (RemoteException e) { e.printStackTrace(); } } } } }
BundleCompat.clearParcelledData(icicle); VirtualCore.get().getComponentDelegate().beforeActivityCreate(activity); IBinder token = mirror.android.app.Activity.mToken.get(activity); ActivityClientRecord r = VActivityManager.get().getActivityRecord(token); VirtualCore.get().getComponentDelegate().afterActivityCreate(activity);
mTempLock = null; VirtualCore.get().getComponentDelegate().beforeApplicationCreate(mInitialApplication); try { mInstrumentation.callApplicationOnCreate(mInitialApplication); VirtualCore.get().getComponentDelegate().afterApplicationCreate(mInitialApplication);
mTempLock = null; VirtualCore.get().getComponentDelegate().beforeApplicationCreate(mInitialApplication); try { mInstrumentation.callApplicationOnCreate(mInitialApplication); VirtualCore.get().getComponentDelegate().afterApplicationCreate(mInitialApplication);