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:
@@ -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();
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user