[Omnient] Creates an AOSP AssistStateManager to dump in TouchInteractionService in AOSP.

Bug: 300101221
Test: manually tested dump, see the NL change for samples.
Flag: INVOKE_OMNI_LPH, DISABLED; ENABLE_LONG_PRESS_NAV_HANDLE, TEAMFOOD.
Change-Id: I1fb03779775cd0c9353abd4f796e9cc7c42f0f96
This commit is contained in:
Becky Qiu
2023-09-20 17:36:44 -07:00
parent 096466ef30
commit 86b6a887d1
3 changed files with 46 additions and 0 deletions

View File

@@ -33,4 +33,6 @@
<string name="taskbar_model_callbacks_factory_class" translatable="false">com.android.launcher3.taskbar.TaskbarModelCallbacksFactory</string>
<string name="assist_state_manager_class" translatable="false"></string>
</resources>

View File

@@ -119,6 +119,7 @@ import com.android.quickstep.inputconsumers.TaskbarUnstashInputConsumer;
import com.android.quickstep.inputconsumers.TrackpadStatusBarInputConsumer;
import com.android.quickstep.util.ActiveGestureLog;
import com.android.quickstep.util.ActiveGestureLog.CompoundString;
import com.android.quickstep.util.AssistStateManager;
import com.android.quickstep.util.AssistUtils;
import com.android.systemui.shared.recents.IOverviewProxy;
import com.android.systemui.shared.recents.ISystemUiProxy;
@@ -1321,6 +1322,8 @@ public class TouchInteractionService extends Service {
createdOverviewActivity.getDeviceProfile().dump(this, "", pw);
}
mTaskbarManager.dumpLogs("", pw);
pw.println("AssistStateManager:");
AssistStateManager.INSTANCE.get(this).dump(" ", pw);
}
private AbsSwipeUpHandler createLauncherSwipeHandler(

View File

@@ -0,0 +1,41 @@
/*
* Copyright (C) 2023 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.android.quickstep.util;
import static com.android.launcher3.util.MainThreadInitializedObject.forOverride;
import com.android.launcher3.R;
import com.android.launcher3.util.MainThreadInitializedObject;
import com.android.launcher3.util.ResourceBasedOverride;
import java.io.PrintWriter;
/** Class to manage Assistant states. */
public class AssistStateManager implements ResourceBasedOverride {
public static final MainThreadInitializedObject<AssistStateManager> INSTANCE =
forOverride(AssistStateManager.class, R.string.assist_state_manager_class);
public AssistStateManager() {}
/** Whether search is available. */
public boolean isSearchAvailable() {
return false;
}
/** Dump states. */
public void dump(String prefix, PrintWriter writer) {}
}