From 0c6603973ad136a3e730d0fb8c571d9468db2f6c Mon Sep 17 00:00:00 2001 From: Jing Ji Date: Tue, 7 Dec 2021 14:51:43 -0800 Subject: Post notification on abusive background current drain Tapping on the notification will bring up the individual abusive app's battery settings page. It won't be re-posted after being dismissed until next day, in order to avoid from spamming the user. Bug: 200326767 Bug: 203105544 Test: FrameworksMockingServicesTests:BackgroundRestrictionTest Test: Manual - adb shell am set-bg-abusive-uids & verify notification Change-Id: I0b30014d748863c66c3845b5f310948a9493e302 --- proto/src/system_messages.proto | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'proto/src') diff --git a/proto/src/system_messages.proto b/proto/src/system_messages.proto index 196c6aaa7fcb..e89dda90a2dd 100644 --- a/proto/src/system_messages.proto +++ b/proto/src/system_messages.proto @@ -362,5 +362,11 @@ message SystemMessage { // Notify the user that some accessibility service has view and control permissions. // package: android NOTE_A11Y_VIEW_AND_CONTROL_ACCESS = 1005; + + // Notify the user an abusive background app has been detected. + // Package: android + // Note: this is a base ID, multiple notifications will be posted for each + // abusive apps, with notification ID based off this ID. + NOTE_ABUSIVE_BG_APPS_BASE = 0xc1b2508; // 203105544 } } -- cgit v1.2.3-59-g8ed1b