Commit Graph

19307 Commits

Author SHA1 Message Date
Sally Yuen
352aab514d Merge "Add API for setting a content description for BigPictureStyle's picture" 2020-11-03 17:29:29 +00:00
Tobias Thierer
a6bccfc44f Merge changes I58e5d2a0,I59693819
* changes:
  BackupManagerService: Make new behavior conditional on ChangeId.
  Enforce BACKUP permission on Service end.
2020-11-03 14:52:31 +00:00
Chloris Kuo
2e4082e39b Merge changes from topic "Feedback-UnlockImportance"
* changes:
  Persist automatic setting in long press menu
  Reset notification channel importance
2020-11-03 14:07:45 +00:00
Tobias Thierer
7671f0d95c BackupManagerService: Make new behavior conditional on ChangeId.
Base CL ag/12885739 introduced unconditional enforcement of the BACKUP
permission for callers of BackupManagerService.isBackupServiceActive()
in the service, but dropped the enforcement on the app process side
(BackupManager).

This CL makes the behavior change conditional on a compat ChangeId.

Bug: 158482162
Test: Manually checked that an app similar to the code sample from
      http://b/158482162#comment1 can reproduce the behavior.
      This is true both before the base CL and after this CL, when
      the app targets an old SDK version (26).
Test: Checked that both (a) before this CL, (b) after this CL where
      the change is manually enabled for the app via the below commands,
      the app runs into a SecurityException instead:
$ adb shell am compat enable 158482162 com.example.tester
$ adb shell dumpsys platform_compat | grep 158482162
ChangeId(158482162; name=IS_BACKUP_SERVICE_ACTIVE_ENFORCE_PERMISSION_IN_SERVICE; enableSinceTargetSdk=31; packageOverrides={com.example.tester=true})

Change-Id: I58e5d2a0b438296137fd76720636c8fdce740ded
2020-11-03 11:08:11 +00:00
Joanne Chung
cf061c1f55 Merge "Allow voice recognition service to blame other apps access." 2020-11-03 06:31:31 +00:00
Chloris Kuo
c468bba15d Reset notification channel importance
Test: atest, manual test on device
Change-Id: I290ce116ede1538354e8444b76ec69de79e338f2
2020-11-03 05:32:07 +00:00
Tobias Thierer
b2ab2c414f Enforce BACKUP permission on Service end.
BackupManager runs in the client process, whereas BackupManagerService
runs in the system server process. Therefore, apps permissions need should
be enforced on the service side.

Bug: 158482162
Test: Manually checked that a sample app  encounters SecurityException
      after but not before this CL, when running code similar to the
      sample in http://b/158482162#comment1 to figure out whether
      isBackupServiceActive() for its own uid.
Change-Id: I59693819542a80a065a9c88373393b0ba0dbef65
2020-11-02 21:49:17 +00:00
Adam Wright
c0850b8e6d Merge "Remove maxTargetSdk from APIs used by backup" 2020-11-02 16:44:05 +00:00
Jerry Chang
38af94c821 Merge "Allow children task of created-by-organizer task to be organized" 2020-11-02 03:40:38 +00:00
Sally
ef5f38e77b Add API for setting a content description for BigPictureStyle's picture
BigPictureStyle allows devs to attach a big picture image to their
notifications. Since images can have content descriptions, allow devs
to add content descriptions to the big picture image for a11y

Bug: b/147295675
Test: atest NotificationManagerTest; created a notification and
tested with TalkBack

Change-Id: Ibdf9d67a7d9a8c3a60b2560c3be6dde93247b7ac
2020-11-01 23:15:14 +00:00
Tobias Thierer
64ef203430 Merge "Backup platform: Update OWNERS." am: 0be136593e am: 04af92eeba am: 6acfa90ddd am: e934630b7d
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1479959

Change-Id: I5aac33c47184c4a383c43d2e0cbe9a08d3946165
2020-10-31 02:30:37 +00:00
Tobias Thierer
e934630b7d Merge "Backup platform: Update OWNERS." am: 0be136593e am: 04af92eeba am: 6acfa90ddd
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1479959

Change-Id: I9538bd821e9468a01bcb50aed3a95718cf2ba135
2020-10-31 02:03:45 +00:00
Tobias Thierer
6acfa90ddd Merge "Backup platform: Update OWNERS." am: 0be136593e am: 04af92eeba
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1479959

