本文整理汇总了Java中com.lody.virtual.helper.utils.ComponentUtils.redirectBroadcastIntent方法的典型用法代码示例。如果您正苦于以下问题:Java ComponentUtils.redirectBroadcastIntent方法的具体用法?Java ComponentUtils.redirectBroadcastIntent怎么用?Java ComponentUtils.redirectBroadcastIntent使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.lody.virtual.helper.utils.ComponentUtils
的用法示例。
在下文中一共展示了ComponentUtils.redirectBroadcastIntent方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: handleIntent
import com.lody.virtual.helper.utils.ComponentUtils; //导入方法依赖的package包/类
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 StubManifest.ENABLE_INNER_SHORTCUT ? handleInstallShortcutIntent(intent) : null;
} else if ("com.android.launcher.action.UNINSTALL_SHORTCUT".equals(action)) {
handleUninstallShortcutIntent(intent);
} else {
return ComponentUtils.redirectBroadcastIntent(intent, VUserHandle.myUserId());
}
return intent;
}
示例2: handleIntent
import com.lody.virtual.helper.utils.ComponentUtils; //导入方法依赖的package包/类
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;
}
示例3: onReceive
import com.lody.virtual.helper.utils.ComponentUtils; //导入方法依赖的package包/类
@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) {
VLog.d("IntentSender", "onReceive's realIntent =" + realIntent + ",extra=" + VLog.toString(realIntent.getExtras()));
Intent newIntent = ComponentUtils.redirectBroadcastIntent(realIntent, userId);
if (newIntent != null) {
context.sendBroadcast(newIntent);
}
}
}
示例4: onReceive
import com.lody.virtual.helper.utils.ComponentUtils; //导入方法依赖的package包/类
@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);
}
}
}
示例5: sendBroadcast
import com.lody.virtual.helper.utils.ComponentUtils; //导入方法依赖的package包/类
public void sendBroadcast(Intent intent, int userId) {
Intent newIntent = ComponentUtils.redirectBroadcastIntent(intent, userId);
if (newIntent != null) {
VirtualCore.get().getContext().sendBroadcast(newIntent);
}
}