Binding AllApps synchronously. (Bug 6855061)
- Also ensuring that we restore to the settling page index if it is in motion Change-Id: I9c6760383113f7614f6cb962ab6562b0e7eb7138
This commit is contained in:
@@ -1686,7 +1686,7 @@ public class LauncherModel extends BroadcastReceiver {
|
||||
@SuppressWarnings("unchecked")
|
||||
final ArrayList<ApplicationInfo> list
|
||||
= (ArrayList<ApplicationInfo>) mAllAppsList.data.clone();
|
||||
mHandler.post(new Runnable() {
|
||||
Runnable r = new Runnable() {
|
||||
public void run() {
|
||||
final long t = SystemClock.uptimeMillis();
|
||||
final Callbacks callbacks = tryGetCallbacks(oldCallbacks);
|
||||
@@ -1698,7 +1698,13 @@ public class LauncherModel extends BroadcastReceiver {
|
||||
+ (SystemClock.uptimeMillis()-t) + "ms");
|
||||
}
|
||||
}
|
||||
});
|
||||
};
|
||||
boolean isRunningOnMainThread = !(sWorkerThread.getThreadId() == Process.myTid());
|
||||
if (oldCallbacks.isAllAppsVisible() && isRunningOnMainThread) {
|
||||
r.run();
|
||||
} else {
|
||||
mHandler.post(r);
|
||||
}
|
||||
}
|
||||
|
||||
private void loadAllAppsByBatch() {
|
||||
|
||||
Reference in New Issue
Block a user