Commit Graph

20640 Commits

Author SHA1 Message Date
Rhed Jao
bf53e16efd Merge "Fix a crash when starting a service in the isolated split" into sc-dev 2021-04-27 06:06:16 +00:00
Louis Chang
9caa70a8d3 Merge "Revert "Do not relaunch bg activities when application info changes"" into sc-dev 2021-04-27 02:23:11 +00:00
Louis Chang
24af61a988 Revert "Do not relaunch bg activities when application info changes"
This reverts commit 8b5afd93b6.

Reason for revert: b/186367826

Bug: 185301309
Change-Id: I7a68f1a32aff194d68af1c3ef55dc60ffbde5df9
2021-04-27 02:21:55 +00:00
Flavio Fiszman
bf0507b001 Merge "Handling group chat sender" into sc-dev 2021-04-26 17:01:12 +00:00
Alex Johnston
3f716ff7a2 Merge "Remove PasswordMetrics.validatePasswordMetrics isPin param" into sc-dev 2021-04-26 15:24:16 +00:00
Flavio Fiszman
47b06875bd Handling group chat sender
Change-Id: I4e4ff94e3452f3eb74bf8d7af2969e0ce2d3ac91
Test: manual and people/
Bug: 183084944
2021-04-26 14:43:35 +01:00
Louis Chang
d41d71e4f8 Merge "Do not relaunch bg activities when application info changes" into sc-dev 2021-04-26 01:19:44 +00:00
TreeHugger Robot
d1a2e3f3bc Merge "Add missing javadocs" into sc-dev 2021-04-23 19:07:41 +00:00
Flavio Fiszman
7852984973 Merge "Check if username is null" into sc-dev 2021-04-23 15:59:09 +00:00
Julia Reynolds
ccbfb05dd9 Add missing javadocs
Test: build
Fixes: 186211207
Change-Id: Ie7da3a9de4afd6eb8f7aeed7c588091be87409f5
2021-04-23 14:48:09 +00:00
Caitlin Cassidy
efaeb0c564 Merge "[Ongoing Call Chip] Don't show the chip on lockscreen." into sc-dev 2021-04-23 14:01:58 +00:00
Alex Johnston
ad5cac3115 Remove PasswordMetrics.validatePasswordMetrics isPin param
* Remove isPin parameter and use actualMetrics.credType,
  which now includes CREDENTIAL_TYPE_PIN

Bug: 184103377
Test: manual testing
      atest com.android.server.devicepolicy.DevicePolicyManagerTest
      atest com.android.cts.devicepolicy.ProfileOwnerTest
      atest com.android.cts.devicepolicy.MixedManagedProfileOwnerTest
      atest com.android.cts.devicepolicy.MixedManagedProfileOwnerTest
Change-Id: Ib79856b14981ef715c941e3cd56bd29ca196f3bb
2021-04-23 13:11:24 +01:00
Flavio Fiszman
249cef5cf5 Check if username is null
Change-Id: If5409e98f9e5a9bca4fea111af3a463bdf86324b
Test: manual
Bug: 185916268
2021-04-23 10:32:51 +01:00
Louis Chang
8b5afd93b6 Do not relaunch bg activities when application info changes
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
2021-04-23 14:34:38 +08:00
Hui Yu
9757955874 Merge "Temp allowlist bluetooth broadcast to start FGS for 10 seconds." into sc-dev 2021-04-22 23:41:30 +00:00
Jeff Sharkey
054fd43e2c Merge "Refinement of AttributionSource handling." into sc-dev 2021-04-22 20:43:14 +00:00
Garfield Tan
0ce27fdffe Merge "Add a method to obtain task info with intent extra" into sc-dev 2021-04-22 20:22:50 +00:00
Jeff Sharkey
67d4e1e079 Refinement of AttributionSource handling.
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
2021-04-22 12:46:06 -06:00
Caitlin Cassidy
eb457d50b7 [Ongoing Call Chip] Don't show the chip on lockscreen.
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
2021-04-22 15:18:12 +00:00
Alex Johnston
f2766e9043 Merge "setKeyGrantForApp DELEGATION_CERT_SELECTION" into sc-dev 2021-04-22 13:03:48 +00:00
Ruslan Tkhakokhov
2a4f590001 Merge "Add @IntDef for backup transport flags" into sc-dev 2021-04-22 12:22:42 +00:00
Chloris Kuo
c08e1a4eda Merge "NAS Setting Migration" into sc-dev 2021-04-22 00:23:25 +00:00
Hui Yu
8c23d658c7 Temp allowlist bluetooth broadcast to start FGS for 10 seconds.
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
2021-04-21 16:48:04 -07:00
TreeHugger Robot
6c0a479e62 Merge "Synthesize app PendingIntents rather than wrap them" into sc-dev 2021-04-21 22:41:22 +00:00
Alex Johnston
4c9f804133 setKeyGrantForApp DELEGATION_CERT_SELECTION
* 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
2021-04-21 17:04:12 +01:00
TreeHugger Robot
16472322f9 Merge "Pipe start op throught app ops policy and delegate" into sc-dev 2021-04-21 15:06:11 +00:00
Rhed Jao
e6bcbdcafa Fix a crash when starting a service in the isolated split
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
2021-04-21 16:44:37 +08:00
Mathew Inwood
f715fddd3c Merge "API changes as requested by API council." into sc-dev 2021-04-21 08:40:16 +00:00
Svet Ganov
8b1aad623e Pipe start op throught app ops policy and delegate
bug: 185504196

