* changes:
Add IGameModeListener and methods to add/remove in GameManagerService
Disallow setting UNSUPPORTED mode to avoid ambiguity
Always return STANDARD & CUSTOM game modes as available modes
Senders can specify an IntentFilter object that should match
against another broadcast intent to be considered in the same
delivery group.
Bug: 249160234
Test: atest services/tests/mockingservicestests/src/com/android/server/am/BroadcastRecordTest.java
Test: atest services/tests/mockingservicestests/src/com/android/server/am/BroadcastQueueModernImplTest.java
Test: atest tests/app/src/android/app/cts/BroadcastOptionsTest.java
Test: atest tests/tests/content/src/android/content/cts/IntentFilterTest.java
Change-Id: I36f1e3ffab8e30371a9968cb23c7b345c3301682
We use:
- PROCESS_STATE_IMPORTANT_FOREGROUND
- ProcessList.PERCEPTIBLE_MEDIUM_APP_ADJ + 1
- Oom-adj will be PERCEPTIBLE_RECENT_FOREGROUND_APP_ADJ + 1
for the first N seconds when started from TOP.
The "+1" is so we can tell apart short-FGS from regular FGS and EJ.
Also, we slightly the oom-adj for EJ -- +2 to the original values -- so
we can tell them apart from FGS / short-FGS.
- Other restrictions of short-FGS aren't implemented yet.
Test: atest FrameworksServicesTests:OomAdjusterTests MockingOomAdjusterTests
Test: Manual test using the test app, monitoring `dumpsys activity processes| grep PACKAGE`
... First N seconds after started from TOP:
```
Proc # 1: fg +51 F/S/IMPF ---N t: 0 8851:com.google.omakoto.testapp/u0a252 (fg-service-short-act)
```
After that:
```
Proc # 1: prcm + 1 R/S/IMPF ---N t: 0 8851:com.google.omakoto.testapp/u0a252 (fg-service-short)
```
Bug: 257270313
Change-Id: I75e9295fd34871a70f6a5db23d701601c1b12622
In this change B&R tasks ask for logs from each BackupAgent after it is
backed up or restored. These logs are then immediately passed on to the
BackupManagerMonitor.
Bug: 252760247
Change-Id: Iaf43ce61e98bb4b42c05c18a46031a06d41abb12
Test: $ atest BackupFrameworksServicesRoboTests:KeyValueBackupTaskTest
$ atest BackupManagerMonitorUtilsTest
Unfortunately, the other classes are not unit testable.
For manual testing, I implemented some fake loggers for various
BackupAgents, passed in a fake BackupManagerMonitor, ran B&R with the
following commands, and observed that the monitor received the logs.
1. $ adb shell bmgr backupnow --all
2. $ adb shell bmgr restore ... (for one KV and one FullBackup package)
The following features are no longer used.
- Stop FGS associated with a given notification channel.
- "Dungeon" notification, which is a system notification showing
"hidden" FGSs.
Test: build
Change-Id: Ic33ee2813bb09b769f7c2b6b432cc761982f2dad
In this CL we:
1) Create the logger when the agent is created.
2) Add getBackupRestoreEventLogger for agent implementations to retrieve
it to log their metrics.
3) Add a method to IBackupAgent for the framework to query the results
of the agent's logging once the agent is done with a B&R session.
This also requires for the results to be Parcelable.
Bug:252760247
Test: atest BackupRestoreEventLoggerTest.java
atest BackupAgentTest.java
Change-Id: I4b4483574f604aff8350e9ddef685f27458e9091
Some parts of the system interact with PendingIntent options via
ActivityOptions even when the underlying PendingIntent might be a
broadcast, so we need accommodate that pattern.
Bug: 254290593
Test: atest FrameworksMockingServicesTests:BroadcastQueueModernImplTest
Test: atest FrameworksMockingServicesTests:BroadcastQueueTest
Test: atest android.app.activity.BroadcastTest#testBroadcastOption_interactive
Change-Id: Ia1e5e2c337d9a4fe557202e794cae23dfa64911b