am df35ac5f: Merge "Remove reference to StatusBarNotification after the value is accessed." into lmp-dev

* commit 'df35ac5fab51383099a2f8e5206202af58ef79bf':
  Remove reference to StatusBarNotification after the value is accessed.
This commit is contained in:
Griff Hazen
2014-09-09 18:42:08 +00:00
committed by Android Git Automerger
2 changed files with 6 additions and 2 deletions

View File

@@ -20,5 +20,6 @@ import android.service.notification.StatusBarNotification;
/** @hide */
interface IStatusBarNotificationHolder {
/** Fetch the held StatusBarNotification. This method should only be called once per Holder */
StatusBarNotification get();
}

View File

@@ -2965,15 +2965,18 @@ public class NotificationManagerService extends SystemService {
*/
private static final class StatusBarNotificationHolder
extends IStatusBarNotificationHolder.Stub {
private final StatusBarNotification mValue;
private StatusBarNotification mValue;
public StatusBarNotificationHolder(StatusBarNotification value) {
mValue = value;
}
/** Get the held value and clear it. This function should only be called once per holder */
@Override
public StatusBarNotification get() {
return mValue;
StatusBarNotification value = mValue;
mValue = null;
return value;
}
}
}