Merge change 22702 into eclair
* changes: run the sync thread at background priority
This commit is contained in:
@@ -85,7 +85,6 @@ public abstract class AbstractThreadedSyncAdapter {
|
|||||||
mSyncThread = new SyncThread(
|
mSyncThread = new SyncThread(
|
||||||
"SyncAdapterThread-" + mNumSyncStarts.incrementAndGet(),
|
"SyncAdapterThread-" + mNumSyncStarts.incrementAndGet(),
|
||||||
syncContextClient, authority, account, extras);
|
syncContextClient, authority, account, extras);
|
||||||
Process.setThreadPriority(Process.THREAD_PRIORITY_BACKGROUND);
|
|
||||||
mSyncThread.start();
|
mSyncThread.start();
|
||||||
alreadyInProgress = false;
|
alreadyInProgress = false;
|
||||||
} else {
|
} else {
|
||||||
@@ -133,6 +132,8 @@ public abstract class AbstractThreadedSyncAdapter {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public void run() {
|
public void run() {
|
||||||
|
Process.setThreadPriority(Process.THREAD_PRIORITY_BACKGROUND);
|
||||||
|
|
||||||
if (isCanceled()) {
|
if (isCanceled()) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user