Add a new permission "RUN_LONG_JOBS" for apps which lets them schedule
long running jobs.
Since this will be a "normal|appop" permission, add the AppOps logic as
well.
Bug: 255038128
Test: build/manual
Change-Id: I27637f2a502bbd615df2d6fb0e558bece60ddaf0
* changes:
Apply negative delay to "urgent" broadcasts.
Deliver handful of system broadcasts as unordered.
BroadcastQueue: more misc fixes before dogfooding.
Several existing broadcasts are being sent as ordered simply to
receive a "resultTo" signal when dispatch is finished. This was
reasonable in the legacy stack, since only one receiver was
dispatched at a time, but the modern stack can dispatch to multiple
receivers in parallel.
This change updates BOOT, SCREEN, and PACKAGE broadcasts to pivot
to this new approach when the modern queue is enabled; we retain
the previous ordered behavior when the legacy queue is being used.
Bug: 253226131
Test: atest FrameworksMockingServicesTests:BroadcastRecordTest
Test: atest FrameworksMockingServicesTests:BroadcastQueueTest
Test: atest FrameworksMockingServicesTests:BroadcastQueueModernImplTest
Change-Id: I81299b9ec6f509f5b73dfe9484aca12794eb3868
New AppOp to be used for near-field file-based audio transfer
(ie. TV Remote Service) to allow audio recording
regardless of sensor privacy state, because it is considered
an intentional user interaction: hold-to-talk
And new Global Settings and SensorPrivacyManager APIs for the
opt-out toggle - as agreed with PWG.
Bug: 235618473
Test: manual
Change-Id: I95cdf8fa362b937609bdf834a82b05ec8375ac26
A subsequent change will actually move the files to the other git
project.
Bug: 243194720
Test: presubmit
Change-Id: If126bb68f74852528c4da8df79831b49b5129983
To update locale, it doesn't need a full configuration because
system only applied the diff of config from non-undefined fields.
IActivityManager#getConfiguration actually gets the configuration
according to the pid, which is process configuration. And process
configuration can be overridden by the activity running in its
process. So the returned value shouldn't be used to update the
system persistent configuration.
Therefore it is enough to use a new Configuration instance with
setting the necessary fields. This is also more efficient that
saves a binder call to system.
Bug: 253386061
Test: atest LocaleManagerTests
Change-Id: Icdce437fcf1a3bef0562cfc4dd5ad3ba52ea08ef
- Fix method incorrectly marked test
- Fix access to non-@hide methods
- Fix a logic error in Notification.java
- Move the 'core' notification test that were in the services suite to
the 'core' suite
Test: atest NotificationTest
Fixes: 254459150
Change-Id: Ib2793badb6b0616097bb837d7fd2c7504a43e186
(cherry picked from commit a4d04b1534)
- Fix method incorrectly marked test
- Fix access to non-@hide methods
- Fix a logic error in Notification.java
- Move the 'core' notification test that were in the services suite to
the 'core' suite
Test: atest NotificationTest
Fixes: 254459150
Change-Id: Ib2793badb6b0616097bb837d7fd2c7504a43e186
Add class definition for BackupRestoreEventLogger which will be used to
allow BackupAgent implementations to report B&R-related events.
Implementation will follow.
Bug: 252762060
Test: m-j
Change-Id: Ib988e99863e46b03a48a0d35f4960870952b8613
This allows the framework to ask for a monitor to use for backups that
are initiated by the framework (i.e. scheduled backups). Previously
the only way to pass a monitor in was through the
BackupManager#requestBackup API.
I also moved BackupManagerMonitorWrapper to a separate class now that
it's shared by three different classes.
Bug: 252763821
Test: atest CtsBackupHostTestCases
Also manually by implementing a simple monitor inside LocalTransport
and calling the new getBackupManagerMonitor.
Change-Id: I84d56a3e80d6c94f9a327f7d71876d1bc27fe5ac
While sending the broadcast, sender can specify
what delivery group the broadcast belongs to and
how it should be treated if there are already
broadcasts in the same delivery group waiting to
be delivered.
Bug: 249160234
Test: atest FrameworksMockingServicesTests:BroadcastQueueTest
Test: atest FrameworksMockingServicesTests:BroadcastQueueModernImplTest
Change-Id: Ie6e8164ff37ec5501482adc9419959cc7e149d90
User-interactive event flow and broadcast priority classes both suffer
from priority inversion issues with strict FIFO dispatch policy:
existing queued deliveries might require significant time to complete
dispatch, with the resulting delivery latency of the interactive or
foreground-priority messages leading to poor user experience. To
address this issue, we introduce urgency-base queueing policy, with
"urgent" broadcasts placed ahead of ordinary ones in the recipients'
pending queues. A broadcast is currently considered urgent when:
* the sender has marked it FLAG_RECEIVER_FOREGROUND, or
* the sender has marked it as "interactive", or
* the broadcast was issued by an alarm triggering
AND
* the broadcast is only going to a single receiver
That final restriction prevents certain kinds of interference with
ordered broadcast delivery and completion semantics.
"interactive" is a new BroadcastOption applied when the broadcast
issuance is in response to a direct user interaction, i.e. when
timeliness of delivery is directly perceived as a responsiveness issue
by the user. The canonical example of this is notification
interactions, though perhaps the concept might usefully be applied to
scenarios such as high-priority push message delivery. For now its use
is restricted to system-internal callers.
Finite capacity for dispatch parallelism can currently cause priority
inversions even with the new queueing policy if all available running
slots are occupied with background-priority deliveries. Addressing
this will happen in a follow-on CL.
Bug: 251902289
Test: atest FrameworksMockingServicesTests:BroadcastQueueModernImplTest
Test: atest FrameworksMockingServicesTests:BroadcastQueueTest
Change-Id: I47813c2c6ca43559f39d701f104fa62527c7bc21
* changes:
Merge "Add a flag to enable independent lock screen live wallpaper" into tm-qpr-dev am: cb69035ca9 am: 80c0576162
Merge "Lock screen live wallpaper: adds home/lock screen flag as argument." into tm-qpr-dev am: 0f8f2d726b am: e5e1aa95a5