Moving various common executors to a single location
Change-Id: I44bca49b8adb6fa22c3b48d10f674e42c28d792c
This commit is contained in:
1 parent
4fa6f63ffd
commit
6fe3eec95c
59 files changed
+434
-441
No files matched your search
@@ -15,6 +15,8 @@
|
||||
*/
|
||||
package com.android.launcher3.testing;
|
||||
|
||||
import static com.android.launcher3.util.Executors.MAIN_EXECUTOR;
|
||||
|
||||
import android.content.Context;
|
||||
import android.os.Bundle;
|
||||
|
||||
@@ -23,7 +25,6 @@ import com.android.launcher3.InvariantDeviceProfile;
|
||||
import com.android.launcher3.Launcher;
|
||||
import com.android.launcher3.LauncherAppState;
|
||||
import com.android.launcher3.LauncherState;
|
||||
import com.android.launcher3.MainThreadExecutor;
|
||||
import com.android.launcher3.R;
|
||||
import com.android.launcher3.allapps.AllAppsStore;
|
||||
import com.android.launcher3.util.ResourceBasedOverride;
|
||||
@@ -88,20 +89,20 @@ public class TestInformationHandler implements ResourceBasedOverride {
|
||||
break;
|
||||
|
||||
case TestProtocol.REQUEST_FREEZE_APP_LIST:
|
||||
new MainThreadExecutor().execute(() ->
|
||||
MAIN_EXECUTOR.execute(() ->
|
||||
mLauncher.getAppsView().getAppsStore().enableDeferUpdates(
|
||||
AllAppsStore.DEFER_UPDATES_TEST));
|
||||
break;
|
||||
|
||||
case TestProtocol.REQUEST_UNFREEZE_APP_LIST:
|
||||
new MainThreadExecutor().execute(() ->
|
||||
MAIN_EXECUTOR.execute(() ->
|
||||
mLauncher.getAppsView().getAppsStore().disableDeferUpdates(
|
||||
AllAppsStore.DEFER_UPDATES_TEST));
|
||||
break;
|
||||
|
||||
case TestProtocol.REQUEST_APP_LIST_FREEZE_FLAGS: {
|
||||
try {
|
||||
final int deferUpdatesFlags = new MainThreadExecutor().submit(() ->
|
||||
final int deferUpdatesFlags = MAIN_EXECUTOR.submit(() ->
|
||||
mLauncher.getAppsView().getAppsStore().getDeferUpdatesFlags()).get();
|
||||
response.putInt(TestProtocol.TEST_INFO_RESPONSE_FIELD,
|
||||
deferUpdatesFlags);
|
||||
|
||||
Reference in new issue
Block a user