Update the configurations via ActivityTaskManager to prevent the
activities being relaunched while in background. Instead, the
activities will be relaunched after brought to front and being visible.
This also prevents all activities in the system being relaunched
at the same time.
Bug: 185301309
Test: update app info via shell command while activity in background
Change-Id: Ibf93b9e3f203578c25e0b6b50494065938790f24
Previous CLs had started passing AttributionSource values across
Binder calls inside BluetoothDevice instances, but this can cause
confuse the permission check logic in the future; we should instead
always aim to use the AttributionSource closest to the app making
the call, instead of parceling it.
This change also improves logging to highlight when we're quietly
treating a permission as denied, and when a UID is mismatched.
Bug: 186106084
Test: atest BluetoothInstrumentationTests
Change-Id: I5d3fdb3c573cb9e77474952d8680caa4c4c464eb
Also moves the #initNotificationIconArea call to be within
CollapsedStatusBarFragment, rather than requiring StatusBar to call it.
This makes our unit tests better because now we don't need to call it
manually.
Also fix a bug in #onDozingChanged that was passing disabled1 in for
disabled2.
Test: atest and manual
Bug: 183229367
Fixes: 185897059
Change-Id: I0a65f9e90e66680f0b602b89f89ec0a4900e9df8
Add an overloaded version of Context.sendBroadcastMultiplePermissions() that can
specify BroadcastOptions, it is called by com.android.bluetooth package.
Bug: 182816627
Test: atest AdapterServiceTest
Test: atest AvrcpControllerStateMachineTest
Test: atest BondStateMachineTest
Test: atest MapClientStateMachineTest
Test: atest RemoteDevicesTest
Change-Id: I8bb2d2ed98ece70ebbe9d3a1b549b966d690de4f
* setKeyGrantForApp and setKeyGrantToWifiAuth
should be guarded with the
DELEGATION_CERT_SELECTION instead of
DELEGATION_CERT_INSTALL
* Update DPM docs
Bug: 178598508
Test: atest com.android.server.devicepolicy.DevicePolicyManagerTest
atest com.android.cts.devicepolicy.MixedDeviceOwnerTest#testDelegation
atest com.android.cts.devicepolicy.MixedDeviceOwnerTest#testDelegationCertSelection
atest com.android.cts.devicepolicy.MixedDeviceOwnerTest#testDelegatedCertInstallerDirectly
Change-Id: Ia47c1e1b360d8e60d6a2e56a7b449f3113d40352
A ClassNotFoundException is thrown when an application starts a
service defined in the isolated split. This cl uses the class loader
of the split to load the class of the service. It also updates the
correct split context to the service.
Bug: 169196314
Test: atest ClassloaderSplitsTest
Change-Id: If52ecb6065cdc6b0e3f2c163996df90c85a00958
Also change boolean parameters to bitwise flags to clean up the
signature. Fixed the unit test in RunningTasksTest because it didn't
set up the test correctly.
Bug: 185492118
Test: atest RunningTasksTest
Change-Id: Id6771c48de2e219acd998b39f82a71ed6e0c59a2
Sometimes it's important that the system create PendingIntents that are
owned by their target app, rather than by the system itself. Make that
possible, and use them in the Notification auto-grouping mechanism.
This makes the auto group Notification's undering PendingIntent how has
the same capabilities as the app whose notifications it elides, rather
than having the system's own capabilities.
Along the way, build the PendingIntent mutability-check exception string
only when it's going to be used, not every time any PendingIntent is
created.
Bug: 174243774
Test: atest CtsAppTestCases:PendingIntentTest
Test: atest CtsAppTestCases:NotificationManagerTest
Test: atest NotificationManagerServiceTest
Change-Id: I5ec03706bc439d305b0093a1ee9c5d381024029c
IACC#activityTopResumedStateLost was reported to ATMS later than
IACC#activityPaused sometimes because one is one-way binder call
while the other one is two-way binder.
Also make IACC#activityTopResumedStateLost a two-way binder
Bug: 185810414
Test: atest ActivityLifecycleTests
Change-Id: Ib87de693f5ebcfd836208924aa8fc2a035ca7c82
Problem:
RenderThread blocked during dumping gfx info.
Root Cause:
Though dumpGfxInfo() uses an async binder invocation ,When the caller is system server, this invocation is not IPC that means it is not asynchronous, it will keep waiting if dumpGfxinfo output size larger than 16*4KB as reader thread start by transferpipe.go cannot be executed because write pipe waiting. Ensure this invocation is asynchronous to prevent writer waiting if buffer cannot be consumed.
Solution:
Send write action to handler thread so reader thread can be started to consume the data in buffer.
Fix: 185806813
Test: dumpsys gfxinfo
Change-Id: I37b1c1881a857970019eddfb762ae620e0353744
permissions.
1. Create a generic FgsTempAllowList class, mFgsStartTempAllowList and
mFgsWhileInUseTempAllowList are instantiated from FgsTempAllowList.
2. For mFgsWhileInUseTempAllowList, the uid on this list is allowed to
have while-in-use permission when the FGS is started from background for
a duration of time.
3. When media button is pressed, the targetUid is added to
mFgsWhileInUseTempAllowList, for the duration of 10 seconds, this way the
targetUid can start FGS from background and have while-in-use permission.
4. When checking for ProcessRecord.
mAllowBackgroundActivityStartsTokens, it is the caller app's
ProcessRecord should be checked instead of the service's ProcessRecord.
Bug: 182481312
Test: use b/167998084 reproduce steps, make a voip call, the
receiver side screen is unlocked, the receiver side uses bluetooth
headset button to pick up the call, "dumpsys activity -a" shows the FGS
has "allowWhileInUsePermissionInFgs=true" and "isForeground=true".
Change-Id: Ic80aefe4202fe2210881bb8eea24b6e34cb1e7d0
This is already used for similar events such as icon drops and user taps. Using it to indicate that the user has woken/slept the device (and passing along location information) makes sense!
This was previously rolled back since WallpaperManager can be null in Car environments. This CL now checks if WallpaperManager is null.
Bug: 169693662
Test: locally with modified wallpaper, it receives events
Change-Id: Ie9d21b4ff4a1edf871540481bc0c4216ed686b7f