Merge "Add toString() for SearchIndexableData and SearchIndexableResource"
diff --git a/core/java/android/provider/SearchIndexableData.java b/core/java/android/provider/SearchIndexableData.java
index 05285a3..3f88f18 100644
--- a/core/java/android/provider/SearchIndexableData.java
+++ b/core/java/android/provider/SearchIndexableData.java
@@ -128,4 +128,44 @@
locale = Locale.getDefault();
enabled = true;
}
+
+ @Override
+ public String toString() {
+ final StringBuilder sb = new StringBuilder();
+ sb.append("SearchIndexableData[context: ");
+ sb.append(context);
+ sb.append(", ");
+ sb.append("locale: ");
+ sb.append(locale);
+ sb.append(", ");
+ sb.append("enabled: ");
+ sb.append(enabled);
+ sb.append(", ");
+ sb.append("rank: ");
+ sb.append(rank);
+ sb.append(", ");
+ sb.append("key: ");
+ sb.append(key);
+ sb.append(", ");
+ sb.append("className: ");
+ sb.append(className);
+ sb.append(", ");
+ sb.append("packageName: ");
+ sb.append(packageName);
+ sb.append(", ");
+ sb.append("iconResId: ");
+ sb.append(iconResId);
+ sb.append(", ");
+ sb.append("intentAction: ");
+ sb.append(intentAction);
+ sb.append(", ");
+ sb.append("intentTargetPackage: ");
+ sb.append(intentTargetPackage);
+ sb.append(", ");
+ sb.append("intentTargetClass: ");
+ sb.append(intentTargetClass);
+ sb.append("]");
+
+ return sb.toString();
+ }
}
diff --git a/core/java/android/provider/SearchIndexableResource.java b/core/java/android/provider/SearchIndexableResource.java
index ba3bd4f..bf33c65 100644
--- a/core/java/android/provider/SearchIndexableResource.java
+++ b/core/java/android/provider/SearchIndexableResource.java
@@ -62,4 +62,17 @@
public SearchIndexableResource(Context context) {
super(context);
}
+
+ @Override
+ public String toString() {
+ final StringBuilder sb = new StringBuilder();
+ sb.append("SearchIndexableResource[");
+ sb.append(super.toString());
+ sb.append(", ");
+ sb.append("xmlResId: ");
+ sb.append(xmlResId);
+ sb.append("]");
+
+ return sb.toString();
+ }
}
\ No newline at end of file