本文整理匯總了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);
}
}