Loading packages/SystemUI/src/com/android/systemui/recents/views/RecentsView.java +35 −0 Original line number Diff line number Diff line Loading @@ -18,6 +18,7 @@ package com.android.systemui.recents.views; import android.app.ActivityOptions; import android.app.TaskStackBuilder; import android.content.ComponentName; import android.content.Context; import android.content.Intent; import android.graphics.Bitmap; Loading Loading @@ -332,6 +333,40 @@ public class RecentsView extends FrameLayout implements TaskStackView.TaskStackV setMeasuredDimension(width, height); } public void noUserInteraction() { if (mClearRecents != null) { mClearRecents.setVisibility(View.VISIBLE); } } @Override protected void onAttachedToWindow () { super.onAttachedToWindow(); if (getResources().getBoolean(R.bool.config_showRecentsTopButtons)) { mClearRecents = ((View)getParent()).findViewById(R.id.recents_clear); View taskManagerView = ((View)getParent()).findViewById(R.id.task_manager); if (taskManagerView != null) { taskManagerView.setOnClickListener(new OnClickListener() { @Override public void onClick(View v) { Intent intent = new Intent(); intent.setComponent(new ComponentName( "com.android.systemui", "com.android.systemui.recents.TaskManagerActivity")); getContext().startActivity(intent); } }); } } else { mClearRecents = ((View)getParent()).findViewById(R.id.clear_recents); } mClearRecents.setOnClickListener(new View.OnClickListener() { public void onClick(View v) { dismissAllTasksAnimated(); } }); } /** * This is called with the full size of the window since we are handling our own insets. */ Loading Loading
packages/SystemUI/src/com/android/systemui/recents/views/RecentsView.java +35 −0 Original line number Diff line number Diff line Loading @@ -18,6 +18,7 @@ package com.android.systemui.recents.views; import android.app.ActivityOptions; import android.app.TaskStackBuilder; import android.content.ComponentName; import android.content.Context; import android.content.Intent; import android.graphics.Bitmap; Loading Loading @@ -332,6 +333,40 @@ public class RecentsView extends FrameLayout implements TaskStackView.TaskStackV setMeasuredDimension(width, height); } public void noUserInteraction() { if (mClearRecents != null) { mClearRecents.setVisibility(View.VISIBLE); } } @Override protected void onAttachedToWindow () { super.onAttachedToWindow(); if (getResources().getBoolean(R.bool.config_showRecentsTopButtons)) { mClearRecents = ((View)getParent()).findViewById(R.id.recents_clear); View taskManagerView = ((View)getParent()).findViewById(R.id.task_manager); if (taskManagerView != null) { taskManagerView.setOnClickListener(new OnClickListener() { @Override public void onClick(View v) { Intent intent = new Intent(); intent.setComponent(new ComponentName( "com.android.systemui", "com.android.systemui.recents.TaskManagerActivity")); getContext().startActivity(intent); } }); } } else { mClearRecents = ((View)getParent()).findViewById(R.id.clear_recents); } mClearRecents.setOnClickListener(new View.OnClickListener() { public void onClick(View v) { dismissAllTasksAnimated(); } }); } /** * This is called with the full size of the window since we are handling our own insets. */ Loading