Add some more data to TouchInteractionService dumps
- Dump OverviewComponentObserver (to check if we're using 3P launcher) - Dump current enabled and disabled plugins - Dump all debug FeatureFlags instead of a few handpicked ones Bug: 146174627 Change-Id: Ic8df899433b0e42d0e05eb1c80c87f62d3b936b6
This commit is contained in:
1 parent
f7205c7665
commit
f6dde3966a
4 files changed
+53
-8
No files matched your search
@@ -14,8 +14,12 @@
|
||||
|
||||
package com.android.launcher3.uioverrides.plugins;
|
||||
|
||||
import static android.content.pm.PackageManager.MATCH_DISABLED_COMPONENTS;
|
||||
|
||||
import android.content.ComponentName;
|
||||
import android.content.Context;
|
||||
import android.content.Intent;
|
||||
import android.content.pm.ResolveInfo;
|
||||
|
||||
import com.android.launcher3.util.MainThreadInitializedObject;
|
||||
import com.android.systemui.plugins.Plugin;
|
||||
@@ -24,6 +28,9 @@ import com.android.systemui.shared.plugins.PluginManager;
|
||||
import com.android.systemui.shared.plugins.PluginManagerImpl;
|
||||
import com.android.systemui.shared.plugins.PluginPrefs;
|
||||
|
||||
import java.io.PrintWriter;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Set;
|
||||
|
||||
public class PluginManagerWrapper {
|
||||
@@ -75,4 +82,27 @@ public class PluginManagerWrapper {
|
||||
public static boolean hasPlugins(Context context) {
|
||||
return PluginPrefs.hasPlugins(context);
|
||||
}
|
||||
|
||||
public void dump(PrintWriter pw) {
|
||||
final List<ComponentName> enabledPlugins = new ArrayList<>();
|
||||
final List<ComponentName> disabledPlugins = new ArrayList<>();
|
||||
for (String action : getPluginActions()) {
|
||||
for (ResolveInfo resolveInfo : mContext.getPackageManager().queryIntentServices(
|
||||
new Intent(action), MATCH_DISABLED_COMPONENTS)) {
|
||||
ComponentName installedPlugin = new ComponentName(
|
||||
resolveInfo.serviceInfo.packageName, resolveInfo.serviceInfo.name);
|
||||
if (mPluginEnabler.isEnabled(installedPlugin)) {
|
||||
enabledPlugins.add(installedPlugin);
|
||||
} else {
|
||||
disabledPlugins.add(installedPlugin);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
pw.println("PluginManager:");
|
||||
pw.println(" numEnabledPlugins=" + enabledPlugins.size());
|
||||
pw.println(" numDisabledPlugins=" + disabledPlugins.size());
|
||||
pw.println(" enabledPlugins=" + enabledPlugins);
|
||||
pw.println(" disabledPlugins=" + disabledPlugins);
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user