From fd3f062fc215dd0f9ea8e0ec3dc258585a480b39 Mon Sep 17 00:00:00 2001 From: Yorke Lee Date: Fri, 27 Feb 2015 14:45:01 -0800 Subject: Don't hide InCallActivity from recents Show InCallActivity in recents (only during an active call) Bug: 17411752 Change-Id: I2c69c517f7278df78454bf69fce93880bc00997a --- InCallUI/src/com/android/incallui/InCallActivity.java | 13 +++++++++++++ InCallUI/src/com/android/incallui/InCallPresenter.java | 6 +++--- 2 files changed, 16 insertions(+), 3 deletions(-) diff --git a/InCallUI/src/com/android/incallui/InCallActivity.java b/InCallUI/src/com/android/incallui/InCallActivity.java index b4824fb56..acb11b5a7 100644 --- a/InCallUI/src/com/android/incallui/InCallActivity.java +++ b/InCallUI/src/com/android/incallui/InCallActivity.java @@ -24,6 +24,7 @@ import android.app.DialogFragment; import android.app.Fragment; import android.app.FragmentManager; import android.app.FragmentTransaction; +import android.content.Context; import android.content.DialogInterface; import android.content.DialogInterface.OnClickListener; import android.content.DialogInterface.OnCancelListener; @@ -862,4 +863,16 @@ public class InCallActivity extends Activity implements FragmentDisplayManager { CallList.getInstance().onErrorDialogDismissed(); InCallPresenter.getInstance().onDismissDialog(); } + + public void setExcludeFromRecents(boolean exclude) { + ActivityManager am = (ActivityManager)getSystemService(Context.ACTIVITY_SERVICE); + List tasks = am.getAppTasks(); + int taskId = getTaskId(); + for (int i=0; i