use of com.android.launcher3.model.BgDataModel.Callbacks in project android_packages_apps_Launcher3 by AOSPA.
the class LauncherModelHelper method loadModelSync.
/**
* Loads the model in memory synchronously
*/
public void loadModelSync() throws ExecutionException, InterruptedException {
Callbacks mockCb = new Callbacks() {
};
Executors.MAIN_EXECUTOR.submit(() -> getModel().addCallbacksAndLoad(mockCb)).get();
Executors.MODEL_EXECUTOR.submit(() -> {
}).get();
Executors.MAIN_EXECUTOR.submit(() -> {
}).get();
Executors.MAIN_EXECUTOR.submit(() -> getModel().removeCallbacks(mockCb)).get();
}
Aggregations