sendbug improvements on email address handling

* use a property to indicate a preferred domain in case multiple
  email addresses are detected; otherwise just pick the first
  one that matches email address regex
* don't fire the intent if no email account is configured, there
  have been reports on confusing behavior when capturing
  bugreport for setup wizard

Bug: 6720467
Change-Id: Ib9b0b8a09e4e565b2531f3ec53723cd46186596f
merge in jb-mr1-release history after reset to jb-mr1-dev
Revert "sendbug improvements on email address handling"

This reverts commit 9ebc639a313d143ade1293cb5932b446d5e623d5.
merge in jb-mr1-release history after reset to jb-mr1-dev
merge in jb-mr1-release history after reset to jb-mr1-dev
merge in jb-mr1-release history after reset to jb-mr1-dev
Don't use intent chooser

Since it forces user to make selection, not offering an option to
remember the choice. Remove the new task flag, also adds an
explicit default category

Change-Id: I3834a8fa27782d14989e510c0756d36aaeeb2bab
merge in jb-mr1-release history after reset to jb-mr1-dev
Always read bugreports from EXTERNAL_STORAGE.

Bug: 7152673
Change-Id: Ibff4503ef21816bfe936eeba89183d1647c85043
Build bugreport paths for emulated storage.

Bug: 7152673
Change-Id: Iae7b298721d2b6690ce9b57245400702fb5d0c4c
merge in jb-mr1-release history after reset to jb-mr1-dev
merge in jb-mr1-release history after reset to jb-mr1-dev
merge in jb-mr1-release history after reset to jb-mr1-dev
merge in jb-mr1-release history after reset to jb-mr1-dev
merge in jb-mr1-factory-release history after reset to jb-mr1-dev
merge in jb-mr1-release history after reset to jb-mr1-dev
Reconcile with jb-mr1-factory-release jb-mr1-release - do not merge

Change-Id: I2a69ed763c7b5f29c060d52b41897abd27bc740d
Use updated stop supplicant API

Bug: 7227463
Change-Id: Ifecb256fed68c2046b77a5ce7a8c9f25c8e3fe62
make_ext4fs: fix dentry padding when dentry size is 4088 or 4092

When the total dentry size is N * 4096 - 4 or N * 4096 - 8, there is
not enough room in the block to insert an extra padding dentry.
Instead, switch to always padding the previous dentry out to the end
of the block, which matches what the kernel does when creating new
directory entries.

Also fix dentry_size to return the size of all the dentries
without the padding, the len + 8 padding is incorrect, and the
DIV_ROUND_UP will round up to the correct number of blocks.

Change-Id: If11f90e4ee172c135a0eae2a50b8be213e2dd0dc
make_ext4fs: fix dentry padding when dentry size is 4088 or 4092

When the total dentry size is N * 4096 - 4 or N * 4096 - 8, there is
not enough room in the block to insert an extra padding dentry.
Instead, switch to always padding the previous dentry out to the end
of the block, which matches what the kernel does when creating new
directory entries.

Also fix dentry_size to return the size of all the dentries
without the padding, the len + 8 padding is incorrect, and the
DIV_ROUND_UP will round up to the correct number of blocks.

Change-Id: If11f90e4ee172c135a0eae2a50b8be213e2dd0dc