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
This commit is contained in:
@@ -38,7 +38,6 @@ import com.android.internal.logging.MetricsProto.MetricsEvent;
|
|||||||
public class BugreportPreference extends CustomDialogPreference {
|
public class BugreportPreference extends CustomDialogPreference {
|
||||||
|
|
||||||
private static final String TAG = "BugreportPreference";
|
private static final String TAG = "BugreportPreference";
|
||||||
private static final int BUGREPORT_DELAY_SECONDS = 3;
|
|
||||||
|
|
||||||
private CheckedTextView mInteractiveTitle;
|
private CheckedTextView mInteractiveTitle;
|
||||||
private TextView mInteractiveSummary;
|
private TextView mInteractiveSummary;
|
||||||
@@ -91,23 +90,11 @@ public class BugreportPreference extends CustomDialogPreference {
|
|||||||
MetricsLogger.action(context, MetricsEvent.ACTION_BUGREPORT_FROM_SETTINGS_FULL);
|
MetricsLogger.action(context, MetricsEvent.ACTION_BUGREPORT_FROM_SETTINGS_FULL);
|
||||||
takeBugreport(ActivityManager.BUGREPORT_OPTION_FULL);
|
takeBugreport(ActivityManager.BUGREPORT_OPTION_FULL);
|
||||||
} else {
|
} else {
|
||||||
Log.v(TAG, "Taking interactive bugreport in " + BUGREPORT_DELAY_SECONDS + "s");
|
Log.v(TAG, "Taking interactive bugreport right away");
|
||||||
MetricsLogger.action(context,
|
MetricsLogger.action(context,
|
||||||
MetricsEvent.ACTION_BUGREPORT_FROM_SETTINGS_INTERACTIVE);
|
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);
|
takeBugreport(ActivityManager.BUGREPORT_OPTION_INTERACTIVE);
|
||||||
}
|
}
|
||||||
}, BUGREPORT_DELAY_SECONDS * DateUtils.SECOND_IN_MILLIS);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user