Change-Id: I785a8988c233d9963460ace4c51d0111e70d4f3a
2020-10-31 01:52:51 +00:00
Tobias Thierer
0be136593e Merge "Backup platform: Update OWNERS." 2020-10-31 01:08:22 +00:00
Adam Wright
f2713a2aea Remove maxTargetSdk from APIs used by backup
The D2D backup process Source backup currently uses
FullBackup.backupToTar; restricting it breaks (at least) SMS transfer.
Remove the constraint, for now.

Bug: 172049974
Test: Automated backup test runs before submission
Change-Id: I67012521e57bb6cadd76bedea1d7415359f2aaf7
2020-10-30 18:22:25 +00:00
Neil Fuller
2b775b57f8 Merge "Fix minor code nits" 2020-10-30 10:34:33 +00:00
Joanne Chung
38f832d4f3 Allow voice recognition service to blame other apps access.
This is a workaround solution for Android R QPR2. We are not allowed
to change the API for QPR release. This is a special case that allows
the current voice recognizer to note proxy ops if it is also the
voice interactor. In S, we will define a new permission that designed
one as a trusted blamer and tie it to a role.

Bug: 17095434
Test: manual
Test: TreeHugger presubmit
Change-Id: I506bbeb95e622b99693dbf5a135c7961b7fd81c1
2020-10-30 15:06:35 +08:00
TreeHugger Robot
dcd4b786d7 Merge "Ensure non-resizeable tasks not in multi-window mode" 2020-10-30 03:20:14 +00:00
Eugene Susla
d915025779 Merge "Store user_set for notification listeners" 2020-10-29 23:37:12 +00:00
Benedict Wong
76062fa471 Merge "Add shell VcnManagementService" am: fa2c588ab5 am: 1ee8f22e8a am: e0eb89cf66 am: 3eda5ec4f9
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1456942

Change-Id: Ib6d081351c2440945d094e7e97433f1e91e1fa8b
2020-10-29 23:20:36 +00:00
Benedict Wong
3eda5ec4f9 Merge "Add shell VcnManagementService" am: fa2c588ab5 am: 1ee8f22e8a am: e0eb89cf66
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1456942

Change-Id: I774426130072afa26da857ee66b724f94b627cd7
2020-10-29 23:07:47 +00:00
Benedict Wong
e0eb89cf66 Merge "Add shell VcnManagementService" am: fa2c588ab5 am: 1ee8f22e8a
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1456942

Change-Id: I41d115e53d3b83c89695d860bca69d4f752a1e44
2020-10-29 22:37:57 +00:00
Tobias Thierer
e00178d61b Backup platform: Update OWNERS.
Strictly speaking other owners for SettingsProvider/test/...
should exist but there aren't any right now, so it's not
worth keeping a per-file rule since I don't think that
those can be combined with include.

Bug: 159055442
Test: Treehugger
Change-Id: I38c9c227e16c91f72ee0fc761670f82160e46ae2
2020-10-29 20:54:16 +00:00
Eugene Susla
13b96a67a1 Store user_set for notification listeners
Bug: 165951651
Test: atest android.app.cts.NotificationManagerTest#testGrantRevokeNotificationManagerApis_works
Change-Id: I69ec26d90b9e4c0e5836b19c695fa9ecb64d30d5
2020-10-29 13:39:54 -07:00
Neil Fuller
5066e850ee Fix minor code nits
Test: None
Change-Id: Ie5f18857a4ad9438cd1712e063179662d15b1c2e
2020-10-29 17:00:10 +00:00
Hongwei Wang
01c2bd141d Merge "Allow resource override on max number of actions in PiP" 2020-10-29 16:58:56 +00:00
Mathew Inwood
8e742f928e Add maxTargetSdk restriction to unused APIs.
These are APIs that have @UnsupportedAppUsage but for which we don't
have any evidence of them currently being used, so should be safe to
remove from the unsupported list.

This is a resubmit of ag/12929664 with some APIs excluded that caused
test failures; see bugs 171886397, 171888296, 171864568.

