public class

DraftCache

extends Object
java.lang.Object
   ↳ com.android.mms.util.DraftCache

Class Overview

Cache for information about draft messages on conversations.

Summary

Nested Classes
interface DraftCache.OnDraftChangedListener  
Public Methods
synchronized void addOnDraftChangedListener(DraftCache.OnDraftChangedListener l)
void dump()
static DraftCache getInstance()
Get the global instance.
synchronized boolean hasDraft(long threadId)
Returns true if the given thread ID has a draft associated with it, false if not.
static void init(Context context)
Initialize the global instance.
void refresh()
To be called whenever the draft state might have changed.
synchronized void removeOnDraftChangedListener(DraftCache.OnDraftChangedListener l)
synchronized void setDraftState(long threadId, boolean hasDraft)
Updates the has-draft status of a particular thread on a piecemeal basis, to be called when a draft has appeared or disappeared.
[Expand]
Inherited Methods
From class java.lang.Object

Public Methods

public synchronized void addOnDraftChangedListener (DraftCache.OnDraftChangedListener l)

public void dump ()

public static DraftCache getInstance ()

Get the global instance.

public synchronized boolean hasDraft (long threadId)

Returns true if the given thread ID has a draft associated with it, false if not.

public static void init (Context context)

Initialize the global instance. Should call only once.

public void refresh ()

To be called whenever the draft state might have changed. Dispatches work to a thread and returns immediately.

public synchronized void removeOnDraftChangedListener (DraftCache.OnDraftChangedListener l)

public synchronized void setDraftState (long threadId, boolean hasDraft)

Updates the has-draft status of a particular thread on a piecemeal basis, to be called when a draft has appeared or disappeared.