@Override public void onReceive(Context context, Intent intent) { Intent realIntent = intent.getParcelableExtra("_VA_|_intent_"); int userId = intent.getIntExtra("_VA_|_user_id_", VUserHandle.USER_ALL); if (realIntent != null) { Intent newIntent = ComponentUtils.redirectBroadcastIntent(realIntent, userId); if (newIntent != null) { context.sendBroadcast(newIntent); } } } }
public void sendBroadcast(Intent intent, int userId) { Intent newIntent = ComponentUtils.redirectBroadcastIntent(intent, userId); if (newIntent != null) { VirtualCore.get().getContext().sendBroadcast(newIntent); } }
private Intent handleIntent(final Intent intent) { final String action = intent.getAction(); if ("android.intent.action.CREATE_SHORTCUT".equals(action) || "com.android.launcher.action.INSTALL_SHORTCUT".equals(action)) { return VASettings.ENABLE_INNER_SHORTCUT ? handleInstallShortcutIntent(intent) : null; } else if ("com.android.launcher.action.UNINSTALL_SHORTCUT".equals(action)) { handleUninstallShortcutIntent(intent); } else if (BadgerManager.handleBadger(intent)) { return null; } else if (Intent.ACTION_MEDIA_SCANNER_SCAN_FILE.equals(action)) { // intent send to system, do not modify it's action(may have other same intent) return handleMediaScannerIntent(intent); } else { return ComponentUtils.redirectBroadcastIntent(intent, VUserHandle.myUserId()); } return intent; }
@Override public void onReceive(Context context, Intent intent) { Intent realIntent = intent.getParcelableExtra("_VA_|_intent_"); int userId = intent.getIntExtra("_VA_|_user_id_", VUserHandle.USER_ALL); if (realIntent != null) { Intent newIntent = ComponentUtils.redirectBroadcastIntent(realIntent, userId); if (newIntent != null) { context.sendBroadcast(newIntent); } } } }
@Override public void onReceive(Context context, Intent intent) { Intent realIntent = intent.getParcelableExtra("_VA_|_intent_"); int userId = intent.getIntExtra("_VA_|_user_id_", VUserHandle.USER_ALL); if (realIntent != null) { Intent newIntent = ComponentUtils.redirectBroadcastIntent(realIntent, userId); if (newIntent != null) { context.sendBroadcast(newIntent); } } } }
public void sendBroadcast(Intent intent, int userId) { Intent newIntent = ComponentUtils.redirectBroadcastIntent(intent, userId); if (newIntent != null) { VirtualCore.get().getContext().sendBroadcast(newIntent); } }
public void sendBroadcast(Intent intent, int userId) { Intent newIntent = ComponentUtils.redirectBroadcastIntent(intent, userId); if (newIntent != null) { VirtualCore.get().getContext().sendBroadcast(newIntent); } }
private Intent handleIntent(final Intent intent) { final String action = intent.getAction(); if ("android.intent.action.CREATE_SHORTCUT".equals(action) || "com.android.launcher.action.INSTALL_SHORTCUT".equals(action)) { return VASettings.ENABLE_INNER_SHORTCUT ? handleInstallShortcutIntent(intent) : null; } else if ("com.android.launcher.action.UNINSTALL_SHORTCUT".equals(action)) { handleUninstallShortcutIntent(intent); } else if (BadgerManager.handleBadger(intent)) { return null; } else { return ComponentUtils.redirectBroadcastIntent(intent, VUserHandle.myUserId()); } return intent; }
private Intent handleIntent(final Intent intent) { final String action = intent.getAction(); if ("android.intent.action.CREATE_SHORTCUT".equals(action) || "com.android.launcher.action.INSTALL_SHORTCUT".equals(action)) { return VASettings.ENABLE_INNER_SHORTCUT ? handleInstallShortcutIntent(intent) : null; } else if ("com.android.launcher.action.UNINSTALL_SHORTCUT".equals(action)) { handleUninstallShortcutIntent(intent); } else if (BadgerManager.handleBadger(intent)) { return null; } else if (Intent.ACTION_MEDIA_SCANNER_SCAN_FILE.equals(action)) { // intent send to system, do not modify it's action(may have other same intent) return handleMediaScannerIntent(intent); } else { return ComponentUtils.redirectBroadcastIntent(intent, VUserHandle.myUserId()); } return intent; }