Update TestProtocol.REQUEST_CLEAR_DATA to properly clear the workspace
Flag: not needed Fixes: 287097473 Test: TaplTestsLauncher3 Change-Id: I980a68dff8b475ce8f7b86284663f697b7bc2b57
This commit is contained in:
1 parent
d2d1942b27
commit
67ca528591
5 files changed
+40
-5
No files matched your search
@@ -188,12 +188,27 @@ public class DebugTestInformationHandler extends TestInformationHandler {
|
||||
return response;
|
||||
}
|
||||
|
||||
case TestProtocol.REQUEST_REINITIALIZE_DATA: {
|
||||
final long identity = Binder.clearCallingIdentity();
|
||||
try {
|
||||
MODEL_EXECUTOR.execute(() -> {
|
||||
LauncherModel model = LauncherAppState.getInstance(mContext).getModel();
|
||||
model.getModelDbController().createEmptyDB();
|
||||
MAIN_EXECUTOR.execute(model::forceReload);
|
||||
});
|
||||
return response;
|
||||
} finally {
|
||||
Binder.restoreCallingIdentity(identity);
|
||||
}
|
||||
}
|
||||
|
||||
case TestProtocol.REQUEST_CLEAR_DATA: {
|
||||
final long identity = Binder.clearCallingIdentity();
|
||||
try {
|
||||
MODEL_EXECUTOR.execute(() -> {
|
||||
LauncherModel model = LauncherAppState.getInstance(mContext).getModel();
|
||||
model.getModelDbController().createEmptyDB();
|
||||
model.getModelDbController().clearEmptyDbFlag();
|
||||
MAIN_EXECUTOR.execute(model::forceReload);
|
||||
});
|
||||
return response;
|
||||
|
||||
Reference in new issue
Block a user