private Intent startActivityProcess(int userId, ActivityRecord sourceRecord, Intent intent, ActivityInfo info) { intent = new Intent(intent); ProcessRecord targetApp = mService.startProcessIfNeedLocked(info.processName, userId, info.packageName); if (targetApp == null) { return null; } Intent targetIntent = new Intent(); targetIntent.setClassName(VirtualCore.get().getHostPkg(), fetchStubActivity(targetApp.vpid, info)); ComponentName component = intent.getComponent(); if (component == null) { component = ComponentUtils.toComponentName(info); } targetIntent.setType(component.flattenToString()); StubActivityRecord saveInstance = new StubActivityRecord(intent, info, sourceRecord != null ? sourceRecord.component : null, userId); saveInstance.saveToIntent(targetIntent); return targetIntent; }
@Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); finish(); Intent intent = getIntent(); StubActivityRecord r = new StubActivityRecord(intent); if (r.intent == null) { return; } r.intent.addFlags(Intent.FLAG_ACTIVITY_FORWARD_RESULT); VActivityManager.get().startActivity(r.intent, r.userId); } }
@Override protected void onCreate(Bundle savedInstanceState) { // The savedInstanceState's classLoader is not exist. super.onCreate(null); finish(); // It seems that we have conflict with the other Android-Plugin-Framework. Intent stubIntent = getIntent(); // Try to acquire the actually component information. StubActivityRecord r = new StubActivityRecord(stubIntent); if (r.intent != null) { if (TextUtils.equals(r.info.processName, VirtualRuntime.getProcessName()) && r.userId == VUserHandle.myUserId()) { // Retry to inject the HCallback to instead of the exist one. InvocationStubManager.getInstance().checkEnv(HCallbackStub.class); Intent intent = r.intent; intent.setExtrasClassLoader(VClientImpl.get().getCurrentApplication().getClassLoader()); startActivity(intent); } else { // Start the target Activity in other process. VActivityManager.get().startActivity(r.intent, r.userId); } } }
private Intent startActivityProcess(int userId, ActivityRecord sourceRecord, Intent intent, ActivityInfo info) { intent = new Intent(intent); ProcessRecord targetApp = mService.startProcessIfNeedLocked(info.processName, userId, info.packageName); if (targetApp == null) { return null; } Intent targetIntent = new Intent(); targetIntent.setClassName(VirtualCore.get().getHostPkg(), fetchStubActivity(targetApp.vpid, info)); ComponentName component = intent.getComponent(); if (component == null) { component = ComponentUtils.toComponentName(info); } targetIntent.setType(component.flattenToString()); StubActivityRecord saveInstance = new StubActivityRecord(intent, info, sourceRecord != null ? sourceRecord.component : null, userId); saveInstance.saveToIntent(targetIntent); return targetIntent; }
StubActivityRecord saveInstance = new StubActivityRecord(stubIntent); if (saveInstance.intent == null) { Log.i(TAG, "save instance intent is null, return");
private Intent startActivityProcess(int userId, ActivityRecord sourceRecord, Intent intent, ActivityInfo info) { intent = new Intent(intent); ProcessRecord targetApp = mService.startProcessIfNeedLocked(info.processName, userId, info.packageName); if (targetApp == null) { return null; } Intent targetIntent = new Intent(); targetIntent.setClassName(VirtualCore.get().getHostPkg(), fetchStubActivity(targetApp.vpid, info)); ComponentName component = intent.getComponent(); if (component == null) { component = ComponentUtils.toComponentName(info); } targetIntent.setType(component.flattenToString()); StubActivityRecord saveInstance = new StubActivityRecord(intent, info, sourceRecord != null ? sourceRecord.component : null, userId); saveInstance.saveToIntent(targetIntent); return targetIntent; }
private boolean handleLaunchActivity(Message msg) { Object r = msg.obj; Intent stubIntent = ActivityThread.ActivityClientRecord.intent.get(r); StubActivityRecord saveInstance = new StubActivityRecord(stubIntent); if (saveInstance.intent == null) { return true;
@Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); finish(); Intent intent = getIntent(); StubActivityRecord r = new StubActivityRecord(intent); if (r.intent == null) { return; } r.intent.addFlags(Intent.FLAG_ACTIVITY_FORWARD_RESULT); VActivityManager.get().startActivity(r.intent, r.userId); } }
@Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); finish(); Intent intent = getIntent(); StubActivityRecord r = new StubActivityRecord(intent); if (r.intent == null) { return; } r.intent.addFlags(Intent.FLAG_ACTIVITY_FORWARD_RESULT); VActivityManager.get().startActivity(r.intent, r.userId); } }
@Override protected void onCreate(Bundle savedInstanceState) { // The savedInstanceState's classLoader is not exist. super.onCreate(null); finish(); // It seems that we have conflict with the other Android-Plugin-Framework. Intent stubIntent = getIntent(); // Try to acquire the actually component information. StubActivityRecord r = new StubActivityRecord(stubIntent); if (r.intent != null) { if (TextUtils.equals(r.info.processName, VirtualRuntime.getProcessName()) && r.userId == VUserHandle.myUserId()) { // Retry to inject the HCallback to instead of the exist one. InvocationStubManager.getInstance().checkEnv(HCallbackStub.class); Intent intent = r.intent; intent.setExtrasClassLoader(VClientImpl.get().getCurrentApplication().getClassLoader()); startActivity(intent); } else { // Start the target Activity in other process. VActivityManager.get().startActivity(r.intent, r.userId); } } }
@Override protected void onCreate(Bundle savedInstanceState) { // The savedInstanceState's classLoader is not exist. super.onCreate(null); finish(); // It seems that we have conflict with the other Android-Plugin-Framework. Intent stubIntent = getIntent(); // Try to acquire the actually component information. StubActivityRecord r = new StubActivityRecord(stubIntent); if (r.intent != null) { if (TextUtils.equals(r.info.processName, VirtualRuntime.getProcessName()) && r.userId == VUserHandle.myUserId()) { // Retry to inject the HCallback to instead of the exist one. InvocationStubManager.getInstance().checkEnv(HCallbackStub.class); Intent intent = r.intent; intent.setExtrasClassLoader(VClientImpl.get().getCurrentApplication().getClassLoader()); startActivity(intent); } else { // Start the target Activity in other process. VActivityManager.get().startActivity(r.intent, r.userId); } } }
private boolean handleLaunchActivity(Message msg) { Object r = msg.obj; Intent stubIntent = ActivityThread.ActivityClientRecord.intent.get(r); StubActivityRecord saveInstance = new StubActivityRecord(stubIntent); if (saveInstance.intent == null) { return true;
private boolean handleLaunchActivity(Message msg) { Object r = msg.obj; Intent stubIntent = ActivityThread.ActivityClientRecord.intent.get(r); StubActivityRecord saveInstance = new StubActivityRecord(stubIntent); if (saveInstance.intent == null) { return true;