Loading libs/WindowManager/Shell/src/com/android/wm/shell/bubbles/BubbleController.java +19 −2 Original line number Diff line number Diff line Loading @@ -1058,6 +1058,11 @@ public class BubbleController implements ConfigurationChangeListener { } } /** Sets the app bubble's taskId which is cached for SysUI. */ public void setAppBubbleTaskId(int taskId) { mImpl.mCachedState.setAppBubbleTaskId(taskId); } /** * Fills the overflow bubbles by loading them from disk. */ Loading Loading @@ -1636,6 +1641,7 @@ public class BubbleController implements ConfigurationChangeListener { private HashSet<String> mSuppressedBubbleKeys = new HashSet<>(); private HashMap<String, String> mSuppressedGroupToNotifKeys = new HashMap<>(); private HashMap<String, Bubble> mShortcutIdToBubble = new HashMap<>(); private int mAppBubbleTaskId = INVALID_TASK_ID; private ArrayList<Bubble> mTmpBubbles = new ArrayList<>(); Loading Loading @@ -1667,12 +1673,22 @@ public class BubbleController implements ConfigurationChangeListener { mSuppressedBubbleKeys.clear(); mShortcutIdToBubble.clear(); mAppBubbleTaskId = INVALID_TASK_ID; for (Bubble b : mTmpBubbles) { mShortcutIdToBubble.put(b.getShortcutId(), b); updateBubbleSuppressedState(b); if (KEY_APP_BUBBLE.equals(b.getKey())) { mAppBubbleTaskId = b.getTaskId(); } } } /** Sets the app bubble's taskId which is cached for SysUI. */ synchronized void setAppBubbleTaskId(int taskId) { mAppBubbleTaskId = taskId; } /** * Updates a specific bubble suppressed state. This is used mainly because notification * suppression changes don't go through the same BubbleData update mechanism. Loading Loading @@ -1722,6 +1738,8 @@ public class BubbleController implements ConfigurationChangeListener { for (String key : mSuppressedGroupToNotifKeys.keySet()) { pw.println(" suppressing: " + key); } pw.print("mAppBubbleTaskId: " + mAppBubbleTaskId); } } Loading Loading @@ -1773,8 +1791,7 @@ public class BubbleController implements ConfigurationChangeListener { @Override public boolean isAppBubbleTaskId(int taskId) { Bubble appBubble = mBubbleData.getBubbleInStackWithKey(KEY_APP_BUBBLE); return appBubble != null && appBubble.getTaskId() == taskId; return mCachedState.mAppBubbleTaskId == taskId; } @Override Loading libs/WindowManager/Shell/src/com/android/wm/shell/bubbles/BubbleExpandedView.java +5 −0 Original line number Diff line number Diff line Loading @@ -278,6 +278,11 @@ public class BubbleExpandedView extends LinearLayout { // The taskId is saved to use for removeTask, preventing appearance in recent tasks. mTaskId = taskId; if (Bubble.KEY_APP_BUBBLE.equals(getBubbleKey())) { // Let the controller know sooner what the taskId is. mController.setAppBubbleTaskId(mTaskId); } // With the task org, the taskAppeared callback will only happen once the task has // already drawn setContentVisibility(true); Loading Loading
libs/WindowManager/Shell/src/com/android/wm/shell/bubbles/BubbleController.java +19 −2 Original line number Diff line number Diff line Loading @@ -1058,6 +1058,11 @@ public class BubbleController implements ConfigurationChangeListener { } } /** Sets the app bubble's taskId which is cached for SysUI. */ public void setAppBubbleTaskId(int taskId) { mImpl.mCachedState.setAppBubbleTaskId(taskId); } /** * Fills the overflow bubbles by loading them from disk. */ Loading Loading @@ -1636,6 +1641,7 @@ public class BubbleController implements ConfigurationChangeListener { private HashSet<String> mSuppressedBubbleKeys = new HashSet<>(); private HashMap<String, String> mSuppressedGroupToNotifKeys = new HashMap<>(); private HashMap<String, Bubble> mShortcutIdToBubble = new HashMap<>(); private int mAppBubbleTaskId = INVALID_TASK_ID; private ArrayList<Bubble> mTmpBubbles = new ArrayList<>(); Loading Loading @@ -1667,12 +1673,22 @@ public class BubbleController implements ConfigurationChangeListener { mSuppressedBubbleKeys.clear(); mShortcutIdToBubble.clear(); mAppBubbleTaskId = INVALID_TASK_ID; for (Bubble b : mTmpBubbles) { mShortcutIdToBubble.put(b.getShortcutId(), b); updateBubbleSuppressedState(b); if (KEY_APP_BUBBLE.equals(b.getKey())) { mAppBubbleTaskId = b.getTaskId(); } } } /** Sets the app bubble's taskId which is cached for SysUI. */ synchronized void setAppBubbleTaskId(int taskId) { mAppBubbleTaskId = taskId; } /** * Updates a specific bubble suppressed state. This is used mainly because notification * suppression changes don't go through the same BubbleData update mechanism. Loading Loading @@ -1722,6 +1738,8 @@ public class BubbleController implements ConfigurationChangeListener { for (String key : mSuppressedGroupToNotifKeys.keySet()) { pw.println(" suppressing: " + key); } pw.print("mAppBubbleTaskId: " + mAppBubbleTaskId); } } Loading Loading @@ -1773,8 +1791,7 @@ public class BubbleController implements ConfigurationChangeListener { @Override public boolean isAppBubbleTaskId(int taskId) { Bubble appBubble = mBubbleData.getBubbleInStackWithKey(KEY_APP_BUBBLE); return appBubble != null && appBubble.getTaskId() == taskId; return mCachedState.mAppBubbleTaskId == taskId; } @Override Loading
libs/WindowManager/Shell/src/com/android/wm/shell/bubbles/BubbleExpandedView.java +5 −0 Original line number Diff line number Diff line Loading @@ -278,6 +278,11 @@ public class BubbleExpandedView extends LinearLayout { // The taskId is saved to use for removeTask, preventing appearance in recent tasks. mTaskId = taskId; if (Bubble.KEY_APP_BUBBLE.equals(getBubbleKey())) { // Let the controller know sooner what the taskId is. mController.setAppBubbleTaskId(mTaskId); } // With the task org, the taskAppeared callback will only happen once the task has // already drawn setContentVisibility(true); Loading