/** @param n */ public void setNotification(@Nullable OpenNotification n) { Check.getInstance().isInMainThread(); unregisterNotificationListener(); mNotification = n; registerNotificationListener(); synchronized (NotificationPresenter.getInstance().monitor) { // Update everything updateTitle(); updateTimestamp(); updateSubtitle(); updateMessage(); updateActions(); updateIcons(); } }
public void resume() { Check.getInstance().isInMainThread(); mResumed = true; synchronized (NotificationPresenter.getInstance().monitor) { if (Operator.bitAnd(mPendingUpdates, PENDING_UPDATE_TITLE)) updateTitle(); if (Operator.bitAnd(mPendingUpdates, PENDING_UPDATE_SUBTITLE)) updateSubtitle(); if (Operator.bitAnd(mPendingUpdates, PENDING_UPDATE_TIMESTAMP)) updateTimestamp(); if (Operator.bitAnd(mPendingUpdates, PENDING_UPDATE_MESSAGE)) updateMessage(); if (Operator.bitAnd(mPendingUpdates, PENDING_UPDATE_ACTIONS)) updateActions(); if (Operator.bitAnd(mPendingUpdates, PENDING_UPDATE_ICONS)) updateIcons(); } mPendingUpdates = 0; registerNotificationListener(); }