From fce3e960fd0f932c3b3d186aa1e8b8c777b52a8a Mon Sep 17 00:00:00 2001 From: Felipe Leme Date: Wed, 21 Sep 2016 10:20:57 -0700 Subject: [PATCH] Remove delay from interactive bugreport. The delay was useful when the interactive bugreport took an initial screenshot, which is not the case anymore. BUG: 30429546 Test: manual Change-Id: I648db4e1acdea3aa89df9205148cac43880763be --- .../android/settings/BugreportPreference.java | 17 ++--------------- 1 file changed, 2 insertions(+), 15 deletions(-) diff --git a/src/com/android/settings/BugreportPreference.java b/src/com/android/settings/BugreportPreference.java index ace71c3a2f7..3aa3b75b4ec 100644 --- a/src/com/android/settings/BugreportPreference.java +++ b/src/com/android/settings/BugreportPreference.java @@ -38,7 +38,6 @@ import com.android.internal.logging.MetricsProto.MetricsEvent; public class BugreportPreference extends CustomDialogPreference { private static final String TAG = "BugreportPreference"; - private static final int BUGREPORT_DELAY_SECONDS = 3; private CheckedTextView mInteractiveTitle; private TextView mInteractiveSummary; @@ -91,22 +90,10 @@ public class BugreportPreference extends CustomDialogPreference { MetricsLogger.action(context, MetricsEvent.ACTION_BUGREPORT_FROM_SETTINGS_FULL); takeBugreport(ActivityManager.BUGREPORT_OPTION_FULL); } else { - Log.v(TAG, "Taking interactive bugreport in " + BUGREPORT_DELAY_SECONDS + "s"); + Log.v(TAG, "Taking interactive bugreport right away"); MetricsLogger.action(context, MetricsEvent.ACTION_BUGREPORT_FROM_SETTINGS_INTERACTIVE); - // Add a little delay before executing, to give the user a chance to close - // the Settings activity before it takes a screenshot. - final String msg = context.getResources() - .getQuantityString(com.android.internal.R.plurals.bugreport_countdown, - BUGREPORT_DELAY_SECONDS, BUGREPORT_DELAY_SECONDS); - Log.v(TAG, msg); - Toast.makeText(context, msg, Toast.LENGTH_SHORT).show(); - new Handler().postDelayed(new Runnable() { - @Override - public void run() { - takeBugreport(ActivityManager.BUGREPORT_OPTION_INTERACTIVE); - } - }, BUGREPORT_DELAY_SECONDS * DateUtils.SECOND_IN_MILLIS); + takeBugreport(ActivityManager.BUGREPORT_OPTION_INTERACTIVE); } } }