Loading packages/SystemUI/src/com/android/systemui/bubbles/BubbleExpandedView.java +22 −0 Original line number Diff line number Diff line Loading @@ -23,9 +23,11 @@ import static com.android.systemui.bubbles.BubbleDebugConfig.TAG_WITH_CLASS_NAME import android.annotation.Nullable; import android.app.ActivityOptions; import android.app.ActivityTaskManager; import android.app.ActivityView; import android.app.Notification; import android.app.PendingIntent; import android.content.ComponentName; import android.content.Context; import android.content.Intent; import android.content.pm.ApplicationInfo; Loading @@ -37,6 +39,7 @@ import android.graphics.Insets; import android.graphics.Point; import android.graphics.drawable.Drawable; import android.graphics.drawable.ShapeDrawable; import android.os.RemoteException; import android.os.UserHandle; import android.provider.Settings; import android.service.notification.StatusBarNotification; Loading Loading @@ -70,6 +73,8 @@ public class BubbleExpandedView extends LinearLayout implements View.OnClickList private ActivityView mActivityView; private boolean mActivityViewReady = false; private int mTaskId = -1; private PendingIntent mBubbleIntent; private boolean mKeyboardVisible; Loading Loading @@ -108,6 +113,14 @@ public class BubbleExpandedView extends LinearLayout implements View.OnClickList mActivityViewReady = false; } @Override public void onTaskCreated(int taskId, ComponentName componentName) { // Since Bubble ActivityView applies singleTaskDisplay this is // guaranteed to only be called once per ActivityView. The taskId is // saved to use for removeTask, preventing appearance in recent tasks. mTaskId = taskId; } /** * This is only called for tasks on this ActivityView, which is also set to * single-task mode -- meaning never more than one task on this display. If a task Loading Loading @@ -423,7 +436,16 @@ public class BubbleExpandedView extends LinearLayout implements View.OnClickList if (mActivityViewReady) { mActivityView.release(); } if (mTaskId != -1) { try { ActivityTaskManager.getService().removeTask(mTaskId); } catch (RemoteException e) { Log.w(TAG, "Failed to remove taskId " + mTaskId); } mTaskId = -1; } removeView(mActivityView); mActivityView = null; mActivityViewReady = false; } Loading Loading
packages/SystemUI/src/com/android/systemui/bubbles/BubbleExpandedView.java +22 −0 Original line number Diff line number Diff line Loading @@ -23,9 +23,11 @@ import static com.android.systemui.bubbles.BubbleDebugConfig.TAG_WITH_CLASS_NAME import android.annotation.Nullable; import android.app.ActivityOptions; import android.app.ActivityTaskManager; import android.app.ActivityView; import android.app.Notification; import android.app.PendingIntent; import android.content.ComponentName; import android.content.Context; import android.content.Intent; import android.content.pm.ApplicationInfo; Loading @@ -37,6 +39,7 @@ import android.graphics.Insets; import android.graphics.Point; import android.graphics.drawable.Drawable; import android.graphics.drawable.ShapeDrawable; import android.os.RemoteException; import android.os.UserHandle; import android.provider.Settings; import android.service.notification.StatusBarNotification; Loading Loading @@ -70,6 +73,8 @@ public class BubbleExpandedView extends LinearLayout implements View.OnClickList private ActivityView mActivityView; private boolean mActivityViewReady = false; private int mTaskId = -1; private PendingIntent mBubbleIntent; private boolean mKeyboardVisible; Loading Loading @@ -108,6 +113,14 @@ public class BubbleExpandedView extends LinearLayout implements View.OnClickList mActivityViewReady = false; } @Override public void onTaskCreated(int taskId, ComponentName componentName) { // Since Bubble ActivityView applies singleTaskDisplay this is // guaranteed to only be called once per ActivityView. The taskId is // saved to use for removeTask, preventing appearance in recent tasks. mTaskId = taskId; } /** * This is only called for tasks on this ActivityView, which is also set to * single-task mode -- meaning never more than one task on this display. If a task Loading Loading @@ -423,7 +436,16 @@ public class BubbleExpandedView extends LinearLayout implements View.OnClickList if (mActivityViewReady) { mActivityView.release(); } if (mTaskId != -1) { try { ActivityTaskManager.getService().removeTask(mTaskId); } catch (RemoteException e) { Log.w(TAG, "Failed to remove taskId " + mTaskId); } mTaskId = -1; } removeView(mActivityView); mActivityView = null; mActivityViewReady = false; } Loading