mirror of
https://github.com/LawnchairLauncher/lawnchair.git
synced 2026-03-01 00:06:47 +00:00
Adding support for loading workspace in the absence of Launcher.
> LoadWorkspace can be called with a LoaderResult which does not bind anything. > Synchronous bind does not look for a valid page id, and will fallback to the current pageId similar to full load flow Bug: 37616877 Change-Id: If14491dc79c5b85ae1019cc93e4e08759df3387d
This commit is contained in:
@@ -116,11 +116,11 @@ public class LoaderTask implements Runnable {
|
||||
mIconCache = mApp.getIconCache();
|
||||
}
|
||||
|
||||
private synchronized void waitForIdle() {
|
||||
protected synchronized void waitForIdle() {
|
||||
// Wait until the either we're stopped or the other threads are done.
|
||||
// This way we don't start loading all apps until the workspace has settled
|
||||
// down.
|
||||
LooperIdleLock idleLock = new LooperIdleLock(this, Looper.getMainLooper());
|
||||
LooperIdleLock idleLock = mResults.newIdleLock(this);
|
||||
// Just in case mFlushingWorkerThread changes but we aren't woken up,
|
||||
// wait no longer than 1sec at a time
|
||||
while (!mStopped && idleLock.awaitLocked(1000));
|
||||
@@ -202,7 +202,10 @@ public class LoaderTask implements Runnable {
|
||||
|
||||
transaction.commit();
|
||||
} catch (CancellationException e) {
|
||||
// Loader stopped, ignore
|
||||
// Loader stopped, ignore
|
||||
if (DEBUG_LOADERS) {
|
||||
Log.d(TAG, "Loader cancelled", e);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user