summaryrefslogtreecommitdiff
path: root/packages/Shell/src
diff options
context:
space:
mode:
authorFelipe Leme <felipeal@google.com>2016-08-03 11:51:00 -0700
committerFelipe Leme <felipeal@google.com>2016-08-03 16:09:35 -0700
commitca5002f6bde51c0dc80281a821650ab28f36b39c (patch)
tree7cb24395754553ecbbdc23a9a75d8253e699ce1d /packages/Shell/src
parenta4a100d206b63b7d689dd2ca45648a1ec24c20b7 (diff)
Fixed BugreportReceiverTest failures:
- testProgress_changeJustDetailsTouchingNotification was failing because the notification mechanism changed and now provides a way to expand and collapse the actions bar, and the test was collapsing it instead of opening the details dialog. It was fixed by tapping the notification content instead of the notification title. - Similarly, openProgressNotification() was refactored to use the bugreport name instead of id. - Uses getObject() (instead of getVisibleObject()) to get the activity from the intent chooser. - Removed the redundant call to back to dismiss the keyboard, which was causing some tests to fail due to an accessibility bug. - Retry a few times in case the bugreport name system property assertion fails, since the property is set by a background thread. - Improved how notifications are canceled. - Created a sleep() helper. Besides the test case improvements, it also removed a redundant call to setCancelable() in the main code. BUG: 30641229 BUG: 30639703 Change-Id: Icd79fada22d0b8e4be034068c3e9143ef0134eed
Diffstat (limited to 'packages/Shell/src')
-rw-r--r--packages/Shell/src/com/android/shell/BugreportProgressService.java3
1 files changed, 1 insertions, 2 deletions
diff --git a/packages/Shell/src/com/android/shell/BugreportProgressService.java b/packages/Shell/src/com/android/shell/BugreportProgressService.java
index 6d4461e665d0..a677ba54c05e 100644
--- a/packages/Shell/src/com/android/shell/BugreportProgressService.java
+++ b/packages/Shell/src/com/android/shell/BugreportProgressService.java
@@ -1455,7 +1455,7 @@ public class BugreportProgressService extends Service {
mDialog = new AlertDialog.Builder(context)
.setView(view)
.setTitle(dialogTitle)
- .setCancelable(false)
+ .setCancelable(true)
.setPositiveButton(context.getString(R.string.save),
null)
.setNegativeButton(context.getString(com.android.internal.R.string.cancel),
@@ -1474,7 +1474,6 @@ public class BugreportProgressService extends Service {
}
})
.create();
- mDialog.setCancelable(true);
mDialog.getWindow().setAttributes(
new WindowManager.LayoutParams(