1
0
mirror of https://github.com/moparisthebest/k-9 synced 2024-11-23 18:02:15 -05:00
This commit is contained in:
Jesse Vincent 2010-10-08 05:34:46 +00:00
parent 945bccd633
commit 7881039cbf

View File

@ -52,7 +52,7 @@ public class MessageProvider extends ContentProvider
{
/**
* The number of milliseconds since Jan. 1, 1970, midnight GMT.
*
*
* <P>Type: INTEGER (long)</P>
*/
String SEND_DATE = "date";
@ -545,7 +545,7 @@ public class MessageProvider extends ContentProvider
@Override
public Cursor query(Uri uri, String[] projection, String selection, String[] selectionArgs,
String sortOrder) throws Exception
String sortOrder) throws Exception
{
mSemaphore.acquire();
@ -564,7 +564,8 @@ public class MessageProvider extends ContentProvider
final WeakReference<MonitoredCursor> weakReference = new WeakReference<MonitoredCursor>(wrapped);
/* make sure the cursor is closed after 30 seconds */
mScheduledPool.schedule(new Runnable() {
mScheduledPool.schedule(new Runnable()
{
@Override
public void run()
@ -582,11 +583,12 @@ public class MessageProvider extends ContentProvider
Log.w(K9.LOG_TAG, "Exception while forcibly closing cursor", e);
}
}
}}, 30, TimeUnit.SECONDS);
}
}, 30, TimeUnit.SECONDS);
return wrapped;
}
}
/**
@ -676,9 +678,11 @@ public class MessageProvider extends ContentProvider
private MessageHelper mMessageHelper;
/* package */ Semaphore mSemaphore = new Semaphore(1);
/* package */
Semaphore mSemaphore = new Semaphore(1);
/* package */ ScheduledExecutorService mScheduledPool = Executors.newScheduledThreadPool(1);
/* package */
ScheduledExecutorService mScheduledPool = Executors.newScheduledThreadPool(1);
@Override
public boolean onCreate()
@ -696,7 +700,8 @@ public class MessageProvider extends ContentProvider
{
Log.v(K9.LOG_TAG, "Registering content resolver notifier");
MessagingController.getInstance(application).addListener(new MessagingListener() {
MessagingController.getInstance(application).addListener(new MessagingListener()
{
@Override
public void searchStats(final AccountStats stats)
{