APIs excluded:
Landroid/bluetooth/le/ScanRecord;->parseFromBytes([B)Landroid/bluetooth/le/ScanRecord;
Landroid/os/Process;->myPpid()I
Landroid/os/SharedMemory;->getFd()I
Landroid/hardware/input/InputManager;->INJECT_INPUT_EVENT_MODE_WAIT_FOR_FINISH:I

Bug: 170729553
Test: Treehugger
Change-Id: I8285daa8530260251ecad6f3f38f98e263629ca7
2020-10-29 11:51:12 +00:00
Louis Chang
a086ae272c Ensure non-resizeable tasks not in multi-window mode
This CL refines e1fb953 to make sure a non-resizeable task with
undefined windowing mode won't be resolved in multi-window mode
even when its parent is.

Bug: 171672645
Test: atest TaskTests
Change-Id: I311f0f9bd9dbadaa134370faea8db937160ea44f
2020-10-29 18:20:32 +08:00
Jerry Chang
e6fc6a3c2a Allow children task of created-by-organizer task to be organized
Allows to organize direct child of root task created by organizer and
extends TaskInfo to reveal the parent task id.

To organize child task properly for each features, passes all child
task organizer events to the listener listening to its parent task if
feasible.

Fix: 169267298
Fix: 169266482
Test: atest WindowOrganizerTests
Test: atest SplitScreenTests
Test: atest PinnedStackTests
Test: atest WindowInsetPolicyTests
Test: atest WMShellUnitTests
Test: split screen works
Change-Id: I8e66f810c86fcdac3287adfa208d8e34786fc9b5
2020-10-29 16:20:19 +08:00
Hongwei Wang
286c33a5c5 Merge "Revert "Add maxTargetSdk restriction to unused APIs."" 2020-10-28 23:58:21 +00:00
Hongwei Wang
050275cd83 Revert "Add maxTargetSdk restriction to unused APIs."
This reverts commit 72f07d6a8a.

Reason for revert: Droidcop-triggered revert due to breakage https://android-build.googleplex.com/builds/quarterdeck?testMethod=testAppZygotePreload&testClass=android.app.cts.ServiceTest&atpConfigName=suite%2Ftest-mapping-presubmit-retry_cloud-tf&testModule=CtsAppTestCases&fkbb=6936597&lkbb=6936969&lkgb=6936551&testResults=true&branch=git_master&target=cf_x86_phone-userdebug>, bug b/171886397

Bug: 171886397
Change-Id: Ibe0f0430a3451477c1ee8ef56a596e91ea1e7672
2020-10-28 20:16:22 +00:00
Makoto Onuki
63dc619b21 Merge "Remove stale comments from PROCESS_STATE_BOUND_TOP" 2020-10-28 18:44:24 +00:00
Hongwei Wang
8bd88f8894 Allow resource override on max number of actions in PiP
Moved the query of max number of pip actions from
ActivityTaskManagerService to ActivityTaskManager.

Note that TaskInfo#pictureInPictureParams is exposed via
TaskInfo#getPictureInPictureParams (annotated as @TestApi).

Bug: 168800594
Test: atest PinnedStackTests#testMaxNumberOfActions \
            PinnedStackTests#testFillMaxAllowedActions \
            PinnedStackTests#testRejectExceededActions
Change-Id: Ibcf2302e3ec87909543a1d6da0b64fd4565a061c
2020-10-28 08:26:21 -07:00
Louis Chang
34a8fd02af Merge "Deprecate MANAGE_ACTIVITY_STACKS permission" 2020-10-28 13:33:14 +00:00
Antoan Angelov
6206a46b15 Merge "Revert "Revert "Add STATE_USER_PROFILE_FINALIZED as an additional user state""" 2020-10-28 12:23:32 +00:00
Mathew Inwood
ee5d369323 Merge "Add maxTargetSdk restriction to unused APIs." 2020-10-28 09:39:20 +00:00
Benedict Wong
e2dacc7411 Add shell VcnManagementService
This patch adds a shell of the VcnManagementService and VcnManager

Bug: 163431877
Test: Compiles, Boots
Change-Id: I1f3d8ab9c9bff7d419ea6d3edaae3b6b41b1d775
2020-10-27 20:09:06 -07:00
Louis Chang
5510ecdfa9 Deprecate MANAGE_ACTIVITY_STACKS permission
Adding MANAGE_ACTIVITY_TASKS permission as the replacement, but
still grant the deprecated MANAGE_ACTIVITY_STACKS permission for
app compatibility.

Bug: 157876448
Test: presubmit

Change-Id: I894ee66e058b1024a731d3be4b33b69626451f08
2020-10-28 09:20:00 +08:00
TreeHugger Robot
bd662afed9 Merge "Add a PendingIntent flag to mark unaudited PI mutability" 2020-10-27 20:03:18 +00:00
Treehugger Robot
e573aca07b Merge changes from topic "BackportUiAutomatorRetry" am: ff062f6e73 am: ed29b2da3c am: 0c6faf40fd
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1471402

Change-Id: I78fcebc34c06e43f607a566f2b3d2faa78f6520b
2020-10-27 18:58:45 +00:00
JW Wang
de9fa75444 Allow #disconnect to be called safely on connection timeout (2/n) am: 0c56d28a19 am: 68569ea618 am: 125259951c
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1470701

Change-Id: I45169e0e371bd0f110b3da9542dac9b618b91f21
2020-10-27 18:58:40 +00:00
JW Wang
bcbc7ddb17 Add #connectWithTimeout (1/n) am: 67c91c405c am: 4fba545a90 am: 167b921a80
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1470700

Change-Id: I090ce5e9fe80ad8d3ff7dae50e851c0fb7f38863
2020-10-27 18:58:29 +00:00
Treehugger Robot
0c6faf40fd Merge changes from topic "BackportUiAutomatorRetry" am: ff062f6e73 am: ed29b2da3c
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1471402

Change-Id: I57d108c24027a44fcadee9ee54c69df9696916c8
2020-10-27 18:47:13 +00:00
JW Wang
125259951c Allow #disconnect to be called safely on connection timeout (2/n) am: 0c56d28a19 am: 68569ea618
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1470701

Change-Id: I229063cf0f85a110a15c9aa4dd6ca013f1c06a96
2020-10-27 18:47:10 +00:00
JW Wang
167b921a80 Add #connectWithTimeout (1/n) am: 67c91c405c am: 4fba545a90
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1470700

Change-Id: Ib1d6e7967c63e1e3af632d1ca1760cba705f4a09
2020-10-27 18:47:05 +00:00
Ashwini Oruganti
44dea867b6 Add a PendingIntent flag to mark unaudited PI mutability
This change adds a FLAG_MUTABLE_UNAUDITED that is equal in value to
FLAG_MUTABLE but is intended to be used with PendingIntents that have
not yet been audited to be intentionally mutable/immutable. This will
help us update the tree to work with the enforced explicit mutability flag
requirement (go/immutable-pendingintents has more context).

This flag is marked as deprecated and we hope to remove it once all PIs
have been audited and use either FLAG_MUTABLE or FLAG_IMMUTABLE.
FLAG_MUTABLE_UNAUDITED should not be relied on long term, and any usage
is intended to be short term.

Bug: 160794467
Test: TH
Change-Id: I6a4f65d5364a611620b88e92c208aba7faaa13b8
2020-10-27 11:09:27 -07:00
TreeHugger Robot
1086c93f77 Merge "Removing taking unrelated locks from holdLock" 2020-10-27 17:46:12 +00:00
JW Wang
b5f26d897d Let #getUiAutomation return null if UiAutomation fails to connect (3/n)
Now #getUiAutomation returns null if the underlying UiAutomation fails
to connect for targetSdkVersion > R. This gives the caller a chance to
retry and decide when to give up.

Bug: 147785023
Test: presubmit
Change-Id: Ibf201fa042b80c067f2a0c3b0bde23adf9c60546
Merged-In: Ibf201fa042b80c067f2a0c3b0bde23adf9c60546
2020-10-27 16:32:19 +00:00
JW Wang
0c56d28a19 Allow #disconnect to be called safely on connection timeout (2/n)
Now #disconnect won't throw if the previous #connect failed due to
timeout. Note we also introduce generation id so we won't receive
notifications or modifications from the previous client to disrupt
UiAutomation's status when making the next connection.

Bug: 147785023
Test: m
Change-Id: Idf77207124494bd78770b8ea5d9ac4b1fd1a490a
Merged-In: Idf77207124494bd78770b8ea5d9ac4b1fd1a490a
2020-10-27 16:31:43 +00:00
Mathew Inwood
72f07d6a8a Add maxTargetSdk restriction to unused APIs.
These are APIs that have @UnsupportedAppUsage but for which we don't
have any evidence of them currently being used, so should be safe to
remove from the unsupported list.

Bug: 170729553
Test: Treehugger
Change-Id: I4c8fd0006f950de9955242e93968fb0996ceb372
2020-10-27 15:46:07 +00:00