diff options
| author | 2019-03-15 02:35:53 -0700 | |
|---|---|---|
| committer | 2019-03-15 02:35:53 -0700 | |
| commit | dd6817feb9d96241abca450d87f16bebb2d62bf7 (patch) | |
| tree | bcbb96f5a4aa19c6fb3ea2ae802f3db0e6511e86 /cmds/dumpstate/utils.cpp | |
| parent | 5cc4907f39b090bc7d7e4ec043db2cd1d0095fc9 (diff) | |
| parent | 97f1721bd49baa3dc39a88b74b03e6f870ad0055 (diff) | |
Merge "Handle user consent denial sooner" am: 62b3ec5981
am: 97f1721bd4
Change-Id: I9aa29c5c24c2f9a7f13bb3e53e7f43c2a1011205
Diffstat (limited to 'cmds/dumpstate/utils.cpp')
| -rw-r--r-- | cmds/dumpstate/utils.cpp | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/cmds/dumpstate/utils.cpp b/cmds/dumpstate/utils.cpp index 4efa99b59b..0bb80dcfba 100644 --- a/cmds/dumpstate/utils.cpp +++ b/cmds/dumpstate/utils.cpp @@ -280,6 +280,12 @@ static void __for_each_pid(void (*helper)(int, const char *, void *), const char if (header) printf("\n------ %s ------\n", header); while ((de = readdir(d))) { + if (ds.IsUserConsentDenied()) { + MYLOGE( + "Returning early because user denied consent to share bugreport with calling app."); + closedir(d); + return; + } int pid; int fd; char cmdpath[255]; @@ -352,6 +358,12 @@ static void for_each_tid_helper(int pid, const char *cmdline, void *arg) { func(pid, pid, cmdline); while ((de = readdir(d))) { + if (ds.IsUserConsentDenied()) { + MYLOGE( + "Returning early because user denied consent to share bugreport with calling app."); + closedir(d); + return; + } int tid; int fd; char commpath[255]; |