use of android.app.ActivityManager.AppTask in project android_packages_apps_Settings by LineageOS.
the class ChooseLockGenericTest method finishAllAppTasks.
private void finishAllAppTasks() {
final ActivityManager activityManager = getTargetContext().getSystemService(ActivityManager.class);
final List<AppTask> appTasks = activityManager.getAppTasks();
for (ActivityManager.AppTask task : appTasks) {
task.finishAndRemoveTask();
}
}
use of android.app.ActivityManager.AppTask in project android_packages_apps_Settings by omnirom.
the class ChooseLockGenericTest method finishAllAppTasks.
private void finishAllAppTasks() {
final ActivityManager activityManager = getTargetContext().getSystemService(ActivityManager.class);
final List<AppTask> appTasks = activityManager.getAppTasks();
for (ActivityManager.AppTask task : appTasks) {
task.finishAndRemoveTask();
}
}
use of android.app.ActivityManager.AppTask in project android_packages_apps_Settings by SudaMod.
the class ChooseLockGenericTest method finishAllAppTasks.
private void finishAllAppTasks() {
final ActivityManager activityManager = getTargetContext().getSystemService(ActivityManager.class);
final List<AppTask> appTasks = activityManager.getAppTasks();
for (ActivityManager.AppTask task : appTasks) {
task.finishAndRemoveTask();
}
}
use of android.app.ActivityManager.AppTask in project android_packages_apps_Settings by crdroidandroid.
the class ChooseLockGenericTest method finishAllAppTasks.
private void finishAllAppTasks() {
final ActivityManager activityManager = getTargetContext().getSystemService(ActivityManager.class);
final List<AppTask> appTasks = activityManager.getAppTasks();
for (ActivityManager.AppTask task : appTasks) {
task.finishAndRemoveTask();
}
}
use of android.app.ActivityManager.AppTask in project robolectric by robolectric.
the class ShadowAppTaskTest method startActivity.
@Test
public void startActivity() {
final AppTask appTask = ShadowAppTask.newInstance();
final Activity activity = Robolectric.setupActivity(Activity.class);
final Intent intent = new Intent(Intent.ACTION_VIEW);
appTask.startActivity(activity, intent, null);
assertThat(shadowOf(activity).peekNextStartedActivity()).isNotNull();
assertThat(shadowOf(activity).peekNextStartedActivity().getAction()).isEqualTo(Intent.ACTION_VIEW);
}
Aggregations