diff options
Diffstat (limited to 'packages/Shell/src')
-rw-r--r-- | packages/Shell/src/com/android/shell/BugreportProgressService.java | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/packages/Shell/src/com/android/shell/BugreportProgressService.java b/packages/Shell/src/com/android/shell/BugreportProgressService.java index 10c541600d87..89ebcd1b3fe6 100644 --- a/packages/Shell/src/com/android/shell/BugreportProgressService.java +++ b/packages/Shell/src/com/android/shell/BugreportProgressService.java @@ -1102,7 +1102,14 @@ public class BugreportProgressService extends Service { preferredDomain = "@" + preferredDomain; } - final Account[] accounts = am.getAccounts(); + final Account[] accounts; + try { + accounts = am.getAccounts(); + } catch (RuntimeException e) { + Log.e(TAG, "Could not get accounts for preferred domain " + preferredDomain, e); + return null; + } + if (DEBUG) Log.d(TAG, "Number of accounts: " + accounts.length); Account foundAccount = null; for (Account account : accounts) { if (Patterns.EMAIL_ADDRESS.matcher(account.name).matches()) { |