summaryrefslogtreecommitdiff
path: root/packages/Shell/tests
diff options
context:
space:
mode:
authorAbhijeet Kaur <abkaur@google.com>2019-10-09 15:10:35 +0100
committerAbhijeet Kaur <abkaur@google.com>2019-10-22 12:26:23 +0100
commit72be2e113e052e13cf214f1b4bbd16702a16e1e5 (patch)
treed1ff07e51cfa6063998d8bf29fa9cc80c8e6603b /packages/Shell/tests
parentf6fb7063a4578be4407408ee791b7b63de4caf62 (diff)
Remove unused broadcasts/functions/variables from Shell
Bugreport is now triggered using API and not via broadcasts from dumpstate. As migration to API flow is stable, we can remove methods and broadcasts that were used in non-API bugreport flow. Now, callbacks are used for communication between dumpsate and Shell instead of broadcasts. * Remove BugreportReceiver.java as it used to handle BUGREPORT_STARTED and BUGREPORT_FINISHED intents which are not required by Shell anymore to track bugreports. * Remove RemoteBugreportReceiver.java as it used to handle REMOTE_BUGREPORT_FINISHED intent which is not required by Shell anymore. * Remove methods that were being used when processing these broadcasts. * Remove pid as that is not used anymore. * Since Shell owns the file now, don't need mTempName, mSavedName, onFocusListener and disable file name after the bugreport is finished. File name can be sanitized and updated even after bugreport finished. Bug: 136066578 Test: Build and flash. Interactive/Full bugreports from Settings/Power button. Test: Rename workflow for interactive bugreports works as expected. Test: * Build and flash * Install TestDPC * Make it device owner * Take a remote bugreport. Works as expected Change-Id: I5e0f829631cb63074c41c914236e78abe95ba162
Diffstat (limited to 'packages/Shell/tests')
-rw-r--r--packages/Shell/tests/src/com/android/shell/BugreportReceiverTest.java6
1 files changed, 4 insertions, 2 deletions
diff --git a/packages/Shell/tests/src/com/android/shell/BugreportReceiverTest.java b/packages/Shell/tests/src/com/android/shell/BugreportReceiverTest.java
index 3a71632cf1ca..bb298e937fbb 100644
--- a/packages/Shell/tests/src/com/android/shell/BugreportReceiverTest.java
+++ b/packages/Shell/tests/src/com/android/shell/BugreportReceiverTest.java
@@ -29,10 +29,8 @@ import static com.android.shell.BugreportProgressService.EXTRA_BUGREPORT;
import static com.android.shell.BugreportProgressService.EXTRA_ID;
import static com.android.shell.BugreportProgressService.EXTRA_MAX;
import static com.android.shell.BugreportProgressService.EXTRA_NAME;
-import static com.android.shell.BugreportProgressService.EXTRA_PID;
import static com.android.shell.BugreportProgressService.EXTRA_SCREENSHOT;
import static com.android.shell.BugreportProgressService.INTENT_BUGREPORT_FINISHED;
-import static com.android.shell.BugreportProgressService.INTENT_BUGREPORT_STARTED;
import static com.android.shell.BugreportProgressService.SCREENSHOT_DELAY_SECONDS;
import static org.junit.Assert.assertEquals;
@@ -145,6 +143,10 @@ public class BugreportReceiverTest {
private static final String TITLE2 = "Master of the Universe";
private static final String DESCRIPTION = "One's description...";
private static final String DESCRIPTION2 = "...is another's treasure.";
+ // TODO(b/143130523): Fix (update) tests and add to presubmit
+ private static final String EXTRA_PID = "android.intent.extra.PID";
+ private static final String INTENT_BUGREPORT_STARTED =
+ "com.android.internal.intent.action.BUGREPORT_STARTED";
private static final String NO_DESCRIPTION = null;
private static final String NO_NAME = null;