diff options
author | Felipe Leme <felipeal@google.com> | 2016-04-25 13:36:44 -0700 |
---|---|---|
committer | Felipe Leme <felipeal@google.com> | 2016-04-25 13:41:28 -0700 |
commit | af096719c0e45a2b7d67e9267b40cffdc16f441a (patch) | |
tree | 697e14fa812892c0624ed59c6ef33d8f7dc9afa7 /packages/Shell/tests | |
parent | cda50893b623f19834114eb225d78fceb70b8aca (diff) |
Don't opt-out of warning dialog by default on user builds.
BUG: 28341946
Change-Id: I9ce6bf52a02a14055d4ded41aac50c79abdb4ee9
Diffstat (limited to 'packages/Shell/tests')
-rw-r--r-- | packages/Shell/tests/src/com/android/shell/BugreportReceiverTest.java | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/packages/Shell/tests/src/com/android/shell/BugreportReceiverTest.java b/packages/Shell/tests/src/com/android/shell/BugreportReceiverTest.java index 07c154645e44..44e956abeb02 100644 --- a/packages/Shell/tests/src/com/android/shell/BugreportReceiverTest.java +++ b/packages/Shell/tests/src/com/android/shell/BugreportReceiverTest.java @@ -63,6 +63,7 @@ import android.app.NotificationManager; import android.content.Context; import android.content.Intent; import android.net.Uri; +import android.os.Build; import android.os.Bundle; import android.os.SystemProperties; import android.service.notification.StatusBarNotification; @@ -517,7 +518,14 @@ public class BugreportReceiverTest extends InstrumentationTestCase { mUiBot.getVisibleObject(mContext.getString(R.string.bugreport_confirm_dont_repeat)); final boolean firstTime = propertyState == null || propertyState == STATE_UNKNOWN; if (firstTime) { - assertTrue("Checkbox should be checked by default", dontShowAgain.isChecked()); + if (Build.TYPE.equals("user")) { + assertFalse("Checkbox should NOT be checked by default on user builds", + dontShowAgain.isChecked()); + mUiBot.click(dontShowAgain, "dont-show-again"); + } else { + assertTrue("Checkbox should be checked by default on build type " + Build.TYPE, + dontShowAgain.isChecked()); + } } else { assertFalse("Checkbox should not be checked", dontShowAgain.isChecked()); mUiBot.click(dontShowAgain, "dont-show-again"); |