Test: atest CtsAppOpsTestCases
      atest CtsPermissionTestCases
      atest CtsPermission2TestCases
      atest CtsPermission3TestCases
      atest CtsPermission4TestCases
      atest CtsPermission5TestCases

Change-Id: I5869a3e9719830f59624519f2d54f0765119cf5f
2021-04-21 08:06:35 +00:00
Chloris Kuo
e67161b7b6 NAS Setting Migration
Cancel onboarding notification when user migrates from settings

Bug: 185428329
Test: atest NotificationManagerServiceTest, NotificationAssistantsTest
Change-Id: I24941e7e046d4b43978db11b9b58516aeaaf0ef3
2021-04-20 19:02:05 -07:00
Garfield Tan
4091a47400 Add a method to obtain task info with intent extra
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
2021-04-20 17:56:32 -07:00
Christopher Tate
e9030d39ad Synthesize app PendingIntents rather than wrap them
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
2021-04-20 18:34:56 +00:00
Ruslan Tkhakokhov
bc6a7d8e2d Add @IntDef for backup transport flags
This addresses the feedback from API council in b/183938013.

Fixes: 183938013
Test: m -j
Change-Id: I3ebf24053ce1ec6cdda60e4dc25ed92641f087fa
2021-04-20 19:14:50 +01:00
Ben Lin
6e6e6b5162 Merge "Add Activity#onPictureInPictureUiStateChanged and PictureInPictureUiState." into sc-dev 2021-04-20 17:45:38 +00:00
Hui Yu
fae5e14059 Merge "Allow FGS started from MediaButtonReceiver to have while-in-use permissions." into sc-dev 2021-04-20 17:04:09 +00:00
Shashwat Razdan
e7f4889beb Merge "Addressing the feedback received in the API review." into sc-dev 2021-04-20 16:01:42 +00:00
Jeff DeCew
eba7be7876 Merge "CallStyle actions have minimum width" into sc-dev 2021-04-20 13:46:14 +00:00
TreeHugger Robot
fd1ba27630 Merge "Avoiding system server dump stuck by pipe buffer full." into sc-dev 2021-04-20 09:16:00 +00:00
TreeHugger Robot
ae88ce7e0a Merge "Fix the ActivityLifecycleTests#testLocalRecreate flakiness" into sc-dev 2021-04-20 08:07:30 +00:00
Shashwat Razdan
8c63ca6581 Addressing the feedback received in the API review.
API Review bugs list is here: https://b.corp.google.com/issues?q=blockingid:176851064

Test: CTS tests:

Fixes:185226923
Fixes:185226755
Fixes:185226674
Fixes:185226597
Fixes:185226790
Fixes:184585058
Fixes:184585080
Fixes:184585117
Fixes:184585343
Fixes:184585079

Change-Id: Idacee5f95ce104d1fb6de40a04ac2b74691f977e
2021-04-20 08:06:25 +00:00
Louis Chang
f3ae7ab1ea Fix the ActivityLifecycleTests#testLocalRecreate flakiness
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
2021-04-20 13:55:50 +08:00
TreeHugger Robot
e354625105 Merge "Rename destSpecs to targetSpecs" into sc-dev 2021-04-20 01:21:06 +00:00
Tang Ding
8bbe093657 Avoiding system server dump stuck by pipe buffer full.
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
2021-04-19 15:46:38 -07:00
Tony Mak
b004404a72 Merge "Add some TestAPIs for replacing some @hide API usages in ExtServices's test" into sc-dev 2021-04-19 21:07:41 +00:00
Hui Yu
36429f87de Allow FGS started from MediaButtonReceiver to have while-in-use
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
2021-04-19 10:34:28 -07:00
TreeHugger Robot
0e47206b0a Merge "Use the existing wallpaper command API to send wake/sleep events to the wallpaper." into sc-dev 2021-04-19 15:50:33 +00:00
Mathew Inwood
c89513ac27 API changes as requested by API council.
Bug: 183512729
Test: m
Merged-In: Ie465c49ff02065e78a2e8e211a13350a0ff7f0a4
Change-Id: Ie465c49ff02065e78a2e8e211a13350a0ff7f0a4
2021-04-19 14:02:52 +00:00
Neil Fuller
05ccc44cb4 Merge "Add the ability to override time origin priorities" into sc-dev 2021-04-19 11:19:43 +00:00
Josh Tsuji
d5da89479e Use the existing wallpaper command API to send wake/sleep events to the wallpaper.
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
2021-04-18 23:12:02 -04:00
TreeHugger Robot
8d8d75af36 Merge "Revert "Use the existing wallpaper command API to send wake/sleep events to the wallpaper."" into sc-dev 2021-04-17 08:53:40 +00:00