diff options
author | Kenny Root <kroot@google.com> | 2012-01-24 09:20:19 -0800 |
---|---|---|
committer | Justin Ho <justinho@google.com> | 2012-01-24 15:34:29 -0800 |
commit | fa351ab265957fa8815df3c4ca1f3c105f253e8b (patch) | |
tree | 225061cfae8d9ce8b9d628a79d37f12c6b4e99fa | |
parent | b30136b7f51858db1a3272bf91801fe7faf16309 (diff) | |
download | extras-ics-mr1.tar.gz |
Only do bugreport on user build with ADB enabledandroid-cts-4.0.3_r2android-4.0.4_r2.1android-4.0.4_r2android-4.0.4_r1.2android-4.0.4_r1.1android-4.0.4_r1ics-mr1-releaseics-mr1
This makes it less likely that users that don't know what a bugreport is
will trigger it, but leaves the possibility for developers to trigger a
bugreport with a key combo.
Bug: 5866877
Change-Id: Ifc3c5126ec9342880a3635845a89c5a4a40156d2
-rwxr-xr-x | bugmailer/bugmailer.sh | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/bugmailer/bugmailer.sh b/bugmailer/bugmailer.sh index ba8eeb7b..93d1c8a4 100755 --- a/bugmailer/bugmailer.sh +++ b/bugmailer/bugmailer.sh @@ -1,5 +1,12 @@ #!/system/bin/sh +# Do not allow bugreports on user builds unless USB debugging +# is enabled. +if [ "x$(getprop ro.build.type)" = "xuser" -a \ + "x$(getprop init.svc.adbd)" != "xrunning" ]; then + exit 0 +fi + timestamp=`date +'%Y-%m-%d-%H-%M-%S'` storagePath="$EXTERNAL_STORAGE/bugreports" bugreport=$storagePath/bugreport-$timestamp |