RESTRICT AUTOMERGE Merge multiple requests by an app in the same task upwards (t)

Merge older dialogs into newer ones, if an app makes multiple requests.

(NOTE: this is a cherry-pick of of a change originally authored by
ntmyren, with merge conflicts resolved.)

LOW_COVERAGE_REASON=b/347361219
Bug: 313909156
Test: atest PermissionTest23#testAppCanOnlyShowOneDialog
DISABLE_TOPIC_PROTECTOR
(cherry picked from commit 6edd098221133ffa0cd1e930b5c9aa593224313e)
(cherry picked from commit 3221a7d15d9a04e77286c5ec7c4a0704b046eb6f)
(cherry picked from https://googleplex-android-review.googlesource.com/q/commit:8ea13c4052d2f7564e808684f3ca04bc7c0407fa)
Merged-In: I465829b05632a9b5061f8bbec6a47edace631007
Change-Id: I465829b05632a9b5061f8bbec6a47edace631007
1 file changed