taskId, ActivityManager.MOVE_TASK_WITH_HOME, opts); } else { Intent intent = ad.intent; intent.addFlags(Intent.FLAG_ACTIVITY_LAUNCHED_FROM_HISTORY | Intent.FLAG_ACTIVITY_TASK_ON_HOME | Intent.FLAG_ACTIVITY_NEW_TASK); try { context.startActivityAsUser(intent, opts, new UserHandle(UserHandle....
am.moveTaskToFront(ad.taskId, ActivityManager.MOVE_TASK_WITH_HOME, opts); }else { Intent intent = ad.intent; intent.addFlags(Intent.FLAG_ACTIVITY_LAUNCHED_FROM_HISTORY | Intent.FLAG_ACTIVITY_TASK_ON_HOME | Intent.FLAG_ACTIVITY_NEW_TASK); if (DEBUG) Log.v(TAG,"Starting activity " + intent...
{ activtyManager.moveTaskToFront(runningTaskInfo.id, ActivityManager.MOVE_TASK_WITH_HOME);return; } } } 开发者ID:stytooldex,项目名称:stynico,代码行数:17,代码来源:AppCompatDlalog.java 示例3: onPause ▲点赞 2▼ importandroid.app.ActivityManager;//导入方法依赖的package包/类@Overrideprotectedvoidon...
// This is an active task; it should just go to the foreground. am.moveTaskToFront(ad.taskId, ActivityManager.MOVE_TASK_WITH_HOME, opts); } else { Intent intent = ad.intent; intent.addFlags(Intent.FLAG_ACTIVITY_LAUNCHED_FROM_HISTORY | Intent.FLAG_ACTIVITY_TASK_ON_HOME | Intent.FLAG_ACTI...
if (ad.taskId >= 0) { // This is an active task; it should just go to the foreground. am.moveTaskToFront(ad.taskId, ActivityManager.MOVE_TASK_WITH_HOME, opts); } else { Intent intent = ad.intent; intent.addFlags(Intent.FLAG_ACTIVITY_LAUNCHED_FROM_HISTORY ...
MOVE_TASK_WITH_HOME); return; } } //若没有找到运行的task,用户结束了task或被系统释放,则重新启动mainactivity Intent resultIntent = new Intent(context, MainActivity.class); resultIntent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_SINGLE_TOP); context.startActivity(resultIntent);...
am.moveTaskToFront(ad.taskId, ActivityManager.MOVE_TASK_WITH_HO ME, 13.opts);14. else15. Intent intent = ent;16. intent.addFlags(Intent.FLAG_ACTIVITY_LAUNCHED_FRO 8、M_HISTORY17. |Intent.FLAG_ACTIVITY_TASK_ON_HOME18. |Intent.FLAG_ACTIVITY_NEW_TASK);19. try 20. context.startActivityAs...
am.moveTaskToFront(ad.taskId, ActivityManager.MOVE_TASK_WITH_HOME, opts); } else { Intent intent = ad.intent; intent.addFlags(Intent.FLAG_ACTIVITY_LAUNCHED_FROM_HISTORY | Intent.FLAG_ACTIVITY_TASK_ON_HOME | Intent.FLAG_ACTIVITY_NEW_TASK); ...
function _GetMOVE_TASK_NO_USER_ACTION: Integer; function _GetMOVE_TASK_WITH_HOME: Integer; function _GetRECENT_IGNORE_UNAVAILABLE: Integer; function _GetRECENT_WITH_EXCLUDED: Integer; { Methods } function init: JActivityManager; cdecl;
am.moveTaskToFront(taskId, 0); 代码示例来源:origin: stackoverflow.com if (Build.VERSION.SDK_INT >= 11) { ActivityManager am = (ActivityManager) activity.getSystemService(Activity.ACTIVITY_SERVICE); am.moveTaskToFront(MyActivity.MyActivityTaskId, ActivityManager.MOVE_TASK_WITH_HOME); } else { ...