From b7ac0ad3c76c16f95289176bbb6bbd608bfb7573 Mon Sep 17 00:00:00 2001 From: Jan Tomljanovic Date: Fri, 12 Mar 2021 16:17:21 +0000 Subject: [PATCH] Add permission for avoiding toast rate limiting. I've decided to use a new permission since it needs to be added to the settings app, which doesn't have INTERNAL_SYSTEM_WINDOW permission, so I didn't want to add it as it may enable it to do some other things it's not supposed to do. Bug: 182448615 Test: atest android.widget.cts.ToastTest as regression test Test: atest NotificationManagerServiceTest Change-Id: I6adc84856f1fe9c33e0ad8470e7248a20587a1e9 --- core/res/AndroidManifest.xml | 8 +++ packages/Shell/AndroidManifest.xml | 3 + .../NotificationManagerService.java | 18 ++++- .../NotificationManagerServiceTest.java | 70 ++++++++++++++++++- 4 files changed, 95 insertions(+), 4 deletions(-) diff --git a/core/res/AndroidManifest.xml b/core/res/AndroidManifest.xml index 29d5e7bbfcd13..692a3d25b0431 100644 --- a/core/res/AndroidManifest.xml +++ b/core/res/AndroidManifest.xml @@ -3447,6 +3447,14 @@ + + + + + + +