Allow Taskbar stashing for external tests

Moved Taskbar stashing enabling logic to QuickstepTestInformationHandler to allow external tests to use the Taskbar API

Test: TaplTestsTaskbar
Bug: 240129939
Change-Id: I0ede8e4767cbe068328997a3afd51f9d5df2799a
This commit is contained in:
Schneider Victor-tulias
2022-08-12 15:35:55 -07:00
parent 39d9eb819c
commit e64a8cfb20
5 changed files with 90 additions and 89 deletions

View File

@@ -21,10 +21,14 @@ import android.content.ContentValues;
import android.database.Cursor;
import android.net.Uri;
import android.os.Bundle;
import android.util.Log;
import com.android.launcher3.Utilities;
public class TestInformationProvider extends ContentProvider {
private static final String TAG = "TestInformationProvider";
@Override
public boolean onCreate() {
return true;
@@ -60,7 +64,13 @@ public class TestInformationProvider extends ContentProvider {
if (Utilities.IS_RUNNING_IN_TEST_HARNESS) {
TestInformationHandler handler = TestInformationHandler.newInstance(getContext());
handler.init(getContext());
return handler.call(method, arg, extras);
Bundle response = handler.call(method, arg, extras);
if (response == null) {
Log.e(TAG, "Couldn't handle method: " + method + "; current handler="
+ handler.getClass().getSimpleName());
}
return response;
}
return null;
}