mirror of
https://github.com/LawnchairLauncher/lawnchair.git
synced 2026-02-19 10:48:19 +00:00
Eliminating messages that launcher activity is frozen
They were ultimately caused by killing Launcher process from tests. Now having a test info handler request to clear db. Bug: 152629799 Change-Id: Ia81ddc3e338718c4cff08c7396b9fda1b7091024
This commit is contained in:
@@ -18,6 +18,8 @@ package com.android.launcher3.testing;
|
||||
|
||||
import static android.graphics.Bitmap.Config.ARGB_8888;
|
||||
|
||||
import static com.android.launcher3.util.Executors.MAIN_EXECUTOR;
|
||||
|
||||
import android.content.Context;
|
||||
import android.graphics.Bitmap;
|
||||
import android.graphics.Color;
|
||||
@@ -28,6 +30,9 @@ import android.view.View;
|
||||
|
||||
import androidx.annotation.Keep;
|
||||
|
||||
import com.android.launcher3.LauncherAppState;
|
||||
import com.android.launcher3.LauncherSettings;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collection;
|
||||
import java.util.LinkedList;
|
||||
@@ -165,6 +170,14 @@ public class DebugTestInformationHandler extends TestInformationHandler {
|
||||
return response;
|
||||
}
|
||||
|
||||
case TestProtocol.REQUEST_CLEAR_DATA: {
|
||||
LauncherSettings.Settings.call(mContext.getContentResolver(),
|
||||
LauncherSettings.Settings.METHOD_CREATE_EMPTY_DB);
|
||||
MAIN_EXECUTOR.submit(() ->
|
||||
LauncherAppState.getInstance(mContext).getModel().forceReload());
|
||||
return response;
|
||||
}
|
||||
|
||||
default:
|
||||
return super.call(method);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user