Improve WMP dumpsys readability.
It's hard enough to read bugreports without having to decipher all of
the various IntDef's littered around; let's go ahead and just translate
them to something readable.
Bug: 65563703
Test: adb shell dumpsys window policy
Change-Id: Iea6cd309eb3411a65e54217fef814a66107a8e31
diff --git a/core/java/android/content/Intent.java b/core/java/android/content/Intent.java
index 08acfb6..c238ffb 100644
--- a/core/java/android/content/Intent.java
+++ b/core/java/android/content/Intent.java
@@ -10071,6 +10071,27 @@
return false;
}
+ /**
+ * Convert the dock state to a human readable format.
+ * @hide
+ */
+ public static String dockStateToString(int dock) {
+ switch (dock) {
+ case EXTRA_DOCK_STATE_HE_DESK:
+ return "EXTRA_DOCK_STATE_HE_DESK";
+ case EXTRA_DOCK_STATE_LE_DESK:
+ return "EXTRA_DOCK_STATE_LE_DESK";
+ case EXTRA_DOCK_STATE_CAR:
+ return "EXTRA_DOCK_STATE_CAR";
+ case EXTRA_DOCK_STATE_DESK:
+ return "EXTRA_DOCK_STATE_DESK";
+ case EXTRA_DOCK_STATE_UNDOCKED:
+ return "EXTRA_DOCK_STATE_UNDOCKED";
+ default:
+ return Integer.toString(dock);
+ }
+ }
+
private static ClipData.Item makeClipItem(ArrayList<Uri> streams, ArrayList<CharSequence> texts,
ArrayList<String> htmlTexts, int which) {
Uri uri = streams != null ? streams.get(which) : null;