@Override public void callActivityOnCreate(Activity activity, Bundle icicle, PersistableBundle persistentState) { if (icicle != null) { BundleCompat.clearParcelledData(icicle); } super.callActivityOnCreate(activity, icicle, persistentState); }
private ProcessRecord performStartProcessLocked(int vuid, int vpid, ApplicationInfo info, String processName) { ProcessRecord app = new ProcessRecord(info, processName, vuid, vpid); Bundle extras = new Bundle(); BundleCompat.putBinder(extras, "_VA_|_binder_", app); extras.putInt("_VA_|_vuid_", vuid); extras.putString("_VA_|_process_", processName); extras.putString("_VA_|_pkg_", info.packageName); Bundle res = ProviderCall.call(VASettings.getStubAuthority(vpid), "_VA_|_init_process_", null, extras); if (res == null) { return null; } int pid = res.getInt("_VA_|_pid_"); IBinder clientBinder = BundleCompat.getBinder(res, "_VA_|_client_"); attachClient(pid, clientBinder); return app; }
@Override public Bundle call(String method, String arg, Bundle extras) { if ("@".equals(method)) { Bundle bundle = new Bundle(); BundleCompat.putBinder(bundle, "_VA_|_binder_", mServiceFetcher); return bundle; } return null; }
public static IUiCallback getUiCallback(Intent intent) { if (intent == null) { return null; } // only for launch intent. if (!Intent.ACTION_MAIN.equals(intent.getAction())) { return null; } try { Bundle bundle = intent.getBundleExtra("_VA_|_sender_"); if (bundle != null) { IBinder uicallbackToken = BundleCompat.getBinder(bundle, "_VA_|_ui_callback_"); return IUiCallback.Stub.asInterface(uicallbackToken); } } catch (Throwable ignored) { } return null; }
public void setUiCallback(Intent intent, IUiCallback callback) { if (callback != null) { Bundle bundle = new Bundle(); BundleCompat.putBinder(bundle, "_VA_|_ui_callback_", callback.asBinder()); intent.putExtra("_VA_|_sender_", bundle); } }
private static IServiceFetcher getServiceFetcher() { if (sFetcher == null || !sFetcher.asBinder().isBinderAlive()) { synchronized (ServiceManagerNative.class) { Context context = VirtualCore.get().getContext(); Bundle response = new ProviderCall.Builder(context, SERVICE_CP_AUTH).methodName("@").call(); if (response != null) { IBinder binder = BundleCompat.getBinder(response, "_VA_|_binder_"); linkBinderDied(binder); sFetcher = IServiceFetcher.Stub.asInterface(binder); } } } return sFetcher; }
private Bundle initProcess(Bundle extras) { ConditionVariable lock = VirtualCore.get().getInitLock(); if (lock != null) { lock.block(); } IBinder token = BundleCompat.getBinder(extras,"_VA_|_binder_"); int vuid = extras.getInt("_VA_|_vuid_"); VClientImpl client = VClientImpl.get(); client.initProcess(token, vuid); Bundle res = new Bundle(); BundleCompat.putBinder(res, "_VA_|_client_", client.asBinder()); res.putInt("_VA_|_pid_", Process.myPid()); return res; }
@Override public Bundle call(String method, String arg, Bundle extras) { if ("@".equals(method)) { Bundle bundle = new Bundle(); BundleCompat.putBinder(bundle, "_VA_|_binder_", mServiceFetcher); return bundle; } return null; }
@Override public void callActivityOnCreate(Activity activity, Bundle icicle) { if (icicle != null) { BundleCompat.clearParcelledData(icicle);
public static IUiCallback getUiCallback(Intent intent) { if (intent == null) { return null; } // only for launch intent. if (!Intent.ACTION_MAIN.equals(intent.getAction())) { return null; } try { Bundle bundle = intent.getBundleExtra("_VA_|_sender_"); if (bundle != null) { IBinder uicallbackToken = BundleCompat.getBinder(bundle, "_VA_|_ui_callback_"); return IUiCallback.Stub.asInterface(uicallbackToken); } } catch (Throwable ignored) { } return null; }
private ProcessRecord performStartProcessLocked(int vuid, int vpid, ApplicationInfo info, String processName) { ProcessRecord app = new ProcessRecord(info, processName, vuid, vpid); Bundle extras = new Bundle(); BundleCompat.putBinder(extras, "_VA_|_binder_", app); extras.putInt("_VA_|_vuid_", vuid); extras.putString("_VA_|_process_", processName); extras.putString("_VA_|_pkg_", info.packageName); Bundle res = ProviderCall.call(VASettings.getStubAuthority(vpid), "_VA_|_init_process_", null, extras); if (res == null) { return null; } int pid = res.getInt("_VA_|_pid_"); IBinder clientBinder = BundleCompat.getBinder(res, "_VA_|_client_"); attachClient(pid, clientBinder); return app; }
@Override public Bundle call(String method, String arg, Bundle extras) { if ("@".equals(method)) { Bundle bundle = new Bundle(); BundleCompat.putBinder(bundle, "_VA_|_binder_", mServiceFetcher); return bundle; } if ("register".equals(method)) { } return null; }
@Override public void callActivityOnCreate(Activity activity, Bundle icicle, PersistableBundle persistentState) { if (icicle != null) { BundleCompat.clearParcelledData(icicle); } super.callActivityOnCreate(activity, icicle, persistentState); }
private static IServiceFetcher getServiceFetcher() { if (sFetcher == null || !sFetcher.asBinder().isBinderAlive()) { synchronized (ServiceManagerNative.class) { Context context = VirtualCore.get().getContext(); Bundle response = new ProviderCall.Builder(context, SERVICE_CP_AUTH).methodName("@").call(); if (response != null) { IBinder binder = BundleCompat.getBinder(response, "_VA_|_binder_"); linkBinderDied(binder); sFetcher = IServiceFetcher.Stub.asInterface(binder); } } } return sFetcher; }
private ProcessRecord performStartProcessLocked(int vuid, int vpid, ApplicationInfo info, String processName) { ProcessRecord app = new ProcessRecord(info, processName, vuid, vpid); Bundle extras = new Bundle(); BundleCompat.putBinder(extras, "_VA_|_binder_", app); extras.putInt("_VA_|_vuid_", vuid); extras.putString("_VA_|_process_", processName); extras.putString("_VA_|_pkg_", info.packageName); Bundle res = ProviderCall.call(VASettings.getStubAuthority(vpid), "_VA_|_init_process_", null, extras); if (res == null) { return null; } int pid = res.getInt("_VA_|_pid_"); IBinder clientBinder = BundleCompat.getBinder(res, "_VA_|_client_"); attachClient(pid, clientBinder); return app; }
public void setUiCallback(Intent intent, IUiCallback callback) { if (callback != null) { Bundle bundle = new Bundle(); BundleCompat.putBinder(bundle, "_VA_|_ui_callback_", callback.asBinder()); intent.putExtra("_VA_|_sender_", bundle); } }
@Override public void callActivityOnCreate(Activity activity, Bundle icicle, PersistableBundle persistentState) { if (icicle != null) { BundleCompat.clearParcelledData(icicle); } super.callActivityOnCreate(activity, icicle, persistentState); }
private static IServiceFetcher getServiceFetcher() { if (sFetcher == null || !sFetcher.asBinder().isBinderAlive()) { synchronized (ServiceManagerNative.class) { Context context = VirtualCore.get().getContext(); Bundle response = new ProviderCall.Builder(context, SERVICE_CP_AUTH).methodName("@").call(); if (response != null) { IBinder binder = BundleCompat.getBinder(response, "_VA_|_binder_"); linkBinderDied(binder); sFetcher = IServiceFetcher.Stub.asInterface(binder); } } } return sFetcher; }
private Bundle initProcess(Bundle extras) { ConditionVariable lock = VirtualCore.get().getInitLock(); if (lock != null) { lock.block(); } IBinder token = BundleCompat.getBinder(extras,"_VA_|_binder_"); int vuid = extras.getInt("_VA_|_vuid_"); VClientImpl client = VClientImpl.get(); client.initProcess(token, vuid); Bundle res = new Bundle(); BundleCompat.putBinder(res, "_VA_|_client_", client.asBinder()); res.putInt("_VA_|_pid_", Process.myPid()); return res; }
public void setUiCallback(Intent intent, IUiCallback callback) { if (callback != null) { Bundle bundle = new Bundle(); BundleCompat.putBinder(bundle, "_VA_|_ui_callback_", callback.asBinder()); intent.putExtra("_VA_|_sender_", bundle); } }