Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(3955)

Unified Diff: chrome/android/java/src/org/chromium/chrome/browser/help/HelpAndFeedback.java

Issue 2897323002: VR feedback reports should go directly to the Feedback activity (Closed)
Patch Set: apply nits Created 3 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/android/java/src/org/chromium/chrome/browser/help/HelpAndFeedback.java
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/help/HelpAndFeedback.java b/chrome/android/java/src/org/chromium/chrome/browser/help/HelpAndFeedback.java
index e2469cc00ca57e79476ff4afa1f3cb23233197b5..c5601dbf8943dc37354efebedc8ae63ac97e6f78 100644
--- a/chrome/android/java/src/org/chromium/chrome/browser/help/HelpAndFeedback.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/help/HelpAndFeedback.java
@@ -62,6 +62,18 @@ public class HelpAndFeedback {
}
/**
+ * Starts an activity prompting the user to enter feedback.
+ *
+ * @param activity The activity to use for starting the feedback activity and to take a
+ * screenshot of.
+ * @param collector the {@link FeedbackCollector} to use for extra data. Must not be null.
+ */
+ protected void showFeedback(Activity activity, @Nonnull FeedbackCollector collector) {
+ Log.d(TAG, "Feedback data: " + collector.getBundle());
+ launchFallbackSupportUri(activity);
+ }
+
+ /**
* Starts an activity showing a help page for the specified context ID.
*
* @param activity The activity to use for starting the help activity and to take a
@@ -73,12 +85,36 @@ public class HelpAndFeedback {
*/
public void show(final Activity activity, final String helpContext, Profile profile,
@Nullable String url) {
- FeedbackCollector.create(activity, profile, url, new FeedbackCollector.FeedbackResult() {
- @Override
- public void onResult(FeedbackCollector collector) {
- show(activity, helpContext, collector);
- }
- });
+ FeedbackCollector.create(activity, profile, url, true /* takeScreenshot */,
+ new FeedbackCollector.FeedbackResult() {
+ @Override
+ public void onResult(FeedbackCollector collector) {
+ show(activity, helpContext, collector);
+ }
+ });
+ }
+
+ /**
+ * Starts an activity prompting the user to enter feedback.
+ *
+ * @param activity The activity to use for starting the feedback activity and to take a
+ * screenshot of.
+ * @param profile the current profile.
+ * @param url the current URL. May be null.
+ * @param categoryTag The category that this feedback report falls under.
+ */
+ public void showFeedback(final Activity activity, Profile profile, @Nullable String url,
+ @Nullable final String categoryTag) {
+ FeedbackCollector.create(activity, profile, url, false /* takeScreenshot */,
+ new FeedbackCollector.FeedbackResult() {
+ @Override
+ public void onResult(FeedbackCollector collector) {
+ if (categoryTag != null) {
+ collector.setCategoryTag(categoryTag);
+ }
+ showFeedback(activity, collector);
+ }
+ });
}
/**

Powered by Google App Engine
This is Rietveld 408576698