Loading packages/SystemUI/src/com/android/systemui/statusbar/policy/BaseHeadsUpManager.java +12 −3 Original line number Original line Diff line number Diff line Loading @@ -304,14 +304,15 @@ public abstract class BaseHeadsUpManager implements HeadsUpManager { if (!isPinned) { if (!isPinned) { headsUpEntry.mWasUnpinned = true; headsUpEntry.mWasUnpinned = true; } } if (entry.isRowPinned() != isPinned) { if (headsUpEntry.isPinned() != isPinned) { entry.setRowPinned(isPinned); headsUpEntry.setPinned(isPinned); updatePinnedMode(); updatePinnedMode(); if (isPinned && entry.getSbn() != null) { if (isPinned && entry.getSbn() != null) { mUiEventLogger.logWithInstanceId( mUiEventLogger.logWithInstanceId( NotificationPeekEvent.NOTIFICATION_PEEK, entry.getSbn().getUid(), NotificationPeekEvent.NOTIFICATION_PEEK, entry.getSbn().getUid(), entry.getSbn().getPackageName(), entry.getSbn().getInstanceId()); entry.getSbn().getPackageName(), entry.getSbn().getInstanceId()); } } // TODO(b/325936094) convert these listeners to collecting a flow for (OnHeadsUpChangedListener listener : mListeners) { for (OnHeadsUpChangedListener listener : mListeners) { if (isPinned) { if (isPinned) { listener.onHeadsUpPinned(entry); listener.onHeadsUpPinned(entry); Loading Loading @@ -662,6 +663,14 @@ public abstract class BaseHeadsUpManager implements HeadsUpManager { updateEntry(true /* updatePostTime */, "setEntry"); updateEntry(true /* updatePostTime */, "setEntry"); } } public boolean isPinned() { return mEntry != null && mEntry.isRowPinned(); } public void setPinned(boolean pinned) { if (mEntry != null) mEntry.setRowPinned(pinned); } /** /** * Updates an entry's removal time. * Updates an entry's removal time. * @param updatePostTime whether or not to refresh the post time * @param updatePostTime whether or not to refresh the post time Loading Loading
packages/SystemUI/src/com/android/systemui/statusbar/policy/BaseHeadsUpManager.java +12 −3 Original line number Original line Diff line number Diff line Loading @@ -304,14 +304,15 @@ public abstract class BaseHeadsUpManager implements HeadsUpManager { if (!isPinned) { if (!isPinned) { headsUpEntry.mWasUnpinned = true; headsUpEntry.mWasUnpinned = true; } } if (entry.isRowPinned() != isPinned) { if (headsUpEntry.isPinned() != isPinned) { entry.setRowPinned(isPinned); headsUpEntry.setPinned(isPinned); updatePinnedMode(); updatePinnedMode(); if (isPinned && entry.getSbn() != null) { if (isPinned && entry.getSbn() != null) { mUiEventLogger.logWithInstanceId( mUiEventLogger.logWithInstanceId( NotificationPeekEvent.NOTIFICATION_PEEK, entry.getSbn().getUid(), NotificationPeekEvent.NOTIFICATION_PEEK, entry.getSbn().getUid(), entry.getSbn().getPackageName(), entry.getSbn().getInstanceId()); entry.getSbn().getPackageName(), entry.getSbn().getInstanceId()); } } // TODO(b/325936094) convert these listeners to collecting a flow for (OnHeadsUpChangedListener listener : mListeners) { for (OnHeadsUpChangedListener listener : mListeners) { if (isPinned) { if (isPinned) { listener.onHeadsUpPinned(entry); listener.onHeadsUpPinned(entry); Loading Loading @@ -662,6 +663,14 @@ public abstract class BaseHeadsUpManager implements HeadsUpManager { updateEntry(true /* updatePostTime */, "setEntry"); updateEntry(true /* updatePostTime */, "setEntry"); } } public boolean isPinned() { return mEntry != null && mEntry.isRowPinned(); } public void setPinned(boolean pinned) { if (mEntry != null) mEntry.setRowPinned(pinned); } /** /** * Updates an entry's removal time. * Updates an entry's removal time. * @param updatePostTime whether or not to refresh the post time * @param updatePostTime whether or not to refresh the post time Loading