Adds dump method to ModelDelegate.

This allows delegates to include additional data in log dumps.

Bug: 181351828
Test: Checked that data was found in a bug report and
adb shell dumpsys activity com.google.android.apps.nexuslauncher

Change-Id: I7a63430202ff899ac885a544c558e1248d2ce829
This commit is contained in:
Andy Wickham
2021-02-26 12:56:25 -08:00
parent a9cb2fb476
commit bb993c484a
2 changed files with 11 additions and 0 deletions

View File

@@ -27,6 +27,8 @@ import com.android.launcher3.R;
import com.android.launcher3.shortcuts.ShortcutKey;
import com.android.launcher3.util.ResourceBasedOverride;
import java.io.FileDescriptor;
import java.io.PrintWriter;
import java.util.Map;
/**
@@ -89,4 +91,11 @@ public class ModelDelegate implements ResourceBasedOverride {
@WorkerThread
public void destroy() { }
/**
* Add data to a dumpsys request for Launcher (e.g. for bug reports).
*
* @see com.android.launcher3.Launcher#dump(java.lang.String, java.io.FileDescriptor,
* java.io.PrintWriter, java.lang.String[])
**/
public void dump(String prefix, FileDescriptor fd, PrintWriter writer, String[] args) { }
}